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;
98 char allocator; /* empty struct */
99 } basic_stringbuf_char;
102 basic_streambuf_wchar base;
107 char allocator; /* empty struct */
108 } basic_stringbuf_wchar;
112 basic_streambuf_char *strbuf;
113 struct _basic_ostream_char *stream;
119 basic_streambuf_wchar *strbuf;
120 struct _basic_ostream_wchar *stream;
124 typedef struct _basic_ostream_char {
126 /* virtual inheritance
127 * basic_ios_char basic_ios;
129 } basic_ostream_char;
131 typedef struct _basic_ostream_wchar {
133 /* virtual inheritance
134 * basic_ios_wchar basic_ios;
136 } basic_ostream_wchar;
141 /* virtual inheritance
142 * basic_ios_char basic_ios;
144 } basic_istream_char;
149 /* virtual inheritance
150 * basic_ios_wchar basic_ios;
152 } basic_istream_wchar;
155 basic_istream_char base1;
156 basic_ostream_char base2;
157 /* virtual inheritance
158 * basic_ios_char basic_ios;
160 } basic_iostream_char;
163 basic_istream_wchar base1;
164 basic_ostream_wchar base2;
165 /* virtual inheritance
166 * basic_ios_wchar basic_ios;
168 } basic_iostream_wchar;
171 basic_ostream_char base;
172 basic_filebuf_char filebuf;
173 /* virtual inheritance
174 * basic_ios_char basic_ios;
176 } basic_ofstream_char;
179 basic_ostream_wchar base;
180 basic_filebuf_wchar filebuf;
181 /* virtual inheritance
182 * basic_ios_wchar basic_ios;
184 } basic_ofstream_wchar;
187 basic_istream_char base;
188 basic_filebuf_char filebuf;
189 /* virtual inheritance
190 * basic_ios_char basic_ios;
192 } basic_ifstream_char;
195 basic_istream_wchar base;
196 basic_filebuf_wchar filebuf;
197 /* virtual inheritance
198 * basic_ios_wchar basic_ios;
200 } basic_ifstream_wchar;
203 basic_iostream_char base;
204 basic_filebuf_char filebuf;
205 /* virtual inheritance
206 * basic_ios_char basic_ios;
208 } basic_fstream_char;
211 basic_iostream_wchar base;
212 basic_filebuf_wchar filebuf;
213 /* virtual inheritance
214 * basic_ios_char basic_ios;
216 } basic_fstream_wchar;
219 basic_ostream_char base;
220 basic_stringbuf_char strbuf;
221 /* virtual inheritance
222 * basic_ios_char basic_ios;
224 } basic_ostringstream_char;
227 basic_ostream_wchar base;
228 basic_stringbuf_wchar strbuf;
229 /* virtual inheritance
230 * basic_ios_wchar basic_ios;
232 } basic_ostringstream_wchar;
235 basic_istream_char base;
236 basic_stringbuf_char strbuf;
237 /* virtual inheritance
238 * basic_ios_char basic_ios;
240 } basic_istringstream_char;
243 basic_istream_wchar base;
244 basic_stringbuf_wchar strbuf;
245 /* virtual inheritance
246 * basic_ios_wchar basic_ios;
248 } basic_istringstream_wchar;
251 basic_iostream_char base;
252 basic_stringbuf_char strbuf;
253 /* virtual inheritance
254 * basic_ios_char basic_ios;
256 } basic_stringstream_char;
259 basic_iostream_wchar base;
260 basic_stringbuf_wchar strbuf;
261 /* virtual inheritance
262 * basic_ios_wchar basic_ios;
264 } basic_stringstream_wchar;
267 STRSTATE_Allocated = 1,
268 STRSTATE_Constant = 2,
269 STRSTATE_Dynamic = 4,
271 } strstreambuf__Strstate;
274 basic_streambuf_char base;
279 void* (__cdecl *palloc)(MSVCP_size_t);
280 void (__cdecl *pfree)(void*);
284 basic_ostream_char base;
286 /* virtual inheritance
287 * basic_ios_char basic_ios;
292 basic_istream_char base;
294 /* virtual inheritance
295 * basic_ios_char basic_ios;
300 basic_iostream_char base;
302 /* virtual inheritance
303 * basic_ios_char basic_ios;
307 extern const vtable_ptr MSVCP_iosb_vtable;
309 /* ??_7ios_base@std@@6B@ */
310 extern const vtable_ptr MSVCP_ios_base_vtable;
312 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
313 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
315 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
316 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
318 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
319 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
321 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
322 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
324 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
325 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
327 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
328 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
330 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
331 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
333 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
334 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
336 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
337 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
339 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
340 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
342 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
343 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
345 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
346 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
348 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
349 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
350 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
351 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
353 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
354 const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)};
355 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
356 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
358 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
359 const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)};
360 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
361 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
363 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
364 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
365 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
366 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
368 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
369 const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)};
370 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
371 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
373 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
374 const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)};
375 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
376 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
378 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
379 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
380 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
381 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
382 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
383 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
385 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
386 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
387 const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)};
388 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
389 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
390 const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)};
391 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
392 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
393 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
394 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
396 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
397 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
398 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
399 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
401 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
402 const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
403 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
404 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
406 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
407 const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
408 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
409 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
411 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
412 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
413 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
414 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
416 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
417 const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
418 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
419 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
421 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
422 const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
423 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
424 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
426 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
427 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
428 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
429 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
430 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
431 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
433 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
434 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
435 const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)};
436 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
437 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
438 const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
439 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
440 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
441 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
442 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
444 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
445 const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)};
446 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
447 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
449 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
450 const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
451 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
452 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
454 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
455 const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
456 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
457 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
459 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
460 const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)};
461 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
462 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
464 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
465 const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
466 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
467 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
469 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
470 const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
471 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
472 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
474 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
475 const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)};
476 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
477 const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
478 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
479 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
481 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
482 const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
483 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
484 const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
485 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
486 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
488 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
489 const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
490 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
491 const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
492 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
493 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
495 /* ??_7strstreambuf@std@@6B */
496 extern const vtable_ptr MSVCP_strstreambuf_vtable;
498 static const int ostrstream_vbtable[] = {0, sizeof(ostrstream)};
499 extern const vtable_ptr MSVCP_ostrstream_vtable;
501 static const int istrstream_vbtable[] = {0, sizeof(istrstream)};
503 static const int strstream_vbtable1[] = {0, sizeof(strstream)};
504 static const int strstream_vbtable2[] = {0, sizeof(strstream)-FIELD_OFFSET(strstream, base.base2)};
505 extern const vtable_ptr MSVCP_strstream_vtable;
507 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@");
508 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@");
509 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
510 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
511 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
512 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
513 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
514 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
515 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
516 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
517 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
518 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
519 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
520 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
521 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
522 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@");
523 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
524 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@");
525 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
526 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
527 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
528 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
529 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
530 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
531 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
532 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
533 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
534 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
535 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
536 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
537 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
538 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@");
539 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
540 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
541 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@");
542 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
543 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
544 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
545 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
546 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
547 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@");
548 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
549 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
550 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@");
551 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
552 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
553 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
554 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
555 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
556 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
557 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
558 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
559 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
560 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
561 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
562 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@");
563 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
564 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
565 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
566 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
567 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
568 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@");
569 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
570 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
571 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
572 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
573 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
574 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
575 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
576 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@");
577 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
578 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
579 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
580 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@");
581 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
582 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
583 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
584 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
585 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
586 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
587 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
588 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@");
589 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
590 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
591 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
592 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@");
593 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
594 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
595 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
596 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
597 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
598 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
599 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
600 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
601 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
602 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
603 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
604 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@");
605 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
606 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
607 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
608 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
609 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
610 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@");
611 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
612 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
613 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
614 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
615 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
616 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
617 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
618 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
619 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
620 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
621 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
622 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
623 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
624 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
625 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
626 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
627 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
628 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
629 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
630 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
631 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
632 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
633 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
634 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
635 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
636 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
637 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
638 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
639 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
640 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
641 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
642 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
643 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
644 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
645 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
646 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
647 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
648 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
649 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
650 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
651 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
652 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
653 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
654 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@");
655 DEFINE_RTTI_DATA4(ostrstream, sizeof(ostrstream),
656 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
657 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
658 "?AVostrstream@std@@");
659 DEFINE_RTTI_DATA8(strstream, sizeof(strstream),
660 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
661 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
662 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
663 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
664 "?AVstrstream@std@@");
667 void __asm_dummy_vtables(void) {
670 VTABLE_ADD_FUNC(iosb_vector_dtor));
671 __ASM_VTABLE(ios_base,
672 VTABLE_ADD_FUNC(ios_base_vector_dtor));
673 __ASM_VTABLE(basic_ios_char,
674 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
675 __ASM_VTABLE(basic_ios_wchar,
676 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
677 __ASM_VTABLE(basic_ios_short,
678 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
679 __ASM_VTABLE(basic_streambuf_char,
680 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
681 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
682 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
683 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
684 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
685 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
686 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
687 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
688 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
689 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
690 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
691 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
692 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
693 __ASM_VTABLE(basic_streambuf_wchar,
694 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
695 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
696 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
697 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
698 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
699 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
700 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
701 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
702 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
703 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
704 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
705 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
706 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
707 __ASM_VTABLE(basic_streambuf_short,
708 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
710 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
711 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
712 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
713 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
714 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
715 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
716 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
717 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
718 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
719 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
720 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
721 __ASM_VTABLE(basic_filebuf_char,
722 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
723 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
724 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
725 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
726 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
727 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
728 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
729 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
730 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
731 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
732 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
733 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
734 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
735 __ASM_VTABLE(basic_filebuf_wchar,
736 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
737 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
738 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
739 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
740 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
741 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
742 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
743 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
744 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
745 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
746 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
747 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
748 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue));
749 __ASM_VTABLE(basic_filebuf_short,
750 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
751 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
752 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
753 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
754 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
755 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
756 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
757 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
758 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
759 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
760 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
761 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
762 VTABLE_ADD_FUNC(basic_filebuf_short_imbue));
763 __ASM_VTABLE(basic_stringbuf_char,
764 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
765 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
766 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
767 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
768 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
769 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
770 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
771 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
772 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
773 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
774 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
775 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
776 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
777 __ASM_VTABLE(basic_stringbuf_wchar,
778 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
779 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
780 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
781 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
782 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
783 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
784 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
785 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
786 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
787 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
788 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
789 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
790 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
791 __ASM_VTABLE(basic_stringbuf_short,
792 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
793 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
794 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
795 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
796 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
797 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
798 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
799 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
800 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
801 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
802 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
803 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
804 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
805 __ASM_VTABLE(basic_ostream_char,
806 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
807 __ASM_VTABLE(basic_ostream_wchar,
808 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
809 __ASM_VTABLE(basic_ostream_short,
810 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
811 __ASM_VTABLE(basic_istream_char,
812 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
813 __ASM_VTABLE(basic_istream_wchar,
814 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
815 __ASM_VTABLE(basic_istream_short,
816 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
817 __ASM_VTABLE(basic_iostream_char,
818 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
819 __ASM_VTABLE(basic_iostream_wchar,
820 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
821 __ASM_VTABLE(basic_iostream_short,
822 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
823 __ASM_VTABLE(basic_ofstream_char,
824 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
825 __ASM_VTABLE(basic_ofstream_wchar,
826 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
827 __ASM_VTABLE(basic_ofstream_short,
828 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
829 __ASM_VTABLE(basic_ifstream_char,
830 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
831 __ASM_VTABLE(basic_ifstream_wchar,
832 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
833 __ASM_VTABLE(basic_ifstream_short,
834 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
835 __ASM_VTABLE(basic_fstream_char,
836 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
837 __ASM_VTABLE(basic_fstream_wchar,
838 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
839 __ASM_VTABLE(basic_fstream_short,
840 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
841 __ASM_VTABLE(basic_ostringstream_char,
842 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
843 __ASM_VTABLE(basic_ostringstream_wchar,
844 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
845 __ASM_VTABLE(basic_ostringstream_short,
846 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
847 __ASM_VTABLE(basic_istringstream_char,
848 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
849 __ASM_VTABLE(basic_istringstream_wchar,
850 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
851 __ASM_VTABLE(basic_istringstream_short,
852 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
853 __ASM_VTABLE(basic_stringstream_char,
854 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
855 __ASM_VTABLE(basic_stringstream_wchar,
856 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
857 __ASM_VTABLE(basic_stringstream_short,
858 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
859 __ASM_VTABLE(strstreambuf,
860 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
861 VTABLE_ADD_FUNC(strstreambuf_overflow)
862 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
863 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
864 VTABLE_ADD_FUNC(strstreambuf_underflow)
865 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
866 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
867 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
868 VTABLE_ADD_FUNC(strstreambuf_seekoff)
869 VTABLE_ADD_FUNC(strstreambuf_seekpos)
870 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
871 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
872 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
873 __ASM_VTABLE(ostrstream,
874 VTABLE_ADD_FUNC(ostrstream_vector_dtor));
875 __ASM_VTABLE(strstream,
876 VTABLE_ADD_FUNC(strstream_vector_dtor));
881 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
882 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
883 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
884 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
886 TRACE("(%p %p %p %p)\n", this, first, next, last);
890 this->wsize = last-next;
893 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
894 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
895 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
896 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
898 basic_streambuf_char_setp_next(this, first, first, last);
901 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
902 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
903 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
904 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
906 TRACE("(%p %p %p %p)\n", this, first, next, last);
910 this->rsize = last-next;
913 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
914 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
915 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
916 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
918 TRACE("(%p)\n", this);
920 this->prbuf = &this->rbuf;
921 this->pwbuf = &this->wbuf;
922 this->prpos = &this->rpos;
923 this->pwpos = &this->wpos;
924 this->prsize = &this->rsize;
925 this->pwsize = &this->wsize;
927 basic_streambuf_char_setp(this, NULL, NULL);
928 basic_streambuf_char_setg(this, NULL, NULL, NULL);
931 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
932 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
933 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
934 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
936 TRACE("(%p %d)\n", this, uninitialized);
937 this->vtable = &MSVCP_basic_streambuf_char_vtable;
941 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
942 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
943 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
944 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
946 TRACE("(%p)\n", this);
948 this->vtable = &MSVCP_basic_streambuf_char_vtable;
949 this->loc = MSVCRT_operator_new(sizeof(locale));
950 locale_ctor(this->loc);
951 basic_streambuf_char__Init_empty(this);
956 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
957 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
958 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
959 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
961 TRACE("(%p)\n", this);
963 locale_dtor(this->loc);
964 MSVCRT_operator_delete(this->loc);
967 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
968 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
970 TRACE("(%p %x)\n", this, flags);
972 /* we have an array, with the number of elements stored before the first object */
973 INT_PTR i, *ptr = (INT_PTR *)this-1;
975 for(i=*ptr-1; i>=0; i--)
976 basic_streambuf_char_dtor(this+i);
977 MSVCRT_operator_delete(ptr);
979 basic_streambuf_char_dtor(this);
981 MSVCRT_operator_delete(this);
987 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
988 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
989 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
991 TRACE("(%p)\n", this);
992 return *this->prpos ? *this->prsize : 0;
995 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
996 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
997 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
998 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
1000 TRACE("(%p)\n", this);
1003 return *this->prpos;
1006 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1007 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1008 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
1009 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
1011 TRACE("(%p)\n", this);
1013 return (*this->prpos)++;
1016 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1017 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1018 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
1020 TRACE("(%p)\n", this);
1023 return *this->prpos;
1026 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1027 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1028 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
1029 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1031 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1041 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1042 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1043 static void basic_streambuf_char__Lock(basic_streambuf_char *this)
1045 TRACE("(%p)\n", this);
1048 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1049 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1050 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1052 TRACE("(%p)\n", this);
1053 return *this->pwpos ? *this->pwsize : 0;
1056 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1057 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1058 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1059 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1061 TRACE("(%p)\n", this);
1063 return (*this->pwpos)++;
1066 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1067 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1068 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1069 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1070 int, (basic_streambuf_char*), (this))
1071 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1073 TRACE("(%p)\n", this);
1077 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1078 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1079 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1080 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1081 int, (basic_streambuf_char*), (this))
1082 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1086 TRACE("(%p)\n", this);
1088 if(call_basic_streambuf_char_underflow(this)==EOF)
1091 ret = (unsigned char)**this->prpos;
1097 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1098 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1099 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1101 streamsize copied, chunk;
1104 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1106 for(copied=0; copied<count && size;) {
1107 chunk = basic_streambuf_char__Gnavail(this);
1108 if(chunk > count-copied)
1109 chunk = count-copied;
1112 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1113 *this->prpos += chunk;
1114 *this->prsize -= chunk;
1117 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1129 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1130 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1131 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1133 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1134 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1137 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1138 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1139 static void basic_streambuf_char__Unlock(basic_streambuf_char *this)
1141 TRACE("(%p)\n", this);
1144 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1145 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1146 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1147 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1149 TRACE("(%p)\n", this);
1150 return *this->prbuf;
1153 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1154 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1155 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1156 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1158 TRACE("(%p)\n", this);
1159 return *this->prpos;
1162 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1163 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1164 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1165 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1167 TRACE("(%p)\n", this);
1168 return *this->prpos+*this->prsize;
1171 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1172 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1173 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1174 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1176 TRACE("(%p)\n", this);
1177 return *this->pwpos+*this->pwsize;
1180 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1181 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1182 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1183 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1185 TRACE("(%p %d)\n", this, off);
1186 *this->prpos += off;
1187 *this->prsize -= off;
1190 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1191 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1192 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1193 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1194 void, (basic_streambuf_char*, const locale*), (this, loc))
1195 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1197 TRACE("(%p %p)\n", this, loc);
1200 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1201 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1202 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1203 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1204 int, (basic_streambuf_char*, int), (this, ch))
1205 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1207 TRACE("(%p %d)\n", this, ch);
1211 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1212 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1213 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1214 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1215 int, (basic_streambuf_char*, int), (this, ch))
1216 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1218 TRACE("(%p %d)\n", this, ch);
1222 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1223 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1224 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1225 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1227 TRACE("(%p)\n", this);
1228 return *this->pwbuf;
1231 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1232 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1233 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1234 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1236 TRACE("(%p %d)\n", this, off);
1237 *this->pwpos += off;
1238 *this->pwsize -= off;
1241 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1242 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1243 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1244 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1246 TRACE("(%p)\n", this);
1247 return *this->pwpos;
1250 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1251 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1252 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1253 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1255 TRACE("(%p %p)\n", this, loc);
1256 memcpy(ret, this->loc, sizeof(locale));
1257 call_basic_streambuf_char_imbue(this, loc);
1258 locale_copy_ctor(this->loc, loc);
1262 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1263 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1264 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1265 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1266 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1267 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1268 fpos_int *ret, streamoff off, int way, int mode)
1270 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1277 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1278 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1279 static fpos_int* basic_streambuf_char_pubseekoff(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);
1283 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1286 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1287 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1288 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1289 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1290 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1291 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1292 fpos_int *ret, fpos_int pos, int mode)
1294 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1301 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1302 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1303 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1304 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1305 fpos_int *ret, fpos_int pos, int mode)
1307 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1308 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1311 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1312 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1313 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1314 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1315 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1316 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1318 TRACE("(%p %p %ld)\n", this, buf, count);
1322 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1323 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1324 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1325 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1327 TRACE("(%p %p %ld)\n", this, buf, count);
1328 return call_basic_streambuf_char_setbuf(this, buf, count);
1331 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1332 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1333 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1334 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1335 int, (basic_streambuf_char*), (this))
1336 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1338 TRACE("(%p)\n", this);
1342 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1343 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1344 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1345 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1347 TRACE("(%p)\n", this);
1348 return call_basic_streambuf_char_sync(this);
1351 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1352 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1353 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1354 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1356 TRACE("(%p %p %ld)\n", this, ptr, count);
1357 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1360 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1361 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1362 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1363 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1364 streamsize, (basic_streambuf_char*), (this))
1365 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1367 TRACE("(%p)\n", this);
1371 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1372 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1373 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1374 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1378 TRACE("(%p)\n", this);
1380 ret = basic_streambuf_char__Gnavail(this);
1381 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1384 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1385 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1386 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1387 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1389 TRACE("(%p %d)\n", this, ch);
1390 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1393 return (unsigned char)ch;
1396 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch);
1399 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1400 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1401 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1402 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1404 TRACE("(%p %d)\n", this, ch);
1405 return basic_streambuf_char__Pnavail(this) ?
1406 (*basic_streambuf_char__Pninc(this) = ch) :
1407 call_basic_streambuf_char_overflow(this, (unsigned char)ch);
1410 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1411 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1412 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1413 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1415 TRACE("(%p)\n", this);
1416 if(*this->prpos && *this->prpos>*this->prbuf) {
1419 return (unsigned char)**this->prpos;
1422 return call_basic_streambuf_char_pbackfail(this, EOF);
1425 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1426 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1427 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1428 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1430 TRACE("(%p)\n", this);
1431 if(basic_streambuf_char__Gnavail(this))
1432 basic_streambuf_char__Gninc(this);
1434 call_basic_streambuf_char_uflow(this);
1437 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1438 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1439 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1440 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1442 TRACE("(%p)\n", this);
1443 return basic_streambuf_char__Gnavail(this) ?
1444 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1447 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1448 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1449 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1450 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1452 TRACE("(%p)\n", this);
1453 return basic_streambuf_char__Gnavail(this) ?
1454 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1457 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1458 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1459 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1460 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1462 TRACE("(%p)\n", this);
1464 if(basic_streambuf_char__Gnavail(this) > 1)
1465 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1466 return basic_streambuf_char_sbumpc(this)==EOF ?
1467 EOF : basic_streambuf_char_sgetc(this);
1470 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1471 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1472 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1473 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1474 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1475 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1477 TRACE("(%p %p %ld)\n", this, ptr, count);
1478 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1481 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1482 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1483 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1484 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1485 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1486 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1488 streamsize copied, chunk;
1490 TRACE("(%p %p %ld)\n", this, ptr, count);
1492 for(copied=0; copied<count;) {
1493 chunk = basic_streambuf_char__Pnavail(this);
1494 if(chunk > count-copied)
1495 chunk = count-copied;
1498 memcpy(*this->pwpos, ptr+copied, chunk);
1499 *this->pwpos += chunk;
1500 *this->pwsize -= chunk;
1502 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) {
1512 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1513 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1514 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1515 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1517 TRACE("(%p %p %ld)\n", this, ptr, count);
1518 return call_basic_streambuf_char_xsputn(this, ptr, count);
1521 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1522 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1523 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1524 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1525 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1526 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1528 TRACE("(%p %p %p %p)\n", this, first, next, last);
1532 this->wsize = last-next;
1535 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1536 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1537 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1538 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1539 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1540 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1542 basic_streambuf_wchar_setp_next(this, first, first, last);
1545 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1546 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1547 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1548 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1549 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1550 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1552 TRACE("(%p %p %p %p)\n", this, first, next, last);
1556 this->rsize = last-next;
1559 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1560 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1561 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1562 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1563 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1564 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1566 TRACE("(%p)\n", this);
1568 this->prbuf = &this->rbuf;
1569 this->pwbuf = &this->wbuf;
1570 this->prpos = &this->rpos;
1571 this->pwpos = &this->wpos;
1572 this->prsize = &this->rsize;
1573 this->pwsize = &this->wsize;
1575 basic_streambuf_wchar_setp(this, NULL, NULL);
1576 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1579 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1580 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1581 static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1583 TRACE("(%p %d)\n", this, uninitialized);
1584 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1585 mutex_ctor(&this->lock);
1589 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1590 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1591 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1592 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1594 TRACE("(%p %d)\n", this, uninitialized);
1595 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1596 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1600 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1601 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1602 static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1604 TRACE("(%p)\n", this);
1606 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1607 mutex_ctor(&this->lock);
1608 this->loc = MSVCRT_operator_new(sizeof(locale));
1609 locale_ctor(this->loc);
1610 basic_streambuf_wchar__Init_empty(this);
1615 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1616 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1617 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1618 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1620 TRACE("(%p)\n", this);
1621 basic_streambuf_wchar_ctor(this);
1622 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1626 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1627 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1628 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1629 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1630 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1631 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1633 TRACE("(%p)\n", this);
1635 mutex_dtor(&this->lock);
1636 locale_dtor(this->loc);
1637 MSVCRT_operator_delete(this->loc);
1640 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1641 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1643 TRACE("(%p %x)\n", this, flags);
1645 /* we have an array, with the number of elements stored before the first object */
1646 INT_PTR i, *ptr = (INT_PTR *)this-1;
1648 for(i=*ptr-1; i>=0; i--)
1649 basic_streambuf_wchar_dtor(this+i);
1650 MSVCRT_operator_delete(ptr);
1652 basic_streambuf_wchar_dtor(this);
1654 MSVCRT_operator_delete(this);
1660 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1661 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1662 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1663 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1664 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1666 TRACE("(%p)\n", this);
1667 return *this->prpos ? *this->prsize : 0;
1670 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1671 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1672 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1673 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1674 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1675 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1677 TRACE("(%p)\n", this);
1680 return *this->prpos;
1683 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1684 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1685 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1686 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1687 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1688 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1690 TRACE("(%p)\n", this);
1692 return (*this->prpos)++;
1695 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1696 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1697 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1698 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1699 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1701 TRACE("(%p)\n", this);
1704 return *this->prpos;
1707 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1708 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1709 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1710 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1711 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1712 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)
1714 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1724 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1725 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1726 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1727 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1728 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1730 TRACE("(%p)\n", this);
1731 mutex_lock(&this->lock);
1734 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1735 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1736 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1737 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1738 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1740 TRACE("(%p)\n", this);
1741 return *this->pwpos ? *this->pwsize : 0;
1744 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1745 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1746 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1747 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1748 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1749 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1751 TRACE("(%p)\n", this);
1753 return (*this->pwpos)++;
1756 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1757 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1758 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1759 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1760 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1761 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1762 unsigned short, (basic_streambuf_wchar*), (this))
1763 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1765 TRACE("(%p)\n", this);
1769 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1770 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1771 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1772 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1773 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1774 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1775 unsigned short, (basic_streambuf_wchar*), (this))
1776 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1780 TRACE("(%p)\n", this);
1782 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1785 ret = **this->prpos;
1791 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1792 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1793 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1794 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1795 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1797 streamsize copied, chunk;
1800 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1802 for(copied=0; copied<count && size;) {
1803 chunk = basic_streambuf_wchar__Gnavail(this);
1804 if(chunk > count-copied)
1805 chunk = count-copied;
1808 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1809 *this->prpos += chunk;
1810 *this->prsize -= chunk;
1812 size -= chunk*sizeof(wchar_t);
1813 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1825 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1826 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1827 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1828 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1829 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1831 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1832 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1835 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1836 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1837 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1838 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1839 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1841 TRACE("(%p)\n", this);
1842 mutex_unlock(&this->lock);
1845 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1846 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1847 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1848 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1849 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1850 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1852 TRACE("(%p)\n", this);
1853 return *this->prbuf;
1856 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1857 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1858 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1859 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1860 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1861 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1863 TRACE("(%p)\n", this);
1864 return *this->prpos;
1867 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1868 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1869 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1870 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1871 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1872 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1874 TRACE("(%p)\n", this);
1875 return *this->prpos+*this->prsize;
1878 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1879 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1880 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1881 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1882 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1883 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1885 TRACE("(%p)\n", this);
1886 return *this->pwpos+*this->pwsize;
1889 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1890 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1891 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1892 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1893 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1894 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1896 TRACE("(%p %d)\n", this, off);
1897 *this->prpos += off;
1898 *this->prsize -= off;
1901 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1902 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1903 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1904 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1905 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1906 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1907 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1908 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1910 TRACE("(%p %p)\n", this, loc);
1913 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1914 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1915 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1916 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1917 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1918 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1919 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1920 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1922 TRACE("(%p %d)\n", this, ch);
1926 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1927 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1928 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1929 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1930 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1931 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1932 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1933 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1935 TRACE("(%p %d)\n", this, ch);
1939 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1940 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1941 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1942 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1943 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1944 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1946 TRACE("(%p)\n", this);
1947 return *this->pwbuf;
1950 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1951 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1952 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1953 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1954 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1955 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1957 TRACE("(%p %d)\n", this, off);
1958 *this->pwpos += off;
1959 *this->pwsize -= off;
1962 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1963 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1964 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1965 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1966 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1967 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1969 TRACE("(%p)\n", this);
1970 return *this->pwpos;
1973 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1974 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1975 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1976 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1977 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1978 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1980 TRACE("(%p %p)\n", this, loc);
1981 memcpy(ret, this->loc, sizeof(locale));
1982 call_basic_streambuf_wchar_imbue(this, loc);
1983 locale_copy_ctor(this->loc, loc);
1987 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1988 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1989 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1990 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1991 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1992 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1993 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1994 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1995 fpos_int *ret, streamoff off, int way, int mode)
1997 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2004 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2005 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2006 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2007 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2008 static fpos_int* basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2009 fpos_int *ret, streamoff off, int way, int mode)
2011 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2012 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2015 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2016 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2017 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2018 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2019 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2020 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2021 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2022 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2023 fpos_int *ret, fpos_int pos, int mode)
2025 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2032 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2033 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2034 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2035 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2036 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2037 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2038 fpos_int *ret, fpos_int pos, int mode)
2040 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2041 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2044 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2045 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2046 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2047 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2048 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2049 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2050 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2051 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2053 TRACE("(%p %p %ld)\n", this, buf, count);
2057 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2058 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2059 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2060 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2061 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2062 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2064 TRACE("(%p %p %ld)\n", this, buf, count);
2065 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2068 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2069 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2070 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2071 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2072 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2073 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2074 int, (basic_streambuf_wchar*), (this))
2075 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2077 TRACE("(%p)\n", this);
2081 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2082 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2083 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2084 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2085 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2086 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2088 TRACE("(%p)\n", this);
2089 return call_basic_streambuf_wchar_sync(this);
2092 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2093 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2094 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2095 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2096 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2097 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2099 TRACE("(%p %p %ld)\n", this, ptr, count);
2100 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2103 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2104 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2105 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2106 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2107 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2108 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2109 streamsize, (basic_streambuf_wchar*), (this))
2110 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2112 TRACE("(%p)\n", this);
2116 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2117 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2118 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2119 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2120 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2121 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2125 TRACE("(%p)\n", this);
2127 ret = basic_streambuf_wchar__Gnavail(this);
2128 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2131 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2132 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2133 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2134 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2135 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2136 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2138 TRACE("(%p %d)\n", this, ch);
2139 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2145 return call_basic_streambuf_wchar_pbackfail(this, ch);
2148 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2149 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2150 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2151 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2152 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2153 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2155 TRACE("(%p %d)\n", this, ch);
2156 return basic_streambuf_wchar__Pnavail(this) ?
2157 (*basic_streambuf_wchar__Pninc(this) = ch) :
2158 call_basic_streambuf_wchar_overflow(this, ch);
2161 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2162 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2163 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2164 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2165 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2166 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2168 TRACE("(%p)\n", this);
2169 if(*this->prpos && *this->prpos>*this->prbuf) {
2172 return **this->prpos;
2175 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2178 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2179 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2180 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2181 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2182 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2183 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2185 TRACE("(%p)\n", this);
2186 if(basic_streambuf_wchar__Gnavail(this))
2187 basic_streambuf_wchar__Gninc(this);
2189 call_basic_streambuf_wchar_uflow(this);
2192 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2193 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2194 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2195 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2196 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2197 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2199 TRACE("(%p)\n", this);
2200 return basic_streambuf_wchar__Gnavail(this) ?
2201 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2204 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2205 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2206 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2207 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2208 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2209 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2211 TRACE("(%p)\n", this);
2212 return basic_streambuf_wchar__Gnavail(this) ?
2213 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2216 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2217 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2218 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2219 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2220 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2221 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2223 TRACE("(%p)\n", this);
2225 if(basic_streambuf_wchar__Gnavail(this) > 1)
2226 return *basic_streambuf_wchar__Gnpreinc(this);
2227 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2228 WEOF : basic_streambuf_wchar_sgetc(this);
2231 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2232 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2233 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2234 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2235 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2236 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2237 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2238 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2240 TRACE("(%p %p %ld)\n", this, ptr, count);
2241 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2244 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2245 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2246 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2247 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2248 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2249 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2250 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2251 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2253 streamsize copied, chunk;
2255 TRACE("(%p %p %ld)\n", this, ptr, count);
2257 for(copied=0; copied<count;) {
2258 chunk = basic_streambuf_wchar__Pnavail(this);
2259 if(chunk > count-copied)
2260 chunk = count-copied;
2263 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2264 *this->pwpos += chunk;
2265 *this->pwsize -= chunk;
2267 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2277 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2278 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2279 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2280 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2281 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2282 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2284 TRACE("(%p %p %ld)\n", this, ptr, count);
2285 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2288 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2289 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2290 int basic_filebuf_char__Init__Stinit = 0;
2292 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2293 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2294 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2295 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2297 TRACE("(%p %p %d)\n", this, file, which);
2300 this->wrotesome = FALSE;
2301 this->state = basic_filebuf_char__Init__Stinit;
2302 this->close = (which == INITFL_open);
2305 basic_streambuf_char__Init_empty(&this->base);
2307 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2308 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2311 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2312 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2313 static void basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
2315 TRACE("(%p %p)\n", this, cvt);
2317 if(codecvt_base_always_noconv(&cvt->base)) {
2320 basic_streambuf_char__Init_empty(&this->base);
2325 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2326 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2327 static MSVCP_bool basic_filebuf_char__Endwrite(basic_filebuf_char *this)
2329 TRACE("(%p)\n", this);
2331 if(!this->wrotesome || !this->cvt)
2335 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2339 /* TODO: check if we need a dynamic buffer here */
2344 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2347 this->wrotesome = FALSE;
2349 case CODECVT_partial:
2350 if(!fwrite(buf, next-buf, 1, this->file))
2355 case CODECVT_noconv:
2356 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2365 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2366 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2367 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2368 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2370 basic_filebuf_char *ret = this;
2372 TRACE("(%p)\n", this);
2377 /* TODO: handle exceptions */
2378 if(!basic_filebuf_char__Endwrite(this))
2380 if(fclose(this->file))
2383 basic_filebuf_char__Init(this, NULL, INITFL_close);
2387 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2388 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2389 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2390 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2392 TRACE("(%p %p)\n", this, file);
2394 basic_streambuf_char_ctor(&this->base);
2395 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2397 basic_filebuf_char__Init(this, file, INITFL_new);
2401 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2402 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2403 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2404 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2406 return basic_filebuf_char_ctor_file(this, NULL);
2409 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2410 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2411 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2412 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2414 TRACE("(%p %d)\n", this, uninitialized);
2416 basic_streambuf_char_ctor(&this->base);
2417 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2421 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2422 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2423 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2424 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2426 TRACE("(%p)\n", this);
2429 basic_filebuf_char_close(this);
2430 basic_streambuf_char_dtor(&this->base);
2433 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2434 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2436 TRACE("(%p %x)\n", this, flags);
2438 /* we have an array, with the number of elements stored before the first object */
2439 INT_PTR i, *ptr = (INT_PTR *)this-1;
2441 for(i=*ptr-1; i>=0; i--)
2442 basic_filebuf_char_dtor(this+i);
2443 MSVCRT_operator_delete(ptr);
2445 basic_filebuf_char_dtor(this);
2447 MSVCRT_operator_delete(this);
2453 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2454 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2455 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2456 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2458 TRACE("(%p)\n", this);
2459 return this->file != NULL;
2462 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2463 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2464 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2466 static const wchar_t rW[] = {'r',0};
2467 static const struct {
2469 const wchar_t str[4];
2470 const wchar_t str_bin[4];
2472 {OPENMODE_out, {'w',0}, {'w','b',0}},
2473 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2474 {OPENMODE_app, {'a',0}, {'a','b',0}},
2475 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2476 {OPENMODE_in, {'r',0}, {'r','b',0}},
2477 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2478 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2479 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2480 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2483 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2487 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2489 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2490 if(str_mode[mode_idx].mode == real_mode)
2492 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2495 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2500 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2501 && (f = _wfopen(name, rW))) {
2506 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2507 : str_mode[mode_idx].str, prot);
2511 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2519 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2520 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2521 static FILE* _Fiopen(const char *name, int mode, int prot)
2523 wchar_t nameW[FILENAME_MAX];
2525 TRACE("(%s %d %d)\n", name, mode, prot);
2527 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2529 return _Fiopen_wchar(nameW, mode, prot);
2532 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2533 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2534 FILE* __cdecl ___Fiopen(const char *name, int mode)
2536 TRACE("(%p %d)\n", name, mode);
2537 return _Fiopen(name, mode, _SH_DENYNO);
2540 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2541 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2542 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2543 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2544 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2548 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2550 if(basic_filebuf_char_is_open(this))
2553 if(!(f = _Fiopen_wchar(name, mode, prot)))
2556 basic_filebuf_char__Init(this, f, INITFL_open);
2557 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2561 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2562 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2563 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2565 wchar_t nameW[FILENAME_MAX];
2567 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2569 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2571 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2574 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2575 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2576 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2577 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2579 TRACE("(%p %p %d)\n", this, name, mode);
2580 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2583 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2584 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2585 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2586 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2588 TRACE("(%p %p %d)\n", this, name, mode);
2589 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2592 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2593 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2594 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2595 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2597 char buf[8], *dyn_buf;
2598 char ch = c, *to_next;
2599 const char *from_next;
2603 TRACE("(%p %d)\n", this, c);
2605 if(!basic_filebuf_char_is_open(this))
2611 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2615 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2616 &from_next, buf, buf+sizeof(buf), &to_next);
2619 case CODECVT_partial:
2624 if(!fwrite(buf, to_next-buf, 1, this->file))
2626 if(ret == CODECVT_partial)
2629 case CODECVT_noconv:
2630 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2638 max_size = codecvt_base_max_length(&this->cvt->base);
2639 dyn_buf = malloc(max_size);
2643 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2644 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2648 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2650 return ret ? c : EOF;
2651 case CODECVT_partial:
2652 ERR("buffer should be big enough to store all output\n");
2660 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2661 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2662 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2663 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2665 TRACE("(%p %d)\n", this, c);
2667 if(!basic_filebuf_char_is_open(this))
2670 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2671 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2672 basic_streambuf_char__Gndec(&this->base);
2673 return c==EOF ? !c : c;
2674 }else if(c!=EOF && !this->cvt) {
2675 return ungetc(c, this->file);
2681 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2682 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2683 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2684 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2686 char ch, buf[128], *to_next;
2687 const char *buf_next;
2690 TRACE("(%p)\n", this);
2692 if(!basic_filebuf_char_is_open(this))
2695 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2696 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2698 c = fgetc(this->file);
2699 if(!this->cvt || c==EOF)
2703 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
2706 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2707 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2708 case CODECVT_partial:
2710 if(to_next == &ch) {
2711 c = fgetc(this->file);
2717 for(i--; i>=buf_next-buf; i--)
2718 ungetc(buf[i], this->file);
2720 case CODECVT_noconv:
2721 return (unsigned char)buf[0];
2727 FIXME("buffer is too small\n");
2731 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2732 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2733 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2734 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2738 TRACE("(%p)\n", this);
2740 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2741 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2743 ret = call_basic_streambuf_char_uflow(&this->base);
2745 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2749 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2750 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2751 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2752 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2753 fpos_int *ret, streamoff off, int way, int mode)
2757 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2759 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2760 || fseek(this->file, off, way)) {
2767 fgetpos(this->file, &pos);
2770 ret->state = this->state;
2774 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2775 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2776 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2777 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2778 fpos_int *ret, fpos_int pos, int mode)
2782 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2784 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2785 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2786 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2793 fgetpos(this->file, &fpos);
2796 ret->state = this->state;
2800 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2801 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2802 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2803 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2805 TRACE("(%p %p %ld)\n", this, buf, count);
2807 if(!basic_filebuf_char_is_open(this))
2810 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2813 basic_filebuf_char__Init(this, this->file, INITFL_open);
2817 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2818 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2819 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2820 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2822 TRACE("(%p)\n", this);
2824 if(!basic_filebuf_char_is_open(this))
2827 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2829 return fflush(this->file);
2832 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2833 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2834 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2835 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2837 TRACE("(%p %p)\n", this, loc);
2838 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2841 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2842 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2843 int basic_filebuf_short__Init__Stinit = 0;
2845 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2846 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2847 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2849 TRACE("(%p %p %d)\n", this, file, which);
2852 this->wrotesome = FALSE;
2854 this->close = (which == INITFL_open);
2857 basic_streambuf_wchar__Init_empty(&this->base);
2860 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2861 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2862 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2863 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2865 TRACE("(%p %p %d)\n", this, file, which);
2868 this->wrotesome = FALSE;
2869 this->state = basic_filebuf_short__Init__Stinit;
2870 this->close = (which == INITFL_open);
2873 basic_streambuf_wchar__Init_empty(&this->base);
2876 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2877 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2878 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2879 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2880 static void basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt)
2882 TRACE("(%p %p)\n", this, cvt);
2884 if(codecvt_base_always_noconv(&cvt->base)) {
2887 basic_streambuf_wchar__Init_empty(&this->base);
2892 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2893 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2894 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2895 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2896 static MSVCP_bool basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this)
2898 TRACE("(%p)\n", this);
2900 if(!this->wrotesome || !this->cvt)
2903 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2907 /* TODO: check if we need a dynamic buffer here */
2912 ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2915 this->wrotesome = FALSE;
2917 case CODECVT_partial:
2918 if(!fwrite(buf, next-buf, 1, this->file))
2923 case CODECVT_noconv:
2924 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2933 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2934 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2935 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2936 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2937 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2938 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2940 basic_filebuf_wchar *ret = this;
2942 TRACE("(%p)\n", this);
2947 /* TODO: handle exceptions */
2948 if(!basic_filebuf_wchar__Endwrite(this))
2950 if(fclose(this->file))
2953 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2957 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2958 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2959 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2961 TRACE("(%p %p)\n", this, file);
2963 basic_streambuf_wchar_ctor(&this->base);
2964 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2966 basic_filebuf_wchar__Init(this, file, INITFL_new);
2970 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2971 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2972 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2973 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2975 TRACE("(%p %p)\n", this, file);
2977 basic_streambuf_short_ctor(&this->base);
2978 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2980 basic_filebuf_short__Init(this, file, INITFL_new);
2984 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2985 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2986 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2988 return basic_filebuf_wchar_ctor_file(this, NULL);
2991 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2992 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2993 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2994 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2996 return basic_filebuf_short_ctor_file(this, NULL);
2999 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3000 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3001 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
3002 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3004 TRACE("(%p %d)\n", this, uninitialized);
3006 basic_streambuf_short_ctor(&this->base);
3007 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3011 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3012 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3013 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
3014 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3015 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
3016 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
3018 TRACE("(%p)\n", this);
3021 basic_filebuf_wchar_close(this);
3022 basic_streambuf_wchar_dtor(&this->base);
3025 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
3026 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
3028 TRACE("(%p %x)\n", this, flags);
3030 /* we have an array, with the number of elements stored before the first object */
3031 INT_PTR i, *ptr = (INT_PTR *)this-1;
3033 for(i=*ptr-1; i>=0; i--)
3034 basic_filebuf_wchar_dtor(this+i);
3035 MSVCRT_operator_delete(ptr);
3037 basic_filebuf_wchar_dtor(this);
3039 MSVCRT_operator_delete(this);
3045 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3046 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3047 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3048 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3049 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
3050 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
3052 TRACE("(%p)\n", this);
3053 return this->file != NULL;
3056 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3057 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3058 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3059 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3060 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3064 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3066 if(basic_filebuf_wchar_is_open(this))
3069 if(!(f = _Fiopen_wchar(name, mode, prot)))
3072 basic_filebuf_wchar__Init(this, f, INITFL_open);
3073 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc));
3077 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3078 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3079 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3081 wchar_t nameW[FILENAME_MAX];
3083 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3085 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3087 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3090 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3091 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3092 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3093 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3095 TRACE("(%p %p %d)\n", this, name, mode);
3096 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3099 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3100 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3101 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3102 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3104 TRACE("(%p %p %d)\n", this, name, mode);
3105 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3108 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3109 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3110 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3111 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3112 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3113 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3115 char buf[8], *dyn_buf, *to_next;
3117 const wchar_t *from_next;
3122 TRACE("(%p %d)\n", this, c);
3124 if(!basic_filebuf_wchar_is_open(this))
3130 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3134 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3135 &from_next, buf, buf+sizeof(buf), &to_next);
3138 case CODECVT_partial:
3143 if(!fwrite(buf, to_next-buf, 1, this->file))
3145 if(ret == CODECVT_partial)
3148 case CODECVT_noconv:
3149 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3157 max_size = codecvt_base_max_length(&this->cvt->base);
3158 dyn_buf = malloc(max_size);
3162 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3163 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
3167 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
3169 return ret ? c : WEOF;
3170 case CODECVT_partial:
3171 ERR("buffer should be big enough to store all output\n");
3179 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3180 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3181 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3182 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3183 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3184 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3186 TRACE("(%p %d)\n", this, c);
3188 if(!basic_filebuf_wchar_is_open(this))
3191 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3192 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3193 basic_streambuf_wchar__Gndec(&this->base);
3194 return c==WEOF ? !c : c;
3195 }else if(c!=WEOF && !this->cvt) {
3196 return ungetwc(c, this->file);
3197 }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) {
3199 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1);
3206 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3207 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3208 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3209 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3210 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3211 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3213 wchar_t ch, *to_next;
3215 const char *buf_next;
3218 TRACE("(%p)\n", this);
3220 if(!basic_filebuf_wchar_is_open(this))
3223 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3224 return *basic_streambuf_wchar__Gninc(&this->base);
3227 return fgetwc(this->file);
3230 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
3231 if((c = fgetc(this->file)) == EOF)
3235 switch(codecvt_wchar_in(this->cvt, &this->state, buf_next,
3236 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
3237 case CODECVT_partial:
3242 for(i--; i>=buf_next-buf; i--)
3243 ungetc(buf[i], this->file);
3245 case CODECVT_noconv:
3246 if(i+1 < sizeof(wchar_t))
3249 memcpy(&ch, buf, sizeof(wchar_t));
3256 FIXME("buffer is too small\n");
3260 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3261 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3262 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3263 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3264 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3265 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3269 TRACE("(%p)\n", this);
3271 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3272 return *basic_streambuf_wchar_gptr(&this->base);
3274 ret = call_basic_streambuf_wchar_uflow(&this->base);
3276 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3280 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3281 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3282 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3283 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3284 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3285 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3286 fpos_int *ret, streamoff off, int way, int mode)
3290 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3292 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) {
3293 if(way == SEEKDIR_cur)
3294 off -= sizeof(wchar_t);
3296 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3299 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3300 || fseek(this->file, off, way)) {
3307 fgetpos(this->file, &pos);
3310 ret->state = this->state;
3314 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3315 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3316 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3317 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3318 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3319 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3320 fpos_int *ret, fpos_int pos, int mode)
3324 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3326 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3327 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3328 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3335 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback)
3336 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3338 fgetpos(this->file, &fpos);
3341 ret->state = this->state;
3345 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3346 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3347 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3348 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3350 TRACE("(%p %p %ld)\n", this, buf, count);
3352 if(!basic_filebuf_wchar_is_open(this))
3355 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3358 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3362 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3363 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3364 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3365 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3367 TRACE("(%p %p %ld)\n", this, buf, count);
3369 if(!basic_filebuf_wchar_is_open(this))
3372 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3375 basic_filebuf_short__Init(this, this->file, INITFL_open);
3379 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3380 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3381 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3382 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3383 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3384 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3386 TRACE("(%p)\n", this);
3388 if(!basic_filebuf_wchar_is_open(this))
3391 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3393 return fflush(this->file);
3396 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
3397 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
3398 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8)
3399 void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc)
3401 TRACE("(%p %p)\n", this, loc);
3402 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc));
3405 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
3406 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
3407 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8)
3408 void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc)
3410 TRACE("(%p %p)\n", this, loc);
3411 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc));
3414 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3415 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3416 static int basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3420 if(!(mode & OPENMODE_in))
3421 state |= STRINGBUF_no_read;
3423 if(!(mode & OPENMODE_out))
3424 state |= STRINGBUF_no_write;
3426 if(mode & OPENMODE_ate)
3427 state |= STRINGBUF_at_end;
3429 if(mode & OPENMODE_app)
3430 state |= STRINGBUF_append;
3435 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3436 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3437 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3438 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3440 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3442 basic_streambuf_char__Init_empty(&this->base);
3444 this->state = state;
3445 this->seekhigh = NULL;
3448 char *buf = MSVCRT_operator_new(count);
3450 ERR("Out of memory\n");
3451 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3454 memcpy(buf, str, count);
3455 this->seekhigh = buf + count;
3457 this->state |= STRINGBUF_allocated;
3459 if(!(state & STRINGBUF_no_read))
3460 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3462 if(!(state & STRINGBUF_no_write)) {
3463 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3465 if(!basic_streambuf_char_gptr(&this->base))
3466 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3471 /* ??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 */
3472 /* ??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 */
3473 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3474 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3475 const basic_string_char *str, IOSB_openmode mode)
3477 TRACE("(%p %p %d)\n", this, str, mode);
3479 basic_streambuf_char_ctor(&this->base);
3480 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3482 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3483 str->size, basic_stringbuf_char__Getstate(this, mode));
3487 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3488 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3489 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3490 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3491 basic_stringbuf_char *this, IOSB_openmode mode)
3493 TRACE("(%p %d)\n", this, mode);
3495 basic_streambuf_char_ctor(&this->base);
3496 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3498 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3502 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3503 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3504 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3505 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3507 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3510 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3511 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3512 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3513 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3515 TRACE("(%p)\n", this);
3517 if(this->state & STRINGBUF_allocated) {
3518 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3519 this->seekhigh = NULL;
3520 this->state &= ~STRINGBUF_allocated;
3523 basic_streambuf_char__Init_empty(&this->base);
3526 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3527 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3528 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3529 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3531 TRACE("(%p)\n", this);
3533 basic_stringbuf_char__Tidy(this);
3534 basic_streambuf_char_dtor(&this->base);
3537 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3538 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3540 TRACE("(%p %x)\n", this, flags);
3543 /* we have an array, with the number of elements stored before the first object */
3544 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3546 for (i = *ptr - 1; i >= 0; i--)
3547 basic_stringbuf_char_dtor(this+i);
3549 MSVCRT_operator_delete(ptr);
3551 basic_stringbuf_char_dtor(this);
3554 MSVCRT_operator_delete(this);
3560 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3561 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3562 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3563 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3565 MSVCP_size_t oldsize, size;
3568 TRACE("(%p %x)\n", this, meta);
3572 if(this->state & STRINGBUF_no_write)
3575 ptr = basic_streambuf_char_pptr(&this->base);
3576 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3577 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3578 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3580 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3581 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3583 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3586 buf = MSVCRT_operator_new(size);
3588 ERR("Out of memory\n");
3589 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3593 this->seekhigh = buf;
3594 basic_streambuf_char_setp(&this->base, buf, buf+size);
3595 if(this->state & STRINGBUF_no_read)
3596 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3598 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3600 this->state |= STRINGBUF_allocated;
3602 ptr = basic_streambuf_char_eback(&this->base);
3603 memcpy(buf, ptr, oldsize);
3605 this->seekhigh = buf+(this->seekhigh-ptr);
3606 basic_streambuf_char_setp_next(&this->base, buf,
3607 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3608 if(this->state & STRINGBUF_no_read)
3609 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3611 basic_streambuf_char_setg(&this->base, buf,
3612 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3613 basic_streambuf_char_pptr(&this->base)+1);
3615 MSVCRT_operator_delete(ptr);
3618 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3621 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3622 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3623 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3624 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3628 TRACE("(%p %x)\n", this, c);
3630 cur = basic_streambuf_char_gptr(&this->base);
3631 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3632 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3637 basic_streambuf_char_gbump(&this->base, -1);
3638 return c==EOF ? !EOF : c;
3641 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3642 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3643 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3644 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3648 TRACE("(%p)\n", this);
3650 cur = basic_streambuf_char_gptr(&this->base);
3651 if(!cur || this->state&STRINGBUF_no_read)
3654 ptr = basic_streambuf_char_pptr(&this->base);
3655 if(this->seekhigh < ptr)
3656 this->seekhigh = ptr;
3658 ptr = basic_streambuf_char_egptr(&this->base);
3659 if(this->seekhigh > ptr)
3660 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3662 if(cur < this->seekhigh)
3663 return (unsigned char)*cur;
3667 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3668 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3669 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3670 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3671 fpos_int *ret, streamoff off, int way, int mode)
3673 char *beg, *cur_r, *cur_w;
3675 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3677 cur_w = basic_streambuf_char_pptr(&this->base);
3678 if(cur_w > this->seekhigh)
3679 this->seekhigh = cur_w;
3685 beg = basic_streambuf_char_eback(&this->base);
3686 cur_r = basic_streambuf_char_gptr(&this->base);
3687 if((mode & OPENMODE_in) && cur_r) {
3688 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3690 else if(way == SEEKDIR_end)
3691 off += this->seekhigh-beg;
3692 else if(way != SEEKDIR_beg)
3695 if(off<0 || off>this->seekhigh-beg) {
3698 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3699 if((mode & OPENMODE_out) && cur_w) {
3700 basic_streambuf_char_setp_next(&this->base, beg,
3701 basic_streambuf_char_gptr(&this->base),
3702 basic_streambuf_char_epptr(&this->base));
3705 }else if((mode & OPENMODE_out) && cur_w) {
3706 if(way == SEEKDIR_cur)
3708 else if(way == SEEKDIR_end)
3709 off += this->seekhigh-beg;
3710 else if(way != SEEKDIR_beg)
3713 if(off<0 || off>this->seekhigh-beg)
3716 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3725 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3726 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3727 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3728 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3729 fpos_int *ret, fpos_int pos, int mode)
3731 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3733 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3738 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3741 /* ?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 */
3742 /* ?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 */
3743 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3744 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3746 TRACE("(%p %p)\n", this, str);
3748 basic_stringbuf_char__Tidy(this);
3749 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3752 /* ?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 */
3753 /* ?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 */
3754 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3755 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3759 TRACE("(%p)\n", this);
3761 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3764 ptr = basic_streambuf_char_pbase(&this->base);
3765 pptr = basic_streambuf_char_pptr(&this->base);
3767 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3770 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3771 ptr = basic_streambuf_char_eback(&this->base);
3772 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3775 return basic_string_char_ctor(ret);
3778 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3779 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3780 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3781 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3782 static int basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3786 if(!(mode & OPENMODE_in))
3787 state |= STRINGBUF_no_read;
3789 if(!(mode & OPENMODE_out))
3790 state |= STRINGBUF_no_write;
3792 if(mode & OPENMODE_ate)
3793 state |= STRINGBUF_at_end;
3795 if(mode & OPENMODE_app)
3796 state |= STRINGBUF_append;
3801 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3802 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3803 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3804 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3805 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3806 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3808 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3810 basic_streambuf_wchar__Init_empty(&this->base);
3812 this->state = state;
3813 this->seekhigh = NULL;
3816 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3818 ERR("Out of memory\n");
3819 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3822 memcpy(buf, str, count*sizeof(wchar_t));
3823 this->seekhigh = buf + count;
3825 this->state |= STRINGBUF_allocated;
3827 if(!(state & STRINGBUF_no_read))
3828 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3830 if(!(state & STRINGBUF_no_write)) {
3831 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3833 if(!basic_streambuf_wchar_gptr(&this->base))
3834 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3839 /* ??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 */
3840 /* ??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 */
3841 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3842 const basic_string_wchar *str, IOSB_openmode mode)
3844 TRACE("(%p %p %d)\n", this, str, mode);
3846 basic_streambuf_wchar_ctor(&this->base);
3847 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3849 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3850 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3854 /* ??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 */
3855 /* ??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 */
3856 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3857 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3858 const basic_string_wchar *str, IOSB_openmode mode)
3860 basic_stringbuf_wchar_ctor_str(this, str, mode);
3861 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3865 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3866 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3867 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3868 basic_stringbuf_wchar *this, IOSB_openmode mode)
3870 TRACE("(%p %d)\n", this, mode);
3872 basic_streambuf_wchar_ctor(&this->base);
3873 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3875 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3879 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3880 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3881 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3882 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3883 basic_stringbuf_wchar *this, IOSB_openmode mode)
3885 basic_stringbuf_wchar_ctor_mode(this, mode);
3886 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3890 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3891 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3892 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3893 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3895 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3898 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3899 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3900 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3901 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3902 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3903 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3905 TRACE("(%p)\n", this);
3907 if(this->state & STRINGBUF_allocated) {
3908 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3909 this->seekhigh = NULL;
3910 this->state &= ~STRINGBUF_allocated;
3913 basic_streambuf_wchar__Init_empty(&this->base);
3916 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3917 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3918 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3919 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3920 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3921 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3923 TRACE("(%p)\n", this);
3925 basic_stringbuf_wchar__Tidy(this);
3926 basic_streambuf_wchar_dtor(&this->base);
3929 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3930 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3932 TRACE("(%p %x)\n", this, flags);
3935 /* we have an array, with the number of elements stored before the first object */
3936 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3938 for (i = *ptr - 1; i >= 0; i--)
3939 basic_stringbuf_wchar_dtor(this+i);
3941 MSVCRT_operator_delete(ptr);
3943 basic_stringbuf_wchar_dtor(this);
3946 MSVCRT_operator_delete(this);
3952 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3953 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3954 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3955 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3956 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3957 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3959 MSVCP_size_t oldsize, size;
3962 TRACE("(%p %x)\n", this, meta);
3966 if(this->state & STRINGBUF_no_write)
3969 ptr = basic_streambuf_wchar_pptr(&this->base);
3970 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3971 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3972 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3974 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3975 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3977 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3980 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3982 ERR("Out of memory\n");
3983 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3987 this->seekhigh = buf;
3988 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3989 if(this->state & STRINGBUF_no_read)
3990 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3992 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3994 this->state |= STRINGBUF_allocated;
3996 ptr = basic_streambuf_wchar_eback(&this->base);
3997 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3999 this->seekhigh = buf+(this->seekhigh-ptr);
4000 basic_streambuf_wchar_setp_next(&this->base, buf,
4001 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
4002 if(this->state & STRINGBUF_no_read)
4003 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4005 basic_streambuf_wchar_setg(&this->base, buf,
4006 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
4007 basic_streambuf_wchar_pptr(&this->base)+1);
4009 MSVCRT_operator_delete(ptr);
4012 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4015 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4016 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4017 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4018 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4019 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
4020 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
4024 TRACE("(%p %x)\n", this, c);
4026 cur = basic_streambuf_wchar_gptr(&this->base);
4027 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
4028 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
4033 basic_streambuf_wchar_gbump(&this->base, -1);
4034 return c==WEOF ? !WEOF : c;
4037 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
4038 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
4039 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
4040 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
4041 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
4042 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
4046 TRACE("(%p)\n", this);
4048 cur = basic_streambuf_wchar_gptr(&this->base);
4049 if(!cur || this->state&STRINGBUF_no_read)
4052 ptr = basic_streambuf_wchar_pptr(&this->base);
4053 if(this->seekhigh < ptr)
4054 this->seekhigh = ptr;
4056 ptr = basic_streambuf_wchar_egptr(&this->base);
4057 if(this->seekhigh > ptr)
4058 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
4060 if(cur < this->seekhigh)
4065 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4066 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4067 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4068 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4069 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
4070 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
4071 fpos_int *ret, streamoff off, int way, int mode)
4073 wchar_t *beg, *cur_r, *cur_w;
4075 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
4077 cur_w = basic_streambuf_wchar_pptr(&this->base);
4078 if(cur_w > this->seekhigh)
4079 this->seekhigh = cur_w;
4085 beg = basic_streambuf_wchar_eback(&this->base);
4086 cur_r = basic_streambuf_wchar_gptr(&this->base);
4087 if((mode & OPENMODE_in) && cur_r) {
4088 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
4090 else if(way == SEEKDIR_end)
4091 off += this->seekhigh-beg;
4092 else if(way != SEEKDIR_beg)
4095 if(off<0 || off>this->seekhigh-beg) {
4098 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
4099 if((mode & OPENMODE_out) && cur_w) {
4100 basic_streambuf_wchar_setp_next(&this->base, beg,
4101 basic_streambuf_wchar_gptr(&this->base),
4102 basic_streambuf_wchar_epptr(&this->base));
4105 }else if((mode & OPENMODE_out) && cur_w) {
4106 if(way == SEEKDIR_cur)
4108 else if(way == SEEKDIR_end)
4109 off += this->seekhigh-beg;
4110 else if(way != SEEKDIR_beg)
4113 if(off<0 || off>this->seekhigh-beg)
4116 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
4125 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4126 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4127 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4128 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4129 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4130 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4131 fpos_int *ret, fpos_int pos, int mode)
4133 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4135 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
4140 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4143 /* ?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 */
4144 /* ?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 */
4145 /* ?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 */
4146 /* ?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 */
4147 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4148 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4150 TRACE("(%p %p)\n", this, str);
4152 basic_stringbuf_wchar__Tidy(this);
4153 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str), str->size, this->state);
4156 /* ?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 */
4157 /* ?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 */
4158 /* ?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 */
4159 /* ?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 */
4160 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4161 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4165 TRACE("(%p)\n", this);
4167 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4170 ptr = basic_streambuf_wchar_pbase(&this->base);
4171 pptr = basic_streambuf_wchar_pptr(&this->base);
4173 return basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4176 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4177 ptr = basic_streambuf_wchar_eback(&this->base);
4178 return basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4181 return basic_string_wchar_ctor(ret);
4184 /* ??0ios_base@std@@IAE@XZ */
4185 /* ??0ios_base@std@@IEAA@XZ */
4186 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4187 ios_base* __thiscall ios_base_ctor(ios_base *this)
4189 TRACE("(%p)\n", this);
4190 this->vtable = &MSVCP_ios_base_vtable;
4194 /* ??0ios_base@std@@QAE@ABV01@@Z */
4195 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4196 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4197 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4199 TRACE("(%p %p)\n", this, copy);
4201 this->vtable = &MSVCP_ios_base_vtable;
4205 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4206 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4207 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4208 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4210 IOS_BASE_fnarray *cur;
4212 TRACE("(%p %x)\n", this, event);
4214 for(cur=this->calls; cur; cur=cur->next)
4215 cur->event_handler(event, this, cur->index);
4218 /* ?_Tidy@ios_base@std@@AAAXXZ */
4219 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4220 void CDECL ios_base_Tidy(ios_base *this)
4222 IOS_BASE_iosarray *arr_cur, *arr_next;
4223 IOS_BASE_fnarray *event_cur, *event_next;
4225 TRACE("(%p)\n", this);
4227 ios_base_Callfns(this, EVENT_erase_event);
4229 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4230 arr_next = arr_cur->next;
4231 MSVCRT_operator_delete(arr_cur);
4235 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4236 event_next = event_cur->next;
4237 MSVCRT_operator_delete(event_cur);
4242 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4243 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4244 static void ios_base_Ios_base_dtor(ios_base *obj)
4246 TRACE("(%p)\n", obj);
4248 locale_dtor(obj->loc);
4249 MSVCRT_operator_delete(obj->loc);
4254 /* ??1ios_base@std@@UAE@XZ */
4255 /* ??1ios_base@std@@UEAA@XZ */
4256 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4257 void __thiscall ios_base_dtor(ios_base *this)
4259 ios_base_Ios_base_dtor(this);
4262 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4263 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4265 TRACE("(%p %x)\n", this, flags);
4267 /* we have an array, with the number of elements stored before the first object */
4268 INT_PTR i, *ptr = (INT_PTR *)this-1;
4270 for(i=*ptr-1; i>=0; i--)
4271 ios_base_dtor(this+i);
4272 MSVCRT_operator_delete(ptr);
4274 ios_base_dtor(this);
4276 MSVCRT_operator_delete(this);
4282 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4283 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4285 TRACE("(%p %x)\n", this, flags);
4287 INT_PTR *ptr = (INT_PTR *)this-1;
4288 MSVCRT_operator_delete(ptr);
4291 MSVCRT_operator_delete(this);
4297 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4298 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4299 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4300 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4302 IOS_BASE_iosarray *p;
4304 TRACE("(%p %d)\n", this, index);
4306 for(p=this->arr; p; p=p->next) {
4307 if(p->index == index)
4311 for(p=this->arr; p; p=p->next) {
4312 if(!p->long_val && !p->ptr_val) {
4318 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4319 p->next = this->arr;
4327 /* ?iword@ios_base@std@@QAEAAJH@Z */
4328 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4329 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4330 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4332 TRACE("(%p %d)\n", this, index);
4333 return &ios_base_Findarr(this, index)->long_val;
4336 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4337 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4338 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4339 void** __thiscall ios_base_pword(ios_base *this, int index)
4341 TRACE("(%p %d)\n", this, index);
4342 return &ios_base_Findarr(this, index)->ptr_val;
4345 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4346 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4347 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4348 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4350 IOS_BASE_fnarray *event;
4352 TRACE("(%p %p %d)\n", this, callback, index);
4354 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4355 event->next = this->calls;
4356 event->index = index;
4357 event->event_handler = callback;
4358 this->calls = event;
4361 /* ?clear@ios_base@std@@QAEXH_N@Z */
4362 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4363 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4364 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4366 TRACE("(%p %x %x)\n", this, state, reraise);
4368 this->state = state & IOSTATE_mask;
4369 if(!(this->state & this->except))
4373 throw_exception(EXCEPTION_RERAISE, NULL);
4374 else if(this->state & this->except & IOSTATE_eofbit)
4375 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4376 else if(this->state & this->except & IOSTATE_failbit)
4377 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4378 else if(this->state & this->except & IOSTATE_badbit)
4379 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4380 else if(this->state & this->except & IOSTATE__Hardfail)
4381 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4384 /* ?clear@ios_base@std@@QAEXH@Z */
4385 /* ?clear@ios_base@std@@QEAAXH@Z */
4386 static void ios_base_clear(ios_base *this, IOSB_iostate state)
4388 ios_base_clear_reraise(this, state, FALSE);
4391 /* ?exceptions@ios_base@std@@QAEXH@Z */
4392 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4393 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4394 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4396 TRACE("(%p %x)\n", this, state);
4397 this->except = state & IOSTATE_mask;
4398 ios_base_clear(this, this->state);
4401 /* ?exceptions@ios_base@std@@QBEHXZ */
4402 /* ?exceptions@ios_base@std@@QEBAHXZ */
4403 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4404 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4406 TRACE("(%p)\n", this);
4407 return this->except;
4410 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4411 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4412 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4413 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4415 TRACE("(%p %p)\n", this, rhs);
4418 IOS_BASE_iosarray *arr_cur;
4419 IOS_BASE_fnarray *event_cur;
4421 ios_base_Tidy(this);
4423 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4424 if(arr_cur->long_val)
4425 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4426 if(arr_cur->ptr_val)
4427 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4429 this->stdstr = rhs->stdstr;
4430 this->fmtfl = rhs->fmtfl;
4431 this->prec = rhs->prec;
4432 this->wide = rhs->wide;
4433 locale_operator_assign(this->loc, rhs->loc);
4435 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4436 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4438 ios_base_Callfns(this, EVENT_copyfmt_event);
4439 ios_base_exceptions_set(this, rhs->except);
4445 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4446 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4447 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4448 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4450 TRACE("(%p %p)\n", this, right);
4453 this->state = right->state;
4454 ios_base_copyfmt(this, right);
4460 /* ?fail@ios_base@std@@QBE_NXZ */
4461 /* ?fail@ios_base@std@@QEBA_NXZ */
4462 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4463 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4465 TRACE("(%p)\n", this);
4466 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4469 /* ??7ios_base@std@@QBE_NXZ */
4470 /* ??7ios_base@std@@QEBA_NXZ */
4471 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4472 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4474 TRACE("(%p)\n", this);
4475 return ios_base_fail(this);
4478 /* ??Bios_base@std@@QBEPAXXZ */
4479 /* ??Bios_base@std@@QEBAPEAXXZ */
4480 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4481 void* __thiscall ios_base_op_fail(const ios_base *this)
4483 TRACE("(%p)\n", this);
4484 return ios_base_fail(this) ? NULL : (void*)this;
4487 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4488 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4489 static void ios_base_Addstd(ios_base *add)
4491 FIXME("(%p) stub\n", add);
4494 /* ?_Init@ios_base@std@@IAEXXZ */
4495 /* ?_Init@ios_base@std@@IEAAXXZ */
4496 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4497 void __thiscall ios_base__Init(ios_base *this)
4499 TRACE("(%p)\n", this);
4502 this->state = this->except = IOSTATE_goodbit;
4503 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4508 this->loc = MSVCRT_operator_new(sizeof(locale));
4509 locale_ctor(this->loc);
4512 /* ?bad@ios_base@std@@QBE_NXZ */
4513 /* ?bad@ios_base@std@@QEBA_NXZ */
4514 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4515 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4517 TRACE("(%p)\n", this);
4518 return (this->state & IOSTATE_badbit) != 0;
4521 /* ?eof@ios_base@std@@QBE_NXZ */
4522 /* ?eof@ios_base@std@@QEBA_NXZ */
4523 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4524 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4526 TRACE("(%p)\n", this);
4527 return (this->state & IOSTATE_eofbit) != 0;
4530 /* ?flags@ios_base@std@@QAEHH@Z */
4531 /* ?flags@ios_base@std@@QEAAHH@Z */
4532 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4533 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4535 IOSB_fmtflags ret = this->fmtfl;
4537 TRACE("(%p %x)\n", this, flags);
4539 this->fmtfl = flags & FMTFLAG_mask;
4543 /* ?flags@ios_base@std@@QBEHXZ */
4544 /* ?flags@ios_base@std@@QEBAHXZ */
4545 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4546 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4548 TRACE("(%p)\n", this);
4552 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4553 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4554 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4555 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4557 TRACE("(%p)\n", this);
4558 return locale_copy_ctor(ret, this->loc);
4561 /* ?good@ios_base@std@@QBE_NXZ */
4562 /* ?good@ios_base@std@@QEBA_NXZ */
4563 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4564 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4566 TRACE("(%p)\n", this);
4567 return this->state == IOSTATE_goodbit;
4570 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4571 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4572 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4573 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4575 TRACE("(%p %p)\n", this, loc);
4577 locale_copy_ctor(this->loc, loc);
4581 /* ?precision@ios_base@std@@QAEHH@Z */
4582 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4583 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4584 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4586 streamsize ret = this->prec;
4588 TRACE("(%p %ld)\n", this, precision);
4590 this->prec = precision;
4594 /* ?precision@ios_base@std@@QBEHXZ */
4595 /* ?precision@ios_base@std@@QEBA_JXZ */
4596 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4597 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4599 TRACE("(%p)\n", this);
4603 /* ?rdstate@ios_base@std@@QBEHXZ */
4604 /* ?rdstate@ios_base@std@@QEBAHXZ */
4605 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4606 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4608 TRACE("(%p)\n", this);
4612 /* ?setf@ios_base@std@@QAEHHH@Z */
4613 /* ?setf@ios_base@std@@QEAAHHH@Z */
4614 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4615 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4617 IOSB_fmtflags ret = this->fmtfl;
4619 TRACE("(%p %x %x)\n", this, flags, mask);
4621 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4625 /* ?setf@ios_base@std@@QAEHH@Z */
4626 /* ?setf@ios_base@std@@QEAAHH@Z */
4627 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4628 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4630 return ios_base_setf_mask(this, flags, ~0);
4633 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4634 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4635 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4636 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4638 TRACE("(%p %x %x)\n", this, state, reraise);
4640 if(state != IOSTATE_goodbit)
4641 ios_base_clear_reraise(this, this->state | state, reraise);
4644 /* ?setstate@ios_base@std@@QAEXH@Z */
4645 /* ?setstate@ios_base@std@@QEAAXH@Z */
4646 static void ios_base_setstate(ios_base *this, IOSB_iostate state)
4648 ios_base_setstate_reraise(this, state, FALSE);
4651 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4652 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4657 TRACE("(%x)\n", sync);
4659 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4660 ret = ios_base_Sync;
4661 ios_base_Sync = sync;
4662 _Lockit_dtor(&lock);
4666 /* ?unsetf@ios_base@std@@QAEXH@Z */
4667 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4668 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4669 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4671 TRACE("(%p %x)\n", this, flags);
4672 this->fmtfl &= ~flags;
4675 /* ?width@ios_base@std@@QAEHH@Z */
4676 /* ?width@ios_base@std@@QEAA_J_J@Z */
4677 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4678 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4680 streamsize ret = this->wide;
4682 TRACE("(%p %ld)\n", this, width);
4688 /* ?width@ios_base@std@@QBEHXZ */
4689 /* ?width@ios_base@std@@QEBA_JXZ */
4690 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4691 streamsize __thiscall ios_base_width_get(ios_base *this)
4693 TRACE("(%p)\n", this);
4697 /* ?xalloc@ios_base@std@@SAHXZ */
4698 int CDECL ios_base_xalloc(void)
4705 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4706 ret = ios_base_Index++;
4707 _Lockit_dtor(&lock);
4711 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4712 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4713 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4714 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4716 TRACE("(%p)\n", this);
4718 ios_base_ctor(&this->base);
4719 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4723 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4724 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4725 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4726 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4728 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4729 ios_base__Init(&this->base);
4730 this->strbuf = streambuf;
4731 this->stream = NULL;
4735 ios_base_setstate(&this->base, IOSTATE_badbit);
4738 FIXME("standard streams not handled yet\n");
4741 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4742 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4743 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4744 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4746 TRACE("(%p %p)\n", this, strbuf);
4748 basic_ios_char_ctor(this);
4749 basic_ios_char_init(this, strbuf, FALSE);
4753 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4754 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4755 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4756 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4758 TRACE("(%p)\n", this);
4759 ios_base_dtor(&this->base);
4762 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4763 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4765 TRACE("(%p %x)\n", this, flags);
4767 /* we have an array, with the number of elements stored before the first object */
4768 INT_PTR i, *ptr = (INT_PTR *)this-1;
4770 for(i=*ptr-1; i>=0; i--)
4771 basic_ios_char_dtor(this+i);
4772 MSVCRT_operator_delete(ptr);
4774 basic_ios_char_dtor(this);
4776 MSVCRT_operator_delete(this);
4782 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4783 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4784 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4785 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4787 TRACE("(%p %x %x)\n", this, state, reraise);
4788 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4791 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4792 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4793 static void basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4795 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4798 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4799 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4800 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4801 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4803 TRACE("(%p %p)\n", this, copy);
4807 this->stream = copy->stream;
4808 this->fillch = copy->fillch;
4809 ios_base_copyfmt(&this->base, ©->base);
4813 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4814 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4815 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4816 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4818 char ret = this->fillch;
4820 TRACE("(%p %c)\n", this, fill);
4822 this->fillch = fill;
4826 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4827 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4828 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4829 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4831 TRACE("(%p)\n", this);
4832 return this->fillch;
4835 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4836 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4837 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4838 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4840 TRACE("(%p %p %p)\n", this, ret, loc);
4843 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
4847 return ios_base_imbue(&this->base, ret, loc);
4850 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4851 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4852 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
4853 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
4855 TRACE("(%p %c %c)\n", this, ch, def);
4856 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def);
4859 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4860 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4861 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
4862 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
4864 basic_streambuf_char *ret = this->strbuf;
4866 TRACE("(%p %p)\n", this, streambuf);
4868 this->strbuf = streambuf;
4869 basic_ios_char_clear(this, IOSTATE_goodbit);
4873 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4874 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4875 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
4876 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
4878 TRACE("(%p)\n", this);
4879 return this->strbuf;
4882 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4883 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4884 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
4885 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4887 TRACE("(%p %x %x)\n", this, state, reraise);
4889 if(state != IOSTATE_goodbit)
4890 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
4893 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4894 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4895 static void basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
4897 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4900 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4901 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4902 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
4903 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
4905 basic_ostream_char *ret = this->stream;
4907 TRACE("(%p %p)\n", this, ostream);
4909 this->stream = ostream;
4913 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4914 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4915 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
4916 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
4918 TRACE("(%p)\n", this);
4919 return this->stream;
4922 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4923 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4924 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
4925 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
4927 TRACE("(%p %c)\n", this, ch);
4928 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch);
4932 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4933 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4934 static basic_ios_wchar* basic_ios_wchar_ctor(basic_ios_wchar *this)
4936 TRACE("(%p)\n", this);
4938 ios_base_ctor(&this->base);
4939 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
4943 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4944 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4945 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
4946 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
4948 basic_ios_wchar_ctor(this);
4949 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4953 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4954 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4955 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4956 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4957 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
4958 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
4960 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4961 ios_base__Init(&this->base);
4962 this->strbuf = streambuf;
4963 this->stream = NULL;
4967 ios_base_setstate(&this->base, IOSTATE_badbit);
4970 FIXME("standard streams not handled yet\n");
4973 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4974 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4975 static basic_ios_wchar* basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4977 TRACE("(%p %p)\n", this, strbuf);
4979 basic_ios_wchar_ctor(this);
4980 basic_ios_wchar_init(this, strbuf, FALSE);
4984 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4985 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4986 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
4987 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4989 basic_ios_wchar_ctor_streambuf(this, strbuf);
4990 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4994 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4995 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4996 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4997 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4998 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
4999 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
5001 TRACE("(%p)\n", this);
5002 ios_base_dtor(&this->base);
5005 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
5006 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
5008 TRACE("(%p %x)\n", this, flags);
5010 /* we have an array, with the number of elements stored before the first object */
5011 INT_PTR i, *ptr = (INT_PTR *)this-1;
5013 for(i=*ptr-1; i>=0; i--)
5014 basic_ios_wchar_dtor(this+i);
5015 MSVCRT_operator_delete(ptr);
5017 basic_ios_wchar_dtor(this);
5019 MSVCRT_operator_delete(this);
5025 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5026 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5027 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5028 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5029 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
5030 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5032 TRACE("(%p %x %x)\n", this, state, reraise);
5033 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
5036 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5037 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5038 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5039 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5040 static void basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
5042 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
5045 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
5046 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5047 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
5048 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5049 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
5050 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
5052 TRACE("(%p %p)\n", this, copy);
5056 this->stream = copy->stream;
5057 this->fillch = copy->fillch;
5058 ios_base_copyfmt(&this->base, ©->base);
5062 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
5063 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
5064 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
5065 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
5066 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
5067 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
5069 wchar_t ret = this->fillch;
5071 TRACE("(%p %c)\n", this, fill);
5073 this->fillch = fill;
5077 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
5078 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
5079 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
5080 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
5081 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
5082 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
5084 TRACE("(%p)\n", this);
5085 return this->fillch;
5088 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5089 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5090 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5091 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5092 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
5093 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
5095 TRACE("(%p %p %p)\n", this, ret, loc);
5098 basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
5102 return ios_base_imbue(&this->base, ret, loc);
5105 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
5106 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
5107 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
5108 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
5109 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
5110 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
5112 TRACE("(%p %c %c)\n", this, ch, def);
5113 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def);
5116 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5117 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5118 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
5119 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5120 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
5121 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
5123 basic_streambuf_wchar *ret = this->strbuf;
5125 TRACE("(%p %p)\n", this, streambuf);
5127 this->strbuf = streambuf;
5128 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5132 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5133 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5134 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5135 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5136 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5137 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5139 TRACE("(%p)\n", this);
5140 return this->strbuf;
5143 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5144 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5145 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5146 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5147 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5148 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5150 TRACE("(%p %x %x)\n", this, state, reraise);
5152 if(state != IOSTATE_goodbit)
5153 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5156 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5157 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5158 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5159 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5160 static void basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5162 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5165 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5166 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5167 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5168 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5169 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5170 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5172 basic_ostream_wchar *ret = this->stream;
5174 TRACE("(%p %p)\n", this, ostream);
5176 this->stream = ostream;
5180 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5181 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5182 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5183 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5184 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5185 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5187 TRACE("(%p)\n", this);
5188 return this->stream;
5191 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5192 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5193 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5194 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5195 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5196 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5198 TRACE("(%p %c)\n", this, ch);
5199 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch);
5202 /* Caution: basic_ostream uses virtual inheritance.
5203 * All constructors have additional parameter that says if base class should be initialized.
5204 * Base class needs to be accessed using vbtable.
5206 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5208 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5211 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5213 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5216 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5218 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5221 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5222 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5223 static basic_ostream_char* basic_ostream_char_ctor(basic_ostream_char *this,
5224 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5226 basic_ios_char *base;
5228 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5231 this->vbtable = basic_ostream_char_vbtable;
5232 base = basic_ostream_char_get_basic_ios(this);
5233 basic_ios_char_ctor(base);
5235 base = basic_ostream_char_get_basic_ios(this);
5238 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5239 basic_ios_char_init(base, strbuf, isstd);
5243 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5244 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5245 static basic_ostream_char* basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5246 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5248 basic_ios_char *base;
5250 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5253 this->vbtable = basic_ostream_char_vbtable;
5254 base = basic_ostream_char_get_basic_ios(this);
5255 basic_ios_char_ctor(base);
5257 base = basic_ostream_char_get_basic_ios(this);
5260 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5262 ios_base_Addstd(&base->base);
5266 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5267 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5268 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5269 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5271 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5273 /* don't destroy virtual base here */
5274 TRACE("(%p)\n", this);
5277 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5278 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5279 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5280 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5282 TRACE("(%p)\n", this);
5283 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5284 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5287 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5288 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5290 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5292 TRACE("(%p %x)\n", this, flags);
5295 /* we have an array, with the number of elements stored before the first object */
5296 INT_PTR i, *ptr = (INT_PTR *)this-1;
5298 for(i=*ptr-1; i>=0; i--)
5299 basic_ostream_char_vbase_dtor(this+i);
5300 MSVCRT_operator_delete(ptr);
5302 basic_ostream_char_vbase_dtor(this);
5304 MSVCRT_operator_delete(this);
5310 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5311 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5312 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5313 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5315 /* this function is not matching C++ specification */
5316 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5318 TRACE("(%p)\n", this);
5320 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5321 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5322 basic_ios_char_setstate(base, IOSTATE_badbit);
5326 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5327 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5328 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5330 return basic_ostream_char_flush(ostream);
5333 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5334 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5335 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5337 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5339 TRACE("(%p)\n", this);
5341 if(base->base.fmtfl & FMTFLAG_unitbuf)
5342 basic_ostream_char_flush(this);
5345 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5346 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5347 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5348 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5350 TRACE("(%p)\n", this);
5351 basic_ostream_char__Osfx(this);
5354 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5356 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5358 if(basic_ios_char_rdbuf_get(base))
5359 basic_streambuf_char__Lock(base->strbuf);
5361 if(ios_base_good(&base->base) && base->stream)
5362 basic_ostream_char_flush(base->stream);
5364 return ios_base_good(&base->base);
5367 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5369 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5371 if(ios_base_good(&base->base) && !__uncaught_exception())
5372 basic_ostream_char_osfx(ostr);
5374 if(basic_ios_char_rdbuf_get(base))
5375 basic_streambuf_char__Unlock(base->strbuf);
5378 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5379 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5380 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5381 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5383 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5385 TRACE("(%p)\n", this);
5387 if(ios_base_good(&base->base) && base->stream)
5388 basic_ostream_char_flush(base->stream);
5389 return ios_base_good(&base->base);
5392 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5393 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5394 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5395 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5397 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5399 TRACE("(%p %c)\n", this, ch);
5401 if(!basic_ostream_char_sentry_create(this)
5402 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5403 basic_ostream_char_sentry_destroy(this);
5404 basic_ios_char_setstate(base, IOSTATE_badbit);
5408 basic_ostream_char_sentry_destroy(this);
5412 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5413 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5414 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5415 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5417 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5419 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5421 if(!ios_base_fail(&base->base)) {
5424 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5425 &seek, pos, OPENMODE_out);
5426 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5427 basic_ios_char_setstate(base, IOSTATE_failbit);
5432 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5433 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5434 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5435 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5437 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5439 TRACE("(%p)\n", this);
5441 if(!ios_base_fail(&base->base)) {
5442 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5443 ret, 0, SEEKDIR_cur, OPENMODE_out);
5452 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5453 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5454 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5455 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5457 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5459 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5461 if(!basic_ostream_char_sentry_create(this)
5462 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5463 basic_ostream_char_sentry_destroy(this);
5464 basic_ios_char_setstate(base, IOSTATE_badbit);
5468 basic_ostream_char_sentry_destroy(this);
5472 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5473 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5474 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5475 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5477 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5478 int state = IOSTATE_goodbit;
5480 TRACE("(%p %d)\n", this, val);
5482 if(basic_ostream_char_sentry_create(this)) {
5483 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5484 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5485 ostreambuf_iterator_char dest = {0, strbuf};
5487 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5488 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5489 ? (LONG)((unsigned short)val) : (LONG)val);
5491 basic_ostream_char_sentry_destroy(this);
5493 basic_ios_char_setstate(base, state);
5497 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5498 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5499 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5500 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5502 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5503 int state = IOSTATE_goodbit;
5505 TRACE("(%p %u)\n", this, val);
5507 if(basic_ostream_char_sentry_create(this)) {
5508 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5509 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5510 ostreambuf_iterator_char dest = {0, strbuf};
5512 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5514 basic_ostream_char_sentry_destroy(this);
5516 basic_ios_char_setstate(base, state);
5520 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5521 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5522 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5523 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5524 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5525 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5527 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5528 int state = IOSTATE_goodbit;
5530 TRACE("(%p %d)\n", this, val);
5532 if(basic_ostream_char_sentry_create(this)) {
5533 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5534 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5535 ostreambuf_iterator_char dest = {0, strbuf};
5537 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5539 basic_ostream_char_sentry_destroy(this);
5541 basic_ios_char_setstate(base, state);
5545 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5546 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5547 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5548 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5549 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5550 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5552 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5553 int state = IOSTATE_goodbit;
5555 TRACE("(%p %u)\n", this, val);
5557 if(basic_ostream_char_sentry_create(this)) {
5558 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5559 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5560 ostreambuf_iterator_char dest = {0, strbuf};
5562 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5564 basic_ostream_char_sentry_destroy(this);
5566 basic_ios_char_setstate(base, state);
5570 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5571 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5572 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5573 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5575 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5576 int state = IOSTATE_goodbit;
5578 TRACE("(%p %f)\n", this, val);
5580 if(basic_ostream_char_sentry_create(this)) {
5581 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5582 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5583 ostreambuf_iterator_char dest = {0, strbuf};
5585 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5587 basic_ostream_char_sentry_destroy(this);
5589 basic_ios_char_setstate(base, state);
5593 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5594 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5595 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5596 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5598 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5599 int state = IOSTATE_goodbit;
5601 TRACE("(%p %lf)\n", this, val);
5603 if(basic_ostream_char_sentry_create(this)) {
5604 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5605 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5606 ostreambuf_iterator_char dest = {0, strbuf};
5608 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5610 basic_ostream_char_sentry_destroy(this);
5612 basic_ios_char_setstate(base, state);
5616 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5617 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5618 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5619 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5621 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5622 int state = IOSTATE_goodbit;
5624 TRACE("(%p %lf)\n", this, val);
5626 if(basic_ostream_char_sentry_create(this)) {
5627 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5628 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5629 ostreambuf_iterator_char dest = {0, strbuf};
5631 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5633 basic_ostream_char_sentry_destroy(this);
5635 basic_ios_char_setstate(base, state);
5639 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5640 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5641 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5642 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5644 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5645 IOSB_iostate state = IOSTATE_badbit;
5648 TRACE("(%p %p)\n", this, val);
5650 if(basic_ostream_char_sentry_create(this)) {
5651 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5652 c = basic_streambuf_char_snextc(val)) {
5653 state = IOSTATE_goodbit;
5655 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5656 state = IOSTATE_badbit;
5661 state = IOSTATE_badbit;
5663 basic_ostream_char_sentry_destroy(this);
5665 ios_base_width_set(&base->base, 0);
5666 basic_ios_char_setstate(base, state);
5670 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5671 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5672 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5673 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5675 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5676 int state = IOSTATE_goodbit;
5678 TRACE("(%p %p)\n", this, val);
5680 if(basic_ostream_char_sentry_create(this)) {
5681 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5682 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5683 ostreambuf_iterator_char dest = {0, strbuf};
5685 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5687 basic_ostream_char_sentry_destroy(this);
5689 basic_ios_char_setstate(base, state);
5693 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5694 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5695 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5696 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5698 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5699 int state = IOSTATE_goodbit;
5701 TRACE("(%p)\n", this);
5703 if(basic_ostream_char_sentry_create(this)) {
5704 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5705 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5706 ostreambuf_iterator_char dest = {0, strbuf};
5708 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5710 basic_ostream_char_sentry_destroy(this);
5712 basic_ios_char_setstate(base, state);
5716 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5717 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5718 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5719 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5721 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5722 int state = IOSTATE_goodbit;
5724 TRACE("(%p)\n", this);
5726 if(basic_ostream_char_sentry_create(this)) {
5727 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5728 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5729 ostreambuf_iterator_char dest = {0, strbuf};
5731 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5733 basic_ostream_char_sentry_destroy(this);
5735 basic_ios_char_setstate(base, state);
5739 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5740 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5741 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5742 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5744 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5745 int state = IOSTATE_goodbit;
5747 TRACE("(%p %x)\n", this, val);
5749 if(basic_ostream_char_sentry_create(this)) {
5750 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5751 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5752 ostreambuf_iterator_char dest = {0, strbuf};
5754 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5756 basic_ostream_char_sentry_destroy(this);
5758 basic_ios_char_setstate(base, state);
5762 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5763 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5764 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5766 TRACE("(%p)\n", ostr);
5768 basic_ostream_char_put(ostr, '\n');
5769 basic_ostream_char_flush(ostr);
5773 /* $?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 */
5774 /* ??$?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 */
5775 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5777 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5778 IOSB_iostate state = IOSTATE_goodbit;
5780 TRACE("(%p %p)\n", ostr, str);
5782 if(basic_ostream_char_sentry_create(ostr)) {
5783 MSVCP_size_t len = basic_string_char_length(str);
5784 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5786 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5787 for(; pad!=0; pad--) {
5788 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5789 state = IOSTATE_badbit;
5795 if(state == IOSTATE_goodbit) {
5796 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5797 state = IOSTATE_badbit;
5800 if(state == IOSTATE_goodbit) {
5801 for(; pad!=0; pad--) {
5802 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5803 state = IOSTATE_badbit;
5809 base->base.wide = 0;
5811 state = IOSTATE_badbit;
5813 basic_ostream_char_sentry_destroy(ostr);
5815 basic_ios_char_setstate(base, state);
5819 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5820 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5821 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5822 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5823 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5824 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5825 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5827 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5828 IOSB_iostate state = IOSTATE_goodbit;
5830 TRACE("(%p %d)\n", ostr, ch);
5832 if(basic_ostream_char_sentry_create(ostr)) {
5833 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5835 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5836 for(; pad!=0; pad--) {
5837 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5838 state = IOSTATE_badbit;
5844 if(state == IOSTATE_goodbit) {
5845 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5846 state = IOSTATE_badbit;
5849 if(state == IOSTATE_goodbit) {
5850 for(; pad!=0; pad--) {
5851 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5852 state = IOSTATE_badbit;
5858 base->base.wide = 0;
5860 state = IOSTATE_badbit;
5862 basic_ostream_char_sentry_destroy(ostr);
5864 basic_ios_char_setstate(base, state);
5868 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5869 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5870 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5871 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5872 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5873 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5874 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5876 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5877 IOSB_iostate state = IOSTATE_goodbit;
5879 TRACE("(%p %s)\n", ostr, str);
5881 if(basic_ostream_char_sentry_create(ostr)) {
5882 MSVCP_size_t len = strlen(str);
5883 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5885 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5886 for(; pad!=0; pad--) {
5887 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5888 state = IOSTATE_badbit;
5894 if(state == IOSTATE_goodbit) {
5895 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5896 state = IOSTATE_badbit;
5899 if(state == IOSTATE_goodbit) {
5900 for(; pad!=0; pad--) {
5901 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5902 state = IOSTATE_badbit;
5908 base->base.wide = 0;
5910 state = IOSTATE_badbit;
5912 basic_ostream_char_sentry_destroy(ostr);
5914 basic_ios_char_setstate(base, state);
5918 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5919 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5920 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5921 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5922 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5924 TRACE("(%p %p)\n", this, pfunc);
5929 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5930 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5931 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5932 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5933 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5935 TRACE("(%p %p)\n", this, pfunc);
5936 pfunc(basic_ostream_char_get_basic_ios(this));
5940 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5941 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5942 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5943 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5944 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5946 TRACE("(%p %p)\n", this, pfunc);
5947 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5951 /* Caution: basic_ostream uses virtual inheritance. */
5952 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5954 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5957 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5959 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5962 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5964 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5967 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5968 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5969 static basic_ostream_wchar* basic_ostream_wchar_ctor(basic_ostream_wchar *this,
5970 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5972 basic_ios_wchar *base;
5974 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5977 this->vbtable = basic_ostream_wchar_vbtable;
5978 base = basic_ostream_wchar_get_basic_ios(this);
5979 basic_ios_wchar_ctor(base);
5981 base = basic_ostream_wchar_get_basic_ios(this);
5984 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5985 basic_ios_wchar_init(base, strbuf, isstd);
5989 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5990 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5991 static basic_ostream_wchar* basic_ostream_short_ctor(basic_ostream_wchar *this,
5992 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5994 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
5995 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
5999 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
6000 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
6001 static basic_ostream_wchar* basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
6002 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
6004 basic_ios_wchar *base;
6006 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
6009 this->vbtable = basic_ostream_wchar_vbtable;
6010 base = basic_ostream_wchar_get_basic_ios(this);
6011 basic_ios_wchar_ctor(base);
6013 base = basic_ostream_wchar_get_basic_ios(this);
6016 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6018 ios_base_Addstd(&base->base);
6022 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6023 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6024 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6025 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6026 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
6027 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
6029 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6031 /* don't destroy virtual base here */
6032 TRACE("(%p)\n", this);
6035 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6036 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6037 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6038 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6039 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
6040 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
6042 TRACE("(%p)\n", this);
6043 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
6044 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
6047 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
6048 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
6050 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6052 TRACE("(%p %x)\n", this, flags);
6055 /* we have an array, with the number of elements stored before the first object */
6056 INT_PTR i, *ptr = (INT_PTR *)this-1;
6058 for(i=*ptr-1; i>=0; i--)
6059 basic_ostream_wchar_vbase_dtor(this+i);
6060 MSVCRT_operator_delete(ptr);
6062 basic_ostream_wchar_vbase_dtor(this);
6064 MSVCRT_operator_delete(this);
6070 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
6071 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
6072 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
6073 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
6074 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
6075 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
6077 /* this function is not matching C++ specification */
6078 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6080 TRACE("(%p)\n", this);
6082 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
6083 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
6084 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6088 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6089 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6090 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6091 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6092 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
6094 return basic_ostream_wchar_flush(ostream);
6097 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6098 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6099 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6100 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6101 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
6103 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6105 TRACE("(%p)\n", this);
6107 if(base->base.fmtfl & FMTFLAG_unitbuf)
6108 basic_ostream_wchar_flush(this);
6111 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6112 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6113 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6114 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6115 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
6116 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
6118 TRACE("(%p)\n", this);
6119 basic_ostream_wchar__Osfx(this);
6122 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6124 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6126 if(basic_ios_wchar_rdbuf_get(base))
6127 basic_streambuf_wchar__Lock(base->strbuf);
6129 if(ios_base_good(&base->base) && base->stream)
6130 basic_ostream_wchar_flush(base->stream);
6132 return ios_base_good(&base->base);
6135 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6137 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6139 if(ios_base_good(&base->base) && !__uncaught_exception())
6140 basic_ostream_wchar_osfx(ostr);
6142 if(basic_ios_wchar_rdbuf_get(base))
6143 basic_streambuf_wchar__Unlock(base->strbuf);
6146 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6147 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6148 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6149 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6150 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6151 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6153 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6155 TRACE("(%p)\n", this);
6157 if(ios_base_good(&base->base) && base->stream)
6158 basic_ostream_wchar_flush(base->stream);
6159 return ios_base_good(&base->base);
6162 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6163 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6164 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6165 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6166 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6167 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6169 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6171 TRACE("(%p %c)\n", this, ch);
6173 if(!basic_ostream_wchar_sentry_create(this)
6174 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6175 basic_ostream_wchar_sentry_destroy(this);
6176 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6180 basic_ostream_wchar_sentry_destroy(this);
6184 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6185 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6186 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6187 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6188 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6189 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6191 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6193 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6195 if(!ios_base_fail(&base->base)) {
6198 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6199 &seek, pos, OPENMODE_out);
6200 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6201 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6206 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6207 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6208 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6209 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6210 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6211 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6213 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6215 TRACE("(%p)\n", this);
6217 if(!ios_base_fail(&base->base)) {
6218 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6219 ret, 0, SEEKDIR_cur, OPENMODE_out);
6228 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6229 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6230 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6231 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6232 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6233 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6235 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6237 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6239 if(!basic_ostream_wchar_sentry_create(this)
6240 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6241 basic_ostream_wchar_sentry_destroy(this);
6242 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6246 basic_ostream_wchar_sentry_destroy(this);
6250 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6252 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6253 int state = IOSTATE_goodbit;
6255 TRACE("(%p %d)\n", this, val);
6257 if(basic_ostream_wchar_sentry_create(this)) {
6258 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6259 ostreambuf_iterator_wchar dest = {0, strbuf};
6261 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6262 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6263 ? (LONG)((unsigned short)val) : (LONG)val);
6265 basic_ostream_wchar_sentry_destroy(this);
6267 basic_ios_wchar_setstate(base, state);
6271 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6272 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6273 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6274 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6276 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6277 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6280 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6282 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6283 int state = IOSTATE_goodbit;
6285 TRACE("(%p %d)\n", this, val);
6287 if(basic_ostream_wchar_sentry_create(this)) {
6288 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6289 ostreambuf_iterator_wchar dest = {0, strbuf};
6291 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6293 basic_ostream_wchar_sentry_destroy(this);
6295 basic_ios_wchar_setstate(base, state);
6299 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6300 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6301 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6302 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6303 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6304 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6306 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6307 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6310 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6312 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6313 int state = IOSTATE_goodbit;
6315 TRACE("(%p %u)\n", this, val);
6317 if(basic_ostream_wchar_sentry_create(this)) {
6318 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6319 ostreambuf_iterator_wchar dest = {0, strbuf};
6321 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6323 basic_ostream_wchar_sentry_destroy(this);
6325 basic_ios_wchar_setstate(base, state);
6329 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6330 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6331 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6332 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6333 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6334 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6336 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6337 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6340 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6342 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6343 int state = IOSTATE_goodbit;
6345 TRACE("(%p %f)\n", this, val);
6347 if(basic_ostream_wchar_sentry_create(this)) {
6348 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6349 ostreambuf_iterator_wchar dest = {0, strbuf};
6351 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6353 basic_ostream_wchar_sentry_destroy(this);
6355 basic_ios_wchar_setstate(base, state);
6359 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6360 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6361 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6362 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6364 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6365 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6368 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6370 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6371 int state = IOSTATE_goodbit;
6373 TRACE("(%p %lf)\n", this, val);
6375 if(basic_ostream_wchar_sentry_create(this)) {
6376 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6377 ostreambuf_iterator_wchar dest = {0, strbuf};
6379 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6381 basic_ostream_wchar_sentry_destroy(this);
6383 basic_ios_wchar_setstate(base, state);
6387 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6388 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6389 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6390 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6392 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6393 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6396 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6398 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6399 int state = IOSTATE_goodbit;
6401 TRACE("(%p %lf)\n", this, val);
6403 if(basic_ostream_wchar_sentry_create(this)) {
6404 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6405 ostreambuf_iterator_wchar dest = {0, strbuf};
6407 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6409 basic_ostream_wchar_sentry_destroy(this);
6411 basic_ios_wchar_setstate(base, state);
6415 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6416 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6417 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6418 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6420 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6421 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6424 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6425 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6426 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6427 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6428 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6429 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6431 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6432 IOSB_iostate state = IOSTATE_badbit;
6433 unsigned short c = '\n';
6435 TRACE("(%p %p)\n", this, val);
6437 if(basic_ostream_wchar_sentry_create(this)) {
6438 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6439 c = basic_streambuf_wchar_snextc(val)) {
6440 state = IOSTATE_goodbit;
6442 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6443 state = IOSTATE_badbit;
6448 state = IOSTATE_badbit;
6450 basic_ostream_wchar_sentry_destroy(this);
6452 ios_base_width_set(&base->base, 0);
6453 basic_ios_wchar_setstate(base, state);
6457 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6459 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6460 int state = IOSTATE_goodbit;
6462 TRACE("(%p %p)\n", this, val);
6464 if(basic_ostream_wchar_sentry_create(this)) {
6465 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6466 ostreambuf_iterator_wchar dest = {0, strbuf};
6468 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6470 basic_ostream_wchar_sentry_destroy(this);
6472 basic_ios_wchar_setstate(base, state);
6476 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6477 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6478 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6479 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6481 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6482 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6485 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6487 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6488 int state = IOSTATE_goodbit;
6490 TRACE("(%p)\n", this);
6492 if(basic_ostream_wchar_sentry_create(this)) {
6493 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6494 ostreambuf_iterator_wchar dest = {0, strbuf};
6496 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6498 basic_ostream_wchar_sentry_destroy(this);
6500 basic_ios_wchar_setstate(base, state);
6504 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6505 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6506 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6507 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6509 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6510 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6513 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6515 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6516 int state = IOSTATE_goodbit;
6518 TRACE("(%p)\n", this);
6520 if(basic_ostream_wchar_sentry_create(this)) {
6521 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6522 ostreambuf_iterator_wchar dest = {0, strbuf};
6524 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6526 basic_ostream_wchar_sentry_destroy(this);
6528 basic_ios_wchar_setstate(base, state);
6532 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6533 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6534 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6535 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6537 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6538 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6541 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6543 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6544 int state = IOSTATE_goodbit;
6546 TRACE("(%p %x)\n", this, val);
6548 if(basic_ostream_wchar_sentry_create(this)) {
6549 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6550 ostreambuf_iterator_wchar dest = {0, strbuf};
6552 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6554 basic_ostream_wchar_sentry_destroy(this);
6556 basic_ios_wchar_setstate(base, state);
6560 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6561 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6562 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6563 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6565 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6566 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6569 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6570 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6571 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6572 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6573 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6575 TRACE("(%p)\n", ostr);
6577 basic_ostream_wchar_put(ostr, '\n');
6578 basic_ostream_wchar_flush(ostr);
6582 /* ??$?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 */
6583 /* ??$?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 */
6584 /* ??$?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 */
6585 /* ??$?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 */
6586 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6588 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6589 IOSB_iostate state = IOSTATE_goodbit;
6591 TRACE("(%p %p)\n", ostr, str);
6593 if(basic_ostream_wchar_sentry_create(ostr)) {
6594 MSVCP_size_t len = basic_string_wchar_length(str);
6595 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6597 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6598 for(; pad!=0; pad--) {
6599 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6600 state = IOSTATE_badbit;
6606 if(state == IOSTATE_goodbit) {
6607 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6608 state = IOSTATE_badbit;
6611 if(state == IOSTATE_goodbit) {
6612 for(; pad!=0; pad--) {
6613 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6614 state = IOSTATE_badbit;
6620 base->base.wide = 0;
6622 state = IOSTATE_badbit;
6624 basic_ostream_wchar_sentry_destroy(ostr);
6626 basic_ios_wchar_setstate(base, state);
6630 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6631 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6632 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6633 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6634 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6636 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6637 IOSB_iostate state = IOSTATE_goodbit;
6639 TRACE("(%p %d)\n", ostr, ch);
6641 if(basic_ostream_wchar_sentry_create(ostr)) {
6642 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6644 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6645 for(; pad!=0; pad--) {
6646 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6647 state = IOSTATE_badbit;
6653 if(state == IOSTATE_goodbit) {
6654 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6655 state = IOSTATE_badbit;
6658 if(state == IOSTATE_goodbit) {
6659 for(; pad!=0; pad--) {
6660 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6661 state = IOSTATE_badbit;
6667 base->base.wide = 0;
6669 state = IOSTATE_badbit;
6671 basic_ostream_wchar_sentry_destroy(ostr);
6673 basic_ios_wchar_setstate(base, state);
6677 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6678 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6679 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6680 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6681 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6683 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6684 IOSB_iostate state = IOSTATE_goodbit;
6686 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6688 if(basic_ostream_wchar_sentry_create(ostr)) {
6689 MSVCP_size_t len = wcslen(str);
6690 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6692 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6693 for(; pad!=0; pad--) {
6694 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6695 state = IOSTATE_badbit;
6701 if(state == IOSTATE_goodbit) {
6702 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6703 state = IOSTATE_badbit;
6706 if(state == IOSTATE_goodbit) {
6707 for(; pad!=0; pad--) {
6708 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6709 state = IOSTATE_badbit;
6715 base->base.wide = 0;
6717 state = IOSTATE_badbit;
6719 basic_ostream_wchar_sentry_destroy(ostr);
6721 basic_ios_wchar_setstate(base, state);
6725 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6726 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6727 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6728 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6729 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6730 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6731 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6733 TRACE("(%p %p)\n", this, pfunc);
6738 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6739 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6740 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6741 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6742 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6743 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6744 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6746 TRACE("(%p %p)\n", this, pfunc);
6747 pfunc(basic_ostream_wchar_get_basic_ios(this));
6751 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6752 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6753 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6754 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6755 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6756 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6757 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6759 TRACE("(%p %p)\n", this, pfunc);
6760 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6764 /* Caution: basic_istream uses virtual inheritance. */
6765 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6767 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6770 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6772 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6775 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6777 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6780 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6781 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6782 static basic_istream_char* basic_istream_char_ctor_init(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
6784 basic_ios_char *base;
6786 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6789 this->vbtable = basic_istream_char_vbtable;
6790 base = basic_istream_char_get_basic_ios(this);
6791 basic_ios_char_ctor(base);
6793 base = basic_istream_char_get_basic_ios(this);
6796 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6799 basic_ios_char_init(base, strbuf, isstd);
6803 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6804 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6805 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6806 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6808 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6811 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6812 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6813 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6814 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6816 basic_ios_char *base;
6818 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6821 this->vbtable = basic_istream_char_vbtable;
6822 base = basic_istream_char_get_basic_ios(this);
6823 basic_ios_char_ctor(base);
6825 base = basic_istream_char_get_basic_ios(this);
6828 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6829 ios_base_Addstd(&base->base);
6833 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6834 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6835 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6836 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6838 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6840 /* don't destroy virtual base here */
6841 TRACE("(%p)\n", this);
6844 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6845 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6846 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6847 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6849 TRACE("(%p)\n", this);
6850 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6851 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6854 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6855 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6857 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6859 TRACE("(%p %x)\n", this, flags);
6862 /* we have an array, with the number of elements stored before the first object */
6863 INT_PTR i, *ptr = (INT_PTR *)this-1;
6865 for(i=*ptr-1; i>=0; i--)
6866 basic_istream_char_vbase_dtor(this+i);
6867 MSVCRT_operator_delete(ptr);
6869 basic_istream_char_vbase_dtor(this);
6871 MSVCRT_operator_delete(this);
6877 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6878 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6879 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6881 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6883 TRACE("(%p %d)\n", this, noskip);
6885 if(ios_base_good(&base->base)) {
6886 if(basic_ios_char_tie_get(base))
6887 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6889 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6890 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6891 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
6894 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6895 ch = basic_streambuf_char_snextc(strbuf)) {
6897 basic_ios_char_setstate(base, IOSTATE_eofbit);
6901 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6907 if(!ios_base_good(&base->base)) {
6908 basic_ios_char_setstate(base, IOSTATE_failbit);
6915 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6916 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6917 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6918 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6920 return basic_istream_char__Ipfx(this, noskip);
6923 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6924 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6925 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6926 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6928 TRACE("(%p)\n", this);
6931 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6933 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6935 if(basic_ios_char_rdbuf_get(base))
6936 basic_streambuf_char__Lock(base->strbuf);
6938 return basic_istream_char_ipfx(istr, noskip);
6941 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6943 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6945 if(basic_ios_char_rdbuf_get(base))
6946 basic_streambuf_char__Unlock(base->strbuf);
6949 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6950 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6951 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6952 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6954 TRACE("(%p)\n", this);
6958 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6959 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6960 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6961 int __thiscall basic_istream_char_get(basic_istream_char *this)
6963 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6966 TRACE("(%p)\n", this);
6970 if(!basic_istream_char_sentry_create(this, TRUE)) {
6971 basic_istream_char_sentry_destroy(this);
6975 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6976 basic_istream_char_sentry_destroy(this);
6978 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6985 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6986 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6987 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6988 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6992 TRACE("(%p %p)\n", this, ch);
6994 ret = basic_istream_char_get(this);
7000 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7001 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7002 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
7003 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7005 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7008 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7012 if(basic_istream_char_sentry_create(this, TRUE)) {
7013 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7015 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
7016 ch = basic_streambuf_char_snextc(strbuf)) {
7017 if(ch==EOF || ch==delim)
7025 basic_istream_char_sentry_destroy(this);
7027 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7028 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7034 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7035 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7036 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
7037 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
7039 return basic_istream_char_get_str_delim(this, str, count, '\n');
7042 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7043 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7044 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
7045 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
7047 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7050 TRACE("(%p %p %c)\n", this, strbuf, delim);
7054 if(basic_istream_char_sentry_create(this, TRUE)) {
7055 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
7057 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
7058 ch = basic_streambuf_char_snextc(strbuf_read)) {
7059 if(ch==EOF || ch==delim)
7062 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
7067 basic_istream_char_sentry_destroy(this);
7069 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7070 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7074 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7075 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7076 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
7077 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
7079 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
7082 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7083 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7084 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
7085 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7087 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7088 int ch = (unsigned char)delim;
7090 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7094 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7095 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7098 ch = basic_streambuf_char_sbumpc(strbuf);
7100 if(ch==EOF || ch==(unsigned char)delim)
7108 if(ch == (unsigned char)delim)
7110 else if(ch != EOF) {
7111 ch = basic_streambuf_char_sgetc(strbuf);
7113 if(ch == (unsigned char)delim) {
7114 basic_streambuf_char__Gninc(strbuf);
7119 basic_istream_char_sentry_destroy(this);
7121 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7122 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7128 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7129 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7130 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7131 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7133 return basic_istream_char_getline_delim(this, str, count, '\n');
7136 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7137 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7138 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7139 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7141 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7142 int ch = (unsigned char)delim;
7145 TRACE("(%p %ld %d)\n", this, count, delim);
7149 if(basic_istream_char_sentry_create(this, TRUE)) {
7150 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7151 state = IOSTATE_goodbit;
7154 ch = basic_streambuf_char_sbumpc(strbuf);
7157 state = IOSTATE_eofbit;
7161 if(ch==(unsigned char)delim)
7165 if(count != INT_MAX)
7169 state = IOSTATE_failbit;
7170 basic_istream_char_sentry_destroy(this);
7172 basic_ios_char_setstate(base, state);
7176 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7177 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7178 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7180 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7183 TRACE("(%p)\n", istream);
7185 if(basic_istream_char_sentry_create(istream, TRUE)) {
7186 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7187 const ctype_char *ctype = ctype_char_use_facet(strbuf->loc);
7189 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7190 ch = basic_streambuf_char_snextc(strbuf)) {
7195 basic_istream_char_sentry_destroy(istream);
7198 basic_ios_char_setstate(base, IOSTATE_eofbit);
7202 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7203 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7204 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7205 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7207 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7210 TRACE("(%p)\n", this);
7214 if(basic_istream_char_sentry_create(this, TRUE))
7215 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7216 basic_istream_char_sentry_destroy(this);
7219 basic_ios_char_setstate(base, IOSTATE_eofbit);
7224 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7225 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7226 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7228 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7229 IOSB_iostate state = IOSTATE_goodbit;
7231 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7233 if(basic_istream_char_sentry_create(this, TRUE)) {
7234 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7236 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7237 if(this->count != count)
7238 state |= IOSTATE_failbit | IOSTATE_eofbit;
7242 basic_istream_char_sentry_destroy(this);
7244 basic_ios_char_setstate(base, state);
7248 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7249 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7250 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7251 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7253 return basic_istream_char__Read_s(this, str, count, count);
7256 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7257 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7258 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7260 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7261 IOSB_iostate state = IOSTATE_goodbit;
7263 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7267 if(basic_istream_char_sentry_create(this, TRUE)) {
7268 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7273 state |= IOSTATE_eofbit;
7275 basic_istream_char__Read_s(this, str, size, avail);
7277 state |= IOSTATE_failbit;
7279 basic_istream_char_sentry_destroy(this);
7281 basic_ios_char_setstate(base, state);
7285 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7286 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7287 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7288 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7290 return basic_istream_char__Readsome_s(this, str, count, count);
7293 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7294 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7295 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7296 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7298 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7299 IOSB_iostate state = IOSTATE_goodbit;
7301 TRACE("(%p %c)\n", this, ch);
7305 if(basic_istream_char_sentry_create(this, TRUE)) {
7306 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7308 if(!ios_base_good(&base->base))
7309 state |= IOSTATE_failbit;
7310 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7311 state |= IOSTATE_badbit;
7313 basic_istream_char_sentry_destroy(this);
7315 basic_ios_char_setstate(base, state);
7319 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7320 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7321 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7322 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7324 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7325 IOSB_iostate state = IOSTATE_goodbit;
7327 TRACE("(%p)\n", this);
7331 if(basic_istream_char_sentry_create(this, TRUE)) {
7332 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7334 if(!ios_base_good(&base->base))
7335 state |= IOSTATE_failbit;
7336 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7337 state |= IOSTATE_badbit;
7339 basic_istream_char_sentry_destroy(this);
7341 basic_ios_char_setstate(base, state);
7345 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7346 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7347 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7348 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7350 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7351 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7353 TRACE("(%p)\n", this);
7358 if(basic_istream_char_sentry_create(this, TRUE)) {
7359 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7360 basic_istream_char_sentry_destroy(this);
7364 basic_istream_char_sentry_destroy(this);
7366 basic_ios_char_setstate(base, IOSTATE_badbit);
7370 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7371 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7372 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7373 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7375 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7377 TRACE("(%p %p)\n", this, ret);
7379 if(ios_base_fail(&base->base)) {
7386 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7387 ret, 0, SEEKDIR_cur, OPENMODE_in);
7389 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7390 basic_ios_char_setstate(base, IOSTATE_failbit);
7395 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7396 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7397 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7398 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7400 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7402 TRACE("(%p %ld %d)\n", this, off, dir);
7404 if(!ios_base_fail(&base->base)) {
7405 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7408 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7410 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7411 basic_ios_char_setstate(base, IOSTATE_failbit);
7413 basic_ios_char_clear(base, IOSTATE_goodbit);
7416 basic_ios_char_clear(base, IOSTATE_goodbit);
7421 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7422 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7423 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7424 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7426 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7428 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7430 if(!ios_base_fail(&base->base)) {
7431 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7434 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7436 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7437 basic_ios_char_setstate(base, IOSTATE_failbit);
7439 basic_ios_char_clear(base, IOSTATE_goodbit);
7442 basic_ios_char_clear(base, IOSTATE_goodbit);
7447 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7448 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7449 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7450 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7452 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7453 int state = IOSTATE_goodbit;
7455 TRACE("(%p %p)\n", this, v);
7457 if(basic_istream_char_sentry_create(this, FALSE)) {
7458 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7459 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7460 istreambuf_iterator_char first={0}, last={0};
7463 first.strbuf = strbuf;
7464 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7466 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7469 state |= IOSTATE_failbit;
7471 basic_istream_char_sentry_destroy(this);
7473 basic_ios_char_setstate(base, state);
7477 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7478 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7479 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7480 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7482 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7483 int state = IOSTATE_goodbit;
7485 TRACE("(%p %p)\n", this, v);
7487 if(basic_istream_char_sentry_create(this, FALSE)) {
7488 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7489 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7490 istreambuf_iterator_char first={0}, last={0};
7492 first.strbuf = strbuf;
7493 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7495 basic_istream_char_sentry_destroy(this);
7497 basic_ios_char_setstate(base, state);
7501 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7502 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7503 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7504 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7506 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7507 int state = IOSTATE_goodbit;
7509 TRACE("(%p %p)\n", this, v);
7511 if(basic_istream_char_sentry_create(this, FALSE)) {
7512 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7513 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7514 istreambuf_iterator_char first={0}, last={0};
7516 first.strbuf = strbuf;
7517 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7519 basic_istream_char_sentry_destroy(this);
7521 basic_ios_char_setstate(base, state);
7525 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7526 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7527 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7528 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7530 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7531 int state = IOSTATE_goodbit;
7533 TRACE("(%p %p)\n", this, v);
7535 if(basic_istream_char_sentry_create(this, FALSE)) {
7536 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7537 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7538 istreambuf_iterator_char first={0}, last={0};
7540 first.strbuf = strbuf;
7541 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7543 basic_istream_char_sentry_destroy(this);
7545 basic_ios_char_setstate(base, state);
7549 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7550 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7551 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7552 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7554 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7555 int state = IOSTATE_goodbit;
7557 TRACE("(%p %p)\n", this, v);
7559 if(basic_istream_char_sentry_create(this, FALSE)) {
7560 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7561 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7562 istreambuf_iterator_char first={0}, last={0};
7564 first.strbuf = strbuf;
7565 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7567 basic_istream_char_sentry_destroy(this);
7569 basic_ios_char_setstate(base, state);
7573 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7574 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7575 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7576 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7578 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7579 int state = IOSTATE_goodbit;
7581 TRACE("(%p %p)\n", this, v);
7583 if(basic_istream_char_sentry_create(this, FALSE)) {
7584 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7585 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7586 istreambuf_iterator_char first={0}, last={0};
7588 first.strbuf = strbuf;
7589 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7591 basic_istream_char_sentry_destroy(this);
7593 basic_ios_char_setstate(base, state);
7597 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7598 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7599 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7600 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7602 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7603 int state = IOSTATE_goodbit;
7605 TRACE("(%p %p)\n", this, v);
7607 if(basic_istream_char_sentry_create(this, FALSE)) {
7608 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7609 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7610 istreambuf_iterator_char first={0}, last={0};
7612 first.strbuf = strbuf;
7613 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7615 basic_istream_char_sentry_destroy(this);
7617 basic_ios_char_setstate(base, state);
7621 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7622 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7623 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7624 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7626 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7627 int state = IOSTATE_goodbit;
7629 TRACE("(%p %p)\n", this, v);
7631 if(basic_istream_char_sentry_create(this, FALSE)) {
7632 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7633 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7634 istreambuf_iterator_char first={0}, last={0};
7636 first.strbuf = strbuf;
7637 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7639 basic_istream_char_sentry_destroy(this);
7641 basic_ios_char_setstate(base, state);
7645 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7646 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7647 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7648 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7650 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7651 int state = IOSTATE_goodbit;
7653 TRACE("(%p %p)\n", this, v);
7655 if(basic_istream_char_sentry_create(this, FALSE)) {
7656 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7657 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7658 istreambuf_iterator_char first={0}, last={0};
7660 first.strbuf = strbuf;
7661 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7663 basic_istream_char_sentry_destroy(this);
7665 basic_ios_char_setstate(base, state);
7669 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7670 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7671 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7672 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7674 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7675 int state = IOSTATE_goodbit;
7677 TRACE("(%p %p)\n", this, v);
7679 if(basic_istream_char_sentry_create(this, FALSE)) {
7680 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7681 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7682 istreambuf_iterator_char first={0}, last={0};
7684 first.strbuf = strbuf;
7685 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7687 basic_istream_char_sentry_destroy(this);
7689 basic_ios_char_setstate(base, state);
7693 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7694 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7695 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7696 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7698 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7699 int state = IOSTATE_goodbit;
7701 TRACE("(%p %p)\n", this, v);
7703 if(basic_istream_char_sentry_create(this, FALSE)) {
7704 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7705 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7706 istreambuf_iterator_char first={0}, last={0};
7708 first.strbuf = strbuf;
7709 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7711 basic_istream_char_sentry_destroy(this);
7713 basic_ios_char_setstate(base, state);
7717 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7718 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7719 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7720 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7722 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7723 int state = IOSTATE_goodbit;
7725 TRACE("(%p %p)\n", this, v);
7727 if(basic_istream_char_sentry_create(this, FALSE)) {
7728 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7729 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7730 istreambuf_iterator_char first={0}, last={0};
7732 first.strbuf = strbuf;
7733 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7735 basic_istream_char_sentry_destroy(this);
7737 basic_ios_char_setstate(base, state);
7741 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7742 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7743 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7744 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7746 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7747 int state = IOSTATE_goodbit;
7749 TRACE("(%p %p)\n", this, v);
7751 if(basic_istream_char_sentry_create(this, FALSE)) {
7752 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7753 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7754 istreambuf_iterator_char first={0}, last={0};
7756 first.strbuf = strbuf;
7757 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7759 basic_istream_char_sentry_destroy(this);
7761 basic_ios_char_setstate(base, state);
7765 /* ??$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 */
7766 /* ??$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 */
7767 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7768 basic_istream_char *istream, basic_string_char *str, char delim)
7770 IOSB_iostate state = IOSTATE_failbit;
7771 int c = (unsigned char)delim;
7773 TRACE("(%p %p %c)\n", istream, str, delim);
7775 if(basic_istream_char_sentry_create(istream, TRUE)) {
7776 basic_string_char_clear(str);
7778 c = basic_istream_char_get(istream);
7780 state = IOSTATE_goodbit;
7782 for(; c!=(unsigned char)delim && c!=EOF; c = basic_istream_char_get(istream)) {
7783 state = IOSTATE_goodbit;
7784 basic_string_char_append_ch(str, c);
7787 basic_istream_char_sentry_destroy(istream);
7789 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7790 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7794 /* ??$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 */
7795 /* ??$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 */
7796 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7797 basic_istream_char *istream, basic_string_char *str)
7799 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7802 /* ??$?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 */
7803 /* ??$?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 */
7804 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7805 basic_istream_char *istream, basic_string_char *str)
7807 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7808 IOSB_iostate state = IOSTATE_failbit;
7811 TRACE("(%p %p)\n", istream, str);
7813 if(basic_istream_char_sentry_create(istream, FALSE)) {
7814 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7815 MSVCP_size_t count = ios_base_width_get(&base->base);
7820 basic_string_char_clear(str);
7822 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7823 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7824 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7825 state = IOSTATE_goodbit;
7826 basic_string_char_append_ch(str, c);
7829 basic_istream_char_sentry_destroy(istream);
7831 ios_base_width_set(&base->base, 0);
7832 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7836 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7837 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7838 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7839 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7840 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7841 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7842 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7844 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7845 IOSB_iostate state = IOSTATE_failbit;
7848 TRACE("(%p %p)\n", istream, str);
7850 if(basic_istream_char_sentry_create(istream, FALSE)) {
7851 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7852 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7854 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7855 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7856 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7857 state = IOSTATE_goodbit;
7861 basic_istream_char_sentry_destroy(istream);
7864 ios_base_width_set(&base->base, 0);
7865 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7869 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7870 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7871 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7872 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7873 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7874 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7875 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7877 IOSB_iostate state = IOSTATE_failbit;
7880 TRACE("(%p %p)\n", istream, ch);
7882 if(basic_istream_char_sentry_create(istream, FALSE)) {
7883 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7884 basic_istream_char_get_basic_ios(istream)));
7886 state = IOSTATE_goodbit;
7890 basic_istream_char_sentry_destroy(istream);
7892 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7893 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7897 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7898 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7899 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7900 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7901 basic_istream_char *this, basic_streambuf_char *streambuf)
7903 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7904 IOSB_iostate state = IOSTATE_failbit;
7907 TRACE("(%p %p)\n", this, streambuf);
7909 if(basic_istream_char_sentry_create(this, FALSE)) {
7910 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7911 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7912 state = IOSTATE_goodbit;
7913 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7917 basic_istream_char_sentry_destroy(this);
7919 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7923 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7924 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7925 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7926 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7927 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7929 TRACE("(%p %p)\n", this, pfunc);
7934 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7935 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7936 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7937 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7938 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7940 TRACE("(%p %p)\n", this, pfunc);
7941 pfunc(basic_istream_char_get_basic_ios(this));
7945 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7946 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7947 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7948 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7949 ios_base* (__cdecl *pfunc)(ios_base*))
7951 TRACE("(%p %p)\n", this, pfunc);
7952 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7956 /* Caution: basic_istream uses virtual inheritance. */
7957 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7959 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7962 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7964 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7967 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7969 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7972 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7973 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7974 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7975 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7977 basic_ios_wchar *base;
7979 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7982 this->vbtable = basic_istream_wchar_vbtable;
7983 base = basic_istream_wchar_get_basic_ios(this);
7984 basic_ios_wchar_ctor(base);
7986 base = basic_istream_wchar_get_basic_ios(this);
7989 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7992 basic_ios_wchar_init(base, strbuf, isstd);
7996 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7997 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7998 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7999 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
8001 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
8002 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8006 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8007 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8008 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
8009 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8011 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8014 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8015 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8016 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
8017 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
8018 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8020 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8023 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8024 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8025 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
8026 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8028 basic_ios_wchar *base;
8030 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
8033 this->vbtable = basic_istream_wchar_vbtable;
8034 base = basic_istream_wchar_get_basic_ios(this);
8035 basic_ios_wchar_ctor(base);
8037 base = basic_istream_wchar_get_basic_ios(this);
8040 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8041 ios_base_Addstd(&base->base);
8045 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8046 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8047 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
8048 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
8049 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8051 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
8052 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8056 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8057 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8058 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8059 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8060 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
8061 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
8063 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8065 /* don't destroy virtual base here */
8066 TRACE("(%p)\n", this);
8069 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8070 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8071 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8072 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8073 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
8074 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
8076 TRACE("(%p)\n", this);
8077 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
8078 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
8081 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
8082 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
8084 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8086 TRACE("(%p %x)\n", this, flags);
8089 /* we have an array, with the number of elements stored before the first object */
8090 INT_PTR i, *ptr = (INT_PTR *)this-1;
8092 for(i=*ptr-1; i>=0; i--)
8093 basic_istream_wchar_vbase_dtor(this+i);
8094 MSVCRT_operator_delete(ptr);
8096 basic_istream_wchar_vbase_dtor(this);
8098 MSVCRT_operator_delete(this);
8104 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8105 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8106 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8107 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8108 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8110 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8112 TRACE("(%p %d)\n", this, noskip);
8114 if(ios_base_good(&base->base)) {
8115 if(basic_ios_wchar_tie_get(base))
8116 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8118 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8119 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8120 const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc);
8123 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8124 ch = basic_streambuf_wchar_snextc(strbuf)) {
8126 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8130 if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8136 if(!ios_base_good(&base->base)) {
8137 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8143 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8144 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8145 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8146 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8147 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8148 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8150 return basic_istream_wchar__Ipfx(this, noskip);
8153 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8154 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8155 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8156 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8157 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8158 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8160 TRACE("(%p)\n", this);
8163 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8165 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8167 if(basic_ios_wchar_rdbuf_get(base))
8168 basic_streambuf_wchar__Lock(base->strbuf);
8170 return basic_istream_wchar_ipfx(istr, noskip);
8173 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8175 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8177 if(basic_ios_wchar_rdbuf_get(base))
8178 basic_streambuf_wchar__Unlock(base->strbuf);
8181 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8182 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8183 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8184 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8185 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8186 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8188 TRACE("(%p)\n", this);
8192 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8193 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8194 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8195 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8196 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8197 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8199 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8202 TRACE("(%p)\n", this);
8206 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8207 basic_istream_wchar_sentry_destroy(this);
8211 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8212 basic_istream_wchar_sentry_destroy(this);
8214 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8221 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8222 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8223 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8224 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8225 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8226 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8230 TRACE("(%p %p)\n", this, ch);
8232 ret = basic_istream_wchar_get(this);
8238 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8239 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8240 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8241 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8242 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8243 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8245 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8246 unsigned short ch = delim;
8248 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8252 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8253 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8255 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8256 ch = basic_streambuf_wchar_snextc(strbuf)) {
8257 if(ch==WEOF || ch==delim)
8265 basic_istream_wchar_sentry_destroy(this);
8267 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8268 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8274 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8275 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8276 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8277 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8278 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8279 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8281 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8284 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8285 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8286 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8287 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8288 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8289 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8291 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8292 unsigned short ch = delim;
8294 TRACE("(%p %p %c)\n", this, strbuf, delim);
8298 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8299 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8301 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8302 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8303 if(ch==WEOF || ch==delim)
8306 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8311 basic_istream_wchar_sentry_destroy(this);
8313 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8314 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8318 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8319 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8320 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8321 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8322 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8323 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8325 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8328 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8329 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8330 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8331 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8332 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8333 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8335 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8336 unsigned short ch = delim;
8338 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8342 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8343 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8346 ch = basic_streambuf_wchar_sbumpc(strbuf);
8348 if(ch==WEOF || ch==delim)
8358 else if(ch != WEOF) {
8359 ch = basic_streambuf_wchar_sgetc(strbuf);
8362 basic_streambuf_wchar__Gninc(strbuf);
8367 basic_istream_wchar_sentry_destroy(this);
8369 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8370 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8376 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8377 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8378 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8379 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8380 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8381 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8383 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8386 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8387 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8388 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8389 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8390 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8391 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8393 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8394 unsigned short ch = delim;
8397 TRACE("(%p %ld %d)\n", this, count, delim);
8401 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8402 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8403 state = IOSTATE_goodbit;
8406 ch = basic_streambuf_wchar_sbumpc(strbuf);
8409 state = IOSTATE_eofbit;
8417 if(count != INT_MAX)
8421 state = IOSTATE_failbit;
8422 basic_istream_wchar_sentry_destroy(this);
8424 basic_ios_wchar_setstate(base, state);
8428 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8429 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8430 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8431 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8432 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8434 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8435 unsigned short ch = '\n';
8437 TRACE("(%p)\n", istream);
8439 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8440 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8441 const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc);
8443 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8444 ch = basic_streambuf_wchar_snextc(strbuf)) {
8449 basic_istream_wchar_sentry_destroy(istream);
8452 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8456 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8457 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8458 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8459 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8460 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8461 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8463 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8464 unsigned short ret = WEOF;
8466 TRACE("(%p)\n", this);
8470 if(basic_istream_wchar_sentry_create(this, TRUE))
8471 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8472 basic_istream_wchar_sentry_destroy(this);
8475 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8480 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8481 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8482 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8483 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8484 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8486 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8487 IOSB_iostate state = IOSTATE_goodbit;
8489 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8491 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8492 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8494 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8495 if(this->count != count)
8496 state |= IOSTATE_failbit | IOSTATE_eofbit;
8500 basic_istream_wchar_sentry_destroy(this);
8502 basic_ios_wchar_setstate(base, state);
8506 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8507 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8508 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8509 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8510 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8511 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8513 return basic_istream_wchar__Read_s(this, str, count, count);
8516 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8517 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8518 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8519 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8520 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8522 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8523 IOSB_iostate state = IOSTATE_goodbit;
8525 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8529 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8530 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8535 state |= IOSTATE_eofbit;
8537 basic_istream_wchar__Read_s(this, str, size, avail);
8539 state |= IOSTATE_failbit;
8541 basic_istream_wchar_sentry_destroy(this);
8543 basic_ios_wchar_setstate(base, state);
8547 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8548 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8549 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8550 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8551 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8552 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8554 return basic_istream_wchar__Readsome_s(this, str, count, count);
8557 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8558 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8559 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8560 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8561 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8562 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8564 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8565 IOSB_iostate state = IOSTATE_goodbit;
8567 TRACE("(%p %c)\n", this, ch);
8571 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8572 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8574 if(!ios_base_good(&base->base))
8575 state |= IOSTATE_failbit;
8576 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8577 state |= IOSTATE_badbit;
8579 basic_istream_wchar_sentry_destroy(this);
8581 basic_ios_wchar_setstate(base, state);
8585 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8586 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8587 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8588 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8589 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8590 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8592 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8593 IOSB_iostate state = IOSTATE_goodbit;
8595 TRACE("(%p)\n", this);
8599 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8600 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8602 if(!ios_base_good(&base->base))
8603 state |= IOSTATE_failbit;
8604 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8605 state |= IOSTATE_badbit;
8607 basic_istream_wchar_sentry_destroy(this);
8609 basic_ios_wchar_setstate(base, state);
8613 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8614 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8615 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8616 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8617 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8618 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8620 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8621 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8623 TRACE("(%p)\n", this);
8628 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8629 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8630 basic_istream_wchar_sentry_destroy(this);
8634 basic_istream_wchar_sentry_destroy(this);
8636 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8640 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8641 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8642 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8643 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8644 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8645 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8647 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8649 TRACE("(%p %p)\n", this, ret);
8651 if(ios_base_fail(&base->base)) {
8658 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8659 ret, 0, SEEKDIR_cur, OPENMODE_in);
8660 if(ret->off==-1 && ret->pos==0 && ret->state==0)
8661 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8666 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8667 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8668 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
8669 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8671 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8673 TRACE("(%p %ld %d)\n", this, off, dir);
8675 if(!ios_base_fail(&base->base)) {
8676 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8679 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8681 if(ret.off==-1 && ret.pos==0 && ret.state==0)
8682 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8684 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8687 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8692 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8693 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8694 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8695 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8696 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8697 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8699 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8701 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8703 if(!ios_base_fail(&base->base)) {
8704 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8707 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8709 if(ret.off==-1 && ret.pos==0 && ret.state==0)
8710 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8712 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8715 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8720 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8722 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8723 int state = IOSTATE_goodbit;
8725 TRACE("(%p %p)\n", this, v);
8727 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8728 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8729 istreambuf_iterator_wchar first={0}, last={0};
8732 first.strbuf = strbuf;
8733 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8735 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8738 state |= IOSTATE_failbit;
8740 basic_istream_wchar_sentry_destroy(this);
8742 basic_ios_wchar_setstate(base, state);
8746 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8747 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8748 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8749 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8751 return basic_istream_read_short(this, v, num_get_short_use_facet(
8752 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8755 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8757 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8758 int state = IOSTATE_goodbit;
8760 TRACE("(%p %p)\n", this, v);
8762 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8763 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8764 istreambuf_iterator_wchar first={0}, last={0};
8766 first.strbuf = strbuf;
8767 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8769 basic_istream_wchar_sentry_destroy(this);
8771 basic_ios_wchar_setstate(base, state);
8775 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8776 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8777 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8778 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8780 return basic_istream_read_int(this, v, num_get_short_use_facet(
8781 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8784 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8786 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8787 int state = IOSTATE_goodbit;
8789 TRACE("(%p %p)\n", this, v);
8791 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8792 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8793 istreambuf_iterator_wchar first={0}, last={0};
8795 first.strbuf = strbuf;
8796 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8798 basic_istream_wchar_sentry_destroy(this);
8800 basic_ios_wchar_setstate(base, state);
8804 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8805 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8806 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8807 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8809 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8810 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8813 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8815 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8816 int state = IOSTATE_goodbit;
8818 TRACE("(%p %p)\n", this, v);
8820 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8821 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8822 istreambuf_iterator_wchar first={0}, last={0};
8824 first.strbuf = strbuf;
8825 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8827 basic_istream_wchar_sentry_destroy(this);
8829 basic_ios_wchar_setstate(base, state);
8833 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8834 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8835 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8836 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8838 return basic_istream_read_long(this, v, num_get_short_use_facet(
8839 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8842 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8844 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8845 int state = IOSTATE_goodbit;
8847 TRACE("(%p %p)\n", this, v);
8849 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8850 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8851 istreambuf_iterator_wchar first={0}, last={0};
8853 first.strbuf = strbuf;
8854 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8856 basic_istream_wchar_sentry_destroy(this);
8858 basic_ios_wchar_setstate(base, state);
8862 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8863 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8864 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8865 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8867 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8868 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8871 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8873 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8874 int state = IOSTATE_goodbit;
8876 TRACE("(%p %p)\n", this, v);
8878 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8879 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8880 istreambuf_iterator_wchar first={0}, last={0};
8882 first.strbuf = strbuf;
8883 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8885 basic_istream_wchar_sentry_destroy(this);
8887 basic_ios_wchar_setstate(base, state);
8891 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8892 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8893 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8894 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8896 return basic_istream_read_float(this, v, num_get_short_use_facet(
8897 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8900 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8902 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8903 int state = IOSTATE_goodbit;
8905 TRACE("(%p %p)\n", this, v);
8907 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8908 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8909 istreambuf_iterator_wchar first={0}, last={0};
8911 first.strbuf = strbuf;
8912 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8914 basic_istream_wchar_sentry_destroy(this);
8916 basic_ios_wchar_setstate(base, state);
8920 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8921 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8922 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8923 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8925 return basic_istream_read_double(this, v, num_get_short_use_facet(
8926 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8929 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8931 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8932 int state = IOSTATE_goodbit;
8934 TRACE("(%p %p)\n", this, v);
8936 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8937 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8938 istreambuf_iterator_wchar first={0}, last={0};
8940 first.strbuf = strbuf;
8941 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8943 basic_istream_wchar_sentry_destroy(this);
8945 basic_ios_wchar_setstate(base, state);
8949 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8950 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8951 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8952 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8954 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8955 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8958 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8960 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8961 int state = IOSTATE_goodbit;
8963 TRACE("(%p %p)\n", this, v);
8965 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8966 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8967 istreambuf_iterator_wchar first={0}, last={0};
8969 first.strbuf = strbuf;
8970 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8972 basic_istream_wchar_sentry_destroy(this);
8974 basic_ios_wchar_setstate(base, state);
8978 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8979 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8980 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8981 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8983 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8984 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8987 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8989 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8990 int state = IOSTATE_goodbit;
8992 TRACE("(%p %p)\n", this, v);
8994 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8995 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8996 istreambuf_iterator_wchar first={0}, last={0};
8998 first.strbuf = strbuf;
8999 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
9001 basic_istream_wchar_sentry_destroy(this);
9003 basic_ios_wchar_setstate(base, state);
9007 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
9008 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
9009 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
9010 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
9012 return basic_istream_read_int64(this, v, num_get_short_use_facet(
9013 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9016 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
9018 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9019 int state = IOSTATE_goodbit;
9021 TRACE("(%p %p)\n", this, v);
9023 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9024 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9025 istreambuf_iterator_wchar first={0}, last={0};
9027 first.strbuf = strbuf;
9028 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
9030 basic_istream_wchar_sentry_destroy(this);
9032 basic_ios_wchar_setstate(base, state);
9036 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
9037 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
9038 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
9039 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9041 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
9042 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9045 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
9047 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9048 int state = IOSTATE_goodbit;
9050 TRACE("(%p %p)\n", this, v);
9052 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9053 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9054 istreambuf_iterator_wchar first={0}, last={0};
9056 first.strbuf = strbuf;
9057 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
9059 basic_istream_wchar_sentry_destroy(this);
9061 basic_ios_wchar_setstate(base, state);
9065 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
9066 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
9067 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
9068 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9070 return basic_istream_read_bool(this, v, num_get_short_use_facet(
9071 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9074 /* ??$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 */
9075 /* ??$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 */
9076 /* ??$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 */
9077 /* ??$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 */
9078 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
9079 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
9081 IOSB_iostate state = IOSTATE_failbit;
9084 TRACE("(%p %p %c)\n", istream, str, delim);
9086 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
9087 basic_string_wchar_clear(str);
9089 c = basic_istream_wchar_get(istream);
9091 state = IOSTATE_goodbit;
9093 for(; c!=delim && c!=WEOF; c = basic_istream_wchar_get(istream)) {
9094 state = IOSTATE_goodbit;
9095 basic_string_wchar_append_ch(str, c);
9098 basic_istream_wchar_sentry_destroy(istream);
9100 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9101 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9105 /* ??$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 */
9106 /* ??$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 */
9107 /* ??$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 */
9108 /* ??$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 */
9109 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
9110 basic_istream_wchar *istream, basic_string_wchar *str)
9112 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
9115 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
9116 basic_string_wchar *str, const ctype_wchar *ctype)
9118 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9119 IOSB_iostate state = IOSTATE_failbit;
9122 TRACE("(%p %p)\n", istream, str);
9124 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9125 MSVCP_size_t count = ios_base_width_get(&base->base);
9130 basic_string_wchar_clear(str);
9132 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9133 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9134 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9135 state = IOSTATE_goodbit;
9136 basic_string_wchar_append_ch(str, c);
9139 basic_istream_wchar_sentry_destroy(istream);
9141 ios_base_width_set(&base->base, 0);
9142 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9146 /* ??$?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 */
9147 /* ??$?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 */
9148 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9149 basic_istream_wchar *istream, basic_string_wchar *str)
9151 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9152 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9155 /* ??$?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 */
9156 /* ??$?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 */
9157 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9158 basic_istream_wchar *istream, basic_string_wchar *str)
9160 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9161 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9164 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9166 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9167 IOSB_iostate state = IOSTATE_failbit;
9168 unsigned short c = '\n';
9170 TRACE("(%p %p)\n", istream, str);
9172 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9173 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9175 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9176 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9177 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9178 state = IOSTATE_goodbit;
9182 basic_istream_wchar_sentry_destroy(istream);
9185 ios_base_width_set(&base->base, 0);
9186 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9190 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9191 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9192 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9194 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9195 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9198 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9199 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9200 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9201 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9202 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9204 IOSB_iostate state = IOSTATE_failbit;
9205 unsigned short c = 0;
9207 TRACE("(%p %p)\n", istream, ch);
9209 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9210 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9211 basic_istream_wchar_get_basic_ios(istream)));
9213 state = IOSTATE_goodbit;
9217 basic_istream_wchar_sentry_destroy(istream);
9219 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9220 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9224 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9225 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9226 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9227 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9228 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9229 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9230 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9232 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9233 IOSB_iostate state = IOSTATE_failbit;
9234 unsigned short c = '\n';
9236 TRACE("(%p %p)\n", this, streambuf);
9238 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9239 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9240 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9241 state = IOSTATE_goodbit;
9242 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9246 basic_istream_wchar_sentry_destroy(this);
9248 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9252 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9253 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9254 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9255 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9256 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9257 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9258 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9260 TRACE("(%p %p)\n", this, pfunc);
9265 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9266 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9267 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9268 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9269 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9270 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9271 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9273 TRACE("(%p %p)\n", this, pfunc);
9274 pfunc(basic_istream_wchar_get_basic_ios(this));
9278 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9279 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9280 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9281 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9282 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9283 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9284 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9286 TRACE("(%p %p)\n", this, pfunc);
9287 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9291 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9293 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9296 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9298 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9301 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9302 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9303 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9304 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9306 basic_ios_char *basic_ios;
9308 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9311 this->base1.vbtable = basic_iostream_char_vbtable1;
9312 this->base2.vbtable = basic_iostream_char_vbtable2;
9313 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9314 basic_ios_char_ctor(basic_ios);
9316 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9319 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9321 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9322 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9326 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9327 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9328 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9329 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9331 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9333 TRACE("(%p)\n", this);
9334 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9335 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9338 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9339 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9340 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9341 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9343 TRACE("(%p)\n", this);
9344 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9345 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9348 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9349 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9351 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9353 TRACE("(%p %x)\n", this, flags);
9356 /* we have an array, with the number of elements stored before the first object */
9357 INT_PTR i, *ptr = (INT_PTR *)this-1;
9359 for(i=*ptr-1; i>=0; i--)
9360 basic_iostream_char_vbase_dtor(this+i);
9361 MSVCRT_operator_delete(ptr);
9363 basic_iostream_char_vbase_dtor(this);
9365 MSVCRT_operator_delete(this);
9371 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9373 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9376 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9378 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9381 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9382 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9383 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9384 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9386 basic_ios_wchar *basic_ios;
9388 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9391 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9392 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9393 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9394 basic_ios_wchar_ctor(basic_ios);
9396 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9399 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9400 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9402 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9406 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9407 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9408 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9409 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9410 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9412 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9413 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9417 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9418 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9419 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9420 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9421 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9422 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9424 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9426 TRACE("(%p)\n", this);
9427 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9428 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9431 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9432 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9433 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9434 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9435 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9436 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9438 TRACE("(%p)\n", this);
9439 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9440 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9443 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9444 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9446 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9448 TRACE("(%p %x)\n", this, flags);
9451 /* we have an array, with the number of elements stored before the first object */
9452 INT_PTR i, *ptr = (INT_PTR *)this-1;
9454 for(i=*ptr-1; i>=0; i--)
9455 basic_iostream_wchar_vbase_dtor(this+i);
9456 MSVCRT_operator_delete(ptr);
9458 basic_iostream_wchar_vbase_dtor(this);
9460 MSVCRT_operator_delete(this);
9466 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9468 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9471 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9473 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9476 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9477 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9478 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9479 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9481 basic_ios_char *basic_ios;
9483 TRACE("(%p %d)\n", this, virt_init);
9486 this->base.vbtable = basic_ofstream_char_vbtable;
9487 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9488 basic_ios_char_ctor(basic_ios);
9490 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9493 basic_filebuf_char_ctor(&this->filebuf);
9494 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9495 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9499 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9500 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9501 static basic_ofstream_char* basic_ofstream_char_ctor_file(
9502 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9504 basic_ios_char *basic_ios;
9506 TRACE("(%p %p %d)\n", this, file, virt_init);
9509 this->base.vbtable = basic_ofstream_char_vbtable;
9510 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9511 basic_ios_char_ctor(basic_ios);
9513 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9516 basic_filebuf_char_ctor_file(&this->filebuf, file);
9517 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9518 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9522 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9523 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9524 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor, 12)
9525 basic_ofstream_char* __thiscall basic_ofstream_char_copy_ctor(basic_ofstream_char *this,
9526 basic_ofstream_char *copy, MSVCP_bool virt_init)
9528 TRACE("(%p %p %d)\n", this, copy, virt_init);
9529 return basic_ofstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9532 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9533 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9534 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 16)
9535 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9536 const char *name, int mode, MSVCP_bool virt_init)
9538 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9540 basic_ofstream_char_ctor(this, virt_init);
9542 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9543 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9544 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9549 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9550 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9551 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9552 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9554 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9556 TRACE("(%p)\n", this);
9558 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9559 basic_filebuf_char_dtor(&this->filebuf);
9562 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9563 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9564 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9565 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9567 TRACE("(%p)\n", this);
9569 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9570 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9573 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9574 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9576 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9578 TRACE("(%p %x)\n", this, flags);
9581 /* we have an array, with the number of elements stored before the first object */
9582 INT_PTR i, *ptr = (INT_PTR *)this-1;
9584 for(i=*ptr-1; i>=0; i--)
9585 basic_ofstream_char_vbase_dtor(this+i);
9586 MSVCRT_operator_delete(ptr);
9588 basic_ofstream_char_vbase_dtor(this);
9590 MSVCRT_operator_delete(this);
9596 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9597 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9598 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9599 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9601 TRACE("(%p)\n", this);
9603 if(!basic_filebuf_char_close(&this->filebuf)) {
9604 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9605 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9609 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9610 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9611 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9612 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9614 TRACE("(%p)\n", this);
9615 return basic_filebuf_char_is_open(&this->filebuf);
9618 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9619 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9620 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9621 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9622 const char *name, int mode)
9624 TRACE("(%p %s %d)\n", this, name, mode);
9626 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9627 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9628 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9632 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9633 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9634 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9635 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9636 const char *name, short mode)
9638 basic_ofstream_char_open(this, name, mode);
9641 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9642 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9643 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9644 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9646 TRACE("(%p)\n", this);
9647 return (basic_filebuf_char*)&this->filebuf;
9650 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9652 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9655 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9657 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9660 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9661 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9662 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9664 basic_ios_wchar *basic_ios;
9666 TRACE("(%p %d)\n", this, virt_init);
9669 this->base.vbtable = basic_ofstream_wchar_vbtable;
9670 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9671 basic_ios_wchar_ctor(basic_ios);
9673 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9676 basic_filebuf_wchar_ctor(&this->filebuf);
9677 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9678 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9682 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9683 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9684 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9685 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9687 basic_ofstream_wchar_ctor(this, virt_init);
9688 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9692 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9693 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9694 static basic_ofstream_wchar* basic_ofstream_wchar_ctor_file(
9695 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9697 basic_ios_wchar *basic_ios;
9699 TRACE("(%p %p %d)\n", this, file, virt_init);
9702 this->base.vbtable = basic_ofstream_wchar_vbtable;
9703 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9704 basic_ios_wchar_ctor(basic_ios);
9706 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9709 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9710 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9711 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9715 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9716 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9717 static basic_ofstream_wchar* basic_ofstream_short_ctor_file(
9718 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9720 basic_ofstream_wchar_ctor_file(this, file, virt_init);
9721 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9725 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9726 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9727 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor, 12)
9728 basic_ofstream_wchar* __thiscall basic_ofstream_short_copy_ctor(basic_ofstream_wchar *this,
9729 basic_ofstream_wchar *copy, MSVCP_bool virt_init)
9731 TRACE("(%p %p %d)\n", this, copy, virt_init);
9732 return basic_ofstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9735 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9736 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9737 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 16)
9738 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
9739 const char *name, int mode, MSVCP_bool virt_init)
9741 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9743 basic_ofstream_short_ctor(this, virt_init);
9745 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9746 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9747 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9752 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9753 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9754 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9755 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9756 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9757 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9759 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9761 TRACE("(%p)\n", this);
9763 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9764 basic_filebuf_wchar_dtor(&this->filebuf);
9767 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9768 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9769 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9770 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9771 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9772 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9774 TRACE("(%p)\n", this);
9776 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9777 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9780 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9781 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9783 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9785 TRACE("(%p %x)\n", this, flags);
9788 /* we have an array, with the number of elements stored before the first object */
9789 INT_PTR i, *ptr = (INT_PTR *)this-1;
9791 for(i=*ptr-1; i>=0; i--)
9792 basic_ofstream_wchar_vbase_dtor(this+i);
9793 MSVCRT_operator_delete(ptr);
9795 basic_ofstream_wchar_vbase_dtor(this);
9797 MSVCRT_operator_delete(this);
9803 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9804 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9805 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9806 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9807 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9808 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9810 TRACE("(%p)\n", this);
9812 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9813 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9814 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9818 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9819 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9820 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9821 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9822 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9823 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9825 TRACE("(%p)\n", this);
9826 return basic_filebuf_wchar_is_open(&this->filebuf);
9829 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9830 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9831 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9832 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9833 const char *name, int mode)
9835 TRACE("(%p %s %d)\n", this, name, mode);
9837 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9838 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9839 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9843 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9844 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9845 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9846 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9847 const char *name, int mode)
9849 basic_ofstream_wchar_open(this, name, mode);
9852 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9853 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9854 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9855 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9856 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9857 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9859 TRACE("(%p)\n", this);
9860 return (basic_filebuf_wchar*)&this->filebuf;
9863 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9865 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9868 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9870 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9873 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9874 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9875 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9876 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9878 basic_ios_char *basic_ios;
9880 TRACE("(%p %d)\n", this, virt_init);
9883 this->base.vbtable = basic_ifstream_char_vbtable;
9884 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9885 basic_ios_char_ctor(basic_ios);
9887 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9890 basic_filebuf_char_ctor(&this->filebuf);
9891 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9892 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9896 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9897 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9898 static basic_ifstream_char* basic_ifstream_char_ctor_file(
9899 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
9901 basic_ios_char *basic_ios;
9903 TRACE("(%p %p %d)\n", this, file, virt_init);
9906 this->base.vbtable = basic_ifstream_char_vbtable;
9907 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9908 basic_ios_char_ctor(basic_ios);
9910 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9913 basic_filebuf_char_ctor_file(&this->filebuf, file);
9914 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9915 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9919 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9920 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9921 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor, 12)
9922 basic_ifstream_char* __thiscall basic_ifstream_char_copy_ctor(basic_ifstream_char *this,
9923 const basic_ifstream_char *copy, MSVCP_bool virt_init)
9925 TRACE("(%p %p %d)\n", this, copy, virt_init);
9926 return basic_ifstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9929 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9930 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9931 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 16)
9932 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
9933 const char *name, int mode, MSVCP_bool virt_init)
9935 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9937 basic_ifstream_char_ctor(this, virt_init);
9939 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9940 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9941 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9946 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9947 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9948 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9949 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9951 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9953 TRACE("(%p)\n", this);
9955 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9956 basic_filebuf_char_dtor(&this->filebuf);
9959 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9960 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9961 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9962 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9964 TRACE("(%p)\n", this);
9966 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9967 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9970 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9971 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9973 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9975 TRACE("(%p %x)\n", this, flags);
9978 /* we have an array, with the number of elements stored before the first object */
9979 INT_PTR i, *ptr = (INT_PTR *)this-1;
9981 for(i=*ptr-1; i>=0; i--)
9982 basic_ifstream_char_vbase_dtor(this+i);
9983 MSVCRT_operator_delete(ptr);
9985 basic_ifstream_char_vbase_dtor(this);
9987 MSVCRT_operator_delete(this);
9993 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9994 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9995 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9996 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9998 TRACE("(%p)\n", this);
10000 if(!basic_filebuf_char_close(&this->filebuf)) {
10001 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10002 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10006 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10007 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10008 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
10009 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
10011 TRACE("(%p)\n", this);
10012 return basic_filebuf_char_is_open(&this->filebuf);
10015 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10016 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10017 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
10018 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
10019 const char *name, int mode)
10021 TRACE("(%p %s %d)\n", this, name, mode);
10023 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10024 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10025 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10029 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10030 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10031 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
10032 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
10033 const char *name, short mode)
10035 basic_ifstream_char_open(this, name, mode);
10038 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10039 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10040 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
10041 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
10043 TRACE("(%p)\n", this);
10044 return (basic_filebuf_char*)&this->filebuf;
10047 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
10049 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
10052 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10054 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
10057 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10058 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10059 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10061 basic_ios_wchar *basic_ios;
10063 TRACE("(%p %d)\n", this, virt_init);
10066 this->base.vbtable = basic_ifstream_wchar_vbtable;
10067 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10068 basic_ios_wchar_ctor(basic_ios);
10070 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10073 basic_filebuf_wchar_ctor(&this->filebuf);
10074 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10075 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10079 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10080 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10081 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
10082 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10084 basic_ifstream_wchar_ctor(this, virt_init);
10085 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10089 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10090 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10091 static basic_ifstream_wchar* basic_ifstream_wchar_ctor_file(
10092 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10094 basic_ios_wchar *basic_ios;
10096 TRACE("(%p %p %d)\n", this, file, virt_init);
10099 this->base.vbtable = basic_ifstream_wchar_vbtable;
10100 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10101 basic_ios_wchar_ctor(basic_ios);
10103 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10106 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10107 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10108 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10112 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10113 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10114 static basic_ifstream_wchar* basic_ifstream_short_ctor_file(
10115 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10117 basic_ifstream_wchar_ctor_file(this, file, virt_init);
10118 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10122 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10123 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10124 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor, 12)
10125 basic_ifstream_wchar* __thiscall basic_ifstream_short_copy_ctor(basic_ifstream_wchar *this,
10126 basic_ifstream_wchar *copy, MSVCP_bool virt_init)
10128 TRACE("(%p %p %d)\n", this, copy, virt_init);
10129 return basic_ifstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10132 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
10133 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
10134 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 16)
10135 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
10136 const char *name, int mode, MSVCP_bool virt_init)
10138 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10140 basic_ifstream_short_ctor(this, virt_init);
10142 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10143 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10144 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10149 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10150 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10151 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10152 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10153 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
10154 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
10156 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10158 TRACE("(%p)\n", this);
10160 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10161 basic_filebuf_wchar_dtor(&this->filebuf);
10164 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10165 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10166 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10167 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10168 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10169 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10171 TRACE("(%p)\n", this);
10173 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10174 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10177 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10178 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10180 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10182 TRACE("(%p %x)\n", this, flags);
10185 /* we have an array, with the number of elements stored before the first object */
10186 INT_PTR i, *ptr = (INT_PTR *)this-1;
10188 for(i=*ptr-1; i>=0; i--)
10189 basic_ifstream_wchar_vbase_dtor(this+i);
10190 MSVCRT_operator_delete(ptr);
10192 basic_ifstream_wchar_vbase_dtor(this);
10194 MSVCRT_operator_delete(this);
10200 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10201 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10202 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10203 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10204 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10205 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10207 TRACE("(%p)\n", this);
10209 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10210 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10211 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10215 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10216 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10217 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10218 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10219 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10220 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10222 TRACE("(%p)\n", this);
10223 return basic_filebuf_wchar_is_open(&this->filebuf);
10226 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
10227 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
10228 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
10229 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10230 const char *name, int mode)
10232 TRACE("(%p %s %d)\n", this, name, mode);
10234 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10235 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10236 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10240 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
10241 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
10242 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10243 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10244 const char *name, short mode)
10246 basic_ifstream_wchar_open(this, name, mode);
10249 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10250 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10251 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10252 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10253 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10254 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10256 TRACE("(%p)\n", this);
10257 return (basic_filebuf_wchar*)&this->filebuf;
10260 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10262 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10265 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10267 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10270 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10271 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10272 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10273 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10275 basic_ios_char *basic_ios;
10277 TRACE("(%p %d)\n", this, virt_init);
10280 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10281 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10282 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10283 basic_ios_char_ctor(basic_ios);
10285 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10288 basic_filebuf_char_ctor(&this->filebuf);
10289 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10290 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10294 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10295 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10296 static basic_fstream_char* basic_fstream_char_ctor_file(basic_fstream_char *this,
10297 FILE *file, MSVCP_bool virt_init)
10299 basic_ios_char *basic_ios;
10301 TRACE("(%p %p %d)\n", this, file, virt_init);
10304 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10305 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10306 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10307 basic_ios_char_ctor(basic_ios);
10309 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10312 basic_filebuf_char_ctor_file(&this->filebuf, file);
10313 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10314 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10318 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
10319 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
10320 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor, 12)
10321 basic_fstream_char* __thiscall basic_fstream_char_copy_ctor(basic_fstream_char *this,
10322 basic_fstream_char *copy, MSVCP_bool virt_init)
10324 TRACE("(%p %p %d)\n", this, copy, virt_init);
10325 return basic_fstream_char_ctor_file(this, copy->filebuf.file, virt_init);
10328 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
10329 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
10330 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 16)
10331 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10332 const char *name, int mode, MSVCP_bool virt_init)
10334 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10336 basic_fstream_char_ctor(this, virt_init);
10338 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10339 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10340 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10345 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10346 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10347 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10348 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10350 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10352 TRACE("(%p)\n", this);
10354 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10355 basic_filebuf_char_dtor(&this->filebuf);
10358 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10359 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10360 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10361 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10363 TRACE("(%p)\n", this);
10365 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10366 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10369 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10370 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10372 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10374 TRACE("(%p %x)\n", this, flags);
10377 /* we have an array, with the number of elements stored before the first object */
10378 INT_PTR i, *ptr = (INT_PTR *)this-1;
10380 for(i=*ptr-1; i>=0; i--)
10381 basic_fstream_char_vbase_dtor(this+i);
10382 MSVCRT_operator_delete(ptr);
10384 basic_fstream_char_vbase_dtor(this);
10386 MSVCRT_operator_delete(this);
10392 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10393 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10394 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10395 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10397 TRACE("(%p)\n", this);
10399 if(!basic_filebuf_char_close(&this->filebuf)) {
10400 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10401 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10405 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10406 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10407 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10408 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10410 TRACE("(%p)\n", this);
10411 return basic_filebuf_char_is_open(&this->filebuf);
10414 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10415 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10416 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10417 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10418 const char *name, int mode)
10420 TRACE("(%p %s %d)\n", this, name, mode);
10422 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10423 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10424 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10428 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10429 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10430 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10431 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10432 const char *name, int mode)
10434 basic_fstream_char_open(this, name, mode);
10437 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10438 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10439 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10440 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10442 TRACE("(%p)\n", this);
10443 return (basic_filebuf_char*)&this->filebuf;
10446 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10448 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10451 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10453 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10456 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10457 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10458 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10460 basic_ios_wchar *basic_ios;
10462 TRACE("(%p %d)\n", this, virt_init);
10465 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10466 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10467 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10468 basic_ios_wchar_ctor(basic_ios);
10470 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10473 basic_filebuf_wchar_ctor(&this->filebuf);
10474 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10475 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10479 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10480 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10481 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10482 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10484 basic_fstream_wchar_ctor(this, virt_init);
10485 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10489 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10490 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10491 static basic_fstream_wchar* basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
10492 FILE *file, MSVCP_bool virt_init)
10494 basic_ios_wchar *basic_ios;
10496 TRACE("(%p %p %d)\n", this, file, virt_init);
10499 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10500 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10501 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10502 basic_ios_wchar_ctor(basic_ios);
10504 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10507 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10508 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10509 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10513 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10514 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10515 static basic_fstream_wchar* basic_fstream_short_ctor_file(basic_fstream_wchar *this,
10516 FILE *file, MSVCP_bool virt_init)
10518 basic_fstream_wchar_ctor_file(this, file, virt_init);
10519 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10523 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10524 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10525 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor, 12)
10526 basic_fstream_wchar* __thiscall basic_fstream_short_copy_ctor(basic_fstream_wchar *this,
10527 basic_fstream_wchar *copy, MSVCP_bool virt_init)
10529 TRACE("(%p %p %d)\n", this, copy, virt_init);
10530 return basic_fstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10533 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10534 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10535 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 16)
10536 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
10537 const char *name, int mode, MSVCP_bool virt_init)
10539 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10541 basic_fstream_short_ctor(this, virt_init);
10543 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10544 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10545 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10550 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10551 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10552 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10553 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10554 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10555 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10557 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10559 TRACE("(%p)\n", this);
10561 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10562 basic_filebuf_wchar_dtor(&this->filebuf);
10565 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10566 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10567 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10568 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10569 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10570 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10572 TRACE("(%p)\n", this);
10574 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10575 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10578 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10579 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10581 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10583 TRACE("(%p %x)\n", this, flags);
10586 /* we have an array, with the number of elements stored before the first object */
10587 INT_PTR i, *ptr = (INT_PTR *)this-1;
10589 for(i=*ptr-1; i>=0; i--)
10590 basic_fstream_wchar_vbase_dtor(this+i);
10591 MSVCRT_operator_delete(ptr);
10593 basic_fstream_wchar_vbase_dtor(this);
10595 MSVCRT_operator_delete(this);
10601 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10602 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10603 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10604 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10605 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10606 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10608 TRACE("(%p)\n", this);
10610 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10611 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10612 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10616 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10617 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10618 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10619 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10620 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10621 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10623 TRACE("(%p)\n", this);
10624 return basic_filebuf_wchar_is_open(&this->filebuf);
10627 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10628 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10629 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10630 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10631 const char *name, int mode)
10633 TRACE("(%p %s %d)\n", this, name, mode);
10635 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10636 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10637 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10641 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10642 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10643 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10644 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10645 const char *name, int mode)
10647 basic_fstream_wchar_open(this, name, mode);
10650 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10651 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10652 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10653 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10654 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10655 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10657 TRACE("(%p)\n", this);
10658 return (basic_filebuf_wchar*)&this->filebuf;
10661 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10663 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10666 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10668 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10671 /* ??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 */
10672 /* ??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 */
10673 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10674 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10675 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10677 basic_ios_char *basic_ios;
10679 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10682 this->base.vbtable = basic_ostringstream_char_vbtable;
10683 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10684 basic_ios_char_ctor(basic_ios);
10686 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10689 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10690 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10691 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10695 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10696 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10697 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10698 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10699 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10701 basic_ios_char *basic_ios;
10703 TRACE("(%p %d %d)\n", this, mode, virt_init);
10706 this->base.vbtable = basic_ostringstream_char_vbtable;
10707 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10708 basic_ios_char_ctor(basic_ios);
10710 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10713 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10714 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10715 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10719 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10720 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10721 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
10722 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10723 basic_ostringstream_char *this, MSVCP_bool virt_init)
10725 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
10728 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10729 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10730 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10731 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10733 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10735 TRACE("(%p)\n", this);
10737 basic_stringbuf_char_dtor(&this->strbuf);
10738 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10741 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10742 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10743 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10744 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10746 TRACE("(%p)\n", this);
10748 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10749 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10752 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10753 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10755 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10757 TRACE("(%p %x)\n", this, flags);
10760 /* we have an array, with the number of elements stored before the first object */
10761 INT_PTR i, *ptr = (INT_PTR *)this-1;
10763 for(i=*ptr-1; i>=0; i--)
10764 basic_ostringstream_char_vbase_dtor(this+i);
10765 MSVCRT_operator_delete(ptr);
10767 basic_ostringstream_char_vbase_dtor(this);
10769 MSVCRT_operator_delete(this);
10775 /* ?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 */
10776 /* ?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 */
10777 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10778 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10780 TRACE("(%p)\n", this);
10781 return (basic_stringbuf_char*)&this->strbuf;
10784 /* ?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 */
10785 /* ?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 */
10786 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10787 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10789 TRACE("(%p %p)\n", this, str);
10790 basic_stringbuf_char_str_set(&this->strbuf, str);
10793 /* ?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 */
10794 /* ?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 */
10795 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10796 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10798 TRACE("(%p %p)\n", this, ret);
10799 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10802 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10804 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10807 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10809 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10812 /* ??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 */
10813 /* ??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 */
10814 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10815 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10817 basic_ios_wchar *basic_ios;
10819 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10822 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10823 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10824 basic_ios_wchar_ctor(basic_ios);
10826 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10829 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10830 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10831 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10835 /* ??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 */
10836 /* ??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 */
10837 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10838 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10839 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10841 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10842 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10846 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10847 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10848 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10849 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10851 basic_ios_wchar *basic_ios;
10853 TRACE("(%p %d %d)\n", this, mode, virt_init);
10856 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10857 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10858 basic_ios_wchar_ctor(basic_ios);
10860 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10863 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10864 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10865 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10869 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10870 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10871 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10872 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10873 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10875 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10876 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10880 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10881 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10882 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
10883 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10884 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
10886 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
10889 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10890 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10891 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10892 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10893 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10894 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10896 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10898 TRACE("(%p)\n", this);
10900 basic_stringbuf_wchar_dtor(&this->strbuf);
10901 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10904 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10905 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10906 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10907 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10908 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10909 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10911 TRACE("(%p)\n", this);
10913 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10914 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10917 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10918 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10920 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10922 TRACE("(%p %x)\n", this, flags);
10925 /* we have an array, with the number of elements stored before the first object */
10926 INT_PTR i, *ptr = (INT_PTR *)this-1;
10928 for(i=*ptr-1; i>=0; i--)
10929 basic_ostringstream_wchar_vbase_dtor(this+i);
10930 MSVCRT_operator_delete(ptr);
10932 basic_ostringstream_wchar_vbase_dtor(this);
10934 MSVCRT_operator_delete(this);
10940 /* ?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 */
10941 /* ?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 */
10942 /* ?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 */
10943 /* ?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 */
10944 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10945 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10947 TRACE("(%p)\n", this);
10948 return (basic_stringbuf_wchar*)&this->strbuf;
10951 /* ?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 */
10952 /* ?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 */
10953 /* ?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 */
10954 /* ?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 */
10955 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10956 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10958 TRACE("(%p %p)\n", this, str);
10959 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10962 /* ?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 */
10963 /* ?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 */
10964 /* ?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 */
10965 /* ?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 */
10966 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10967 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10969 TRACE("(%p %p)\n", this, ret);
10970 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10973 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10975 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10978 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10980 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10983 /* ??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 */
10984 /* ??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 */
10985 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10986 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10987 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10989 basic_ios_char *basic_ios;
10991 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10994 this->base.vbtable = basic_istringstream_char_vbtable;
10995 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10996 basic_ios_char_ctor(basic_ios);
10998 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11001 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11002 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11003 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11007 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11008 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11009 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
11010 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
11011 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
11013 basic_ios_char *basic_ios;
11015 TRACE("(%p %d %d)\n", this, mode, virt_init);
11018 this->base.vbtable = basic_istringstream_char_vbtable;
11019 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11020 basic_ios_char_ctor(basic_ios);
11022 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11025 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11026 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11027 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11031 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11032 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11033 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
11034 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
11035 basic_istringstream_char *this, MSVCP_bool virt_init)
11037 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
11040 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11041 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11042 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
11043 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
11045 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11047 TRACE("(%p)\n", this);
11049 basic_stringbuf_char_dtor(&this->strbuf);
11050 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11053 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11054 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11055 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
11056 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
11058 TRACE("(%p)\n", this);
11060 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
11061 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
11064 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
11065 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11067 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11069 TRACE("(%p %x)\n", this, flags);
11072 /* we have an array, with the number of elements stored before the first object */
11073 INT_PTR i, *ptr = (INT_PTR *)this-1;
11075 for(i=*ptr-1; i>=0; i--)
11076 basic_istringstream_char_vbase_dtor(this+i);
11077 MSVCRT_operator_delete(ptr);
11079 basic_istringstream_char_vbase_dtor(this);
11081 MSVCRT_operator_delete(this);
11087 /* ?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 */
11088 /* ?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 */
11089 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
11090 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
11092 TRACE("(%p)\n", this);
11093 return (basic_stringbuf_char*)&this->strbuf;
11096 /* ?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 */
11097 /* ?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 */
11098 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
11099 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
11101 TRACE("(%p %p)\n", this, str);
11102 basic_stringbuf_char_str_set(&this->strbuf, str);
11105 /* ?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 */
11106 /* ?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 */
11107 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
11108 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
11110 TRACE("(%p %p)\n", this, ret);
11111 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11114 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
11116 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
11119 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11121 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
11124 /* ??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 */
11125 /* ??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 */
11126 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
11127 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11129 basic_ios_wchar *basic_ios;
11131 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11134 this->base.vbtable = basic_istringstream_wchar_vbtable;
11135 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11136 basic_ios_wchar_ctor(basic_ios);
11138 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11141 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11142 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11143 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11147 /* ??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 */
11148 /* ??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 */
11149 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
11150 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
11151 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11153 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
11154 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11158 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11159 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11160 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
11161 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11163 basic_ios_wchar *basic_ios;
11165 TRACE("(%p %d %d)\n", this, mode, virt_init);
11168 this->base.vbtable = basic_istringstream_wchar_vbtable;
11169 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11170 basic_ios_wchar_ctor(basic_ios);
11172 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11175 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11176 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11177 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11181 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11182 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11183 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11184 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11185 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11187 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11188 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11192 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11193 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11194 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11195 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11196 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11198 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
11201 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11202 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11203 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11204 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11205 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11206 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11208 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11210 TRACE("(%p)\n", this);
11212 basic_stringbuf_wchar_dtor(&this->strbuf);
11213 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11216 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11217 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11218 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11219 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11220 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11221 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11223 TRACE("(%p)\n", this);
11225 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11226 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11229 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11230 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11232 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11234 TRACE("(%p %x)\n", this, flags);
11237 /* we have an array, with the number of elements stored before the first object */
11238 INT_PTR i, *ptr = (INT_PTR *)this-1;
11240 for(i=*ptr-1; i>=0; i--)
11241 basic_istringstream_wchar_vbase_dtor(this+i);
11242 MSVCRT_operator_delete(ptr);
11244 basic_istringstream_wchar_vbase_dtor(this);
11246 MSVCRT_operator_delete(this);
11252 /* ?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 */
11253 /* ?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 */
11254 /* ?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 */
11255 /* ?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 */
11256 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11257 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11259 TRACE("(%p)\n", this);
11260 return (basic_stringbuf_wchar*)&this->strbuf;
11263 /* ?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 */
11264 /* ?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 */
11265 /* ?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 */
11266 /* ?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 */
11267 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11268 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11270 TRACE("(%p %p)\n", this, str);
11271 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11274 /* ?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 */
11275 /* ?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 */
11276 /* ?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 */
11277 /* ?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 */
11278 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11279 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11281 TRACE("(%p %p)\n", this, ret);
11282 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11285 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11287 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11290 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11292 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11295 /* ??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 */
11296 /* ??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 */
11297 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11298 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11299 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11301 basic_ios_char *basic_ios;
11303 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11306 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11307 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11308 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11309 basic_ios_char_ctor(basic_ios);
11311 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11314 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11315 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11316 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11320 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11321 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11322 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11323 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11324 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11326 basic_ios_char *basic_ios;
11328 TRACE("(%p %d %d)\n", this, mode, virt_init);
11331 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11332 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11333 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11334 basic_ios_char_ctor(basic_ios);
11336 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11339 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11340 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11341 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11345 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11346 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11347 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
11348 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11349 basic_stringstream_char *this, MSVCP_bool virt_init)
11351 return basic_stringstream_char_ctor_mode(
11352 this, OPENMODE_out|OPENMODE_in, virt_init);
11355 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11356 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11357 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11358 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11360 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11362 TRACE("(%p)\n", this);
11364 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11365 basic_stringbuf_char_dtor(&this->strbuf);
11368 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11369 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11370 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11371 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11373 TRACE("(%p)\n", this);
11375 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11376 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11379 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11380 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11382 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11384 TRACE("(%p %x)\n", this, flags);
11387 /* we have an array, with the number of elements stored before the first object */
11388 INT_PTR i, *ptr = (INT_PTR *)this-1;
11390 for(i=*ptr-1; i>=0; i--)
11391 basic_stringstream_char_vbase_dtor(this+i);
11392 MSVCRT_operator_delete(ptr);
11394 basic_stringstream_char_vbase_dtor(this);
11396 MSVCRT_operator_delete(this);
11402 /* ?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 */
11403 /* ?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 */
11404 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11405 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11407 TRACE("(%p)\n", this);
11408 return (basic_stringbuf_char*)&this->strbuf;
11411 /* ?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 */
11412 /* ?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 */
11413 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11414 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11416 TRACE("(%p %p)\n", this, str);
11417 basic_stringbuf_char_str_set(&this->strbuf, str);
11420 /* ?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 */
11421 /* ?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 */
11422 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11423 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11425 TRACE("(%p %p)\n", this, ret);
11426 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11429 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11431 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11434 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11436 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11439 /* ??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 */
11440 /* ??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 */
11441 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11442 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11444 basic_ios_wchar *basic_ios;
11446 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11449 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11450 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11451 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11452 basic_ios_wchar_ctor(basic_ios);
11454 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11457 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11458 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11459 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11463 /* ??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 */
11464 /* ??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 */
11465 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11466 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11467 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11469 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11470 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11474 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11475 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11476 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11477 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11479 basic_ios_wchar *basic_ios;
11481 TRACE("(%p %d %d)\n", this, mode, virt_init);
11484 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11485 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11486 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11487 basic_ios_wchar_ctor(basic_ios);
11489 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11492 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11493 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11494 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11498 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11499 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11500 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11501 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11502 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11504 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11505 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11509 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11510 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11511 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
11512 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11513 basic_stringstream_wchar *this, MSVCP_bool virt_init)
11515 return basic_stringstream_short_ctor_mode(
11516 this, OPENMODE_out|OPENMODE_in, virt_init);
11519 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11520 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11521 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11522 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11523 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11524 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11526 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11528 TRACE("(%p)\n", this);
11530 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11531 basic_stringbuf_wchar_dtor(&this->strbuf);
11534 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11535 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11536 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11537 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11538 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11539 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11541 TRACE("(%p)\n", this);
11543 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11544 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11547 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11548 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11550 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11552 TRACE("(%p %x)\n", this, flags);
11555 /* we have an array, with the number of elements stored before the first object */
11556 INT_PTR i, *ptr = (INT_PTR *)this-1;
11558 for(i=*ptr-1; i>=0; i--)
11559 basic_stringstream_wchar_vbase_dtor(this+i);
11560 MSVCRT_operator_delete(ptr);
11562 basic_stringstream_wchar_vbase_dtor(this);
11564 MSVCRT_operator_delete(this);
11570 /* ?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 */
11571 /* ?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 */
11572 /* ?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 */
11573 /* ?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 */
11574 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11575 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11577 TRACE("(%p)\n", this);
11578 return (basic_stringbuf_wchar*)&this->strbuf;
11581 /* ?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 */
11582 /* ?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 */
11583 /* ?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 */
11584 /* ?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 */
11585 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11586 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11588 TRACE("(%p %p)\n", this, str);
11589 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11592 /* ?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 */
11593 /* ?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 */
11594 /* ?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 */
11595 /* ?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 */
11596 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11597 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11599 TRACE("(%p %p)\n", this, ret);
11600 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11603 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11604 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11605 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11606 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11608 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11610 this->minsize = 32;
11611 this->endsave = NULL;
11612 this->strmode = mode;
11613 this->palloc = NULL;
11614 this->pfree = NULL;
11617 this->strmode |= STRSTATE_Dynamic;
11618 if(len > this->minsize)
11619 this->minsize = len;
11620 this->seekhigh = NULL;
11629 this->seekhigh = g+len;
11630 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11632 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11635 /* ??0strstreambuf@std@@QAE@PACH0@Z */
11636 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
11637 /* ??0strstreambuf@std@@QAE@PADH0@Z */
11638 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
11639 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
11640 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
11641 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
11643 TRACE("(%p %p %ld %p)\n", this, g, len, p);
11645 basic_streambuf_char_ctor(&this->base);
11646 this->base.vtable = &MSVCP_strstreambuf_vtable;
11648 strstreambuf__Init(this, len, g, p, 0);
11652 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11653 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11654 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11655 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11657 TRACE("(%p)\n", this);
11659 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11661 this->pfree(basic_streambuf_char_eback(&this->base));
11663 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11666 this->endsave = NULL;
11667 this->seekhigh = NULL;
11668 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11669 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11670 basic_streambuf_char_setp(&this->base, NULL, NULL);
11673 /* ??1strstreambuf@std@@UAE@XZ */
11674 /* ??1strstreambuf@std@@UEAA@XZ */
11675 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11676 void __thiscall strstreambuf_dtor(strstreambuf *this)
11678 TRACE("(%p)\n", this);
11680 strstreambuf__Tidy(this);
11681 basic_streambuf_char_dtor(&this->base);
11684 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11685 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11687 TRACE("(%p %x)\n", this, flags);
11689 /* we have an array, with the number of elements stored before the first object */
11690 INT_PTR i, *ptr = (INT_PTR *)this-1;
11692 for(i=*ptr-1; i>=0; i--)
11693 strstreambuf_dtor(this+i);
11694 MSVCRT_operator_delete(ptr);
11696 strstreambuf_dtor(this);
11698 MSVCRT_operator_delete(this);
11704 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11705 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11706 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11707 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11709 TRACE("(%p %d)\n", this, freeze);
11711 if(!freeze == !(this->strmode *STRSTATE_Frozen))
11715 this->strmode |= STRSTATE_Frozen;
11716 this->endsave = basic_streambuf_char_epptr(&this->base);
11717 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11718 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11720 this->strmode &= ~STRSTATE_Frozen;
11721 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11722 basic_streambuf_char_pptr(&this->base), this->endsave);
11726 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11727 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11728 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11729 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11731 MSVCP_size_t old_size, size;
11734 TRACE("(%p %d)\n", this, c);
11739 if(this->strmode & STRSTATE_Frozen)
11742 ptr = basic_streambuf_char_pptr(&this->base);
11743 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11744 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11746 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11749 ptr = basic_streambuf_char_eback(&this->base);
11750 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11752 size = old_size + old_size/2;
11753 if(size < this->minsize)
11754 size = this->minsize;
11757 buf = this->palloc(size);
11759 buf = MSVCRT_operator_new(size);
11763 memcpy(buf, ptr, old_size);
11764 if(this->strmode & STRSTATE_Allocated) {
11768 MSVCRT_operator_delete(ptr);
11771 this->strmode |= STRSTATE_Allocated;
11773 this->seekhigh = buf;
11774 basic_streambuf_char_setp(&this->base, buf, buf+size);
11775 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11777 this->seekhigh = this->seekhigh-ptr+buf;
11778 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11779 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11780 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11781 basic_streambuf_char_pptr(&this->base));
11784 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11787 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11788 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11789 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11790 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11792 char *ptr = basic_streambuf_char_gptr(&this->base);
11794 TRACE("(%p %d)\n", this, c);
11796 if(ptr<=basic_streambuf_char_eback(&this->base)
11797 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11800 basic_streambuf_char_gbump(&this->base, -1);
11803 if(this->strmode & STRSTATE_Constant)
11804 return (unsigned char)c;
11806 return (unsigned char)(ptr[0] = c);
11809 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
11810 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
11811 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11812 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11814 char *eback = basic_streambuf_char_eback(&this->base);
11815 char *pptr = basic_streambuf_char_pptr(&this->base);
11816 char *gptr = basic_streambuf_char_gptr(&this->base);
11818 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11823 if(pptr > this->seekhigh)
11824 this->seekhigh = pptr;
11826 if((mode & OPENMODE_in) && gptr) {
11827 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11829 else if(way == SEEKDIR_end)
11830 off += this->seekhigh-eback;
11831 else if(way != SEEKDIR_beg)
11834 if(off<0 || off>this->seekhigh-eback) {
11837 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11838 if((mode & OPENMODE_out) && pptr) {
11839 basic_streambuf_char_setp_next(&this->base, eback,
11840 gptr, basic_streambuf_char_epptr(&this->base));
11843 }else if((mode & OPENMODE_out) && pptr) {
11844 if(way == SEEKDIR_cur)
11846 else if(way == SEEKDIR_end)
11847 off += this->seekhigh-eback;
11848 else if(way != SEEKDIR_beg)
11851 if(off<0 || off>this->seekhigh-eback)
11854 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11863 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11864 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11865 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11866 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11868 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11870 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
11875 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11878 /* ?underflow@strstreambuf@std@@MAEHXZ */
11879 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11880 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11881 int __thiscall strstreambuf_underflow(strstreambuf *this)
11883 char *gptr = basic_streambuf_char_gptr(&this->base);
11886 TRACE("(%p)\n", this);
11891 if(gptr < basic_streambuf_char_egptr(&this->base))
11892 return (unsigned char)(*gptr);
11894 pptr = basic_streambuf_char_gptr(&this->base);
11895 if(pptr > this->seekhigh)
11896 this->seekhigh = pptr;
11898 if(this->seekhigh <= gptr)
11901 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11902 gptr, this->seekhigh);
11903 return (unsigned char)(*gptr);
11906 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
11908 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
11911 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
11913 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
11916 /* ??0ostrstream@std@@QAE@PADHH@Z */
11917 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
11918 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11920 basic_ios_char *basic_ios;
11922 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11925 this->base.vbtable = ostrstream_vbtable;
11926 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11927 basic_ios_char_ctor(basic_ios);
11929 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11932 strstreambuf_ctor_get_put(&this->buf, buf, size,
11933 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11934 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, FALSE);
11935 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
11939 /* ??1ostrstream@std@@UAE@XZ */
11940 /* ??1ostrstream@std@@UEAA@XZ */
11941 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
11942 void __thiscall ostrstream_dtor(basic_ios_char *base)
11944 ostrstream *this = ostrstream_from_basic_ios(base);
11946 TRACE("(%p)\n", this);
11948 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11949 strstreambuf_dtor(&this->buf);
11952 static void ostrstream_vbase_dtor(ostrstream *this)
11954 TRACE("(%p)\n", this);
11956 ostrstream_dtor(ostrstream_to_basic_ios(this));
11957 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11960 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
11961 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11963 ostrstream *this = ostrstream_from_basic_ios(base);
11965 TRACE("(%p %x)\n", this, flags);
11968 /* we have an array, with the number of elements stored before the first object */
11969 INT_PTR i, *ptr = (INT_PTR *)this-1;
11971 for(i=*ptr-1; i>=0; i--)
11972 ostrstream_vbase_dtor(this+i);
11973 MSVCRT_operator_delete(ptr);
11975 ostrstream_vbase_dtor(this);
11977 MSVCRT_operator_delete(this);
11983 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
11985 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
11988 /* ??1istrstream@std@@UAE@XZ */
11989 /* ??1istrstream@std@@UEAA@XZ */
11990 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
11991 void __thiscall istrstream_dtor(basic_ios_char *base)
11993 istrstream *this = istrstream_from_basic_ios(base);
11995 TRACE("(%p)\n", this);
11997 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11998 strstreambuf_dtor(&this->buf);
12001 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
12003 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
12006 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
12008 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
12011 /* ??0strstream@std@@QAE@PADHH@Z */
12012 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
12013 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
12014 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
12016 basic_ios_char *basic_ios;
12018 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
12021 this->base.base1.vbtable = strstream_vbtable1;
12022 this->base.base2.vbtable = strstream_vbtable2;
12023 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12024 basic_ios_char_ctor(basic_ios);
12026 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12029 strstreambuf_ctor_get_put(&this->buf, buf, size,
12030 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
12031 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
12032 basic_ios->base.vtable = &MSVCP_strstream_vtable;
12036 /* ??1strstream@std@@UAE@XZ */
12037 /* ??1strstream@std@@UEAA@XZ */
12038 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
12039 void __thiscall strstream_dtor(basic_ios_char *base)
12041 strstream *this = strstream_from_basic_ios(base);
12043 TRACE("(%p)\n", this);
12045 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
12046 strstreambuf_dtor(&this->buf);
12049 static void strstream_vbase_dtor(strstream *this)
12051 TRACE("(%p)\n", this);
12053 strstream_dtor(strstream_to_basic_ios(this));
12054 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
12057 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
12058 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
12060 strstream *this = strstream_from_basic_ios(base);
12062 TRACE("(%p %x)\n", this, flags);
12065 /* we have an array, with the number of elements stored before the first object */
12066 INT_PTR i, *ptr = (INT_PTR *)this-1;
12068 for(i=*ptr-1; i>=0; i--)
12069 strstream_vbase_dtor(this+i);
12070 MSVCRT_operator_delete(ptr);
12072 strstream_vbase_dtor(this);
12074 MSVCRT_operator_delete(this);
12080 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
12082 ios_base_precision_set(base, prec);
12085 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
12086 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12087 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
12089 TRACE("(%p %ld)\n", ret, prec);
12091 ret->pfunc = setprecision_func;
12096 static void __cdecl setw_func(ios_base *base, streamsize width)
12098 ios_base_width_set(base, width);
12101 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
12102 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12103 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
12105 TRACE("(%p %ld)\n", ret, width);
12107 ret->pfunc = setw_func;
12112 static void __cdecl resetioflags_func(ios_base *base, int mask)
12114 ios_base_setf_mask(base, 0, mask);
12117 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12118 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
12120 TRACE("(%p %d)\n", ret, mask);
12122 ret->pfunc = resetioflags_func;
12127 static void __cdecl setiosflags_func(ios_base *base, int mask)
12129 ios_base_setf_mask(base, FMTFLAG_mask, mask);
12132 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12133 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
12135 TRACE("(%p %d)\n", ret, mask);
12137 ret->pfunc = setiosflags_func;
12142 static void __cdecl setbase_func(ios_base *base, int set_base)
12145 set_base = FMTFLAG_dec;
12146 else if(set_base == 8)
12147 set_base = FMTFLAG_oct;
12148 else if(set_base == 16)
12149 set_base = FMTFLAG_hex;
12153 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
12156 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
12157 manip_int* __cdecl setbase(manip_int *ret, int base)
12159 TRACE("(%p %d)\n", ret, base);
12161 ret->pfunc = setbase_func;
12166 static basic_filebuf_char filebuf_char_stdin;
12167 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12169 basic_istream_char obj;
12170 basic_ios_char vbase;
12172 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12173 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12174 basic_istream_char *_Ptr_cin = &cin.obj;
12176 static basic_filebuf_wchar filebuf_short_stdin;
12177 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12179 basic_istream_wchar obj;
12180 basic_ios_wchar vbase;
12181 } ucin = { { 0 } };
12182 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12183 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12184 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12186 static basic_filebuf_wchar filebuf_wchar_stdin;
12187 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12189 basic_istream_wchar obj;
12190 basic_ios_wchar vbase;
12191 } wcin = { { 0 } };
12192 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12193 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12194 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12196 static basic_filebuf_char filebuf_char_stdout;
12197 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12199 basic_ostream_char obj;
12200 basic_ios_char vbase;
12201 } cout = { { 0 } };
12202 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12203 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12204 basic_ostream_char *_Ptr_cout = &cout.obj;
12206 static basic_filebuf_wchar filebuf_short_stdout;
12207 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12209 basic_ostream_wchar obj;
12210 basic_ios_wchar vbase;
12211 } ucout = { { 0 } };
12212 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12213 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12214 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12216 static basic_filebuf_wchar filebuf_wchar_stdout;
12217 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12219 basic_ostream_wchar obj;
12220 basic_ios_wchar vbase;
12221 } wcout = { { 0 } };
12222 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12223 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12224 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12226 static basic_filebuf_char filebuf_char_stderr;
12227 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12229 basic_ostream_char obj;
12230 basic_ios_char vbase;
12231 } cerr = { { 0 } };
12232 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12233 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12234 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12236 static basic_filebuf_wchar filebuf_short_stderr;
12237 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12239 basic_ostream_wchar obj;
12240 basic_ios_wchar vbase;
12241 } ucerr = { { 0 } };
12242 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12243 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12244 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12246 static basic_filebuf_wchar filebuf_wchar_stderr;
12247 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12249 basic_ostream_wchar obj;
12250 basic_ios_wchar vbase;
12251 } wcerr = { { 0 } };
12252 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12253 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12254 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12256 static basic_filebuf_char filebuf_char_log;
12257 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12259 basic_ostream_char obj;
12260 basic_ios_char vbase;
12261 } clog = { { 0 } };
12262 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12263 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12264 basic_ostream_char *_Ptr_clog = &clog.obj;
12266 static basic_filebuf_wchar filebuf_short_log;
12267 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12269 basic_ostream_wchar obj;
12270 basic_ios_wchar vbase;
12271 } uclog = { { 0 } };
12272 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12273 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12274 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12276 static basic_filebuf_wchar filebuf_wchar_log;
12277 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12279 basic_ostream_wchar obj;
12280 basic_ios_wchar vbase;
12281 } wclog = { { 0 } };
12282 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12283 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12284 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12286 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12287 int ios_base_Init__Init_cnt = -1;
12289 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12290 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12291 static void ios_base_Init__Init_ctor(void *this)
12293 TRACE("(%p)\n", this);
12295 if(ios_base_Init__Init_cnt < 0)
12296 ios_base_Init__Init_cnt = 1;
12298 ios_base_Init__Init_cnt++;
12301 /* ??0Init@ios_base@std@@QAE@XZ */
12302 /* ??0Init@ios_base@std@@QEAA@XZ */
12303 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12304 void* __thiscall ios_base_Init_ctor(void *this)
12306 ios_base_Init__Init_ctor(this);
12310 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12311 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12312 static void ios_base_Init__Init_dtor(void *this)
12314 TRACE("(%p)\n", this);
12316 ios_base_Init__Init_cnt--;
12317 if(!ios_base_Init__Init_cnt) {
12318 basic_ostream_char_flush(&cout.obj);
12319 basic_ostream_char_flush(&cerr.obj);
12320 basic_ostream_char_flush(&clog.obj);
12324 /* ??1Init@ios_base@std@@QAE@XZ */
12325 /* ??1Init@ios_base@std@@QEAA@XZ */
12326 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12327 void __thiscall ios_base_Init_dtor(void *this)
12329 ios_base_Init__Init_dtor(this);
12332 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12333 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12334 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12335 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12337 TRACE("(%p %p)\n", this, rhs);
12341 /* ?_Init_cnt@_Winit@std@@0HA */
12342 int _Winit__Init_cnt = -1;
12344 /* ??0_Winit@std@@QAE@XZ */
12345 /* ??0_Winit@std@@QEAA@XZ */
12346 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12347 void* __thiscall _Winit_ctor(void *this)
12349 TRACE("(%p)\n", this);
12351 if(_Winit__Init_cnt < 0)
12352 _Winit__Init_cnt = 1;
12354 _Winit__Init_cnt++;
12359 /* ??1_Winit@std@@QAE@XZ */
12360 /* ??1_Winit@std@@QAE@XZ */
12361 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12362 void __thiscall _Winit_dtor(void *this)
12364 TRACE("(%p)\n", this);
12366 _Winit__Init_cnt--;
12367 if(!_Winit__Init_cnt) {
12368 basic_ostream_wchar_flush(&wcout.obj);
12369 basic_ostream_wchar_flush(&wcerr.obj);
12370 basic_ostream_wchar_flush(&wclog.obj);
12374 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12375 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12376 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12377 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12379 TRACE("(%p %p)\n", this, rhs);
12383 void init_io(void *base)
12386 init_iosb_rtti(base);
12387 init_ios_base_rtti(base);
12388 init_basic_ios_char_rtti(base);
12389 init_basic_ios_wchar_rtti(base);
12390 init_basic_ios_short_rtti(base);
12391 init_basic_streambuf_char_rtti(base);
12392 init_basic_streambuf_wchar_rtti(base);
12393 init_basic_streambuf_short_rtti(base);
12394 init_basic_filebuf_char_rtti(base);
12395 init_basic_filebuf_wchar_rtti(base);
12396 init_basic_filebuf_short_rtti(base);
12397 init_basic_stringbuf_char_rtti(base);
12398 init_basic_stringbuf_wchar_rtti(base);
12399 init_basic_stringbuf_short_rtti(base);
12400 init_basic_ostream_char_rtti(base);
12401 init_basic_ostream_wchar_rtti(base);
12402 init_basic_ostream_short_rtti(base);
12403 init_basic_istream_char_rtti(base);
12404 init_basic_istream_wchar_rtti(base);
12405 init_basic_istream_short_rtti(base);
12406 init_basic_iostream_char_rtti(base);
12407 init_basic_iostream_wchar_rtti(base);
12408 init_basic_iostream_short_rtti(base);
12409 init_basic_ofstream_char_rtti(base);
12410 init_basic_ofstream_wchar_rtti(base);
12411 init_basic_ofstream_short_rtti(base);
12412 init_basic_ifstream_char_rtti(base);
12413 init_basic_ifstream_wchar_rtti(base);
12414 init_basic_ifstream_short_rtti(base);
12415 init_basic_fstream_char_rtti(base);
12416 init_basic_fstream_wchar_rtti(base);
12417 init_basic_fstream_short_rtti(base);
12418 init_basic_ostringstream_char_rtti(base);
12419 init_basic_ostringstream_wchar_rtti(base);
12420 init_basic_ostringstream_short_rtti(base);
12421 init_basic_istringstream_char_rtti(base);
12422 init_basic_istringstream_wchar_rtti(base);
12423 init_basic_istringstream_short_rtti(base);
12424 init_basic_stringstream_char_rtti(base);
12425 init_basic_stringstream_wchar_rtti(base);
12426 init_basic_stringstream_short_rtti(base);
12427 init_strstreambuf_rtti(base);
12428 init_strstream_rtti(base);
12429 init_ostrstream_rtti(base);
12432 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12433 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12435 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12436 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12438 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12439 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12441 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12442 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
12444 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12445 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
12447 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12448 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
12450 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12451 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
12453 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12454 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
12456 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12457 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
12459 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12460 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
12462 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12463 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
12465 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12466 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
12471 basic_istream_char_vbase_dtor(&cin.obj);
12472 basic_filebuf_char_dtor(&filebuf_char_stdin);
12474 basic_istream_wchar_vbase_dtor(&ucin.obj);
12475 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12477 basic_istream_wchar_vbase_dtor(&wcin.obj);
12478 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12480 basic_ostream_char_vbase_dtor(&cout.obj);
12481 basic_filebuf_char_dtor(&filebuf_char_stdout);
12483 basic_ostream_wchar_vbase_dtor(&ucout.obj);
12484 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12486 basic_ostream_wchar_vbase_dtor(&wcout.obj);
12487 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12489 basic_ostream_char_vbase_dtor(&cerr.obj);
12490 basic_filebuf_char_dtor(&filebuf_char_stderr);
12492 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
12493 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
12495 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
12496 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
12498 basic_ostream_char_vbase_dtor(&clog.obj);
12499 basic_filebuf_char_dtor(&filebuf_char_log);
12501 basic_ostream_wchar_vbase_dtor(&uclog.obj);
12502 basic_filebuf_wchar_dtor(&filebuf_short_log);
12504 basic_ostream_wchar_vbase_dtor(&wclog.obj);
12505 basic_filebuf_wchar_dtor(&filebuf_wchar_log);