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 locale_ctor(&this->loc);
950 basic_streambuf_char__Init_empty(this);
955 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
956 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
957 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
958 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
960 TRACE("(%p)\n", this);
962 locale_dtor(&this->loc);
965 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
966 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
968 TRACE("(%p %x)\n", this, flags);
970 /* we have an array, with the number of elements stored before the first object */
971 INT_PTR i, *ptr = (INT_PTR *)this-1;
973 for(i=*ptr-1; i>=0; i--)
974 basic_streambuf_char_dtor(this+i);
975 MSVCRT_operator_delete(ptr);
977 basic_streambuf_char_dtor(this);
979 MSVCRT_operator_delete(this);
985 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
986 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
987 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
989 TRACE("(%p)\n", this);
990 return *this->prpos ? *this->prsize : 0;
993 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
994 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
995 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
996 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
998 TRACE("(%p)\n", this);
1001 return *this->prpos;
1004 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1005 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1006 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
1007 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
1009 TRACE("(%p)\n", this);
1011 return (*this->prpos)++;
1014 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1015 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1016 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
1018 TRACE("(%p)\n", this);
1021 return *this->prpos;
1024 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1025 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1026 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
1027 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1029 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1039 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1040 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1041 static void basic_streambuf_char__Lock(basic_streambuf_char *this)
1043 TRACE("(%p)\n", this);
1046 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1047 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1048 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1050 TRACE("(%p)\n", this);
1051 return *this->pwpos ? *this->pwsize : 0;
1054 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1055 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1056 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1057 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1059 TRACE("(%p)\n", this);
1061 return (*this->pwpos)++;
1064 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1065 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1066 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1067 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1068 int, (basic_streambuf_char*), (this))
1069 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1071 TRACE("(%p)\n", this);
1075 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1076 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1077 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1078 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1079 int, (basic_streambuf_char*), (this))
1080 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1084 TRACE("(%p)\n", this);
1086 if(call_basic_streambuf_char_underflow(this)==EOF)
1089 ret = (unsigned char)**this->prpos;
1095 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1096 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1097 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1099 streamsize copied, chunk;
1102 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1104 for(copied=0; copied<count && size;) {
1105 chunk = basic_streambuf_char__Gnavail(this);
1106 if(chunk > count-copied)
1107 chunk = count-copied;
1110 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1111 *this->prpos += chunk;
1112 *this->prsize -= chunk;
1115 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1127 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1128 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1129 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1131 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1132 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1135 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1136 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1137 static void basic_streambuf_char__Unlock(basic_streambuf_char *this)
1139 TRACE("(%p)\n", this);
1142 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1143 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1144 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1145 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1147 TRACE("(%p)\n", this);
1148 return *this->prbuf;
1151 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1152 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1153 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1154 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1156 TRACE("(%p)\n", this);
1157 return *this->prpos;
1160 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1161 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1162 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1163 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1165 TRACE("(%p)\n", this);
1166 return *this->prpos+*this->prsize;
1169 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1170 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1171 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1172 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1174 TRACE("(%p)\n", this);
1175 return *this->pwpos+*this->pwsize;
1178 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1179 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1180 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1181 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1183 TRACE("(%p %d)\n", this, off);
1184 *this->prpos += off;
1185 *this->prsize -= off;
1188 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1189 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1190 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1191 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1192 void, (basic_streambuf_char*, const locale*), (this, loc))
1193 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1195 TRACE("(%p %p)\n", this, loc);
1198 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1199 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1200 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1201 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1202 int, (basic_streambuf_char*, int), (this, ch))
1203 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1205 TRACE("(%p %d)\n", this, ch);
1209 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1210 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1211 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1212 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1213 int, (basic_streambuf_char*, int), (this, ch))
1214 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1216 TRACE("(%p %d)\n", this, ch);
1220 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1221 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1222 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1223 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1225 TRACE("(%p)\n", this);
1226 return *this->pwbuf;
1229 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1230 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1231 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1232 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1234 TRACE("(%p %d)\n", this, off);
1235 *this->pwpos += off;
1236 *this->pwsize -= off;
1239 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1240 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1241 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1242 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1244 TRACE("(%p)\n", this);
1245 return *this->pwpos;
1248 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1249 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1250 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1251 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1253 TRACE("(%p %p)\n", this, loc);
1254 memcpy(ret, &this->loc, sizeof(locale));
1255 call_basic_streambuf_char_imbue(this, loc);
1256 locale_copy_ctor(&this->loc, loc);
1260 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1261 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1262 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1263 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1264 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1265 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1266 fpos_int *ret, streamoff off, int way, int mode)
1268 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1275 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1276 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1277 static fpos_int* basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1278 fpos_int *ret, streamoff off, int way, int mode)
1280 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1281 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1284 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1285 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1286 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1287 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1288 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1289 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1290 fpos_int *ret, fpos_int pos, int mode)
1292 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1299 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1300 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1301 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1302 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1303 fpos_int *ret, fpos_int pos, int mode)
1305 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1306 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1309 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1310 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1311 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1312 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1313 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1314 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1316 TRACE("(%p %p %ld)\n", this, buf, count);
1320 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1321 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1322 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1323 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1325 TRACE("(%p %p %ld)\n", this, buf, count);
1326 return call_basic_streambuf_char_setbuf(this, buf, count);
1329 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1330 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1331 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1332 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1333 int, (basic_streambuf_char*), (this))
1334 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1336 TRACE("(%p)\n", this);
1340 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1341 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1342 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1343 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1345 TRACE("(%p)\n", this);
1346 return call_basic_streambuf_char_sync(this);
1349 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1350 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1351 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1352 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1354 TRACE("(%p %p %ld)\n", this, ptr, count);
1355 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1358 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1359 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1360 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1361 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1362 streamsize, (basic_streambuf_char*), (this))
1363 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1365 TRACE("(%p)\n", this);
1369 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1370 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1371 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1372 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1376 TRACE("(%p)\n", this);
1378 ret = basic_streambuf_char__Gnavail(this);
1379 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1382 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1383 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1384 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1385 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1387 TRACE("(%p %d)\n", this, ch);
1388 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1391 return (unsigned char)ch;
1394 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch);
1397 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1398 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1399 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1400 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1402 TRACE("(%p %d)\n", this, ch);
1403 return basic_streambuf_char__Pnavail(this) ?
1404 (*basic_streambuf_char__Pninc(this) = ch) :
1405 call_basic_streambuf_char_overflow(this, (unsigned char)ch);
1408 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1409 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1410 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1411 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1413 TRACE("(%p)\n", this);
1414 if(*this->prpos && *this->prpos>*this->prbuf) {
1417 return (unsigned char)**this->prpos;
1420 return call_basic_streambuf_char_pbackfail(this, EOF);
1423 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1424 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1425 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1426 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1428 TRACE("(%p)\n", this);
1429 if(basic_streambuf_char__Gnavail(this))
1430 basic_streambuf_char__Gninc(this);
1432 call_basic_streambuf_char_uflow(this);
1435 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1436 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1437 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1438 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1440 TRACE("(%p)\n", this);
1441 return basic_streambuf_char__Gnavail(this) ?
1442 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1445 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1446 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1447 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1448 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1450 TRACE("(%p)\n", this);
1451 return basic_streambuf_char__Gnavail(this) ?
1452 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1455 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1456 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1457 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1458 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1460 TRACE("(%p)\n", this);
1462 if(basic_streambuf_char__Gnavail(this) > 1)
1463 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1464 return basic_streambuf_char_sbumpc(this)==EOF ?
1465 EOF : basic_streambuf_char_sgetc(this);
1468 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1469 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1470 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1471 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1472 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1473 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1475 TRACE("(%p %p %ld)\n", this, ptr, count);
1476 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1479 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1480 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1481 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1482 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1483 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1484 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1486 streamsize copied, chunk;
1488 TRACE("(%p %p %ld)\n", this, ptr, count);
1490 for(copied=0; copied<count;) {
1491 chunk = basic_streambuf_char__Pnavail(this);
1492 if(chunk > count-copied)
1493 chunk = count-copied;
1496 memcpy(*this->pwpos, ptr+copied, chunk);
1497 *this->pwpos += chunk;
1498 *this->pwsize -= chunk;
1500 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) {
1510 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1511 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1512 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1513 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1515 TRACE("(%p %p %ld)\n", this, ptr, count);
1516 return call_basic_streambuf_char_xsputn(this, ptr, count);
1519 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1520 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1521 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1522 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1523 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1524 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1526 TRACE("(%p %p %p %p)\n", this, first, next, last);
1530 this->wsize = last-next;
1533 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1534 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1535 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1536 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1537 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1538 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1540 basic_streambuf_wchar_setp_next(this, first, first, last);
1543 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1544 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1545 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1546 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1547 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1548 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1550 TRACE("(%p %p %p %p)\n", this, first, next, last);
1554 this->rsize = last-next;
1557 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1558 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1559 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1560 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1561 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1562 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1564 TRACE("(%p)\n", this);
1566 this->prbuf = &this->rbuf;
1567 this->pwbuf = &this->wbuf;
1568 this->prpos = &this->rpos;
1569 this->pwpos = &this->wpos;
1570 this->prsize = &this->rsize;
1571 this->pwsize = &this->wsize;
1573 basic_streambuf_wchar_setp(this, NULL, NULL);
1574 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1577 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1578 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1579 static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1581 TRACE("(%p %d)\n", this, uninitialized);
1582 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1583 mutex_ctor(&this->lock);
1587 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1588 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1589 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1590 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1592 TRACE("(%p %d)\n", this, uninitialized);
1593 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1594 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1598 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1599 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1600 static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1602 TRACE("(%p)\n", this);
1604 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1605 mutex_ctor(&this->lock);
1606 locale_ctor(&this->loc);
1607 basic_streambuf_wchar__Init_empty(this);
1612 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1613 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1614 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1615 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1617 TRACE("(%p)\n", this);
1618 basic_streambuf_wchar_ctor(this);
1619 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1623 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1624 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1625 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1626 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1627 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1628 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1630 TRACE("(%p)\n", this);
1632 mutex_dtor(&this->lock);
1633 locale_dtor(&this->loc);
1636 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1637 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1639 TRACE("(%p %x)\n", this, flags);
1641 /* we have an array, with the number of elements stored before the first object */
1642 INT_PTR i, *ptr = (INT_PTR *)this-1;
1644 for(i=*ptr-1; i>=0; i--)
1645 basic_streambuf_wchar_dtor(this+i);
1646 MSVCRT_operator_delete(ptr);
1648 basic_streambuf_wchar_dtor(this);
1650 MSVCRT_operator_delete(this);
1656 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1657 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1658 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1659 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1660 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1662 TRACE("(%p)\n", this);
1663 return *this->prpos ? *this->prsize : 0;
1666 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1667 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1668 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1669 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1670 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1671 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1673 TRACE("(%p)\n", this);
1676 return *this->prpos;
1679 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1680 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1681 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1682 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1683 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1684 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1686 TRACE("(%p)\n", this);
1688 return (*this->prpos)++;
1691 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1692 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1693 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1694 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1695 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1697 TRACE("(%p)\n", this);
1700 return *this->prpos;
1703 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1704 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1705 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1706 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1707 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1708 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)
1710 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1720 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1721 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1722 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1723 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1724 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1726 TRACE("(%p)\n", this);
1727 mutex_lock(&this->lock);
1730 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1731 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1732 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1733 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1734 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1736 TRACE("(%p)\n", this);
1737 return *this->pwpos ? *this->pwsize : 0;
1740 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1741 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1742 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1743 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1744 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1745 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1747 TRACE("(%p)\n", this);
1749 return (*this->pwpos)++;
1752 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1753 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1754 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1755 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1756 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1757 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1758 unsigned short, (basic_streambuf_wchar*), (this))
1759 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1761 TRACE("(%p)\n", this);
1765 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1766 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1767 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1768 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1769 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1770 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1771 unsigned short, (basic_streambuf_wchar*), (this))
1772 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1776 TRACE("(%p)\n", this);
1778 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1781 ret = **this->prpos;
1787 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1788 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1789 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1790 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1791 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1793 streamsize copied, chunk;
1796 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1798 for(copied=0; copied<count && size;) {
1799 chunk = basic_streambuf_wchar__Gnavail(this);
1800 if(chunk > count-copied)
1801 chunk = count-copied;
1804 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1805 *this->prpos += chunk;
1806 *this->prsize -= chunk;
1808 size -= chunk*sizeof(wchar_t);
1809 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1821 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1822 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1823 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1824 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1825 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1827 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1828 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1831 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1832 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1833 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1834 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1835 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1837 TRACE("(%p)\n", this);
1838 mutex_unlock(&this->lock);
1841 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1842 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1843 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1844 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1845 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1846 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1848 TRACE("(%p)\n", this);
1849 return *this->prbuf;
1852 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1853 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1854 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1855 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1856 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1857 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1859 TRACE("(%p)\n", this);
1860 return *this->prpos;
1863 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1864 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1865 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1866 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1867 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1868 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1870 TRACE("(%p)\n", this);
1871 return *this->prpos+*this->prsize;
1874 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1875 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1876 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1877 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1878 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1879 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1881 TRACE("(%p)\n", this);
1882 return *this->pwpos+*this->pwsize;
1885 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1886 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1887 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1888 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1889 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1890 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1892 TRACE("(%p %d)\n", this, off);
1893 *this->prpos += off;
1894 *this->prsize -= off;
1897 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1898 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1899 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1900 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1901 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1902 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1903 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1904 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1906 TRACE("(%p %p)\n", this, loc);
1909 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1910 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1911 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1912 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1913 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1914 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1915 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1916 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1918 TRACE("(%p %d)\n", this, ch);
1922 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1923 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1924 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1925 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1926 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1927 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1928 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1929 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1931 TRACE("(%p %d)\n", this, ch);
1935 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1936 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1937 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1938 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1939 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1940 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1942 TRACE("(%p)\n", this);
1943 return *this->pwbuf;
1946 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1947 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1948 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1949 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1950 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1951 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1953 TRACE("(%p %d)\n", this, off);
1954 *this->pwpos += off;
1955 *this->pwsize -= off;
1958 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1959 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1960 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1961 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1962 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1963 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1965 TRACE("(%p)\n", this);
1966 return *this->pwpos;
1969 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1970 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1971 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1972 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1973 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1974 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1976 TRACE("(%p %p)\n", this, loc);
1977 memcpy(ret, &this->loc, sizeof(locale));
1978 call_basic_streambuf_wchar_imbue(this, loc);
1979 locale_copy_ctor(&this->loc, loc);
1983 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1984 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1985 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1986 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1987 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1988 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1989 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1990 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1991 fpos_int *ret, streamoff off, int way, int mode)
1993 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2000 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2001 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2002 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2003 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2004 static fpos_int* basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2005 fpos_int *ret, streamoff off, int way, int mode)
2007 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2008 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2011 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2012 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2013 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2014 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2015 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2016 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2017 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2018 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2019 fpos_int *ret, fpos_int pos, int mode)
2021 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2028 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2029 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2030 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2031 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2032 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2033 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2034 fpos_int *ret, fpos_int pos, int mode)
2036 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2037 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2040 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2041 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2042 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2043 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2044 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2045 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2046 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2047 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2049 TRACE("(%p %p %ld)\n", this, buf, count);
2053 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2054 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2055 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2056 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2057 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2058 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2060 TRACE("(%p %p %ld)\n", this, buf, count);
2061 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2064 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2065 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2066 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2067 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2068 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2069 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2070 int, (basic_streambuf_wchar*), (this))
2071 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2073 TRACE("(%p)\n", this);
2077 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2078 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2079 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2080 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2081 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2082 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2084 TRACE("(%p)\n", this);
2085 return call_basic_streambuf_wchar_sync(this);
2088 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2089 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2090 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2091 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2092 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2093 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2095 TRACE("(%p %p %ld)\n", this, ptr, count);
2096 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2099 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2100 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2101 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2102 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2103 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2104 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2105 streamsize, (basic_streambuf_wchar*), (this))
2106 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2108 TRACE("(%p)\n", this);
2112 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2113 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2114 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2115 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2116 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2117 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2121 TRACE("(%p)\n", this);
2123 ret = basic_streambuf_wchar__Gnavail(this);
2124 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2127 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2128 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2129 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2130 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2131 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2132 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2134 TRACE("(%p %d)\n", this, ch);
2135 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2141 return call_basic_streambuf_wchar_pbackfail(this, ch);
2144 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2145 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2146 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2147 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2148 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2149 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2151 TRACE("(%p %d)\n", this, ch);
2152 return basic_streambuf_wchar__Pnavail(this) ?
2153 (*basic_streambuf_wchar__Pninc(this) = ch) :
2154 call_basic_streambuf_wchar_overflow(this, ch);
2157 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2158 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2159 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2160 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2161 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2162 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2164 TRACE("(%p)\n", this);
2165 if(*this->prpos && *this->prpos>*this->prbuf) {
2168 return **this->prpos;
2171 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2174 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2175 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2176 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2177 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2178 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2179 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2181 TRACE("(%p)\n", this);
2182 if(basic_streambuf_wchar__Gnavail(this))
2183 basic_streambuf_wchar__Gninc(this);
2185 call_basic_streambuf_wchar_uflow(this);
2188 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2189 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2190 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2191 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2192 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2193 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2195 TRACE("(%p)\n", this);
2196 return basic_streambuf_wchar__Gnavail(this) ?
2197 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2200 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2201 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2202 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2203 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2204 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2205 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2207 TRACE("(%p)\n", this);
2208 return basic_streambuf_wchar__Gnavail(this) ?
2209 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2212 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2213 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2214 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2215 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2216 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2217 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2219 TRACE("(%p)\n", this);
2221 if(basic_streambuf_wchar__Gnavail(this) > 1)
2222 return *basic_streambuf_wchar__Gnpreinc(this);
2223 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2224 WEOF : basic_streambuf_wchar_sgetc(this);
2227 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2228 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2229 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2230 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2231 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2232 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2233 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2234 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2236 TRACE("(%p %p %ld)\n", this, ptr, count);
2237 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2240 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2241 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2242 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2243 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2244 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2245 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2246 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2247 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2249 streamsize copied, chunk;
2251 TRACE("(%p %p %ld)\n", this, ptr, count);
2253 for(copied=0; copied<count;) {
2254 chunk = basic_streambuf_wchar__Pnavail(this);
2255 if(chunk > count-copied)
2256 chunk = count-copied;
2259 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2260 *this->pwpos += chunk;
2261 *this->pwsize -= chunk;
2263 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2273 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2274 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2275 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2276 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2277 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2278 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2280 TRACE("(%p %p %ld)\n", this, ptr, count);
2281 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2284 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2285 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2286 int basic_filebuf_char__Init__Stinit = 0;
2288 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2289 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2290 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2291 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2293 TRACE("(%p %p %d)\n", this, file, which);
2296 this->wrotesome = FALSE;
2297 this->state = basic_filebuf_char__Init__Stinit;
2298 this->close = (which == INITFL_open);
2301 basic_streambuf_char__Init_empty(&this->base);
2303 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2304 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2307 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2308 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2309 static void basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
2311 TRACE("(%p %p)\n", this, cvt);
2313 if(codecvt_base_always_noconv(&cvt->base)) {
2316 basic_streambuf_char__Init_empty(&this->base);
2321 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2322 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2323 static MSVCP_bool basic_filebuf_char__Endwrite(basic_filebuf_char *this)
2325 TRACE("(%p)\n", this);
2327 if(!this->wrotesome || !this->cvt)
2331 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2335 /* TODO: check if we need a dynamic buffer here */
2340 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2343 this->wrotesome = FALSE;
2345 case CODECVT_partial:
2346 if(!fwrite(buf, next-buf, 1, this->file))
2351 case CODECVT_noconv:
2352 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2361 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2362 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2363 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2364 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2366 basic_filebuf_char *ret = this;
2368 TRACE("(%p)\n", this);
2373 /* TODO: handle exceptions */
2374 if(!basic_filebuf_char__Endwrite(this))
2376 if(fclose(this->file))
2379 basic_filebuf_char__Init(this, NULL, INITFL_close);
2383 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2384 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2385 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2386 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2388 TRACE("(%p %p)\n", this, file);
2390 basic_streambuf_char_ctor(&this->base);
2391 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2393 basic_filebuf_char__Init(this, file, INITFL_new);
2397 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2398 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2399 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2400 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2402 return basic_filebuf_char_ctor_file(this, NULL);
2405 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2406 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2407 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2408 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2410 TRACE("(%p %d)\n", this, uninitialized);
2412 basic_streambuf_char_ctor(&this->base);
2413 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2417 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2418 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2419 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2420 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2422 TRACE("(%p)\n", this);
2425 basic_filebuf_char_close(this);
2426 basic_streambuf_char_dtor(&this->base);
2429 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2430 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2432 TRACE("(%p %x)\n", this, flags);
2434 /* we have an array, with the number of elements stored before the first object */
2435 INT_PTR i, *ptr = (INT_PTR *)this-1;
2437 for(i=*ptr-1; i>=0; i--)
2438 basic_filebuf_char_dtor(this+i);
2439 MSVCRT_operator_delete(ptr);
2441 basic_filebuf_char_dtor(this);
2443 MSVCRT_operator_delete(this);
2449 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2450 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2451 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2452 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2454 TRACE("(%p)\n", this);
2455 return this->file != NULL;
2458 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2459 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2460 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2462 static const wchar_t rW[] = {'r',0};
2463 static const struct {
2465 const wchar_t str[4];
2466 const wchar_t str_bin[4];
2468 {OPENMODE_out, {'w',0}, {'w','b',0}},
2469 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2470 {OPENMODE_app, {'a',0}, {'a','b',0}},
2471 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2472 {OPENMODE_in, {'r',0}, {'r','b',0}},
2473 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2474 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2475 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2476 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2479 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2483 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2485 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2486 if(str_mode[mode_idx].mode == real_mode)
2488 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2491 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2496 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2497 && (f = _wfopen(name, rW))) {
2502 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2503 : str_mode[mode_idx].str, prot);
2507 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2515 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2516 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2517 static FILE* _Fiopen(const char *name, int mode, int prot)
2519 wchar_t nameW[FILENAME_MAX];
2521 TRACE("(%s %d %d)\n", name, mode, prot);
2523 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2525 return _Fiopen_wchar(nameW, mode, prot);
2528 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2529 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2530 FILE* __cdecl ___Fiopen(const char *name, int mode)
2532 TRACE("(%p %d)\n", name, mode);
2533 return _Fiopen(name, mode, _SH_DENYNO);
2536 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2537 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2538 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2539 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2540 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2544 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2546 if(basic_filebuf_char_is_open(this))
2549 if(!(f = _Fiopen_wchar(name, mode, prot)))
2552 basic_filebuf_char__Init(this, f, INITFL_open);
2553 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(&this->base.loc));
2557 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2558 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2559 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2561 wchar_t nameW[FILENAME_MAX];
2563 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2565 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2567 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2570 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2571 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2572 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2573 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2575 TRACE("(%p %p %d)\n", this, name, mode);
2576 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2579 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2580 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2581 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2582 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2584 TRACE("(%p %p %d)\n", this, name, mode);
2585 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2588 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2589 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2590 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2591 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2593 char buf[8], *dyn_buf;
2594 char ch = c, *to_next;
2595 const char *from_next;
2599 TRACE("(%p %d)\n", this, c);
2601 if(!basic_filebuf_char_is_open(this))
2607 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2611 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2612 &from_next, buf, buf+sizeof(buf), &to_next);
2615 case CODECVT_partial:
2620 if(!fwrite(buf, to_next-buf, 1, this->file))
2622 if(ret == CODECVT_partial)
2625 case CODECVT_noconv:
2626 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2634 max_size = codecvt_base_max_length(&this->cvt->base);
2635 dyn_buf = malloc(max_size);
2639 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2640 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2644 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2646 return ret ? c : EOF;
2647 case CODECVT_partial:
2648 ERR("buffer should be big enough to store all output\n");
2656 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2657 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2658 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2659 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2661 TRACE("(%p %d)\n", this, c);
2663 if(!basic_filebuf_char_is_open(this))
2666 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2667 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2668 basic_streambuf_char__Gndec(&this->base);
2669 return c==EOF ? !c : c;
2670 }else if(c!=EOF && !this->cvt) {
2671 return ungetc(c, this->file);
2677 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2678 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2679 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2680 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2682 char ch, buf[128], *to_next;
2683 const char *buf_next;
2686 TRACE("(%p)\n", this);
2688 if(!basic_filebuf_char_is_open(this))
2691 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2692 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2694 c = fgetc(this->file);
2695 if(!this->cvt || c==EOF)
2699 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
2702 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2703 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2704 case CODECVT_partial:
2706 if(to_next == &ch) {
2707 c = fgetc(this->file);
2713 for(i--; i>=buf_next-buf; i--)
2714 ungetc(buf[i], this->file);
2716 case CODECVT_noconv:
2717 return (unsigned char)buf[0];
2723 FIXME("buffer is too small\n");
2727 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2728 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2729 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2730 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2734 TRACE("(%p)\n", this);
2736 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2737 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2739 ret = call_basic_streambuf_char_uflow(&this->base);
2741 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2745 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2746 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2747 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2748 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2749 fpos_int *ret, streamoff off, int way, int mode)
2753 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2755 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2756 || fseek(this->file, off, way)) {
2763 fgetpos(this->file, &pos);
2766 ret->state = this->state;
2770 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2771 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2772 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2773 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2774 fpos_int *ret, fpos_int pos, int mode)
2778 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2780 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2781 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2782 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2789 fgetpos(this->file, &fpos);
2792 ret->state = this->state;
2796 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2797 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2798 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2799 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2801 TRACE("(%p %p %ld)\n", this, buf, count);
2803 if(!basic_filebuf_char_is_open(this))
2806 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2809 basic_filebuf_char__Init(this, this->file, INITFL_open);
2813 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2814 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2815 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2816 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2818 TRACE("(%p)\n", this);
2820 if(!basic_filebuf_char_is_open(this))
2823 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2825 return fflush(this->file);
2828 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2829 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2830 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2831 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2833 TRACE("(%p %p)\n", this, loc);
2834 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2837 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2838 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2839 int basic_filebuf_short__Init__Stinit = 0;
2841 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2842 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2843 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2845 TRACE("(%p %p %d)\n", this, file, which);
2848 this->wrotesome = FALSE;
2850 this->close = (which == INITFL_open);
2853 basic_streambuf_wchar__Init_empty(&this->base);
2856 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2857 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2858 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2859 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2861 TRACE("(%p %p %d)\n", this, file, which);
2864 this->wrotesome = FALSE;
2865 this->state = basic_filebuf_short__Init__Stinit;
2866 this->close = (which == INITFL_open);
2869 basic_streambuf_wchar__Init_empty(&this->base);
2872 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2873 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2874 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2875 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2876 static void basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt)
2878 TRACE("(%p %p)\n", this, cvt);
2880 if(codecvt_base_always_noconv(&cvt->base)) {
2883 basic_streambuf_wchar__Init_empty(&this->base);
2888 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2889 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2890 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2891 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2892 static MSVCP_bool basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this)
2894 TRACE("(%p)\n", this);
2896 if(!this->wrotesome || !this->cvt)
2899 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2903 /* TODO: check if we need a dynamic buffer here */
2908 ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2911 this->wrotesome = FALSE;
2913 case CODECVT_partial:
2914 if(!fwrite(buf, next-buf, 1, this->file))
2919 case CODECVT_noconv:
2920 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2929 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2930 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2931 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2932 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2933 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2934 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2936 basic_filebuf_wchar *ret = this;
2938 TRACE("(%p)\n", this);
2943 /* TODO: handle exceptions */
2944 if(!basic_filebuf_wchar__Endwrite(this))
2946 if(fclose(this->file))
2949 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2953 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2954 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2955 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2957 TRACE("(%p %p)\n", this, file);
2959 basic_streambuf_wchar_ctor(&this->base);
2960 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2962 basic_filebuf_wchar__Init(this, file, INITFL_new);
2966 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2967 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2968 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2969 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2971 TRACE("(%p %p)\n", this, file);
2973 basic_streambuf_short_ctor(&this->base);
2974 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2976 basic_filebuf_short__Init(this, file, INITFL_new);
2980 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2981 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2982 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2984 return basic_filebuf_wchar_ctor_file(this, NULL);
2987 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2988 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2989 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2990 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2992 return basic_filebuf_short_ctor_file(this, NULL);
2995 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2996 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2997 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
2998 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3000 TRACE("(%p %d)\n", this, uninitialized);
3002 basic_streambuf_short_ctor(&this->base);
3003 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3007 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3008 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3009 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
3010 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3011 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
3012 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
3014 TRACE("(%p)\n", this);
3017 basic_filebuf_wchar_close(this);
3018 basic_streambuf_wchar_dtor(&this->base);
3021 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
3022 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
3024 TRACE("(%p %x)\n", this, flags);
3026 /* we have an array, with the number of elements stored before the first object */
3027 INT_PTR i, *ptr = (INT_PTR *)this-1;
3029 for(i=*ptr-1; i>=0; i--)
3030 basic_filebuf_wchar_dtor(this+i);
3031 MSVCRT_operator_delete(ptr);
3033 basic_filebuf_wchar_dtor(this);
3035 MSVCRT_operator_delete(this);
3041 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3042 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3043 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3044 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3045 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
3046 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
3048 TRACE("(%p)\n", this);
3049 return this->file != NULL;
3052 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3053 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3054 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3055 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3056 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3060 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3062 if(basic_filebuf_wchar_is_open(this))
3065 if(!(f = _Fiopen_wchar(name, mode, prot)))
3068 basic_filebuf_wchar__Init(this, f, INITFL_open);
3069 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(&this->base.loc));
3073 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3074 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3075 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3077 wchar_t nameW[FILENAME_MAX];
3079 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3081 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3083 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3086 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3087 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3088 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3089 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3091 TRACE("(%p %p %d)\n", this, name, mode);
3092 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3095 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3096 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3097 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3098 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3100 TRACE("(%p %p %d)\n", this, name, mode);
3101 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3104 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3105 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3106 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3107 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3108 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3109 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3111 char buf[8], *dyn_buf, *to_next;
3113 const wchar_t *from_next;
3118 TRACE("(%p %d)\n", this, c);
3120 if(!basic_filebuf_wchar_is_open(this))
3126 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3130 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3131 &from_next, buf, buf+sizeof(buf), &to_next);
3134 case CODECVT_partial:
3139 if(!fwrite(buf, to_next-buf, 1, this->file))
3141 if(ret == CODECVT_partial)
3144 case CODECVT_noconv:
3145 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3153 max_size = codecvt_base_max_length(&this->cvt->base);
3154 dyn_buf = malloc(max_size);
3158 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3159 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
3163 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
3165 return ret ? c : WEOF;
3166 case CODECVT_partial:
3167 ERR("buffer should be big enough to store all output\n");
3175 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3176 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3177 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3178 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3179 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3180 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3182 TRACE("(%p %d)\n", this, c);
3184 if(!basic_filebuf_wchar_is_open(this))
3187 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3188 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3189 basic_streambuf_wchar__Gndec(&this->base);
3190 return c==WEOF ? !c : c;
3191 }else if(c!=WEOF && !this->cvt) {
3192 return ungetwc(c, this->file);
3193 }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) {
3195 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1);
3202 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3203 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3204 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3205 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3206 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3207 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3209 wchar_t ch, *to_next;
3211 const char *buf_next;
3214 TRACE("(%p)\n", this);
3216 if(!basic_filebuf_wchar_is_open(this))
3219 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3220 return *basic_streambuf_wchar__Gninc(&this->base);
3223 return fgetwc(this->file);
3226 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
3227 if((c = fgetc(this->file)) == EOF)
3231 switch(codecvt_wchar_in(this->cvt, &this->state, buf_next,
3232 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
3233 case CODECVT_partial:
3238 for(i--; i>=buf_next-buf; i--)
3239 ungetc(buf[i], this->file);
3241 case CODECVT_noconv:
3242 if(i+1 < sizeof(wchar_t))
3245 memcpy(&ch, buf, sizeof(wchar_t));
3252 FIXME("buffer is too small\n");
3256 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3257 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3258 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3259 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3260 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3261 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3265 TRACE("(%p)\n", this);
3267 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3268 return *basic_streambuf_wchar_gptr(&this->base);
3270 ret = call_basic_streambuf_wchar_uflow(&this->base);
3272 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3276 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3277 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3278 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3279 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3280 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3281 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3282 fpos_int *ret, streamoff off, int way, int mode)
3286 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3288 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) {
3289 if(way == SEEKDIR_cur)
3290 off -= sizeof(wchar_t);
3292 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3295 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3296 || fseek(this->file, off, way)) {
3303 fgetpos(this->file, &pos);
3306 ret->state = this->state;
3310 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3311 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3312 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3313 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3314 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3315 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3316 fpos_int *ret, fpos_int pos, int mode)
3320 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3322 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3323 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3324 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3331 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback)
3332 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3334 fgetpos(this->file, &fpos);
3337 ret->state = this->state;
3341 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3342 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3343 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3344 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3346 TRACE("(%p %p %ld)\n", this, buf, count);
3348 if(!basic_filebuf_wchar_is_open(this))
3351 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3354 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3358 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3359 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3360 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3361 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3363 TRACE("(%p %p %ld)\n", this, buf, count);
3365 if(!basic_filebuf_wchar_is_open(this))
3368 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3371 basic_filebuf_short__Init(this, this->file, INITFL_open);
3375 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3376 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3377 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3378 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3379 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3380 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3382 TRACE("(%p)\n", this);
3384 if(!basic_filebuf_wchar_is_open(this))
3387 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3389 return fflush(this->file);
3392 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
3393 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
3394 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8)
3395 void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc)
3397 TRACE("(%p %p)\n", this, loc);
3398 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc));
3401 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
3402 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
3403 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8)
3404 void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc)
3406 TRACE("(%p %p)\n", this, loc);
3407 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc));
3410 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3411 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3412 static int basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3416 if(!(mode & OPENMODE_in))
3417 state |= STRINGBUF_no_read;
3419 if(!(mode & OPENMODE_out))
3420 state |= STRINGBUF_no_write;
3422 if(mode & OPENMODE_ate)
3423 state |= STRINGBUF_at_end;
3425 if(mode & OPENMODE_app)
3426 state |= STRINGBUF_append;
3431 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3432 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3433 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3434 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3436 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3438 basic_streambuf_char__Init_empty(&this->base);
3440 this->state = state;
3441 this->seekhigh = NULL;
3444 char *buf = MSVCRT_operator_new(count);
3446 ERR("Out of memory\n");
3447 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3450 memcpy(buf, str, count);
3451 this->seekhigh = buf + count;
3453 this->state |= STRINGBUF_allocated;
3455 if(!(state & STRINGBUF_no_read))
3456 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3458 if(!(state & STRINGBUF_no_write)) {
3459 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3461 if(!basic_streambuf_char_gptr(&this->base))
3462 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3467 /* ??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 */
3468 /* ??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 */
3469 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3470 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3471 const basic_string_char *str, IOSB_openmode mode)
3473 TRACE("(%p %p %d)\n", this, str, mode);
3475 basic_streambuf_char_ctor(&this->base);
3476 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3478 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3479 str->size, basic_stringbuf_char__Getstate(this, mode));
3483 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3484 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3485 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3486 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3487 basic_stringbuf_char *this, IOSB_openmode mode)
3489 TRACE("(%p %d)\n", this, mode);
3491 basic_streambuf_char_ctor(&this->base);
3492 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3494 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3498 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3499 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3500 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3501 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3503 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3506 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3507 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3508 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3509 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3511 TRACE("(%p)\n", this);
3513 if(this->state & STRINGBUF_allocated) {
3514 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3515 this->seekhigh = NULL;
3516 this->state &= ~STRINGBUF_allocated;
3519 basic_streambuf_char__Init_empty(&this->base);
3522 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3523 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3524 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3525 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3527 TRACE("(%p)\n", this);
3529 basic_stringbuf_char__Tidy(this);
3530 basic_streambuf_char_dtor(&this->base);
3533 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3534 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3536 TRACE("(%p %x)\n", this, flags);
3539 /* we have an array, with the number of elements stored before the first object */
3540 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3542 for (i = *ptr - 1; i >= 0; i--)
3543 basic_stringbuf_char_dtor(this+i);
3545 MSVCRT_operator_delete(ptr);
3547 basic_stringbuf_char_dtor(this);
3550 MSVCRT_operator_delete(this);
3556 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3557 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3558 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3559 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3561 MSVCP_size_t oldsize, size;
3564 TRACE("(%p %x)\n", this, meta);
3568 if(this->state & STRINGBUF_no_write)
3571 ptr = basic_streambuf_char_pptr(&this->base);
3572 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3573 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3574 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3576 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3577 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3579 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3582 buf = MSVCRT_operator_new(size);
3584 ERR("Out of memory\n");
3585 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3589 this->seekhigh = buf;
3590 basic_streambuf_char_setp(&this->base, buf, buf+size);
3591 if(this->state & STRINGBUF_no_read)
3592 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3594 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3596 this->state |= STRINGBUF_allocated;
3598 ptr = basic_streambuf_char_eback(&this->base);
3599 memcpy(buf, ptr, oldsize);
3601 this->seekhigh = buf+(this->seekhigh-ptr);
3602 basic_streambuf_char_setp_next(&this->base, buf,
3603 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3604 if(this->state & STRINGBUF_no_read)
3605 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3607 basic_streambuf_char_setg(&this->base, buf,
3608 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3609 basic_streambuf_char_pptr(&this->base)+1);
3611 MSVCRT_operator_delete(ptr);
3614 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3617 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3618 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3619 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3620 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3624 TRACE("(%p %x)\n", this, c);
3626 cur = basic_streambuf_char_gptr(&this->base);
3627 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3628 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3633 basic_streambuf_char_gbump(&this->base, -1);
3634 return c==EOF ? !EOF : c;
3637 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3638 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3639 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3640 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3644 TRACE("(%p)\n", this);
3646 cur = basic_streambuf_char_gptr(&this->base);
3647 if(!cur || this->state&STRINGBUF_no_read)
3650 ptr = basic_streambuf_char_pptr(&this->base);
3651 if(this->seekhigh < ptr)
3652 this->seekhigh = ptr;
3654 ptr = basic_streambuf_char_egptr(&this->base);
3655 if(this->seekhigh > ptr)
3656 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3658 if(cur < this->seekhigh)
3659 return (unsigned char)*cur;
3663 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3664 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3665 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3666 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3667 fpos_int *ret, streamoff off, int way, int mode)
3669 char *beg, *cur_r, *cur_w;
3671 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3673 cur_w = basic_streambuf_char_pptr(&this->base);
3674 if(cur_w > this->seekhigh)
3675 this->seekhigh = cur_w;
3681 beg = basic_streambuf_char_eback(&this->base);
3682 cur_r = basic_streambuf_char_gptr(&this->base);
3683 if((mode & OPENMODE_in) && cur_r) {
3684 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3686 else if(way == SEEKDIR_end)
3687 off += this->seekhigh-beg;
3688 else if(way != SEEKDIR_beg)
3691 if(off<0 || off>this->seekhigh-beg) {
3694 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3695 if((mode & OPENMODE_out) && cur_w) {
3696 basic_streambuf_char_setp_next(&this->base, beg,
3697 basic_streambuf_char_gptr(&this->base),
3698 basic_streambuf_char_epptr(&this->base));
3701 }else if((mode & OPENMODE_out) && cur_w) {
3702 if(way == SEEKDIR_cur)
3704 else if(way == SEEKDIR_end)
3705 off += this->seekhigh-beg;
3706 else if(way != SEEKDIR_beg)
3709 if(off<0 || off>this->seekhigh-beg)
3712 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3721 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3722 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3723 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3724 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3725 fpos_int *ret, fpos_int pos, int mode)
3727 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3729 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3734 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3737 /* ?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 */
3738 /* ?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 */
3739 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3740 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3742 TRACE("(%p %p)\n", this, str);
3744 basic_stringbuf_char__Tidy(this);
3745 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3748 /* ?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 */
3749 /* ?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 */
3750 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3751 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3755 TRACE("(%p)\n", this);
3757 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3760 ptr = basic_streambuf_char_pbase(&this->base);
3761 pptr = basic_streambuf_char_pptr(&this->base);
3763 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3766 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3767 ptr = basic_streambuf_char_eback(&this->base);
3768 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3771 return basic_string_char_ctor(ret);
3774 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3775 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3776 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3777 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3778 static int basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3782 if(!(mode & OPENMODE_in))
3783 state |= STRINGBUF_no_read;
3785 if(!(mode & OPENMODE_out))
3786 state |= STRINGBUF_no_write;
3788 if(mode & OPENMODE_ate)
3789 state |= STRINGBUF_at_end;
3791 if(mode & OPENMODE_app)
3792 state |= STRINGBUF_append;
3797 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3798 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3799 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3800 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3801 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3802 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3804 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3806 basic_streambuf_wchar__Init_empty(&this->base);
3808 this->state = state;
3809 this->seekhigh = NULL;
3812 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3814 ERR("Out of memory\n");
3815 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3818 memcpy(buf, str, count*sizeof(wchar_t));
3819 this->seekhigh = buf + count;
3821 this->state |= STRINGBUF_allocated;
3823 if(!(state & STRINGBUF_no_read))
3824 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3826 if(!(state & STRINGBUF_no_write)) {
3827 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3829 if(!basic_streambuf_wchar_gptr(&this->base))
3830 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3835 /* ??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 */
3836 /* ??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 */
3837 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3838 const basic_string_wchar *str, IOSB_openmode mode)
3840 TRACE("(%p %p %d)\n", this, str, mode);
3842 basic_streambuf_wchar_ctor(&this->base);
3843 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3845 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3846 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3850 /* ??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 */
3851 /* ??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 */
3852 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3853 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3854 const basic_string_wchar *str, IOSB_openmode mode)
3856 basic_stringbuf_wchar_ctor_str(this, str, mode);
3857 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3861 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3862 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3863 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3864 basic_stringbuf_wchar *this, IOSB_openmode mode)
3866 TRACE("(%p %d)\n", this, mode);
3868 basic_streambuf_wchar_ctor(&this->base);
3869 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3871 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3875 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3876 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3877 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3878 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3879 basic_stringbuf_wchar *this, IOSB_openmode mode)
3881 basic_stringbuf_wchar_ctor_mode(this, mode);
3882 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3886 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3887 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3888 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3889 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3891 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3894 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3895 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3896 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3897 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3898 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3899 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3901 TRACE("(%p)\n", this);
3903 if(this->state & STRINGBUF_allocated) {
3904 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3905 this->seekhigh = NULL;
3906 this->state &= ~STRINGBUF_allocated;
3909 basic_streambuf_wchar__Init_empty(&this->base);
3912 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3913 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3914 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3915 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3916 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3917 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3919 TRACE("(%p)\n", this);
3921 basic_stringbuf_wchar__Tidy(this);
3922 basic_streambuf_wchar_dtor(&this->base);
3925 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3926 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3928 TRACE("(%p %x)\n", this, flags);
3931 /* we have an array, with the number of elements stored before the first object */
3932 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3934 for (i = *ptr - 1; i >= 0; i--)
3935 basic_stringbuf_wchar_dtor(this+i);
3937 MSVCRT_operator_delete(ptr);
3939 basic_stringbuf_wchar_dtor(this);
3942 MSVCRT_operator_delete(this);
3948 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3949 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3950 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3951 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3952 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3953 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3955 MSVCP_size_t oldsize, size;
3958 TRACE("(%p %x)\n", this, meta);
3962 if(this->state & STRINGBUF_no_write)
3965 ptr = basic_streambuf_wchar_pptr(&this->base);
3966 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3967 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3968 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3970 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3971 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3973 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3976 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3978 ERR("Out of memory\n");
3979 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3983 this->seekhigh = buf;
3984 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3985 if(this->state & STRINGBUF_no_read)
3986 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3988 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3990 this->state |= STRINGBUF_allocated;
3992 ptr = basic_streambuf_wchar_eback(&this->base);
3993 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3995 this->seekhigh = buf+(this->seekhigh-ptr);
3996 basic_streambuf_wchar_setp_next(&this->base, buf,
3997 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
3998 if(this->state & STRINGBUF_no_read)
3999 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4001 basic_streambuf_wchar_setg(&this->base, buf,
4002 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
4003 basic_streambuf_wchar_pptr(&this->base)+1);
4005 MSVCRT_operator_delete(ptr);
4008 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4011 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4012 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4013 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4014 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4015 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
4016 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
4020 TRACE("(%p %x)\n", this, c);
4022 cur = basic_streambuf_wchar_gptr(&this->base);
4023 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
4024 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
4029 basic_streambuf_wchar_gbump(&this->base, -1);
4030 return c==WEOF ? !WEOF : c;
4033 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
4034 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
4035 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
4036 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
4037 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
4038 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
4042 TRACE("(%p)\n", this);
4044 cur = basic_streambuf_wchar_gptr(&this->base);
4045 if(!cur || this->state&STRINGBUF_no_read)
4048 ptr = basic_streambuf_wchar_pptr(&this->base);
4049 if(this->seekhigh < ptr)
4050 this->seekhigh = ptr;
4052 ptr = basic_streambuf_wchar_egptr(&this->base);
4053 if(this->seekhigh > ptr)
4054 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
4056 if(cur < this->seekhigh)
4061 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4062 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4063 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4064 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4065 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
4066 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
4067 fpos_int *ret, streamoff off, int way, int mode)
4069 wchar_t *beg, *cur_r, *cur_w;
4071 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
4073 cur_w = basic_streambuf_wchar_pptr(&this->base);
4074 if(cur_w > this->seekhigh)
4075 this->seekhigh = cur_w;
4081 beg = basic_streambuf_wchar_eback(&this->base);
4082 cur_r = basic_streambuf_wchar_gptr(&this->base);
4083 if((mode & OPENMODE_in) && cur_r) {
4084 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
4086 else if(way == SEEKDIR_end)
4087 off += this->seekhigh-beg;
4088 else if(way != SEEKDIR_beg)
4091 if(off<0 || off>this->seekhigh-beg) {
4094 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
4095 if((mode & OPENMODE_out) && cur_w) {
4096 basic_streambuf_wchar_setp_next(&this->base, beg,
4097 basic_streambuf_wchar_gptr(&this->base),
4098 basic_streambuf_wchar_epptr(&this->base));
4101 }else if((mode & OPENMODE_out) && cur_w) {
4102 if(way == SEEKDIR_cur)
4104 else if(way == SEEKDIR_end)
4105 off += this->seekhigh-beg;
4106 else if(way != SEEKDIR_beg)
4109 if(off<0 || off>this->seekhigh-beg)
4112 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
4121 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4122 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4123 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4124 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4125 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4126 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4127 fpos_int *ret, fpos_int pos, int mode)
4129 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4131 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
4136 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4139 /* ?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 */
4140 /* ?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 */
4141 /* ?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 */
4142 /* ?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 */
4143 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4144 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4146 TRACE("(%p %p)\n", this, str);
4148 basic_stringbuf_wchar__Tidy(this);
4149 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str), str->size, this->state);
4152 /* ?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 */
4153 /* ?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 */
4154 /* ?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 */
4155 /* ?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 */
4156 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4157 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4161 TRACE("(%p)\n", this);
4163 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4166 ptr = basic_streambuf_wchar_pbase(&this->base);
4167 pptr = basic_streambuf_wchar_pptr(&this->base);
4169 return basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4172 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4173 ptr = basic_streambuf_wchar_eback(&this->base);
4174 return basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4177 return basic_string_wchar_ctor(ret);
4180 /* ??0ios_base@std@@IAE@XZ */
4181 /* ??0ios_base@std@@IEAA@XZ */
4182 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4183 ios_base* __thiscall ios_base_ctor(ios_base *this)
4185 TRACE("(%p)\n", this);
4186 this->vtable = &MSVCP_ios_base_vtable;
4190 /* ??0ios_base@std@@QAE@ABV01@@Z */
4191 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4192 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4193 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4195 TRACE("(%p %p)\n", this, copy);
4197 this->vtable = &MSVCP_ios_base_vtable;
4201 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4202 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4203 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4204 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4206 IOS_BASE_fnarray *cur;
4208 TRACE("(%p %x)\n", this, event);
4210 for(cur=this->calls; cur; cur=cur->next)
4211 cur->event_handler(event, this, cur->index);
4214 /* ?_Tidy@ios_base@std@@AAAXXZ */
4215 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4216 void CDECL ios_base_Tidy(ios_base *this)
4218 IOS_BASE_iosarray *arr_cur, *arr_next;
4219 IOS_BASE_fnarray *event_cur, *event_next;
4221 TRACE("(%p)\n", this);
4223 ios_base_Callfns(this, EVENT_erase_event);
4225 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4226 arr_next = arr_cur->next;
4227 MSVCRT_operator_delete(arr_cur);
4231 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4232 event_next = event_cur->next;
4233 MSVCRT_operator_delete(event_cur);
4238 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4239 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4240 static void ios_base_Ios_base_dtor(ios_base *obj)
4242 TRACE("(%p)\n", obj);
4244 locale_dtor(obj->loc);
4245 MSVCRT_operator_delete(obj->loc);
4250 /* ??1ios_base@std@@UAE@XZ */
4251 /* ??1ios_base@std@@UEAA@XZ */
4252 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4253 void __thiscall ios_base_dtor(ios_base *this)
4255 ios_base_Ios_base_dtor(this);
4258 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4259 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4261 TRACE("(%p %x)\n", this, flags);
4263 /* we have an array, with the number of elements stored before the first object */
4264 INT_PTR i, *ptr = (INT_PTR *)this-1;
4266 for(i=*ptr-1; i>=0; i--)
4267 ios_base_dtor(this+i);
4268 MSVCRT_operator_delete(ptr);
4270 ios_base_dtor(this);
4272 MSVCRT_operator_delete(this);
4278 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4279 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4281 TRACE("(%p %x)\n", this, flags);
4283 INT_PTR *ptr = (INT_PTR *)this-1;
4284 MSVCRT_operator_delete(ptr);
4287 MSVCRT_operator_delete(this);
4293 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4294 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4295 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4296 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4298 IOS_BASE_iosarray *p;
4300 TRACE("(%p %d)\n", this, index);
4302 for(p=this->arr; p; p=p->next) {
4303 if(p->index == index)
4307 for(p=this->arr; p; p=p->next) {
4308 if(!p->long_val && !p->ptr_val) {
4314 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4315 p->next = this->arr;
4323 /* ?iword@ios_base@std@@QAEAAJH@Z */
4324 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4325 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4326 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4328 TRACE("(%p %d)\n", this, index);
4329 return &ios_base_Findarr(this, index)->long_val;
4332 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4333 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4334 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4335 void** __thiscall ios_base_pword(ios_base *this, int index)
4337 TRACE("(%p %d)\n", this, index);
4338 return &ios_base_Findarr(this, index)->ptr_val;
4341 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4342 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4343 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4344 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4346 IOS_BASE_fnarray *event;
4348 TRACE("(%p %p %d)\n", this, callback, index);
4350 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4351 event->next = this->calls;
4352 event->index = index;
4353 event->event_handler = callback;
4354 this->calls = event;
4357 /* ?clear@ios_base@std@@QAEXH_N@Z */
4358 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4359 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4360 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4362 TRACE("(%p %x %x)\n", this, state, reraise);
4364 this->state = state & IOSTATE_mask;
4365 if(!(this->state & this->except))
4369 throw_exception(EXCEPTION_RERAISE, NULL);
4370 else if(this->state & this->except & IOSTATE_eofbit)
4371 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4372 else if(this->state & this->except & IOSTATE_failbit)
4373 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4374 else if(this->state & this->except & IOSTATE_badbit)
4375 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4376 else if(this->state & this->except & IOSTATE__Hardfail)
4377 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4380 /* ?clear@ios_base@std@@QAEXH@Z */
4381 /* ?clear@ios_base@std@@QEAAXH@Z */
4382 static void ios_base_clear(ios_base *this, IOSB_iostate state)
4384 ios_base_clear_reraise(this, state, FALSE);
4387 /* ?exceptions@ios_base@std@@QAEXH@Z */
4388 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4389 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4390 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4392 TRACE("(%p %x)\n", this, state);
4393 this->except = state & IOSTATE_mask;
4394 ios_base_clear(this, this->state);
4397 /* ?exceptions@ios_base@std@@QBEHXZ */
4398 /* ?exceptions@ios_base@std@@QEBAHXZ */
4399 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4400 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4402 TRACE("(%p)\n", this);
4403 return this->except;
4406 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4407 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4408 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4409 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4411 TRACE("(%p %p)\n", this, rhs);
4414 IOS_BASE_iosarray *arr_cur;
4415 IOS_BASE_fnarray *event_cur;
4417 ios_base_Tidy(this);
4419 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4420 if(arr_cur->long_val)
4421 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4422 if(arr_cur->ptr_val)
4423 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4425 this->stdstr = rhs->stdstr;
4426 this->fmtfl = rhs->fmtfl;
4427 this->prec = rhs->prec;
4428 this->wide = rhs->wide;
4429 locale_operator_assign(this->loc, rhs->loc);
4431 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4432 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4434 ios_base_Callfns(this, EVENT_copyfmt_event);
4435 ios_base_exceptions_set(this, rhs->except);
4441 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4442 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4443 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4444 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4446 TRACE("(%p %p)\n", this, right);
4449 this->state = right->state;
4450 ios_base_copyfmt(this, right);
4456 /* ?fail@ios_base@std@@QBE_NXZ */
4457 /* ?fail@ios_base@std@@QEBA_NXZ */
4458 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4459 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4461 TRACE("(%p)\n", this);
4462 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4465 /* ??7ios_base@std@@QBE_NXZ */
4466 /* ??7ios_base@std@@QEBA_NXZ */
4467 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4468 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4470 TRACE("(%p)\n", this);
4471 return ios_base_fail(this);
4474 /* ??Bios_base@std@@QBEPAXXZ */
4475 /* ??Bios_base@std@@QEBAPEAXXZ */
4476 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4477 void* __thiscall ios_base_op_fail(const ios_base *this)
4479 TRACE("(%p)\n", this);
4480 return ios_base_fail(this) ? NULL : (void*)this;
4483 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4484 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4485 static void ios_base_Addstd(ios_base *add)
4487 FIXME("(%p) stub\n", add);
4490 /* ?_Init@ios_base@std@@IAEXXZ */
4491 /* ?_Init@ios_base@std@@IEAAXXZ */
4492 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4493 void __thiscall ios_base__Init(ios_base *this)
4495 TRACE("(%p)\n", this);
4498 this->state = this->except = IOSTATE_goodbit;
4499 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4504 this->loc = MSVCRT_operator_new(sizeof(locale));
4505 locale_ctor(this->loc);
4508 /* ?bad@ios_base@std@@QBE_NXZ */
4509 /* ?bad@ios_base@std@@QEBA_NXZ */
4510 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4511 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4513 TRACE("(%p)\n", this);
4514 return (this->state & IOSTATE_badbit) != 0;
4517 /* ?eof@ios_base@std@@QBE_NXZ */
4518 /* ?eof@ios_base@std@@QEBA_NXZ */
4519 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4520 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4522 TRACE("(%p)\n", this);
4523 return (this->state & IOSTATE_eofbit) != 0;
4526 /* ?flags@ios_base@std@@QAEHH@Z */
4527 /* ?flags@ios_base@std@@QEAAHH@Z */
4528 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4529 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4531 IOSB_fmtflags ret = this->fmtfl;
4533 TRACE("(%p %x)\n", this, flags);
4535 this->fmtfl = flags & FMTFLAG_mask;
4539 /* ?flags@ios_base@std@@QBEHXZ */
4540 /* ?flags@ios_base@std@@QEBAHXZ */
4541 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4542 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4544 TRACE("(%p)\n", this);
4548 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4549 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4550 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4551 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4553 TRACE("(%p)\n", this);
4554 return locale_copy_ctor(ret, this->loc);
4557 /* ?good@ios_base@std@@QBE_NXZ */
4558 /* ?good@ios_base@std@@QEBA_NXZ */
4559 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4560 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4562 TRACE("(%p)\n", this);
4563 return this->state == IOSTATE_goodbit;
4566 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4567 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4568 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4569 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4571 TRACE("(%p %p)\n", this, loc);
4573 locale_copy_ctor(this->loc, loc);
4577 /* ?precision@ios_base@std@@QAEHH@Z */
4578 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4579 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4580 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4582 streamsize ret = this->prec;
4584 TRACE("(%p %ld)\n", this, precision);
4586 this->prec = precision;
4590 /* ?precision@ios_base@std@@QBEHXZ */
4591 /* ?precision@ios_base@std@@QEBA_JXZ */
4592 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4593 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4595 TRACE("(%p)\n", this);
4599 /* ?rdstate@ios_base@std@@QBEHXZ */
4600 /* ?rdstate@ios_base@std@@QEBAHXZ */
4601 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4602 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4604 TRACE("(%p)\n", this);
4608 /* ?setf@ios_base@std@@QAEHHH@Z */
4609 /* ?setf@ios_base@std@@QEAAHHH@Z */
4610 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4611 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4613 IOSB_fmtflags ret = this->fmtfl;
4615 TRACE("(%p %x %x)\n", this, flags, mask);
4617 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4621 /* ?setf@ios_base@std@@QAEHH@Z */
4622 /* ?setf@ios_base@std@@QEAAHH@Z */
4623 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4624 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4626 return ios_base_setf_mask(this, flags, ~0);
4629 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4630 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4631 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4632 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4634 TRACE("(%p %x %x)\n", this, state, reraise);
4636 if(state != IOSTATE_goodbit)
4637 ios_base_clear_reraise(this, this->state | state, reraise);
4640 /* ?setstate@ios_base@std@@QAEXH@Z */
4641 /* ?setstate@ios_base@std@@QEAAXH@Z */
4642 static void ios_base_setstate(ios_base *this, IOSB_iostate state)
4644 ios_base_setstate_reraise(this, state, FALSE);
4647 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4648 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4653 TRACE("(%x)\n", sync);
4655 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4656 ret = ios_base_Sync;
4657 ios_base_Sync = sync;
4658 _Lockit_dtor(&lock);
4662 /* ?unsetf@ios_base@std@@QAEXH@Z */
4663 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4664 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4665 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4667 TRACE("(%p %x)\n", this, flags);
4668 this->fmtfl &= ~flags;
4671 /* ?width@ios_base@std@@QAEHH@Z */
4672 /* ?width@ios_base@std@@QEAA_J_J@Z */
4673 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4674 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4676 streamsize ret = this->wide;
4678 TRACE("(%p %ld)\n", this, width);
4684 /* ?width@ios_base@std@@QBEHXZ */
4685 /* ?width@ios_base@std@@QEBA_JXZ */
4686 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4687 streamsize __thiscall ios_base_width_get(ios_base *this)
4689 TRACE("(%p)\n", this);
4693 /* ?xalloc@ios_base@std@@SAHXZ */
4694 int CDECL ios_base_xalloc(void)
4701 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4702 ret = ios_base_Index++;
4703 _Lockit_dtor(&lock);
4707 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4708 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4709 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4710 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4712 TRACE("(%p)\n", this);
4714 ios_base_ctor(&this->base);
4715 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4719 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4720 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4721 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4722 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4724 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4725 ios_base__Init(&this->base);
4726 this->strbuf = streambuf;
4727 this->stream = NULL;
4731 ios_base_setstate(&this->base, IOSTATE_badbit);
4734 FIXME("standard streams not handled yet\n");
4737 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4738 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4739 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4740 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4742 TRACE("(%p %p)\n", this, strbuf);
4744 basic_ios_char_ctor(this);
4745 basic_ios_char_init(this, strbuf, FALSE);
4749 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4750 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4751 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4752 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4754 TRACE("(%p)\n", this);
4755 ios_base_dtor(&this->base);
4758 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4759 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4761 TRACE("(%p %x)\n", this, flags);
4763 /* we have an array, with the number of elements stored before the first object */
4764 INT_PTR i, *ptr = (INT_PTR *)this-1;
4766 for(i=*ptr-1; i>=0; i--)
4767 basic_ios_char_dtor(this+i);
4768 MSVCRT_operator_delete(ptr);
4770 basic_ios_char_dtor(this);
4772 MSVCRT_operator_delete(this);
4778 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4779 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4780 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4781 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4783 TRACE("(%p %x %x)\n", this, state, reraise);
4784 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4787 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4788 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4789 static void basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4791 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4794 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4795 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4796 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4797 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4799 TRACE("(%p %p)\n", this, copy);
4803 this->stream = copy->stream;
4804 this->fillch = copy->fillch;
4805 ios_base_copyfmt(&this->base, ©->base);
4809 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4810 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4811 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4812 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4814 char ret = this->fillch;
4816 TRACE("(%p %c)\n", this, fill);
4818 this->fillch = fill;
4822 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4823 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4824 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4825 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4827 TRACE("(%p)\n", this);
4828 return this->fillch;
4831 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4832 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4833 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4834 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4836 TRACE("(%p %p %p)\n", this, ret, loc);
4839 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
4843 return ios_base_imbue(&this->base, ret, loc);
4846 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4847 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4848 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
4849 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
4851 TRACE("(%p %c %c)\n", this, ch, def);
4852 return ctype_char_narrow_ch(ctype_char_use_facet(&this->strbuf->loc), ch, def);
4855 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4856 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4857 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
4858 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
4860 basic_streambuf_char *ret = this->strbuf;
4862 TRACE("(%p %p)\n", this, streambuf);
4864 this->strbuf = streambuf;
4865 basic_ios_char_clear(this, IOSTATE_goodbit);
4869 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4870 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4871 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
4872 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
4874 TRACE("(%p)\n", this);
4875 return this->strbuf;
4878 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4879 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4880 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
4881 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4883 TRACE("(%p %x %x)\n", this, state, reraise);
4885 if(state != IOSTATE_goodbit)
4886 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
4889 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4890 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4891 static void basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
4893 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4896 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4897 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4898 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
4899 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
4901 basic_ostream_char *ret = this->stream;
4903 TRACE("(%p %p)\n", this, ostream);
4905 this->stream = ostream;
4909 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4910 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4911 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
4912 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
4914 TRACE("(%p)\n", this);
4915 return this->stream;
4918 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4919 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4920 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
4921 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
4923 TRACE("(%p %c)\n", this, ch);
4924 return ctype_char_widen_ch(ctype_char_use_facet(&this->strbuf->loc), ch);
4928 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4929 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4930 static basic_ios_wchar* basic_ios_wchar_ctor(basic_ios_wchar *this)
4932 TRACE("(%p)\n", this);
4934 ios_base_ctor(&this->base);
4935 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
4939 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4940 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4941 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
4942 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
4944 basic_ios_wchar_ctor(this);
4945 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4949 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4950 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4951 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4952 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4953 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
4954 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
4956 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4957 ios_base__Init(&this->base);
4958 this->strbuf = streambuf;
4959 this->stream = NULL;
4963 ios_base_setstate(&this->base, IOSTATE_badbit);
4966 FIXME("standard streams not handled yet\n");
4969 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4970 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4971 static basic_ios_wchar* basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4973 TRACE("(%p %p)\n", this, strbuf);
4975 basic_ios_wchar_ctor(this);
4976 basic_ios_wchar_init(this, strbuf, FALSE);
4980 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4981 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4982 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
4983 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4985 basic_ios_wchar_ctor_streambuf(this, strbuf);
4986 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4990 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4991 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4992 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4993 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4994 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
4995 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
4997 TRACE("(%p)\n", this);
4998 ios_base_dtor(&this->base);
5001 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
5002 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
5004 TRACE("(%p %x)\n", this, flags);
5006 /* we have an array, with the number of elements stored before the first object */
5007 INT_PTR i, *ptr = (INT_PTR *)this-1;
5009 for(i=*ptr-1; i>=0; i--)
5010 basic_ios_wchar_dtor(this+i);
5011 MSVCRT_operator_delete(ptr);
5013 basic_ios_wchar_dtor(this);
5015 MSVCRT_operator_delete(this);
5021 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5022 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5023 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5024 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5025 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
5026 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5028 TRACE("(%p %x %x)\n", this, state, reraise);
5029 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
5032 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5033 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5034 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5035 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5036 static void basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
5038 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
5041 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
5042 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5043 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
5044 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5045 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
5046 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
5048 TRACE("(%p %p)\n", this, copy);
5052 this->stream = copy->stream;
5053 this->fillch = copy->fillch;
5054 ios_base_copyfmt(&this->base, ©->base);
5058 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
5059 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
5060 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
5061 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
5062 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
5063 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
5065 wchar_t ret = this->fillch;
5067 TRACE("(%p %c)\n", this, fill);
5069 this->fillch = fill;
5073 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
5074 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
5075 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
5076 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
5077 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
5078 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
5080 TRACE("(%p)\n", this);
5081 return this->fillch;
5084 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5085 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5086 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5087 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5088 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
5089 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
5091 TRACE("(%p %p %p)\n", this, ret, loc);
5094 basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
5098 return ios_base_imbue(&this->base, ret, loc);
5101 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
5102 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
5103 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
5104 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
5105 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
5106 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
5108 TRACE("(%p %c %c)\n", this, ch, def);
5109 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch, def);
5112 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5113 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5114 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
5115 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5116 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
5117 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
5119 basic_streambuf_wchar *ret = this->strbuf;
5121 TRACE("(%p %p)\n", this, streambuf);
5123 this->strbuf = streambuf;
5124 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5128 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5129 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5130 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5131 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5132 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5133 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5135 TRACE("(%p)\n", this);
5136 return this->strbuf;
5139 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5140 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5141 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5142 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5143 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5144 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5146 TRACE("(%p %x %x)\n", this, state, reraise);
5148 if(state != IOSTATE_goodbit)
5149 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5152 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5153 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5154 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5155 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5156 static void basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5158 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5161 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5162 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5163 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5164 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5165 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5166 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5168 basic_ostream_wchar *ret = this->stream;
5170 TRACE("(%p %p)\n", this, ostream);
5172 this->stream = ostream;
5176 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5177 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5178 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5179 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5180 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5181 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5183 TRACE("(%p)\n", this);
5184 return this->stream;
5187 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5188 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5189 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5190 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5191 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5192 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5194 TRACE("(%p %c)\n", this, ch);
5195 return ctype_wchar_widen_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch);
5198 /* Caution: basic_ostream uses virtual inheritance.
5199 * All constructors have additional parameter that says if base class should be initialized.
5200 * Base class needs to be accessed using vbtable.
5202 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5204 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5207 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5209 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5212 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5214 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5217 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5218 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5219 static basic_ostream_char* basic_ostream_char_ctor(basic_ostream_char *this,
5220 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5222 basic_ios_char *base;
5224 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5227 this->vbtable = basic_ostream_char_vbtable;
5228 base = basic_ostream_char_get_basic_ios(this);
5229 basic_ios_char_ctor(base);
5231 base = basic_ostream_char_get_basic_ios(this);
5234 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5235 basic_ios_char_init(base, strbuf, isstd);
5239 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5240 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5241 static basic_ostream_char* basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5242 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5244 basic_ios_char *base;
5246 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5249 this->vbtable = basic_ostream_char_vbtable;
5250 base = basic_ostream_char_get_basic_ios(this);
5251 basic_ios_char_ctor(base);
5253 base = basic_ostream_char_get_basic_ios(this);
5256 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5258 ios_base_Addstd(&base->base);
5262 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5263 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5264 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5265 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5267 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5269 /* don't destroy virtual base here */
5270 TRACE("(%p)\n", this);
5273 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5274 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5275 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5276 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5278 TRACE("(%p)\n", this);
5279 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5280 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5283 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5284 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5286 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5288 TRACE("(%p %x)\n", this, flags);
5291 /* we have an array, with the number of elements stored before the first object */
5292 INT_PTR i, *ptr = (INT_PTR *)this-1;
5294 for(i=*ptr-1; i>=0; i--)
5295 basic_ostream_char_vbase_dtor(this+i);
5296 MSVCRT_operator_delete(ptr);
5298 basic_ostream_char_vbase_dtor(this);
5300 MSVCRT_operator_delete(this);
5306 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5307 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5308 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5309 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5311 /* this function is not matching C++ specification */
5312 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5314 TRACE("(%p)\n", this);
5316 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5317 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5318 basic_ios_char_setstate(base, IOSTATE_badbit);
5322 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5323 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5324 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5326 return basic_ostream_char_flush(ostream);
5329 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5330 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5331 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5333 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5335 TRACE("(%p)\n", this);
5337 if(base->base.fmtfl & FMTFLAG_unitbuf)
5338 basic_ostream_char_flush(this);
5341 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5342 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5343 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5344 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5346 TRACE("(%p)\n", this);
5347 basic_ostream_char__Osfx(this);
5350 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5352 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5354 if(basic_ios_char_rdbuf_get(base))
5355 basic_streambuf_char__Lock(base->strbuf);
5357 if(ios_base_good(&base->base) && base->stream)
5358 basic_ostream_char_flush(base->stream);
5360 return ios_base_good(&base->base);
5363 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5365 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5367 if(ios_base_good(&base->base) && !__uncaught_exception())
5368 basic_ostream_char_osfx(ostr);
5370 if(basic_ios_char_rdbuf_get(base))
5371 basic_streambuf_char__Unlock(base->strbuf);
5374 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5375 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5376 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5377 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5379 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5381 TRACE("(%p)\n", this);
5383 if(ios_base_good(&base->base) && base->stream)
5384 basic_ostream_char_flush(base->stream);
5385 return ios_base_good(&base->base);
5388 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5389 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5390 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5391 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5393 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5395 TRACE("(%p %c)\n", this, ch);
5397 if(!basic_ostream_char_sentry_create(this)
5398 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5399 basic_ostream_char_sentry_destroy(this);
5400 basic_ios_char_setstate(base, IOSTATE_badbit);
5404 basic_ostream_char_sentry_destroy(this);
5408 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5409 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5410 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5411 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5413 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5415 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5417 if(!ios_base_fail(&base->base)) {
5420 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5421 &seek, pos, OPENMODE_out);
5422 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5423 basic_ios_char_setstate(base, IOSTATE_failbit);
5428 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5429 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5430 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5431 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5433 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5435 TRACE("(%p)\n", this);
5437 if(!ios_base_fail(&base->base)) {
5438 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5439 ret, 0, SEEKDIR_cur, OPENMODE_out);
5448 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5449 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5450 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5451 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5453 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5455 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5457 if(!basic_ostream_char_sentry_create(this)
5458 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5459 basic_ostream_char_sentry_destroy(this);
5460 basic_ios_char_setstate(base, IOSTATE_badbit);
5464 basic_ostream_char_sentry_destroy(this);
5468 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5469 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5470 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5471 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5473 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5474 int state = IOSTATE_goodbit;
5476 TRACE("(%p %d)\n", this, val);
5478 if(basic_ostream_char_sentry_create(this)) {
5479 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5480 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5481 ostreambuf_iterator_char dest = {0, strbuf};
5483 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5484 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5485 ? (LONG)((unsigned short)val) : (LONG)val);
5487 basic_ostream_char_sentry_destroy(this);
5489 basic_ios_char_setstate(base, state);
5493 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5494 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5495 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5496 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5498 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5499 int state = IOSTATE_goodbit;
5501 TRACE("(%p %u)\n", this, val);
5503 if(basic_ostream_char_sentry_create(this)) {
5504 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5505 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5506 ostreambuf_iterator_char dest = {0, strbuf};
5508 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5510 basic_ostream_char_sentry_destroy(this);
5512 basic_ios_char_setstate(base, state);
5516 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5517 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5518 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5519 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5520 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5521 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5523 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5524 int state = IOSTATE_goodbit;
5526 TRACE("(%p %d)\n", this, val);
5528 if(basic_ostream_char_sentry_create(this)) {
5529 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5530 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5531 ostreambuf_iterator_char dest = {0, strbuf};
5533 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5535 basic_ostream_char_sentry_destroy(this);
5537 basic_ios_char_setstate(base, state);
5541 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5542 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5543 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5544 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5545 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5546 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5548 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5549 int state = IOSTATE_goodbit;
5551 TRACE("(%p %u)\n", this, val);
5553 if(basic_ostream_char_sentry_create(this)) {
5554 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5555 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5556 ostreambuf_iterator_char dest = {0, strbuf};
5558 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5560 basic_ostream_char_sentry_destroy(this);
5562 basic_ios_char_setstate(base, state);
5566 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5567 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5568 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5569 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5571 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5572 int state = IOSTATE_goodbit;
5574 TRACE("(%p %f)\n", this, val);
5576 if(basic_ostream_char_sentry_create(this)) {
5577 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5578 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5579 ostreambuf_iterator_char dest = {0, strbuf};
5581 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5583 basic_ostream_char_sentry_destroy(this);
5585 basic_ios_char_setstate(base, state);
5589 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5590 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5591 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5592 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5594 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5595 int state = IOSTATE_goodbit;
5597 TRACE("(%p %lf)\n", this, val);
5599 if(basic_ostream_char_sentry_create(this)) {
5600 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5601 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5602 ostreambuf_iterator_char dest = {0, strbuf};
5604 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5606 basic_ostream_char_sentry_destroy(this);
5608 basic_ios_char_setstate(base, state);
5612 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5613 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5614 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5615 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5617 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5618 int state = IOSTATE_goodbit;
5620 TRACE("(%p %lf)\n", this, val);
5622 if(basic_ostream_char_sentry_create(this)) {
5623 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5624 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5625 ostreambuf_iterator_char dest = {0, strbuf};
5627 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5629 basic_ostream_char_sentry_destroy(this);
5631 basic_ios_char_setstate(base, state);
5635 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5636 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5637 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5638 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5640 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5641 IOSB_iostate state = IOSTATE_badbit;
5644 TRACE("(%p %p)\n", this, val);
5646 if(basic_ostream_char_sentry_create(this)) {
5647 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5648 c = basic_streambuf_char_snextc(val)) {
5649 state = IOSTATE_goodbit;
5651 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5652 state = IOSTATE_badbit;
5657 state = IOSTATE_badbit;
5659 basic_ostream_char_sentry_destroy(this);
5661 ios_base_width_set(&base->base, 0);
5662 basic_ios_char_setstate(base, state);
5666 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5667 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5668 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5669 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5671 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5672 int state = IOSTATE_goodbit;
5674 TRACE("(%p %p)\n", this, val);
5676 if(basic_ostream_char_sentry_create(this)) {
5677 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5678 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5679 ostreambuf_iterator_char dest = {0, strbuf};
5681 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5683 basic_ostream_char_sentry_destroy(this);
5685 basic_ios_char_setstate(base, state);
5689 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5690 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5691 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5692 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5694 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5695 int state = IOSTATE_goodbit;
5697 TRACE("(%p)\n", this);
5699 if(basic_ostream_char_sentry_create(this)) {
5700 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5701 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5702 ostreambuf_iterator_char dest = {0, strbuf};
5704 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5706 basic_ostream_char_sentry_destroy(this);
5708 basic_ios_char_setstate(base, state);
5712 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5713 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5714 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5715 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5717 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5718 int state = IOSTATE_goodbit;
5720 TRACE("(%p)\n", this);
5722 if(basic_ostream_char_sentry_create(this)) {
5723 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5724 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5725 ostreambuf_iterator_char dest = {0, strbuf};
5727 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5729 basic_ostream_char_sentry_destroy(this);
5731 basic_ios_char_setstate(base, state);
5735 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5736 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5737 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5738 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5740 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5741 int state = IOSTATE_goodbit;
5743 TRACE("(%p %x)\n", this, val);
5745 if(basic_ostream_char_sentry_create(this)) {
5746 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5747 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5748 ostreambuf_iterator_char dest = {0, strbuf};
5750 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5752 basic_ostream_char_sentry_destroy(this);
5754 basic_ios_char_setstate(base, state);
5758 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5759 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5760 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5762 TRACE("(%p)\n", ostr);
5764 basic_ostream_char_put(ostr, '\n');
5765 basic_ostream_char_flush(ostr);
5769 /* $?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 */
5770 /* ??$?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 */
5771 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5773 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5774 IOSB_iostate state = IOSTATE_goodbit;
5776 TRACE("(%p %p)\n", ostr, str);
5778 if(basic_ostream_char_sentry_create(ostr)) {
5779 MSVCP_size_t len = basic_string_char_length(str);
5780 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5782 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5783 for(; pad!=0; pad--) {
5784 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5785 state = IOSTATE_badbit;
5791 if(state == IOSTATE_goodbit) {
5792 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5793 state = IOSTATE_badbit;
5796 if(state == IOSTATE_goodbit) {
5797 for(; pad!=0; pad--) {
5798 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5799 state = IOSTATE_badbit;
5805 base->base.wide = 0;
5807 state = IOSTATE_badbit;
5809 basic_ostream_char_sentry_destroy(ostr);
5811 basic_ios_char_setstate(base, state);
5815 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5816 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5817 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5818 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5819 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5820 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5821 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5823 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5824 IOSB_iostate state = IOSTATE_goodbit;
5826 TRACE("(%p %d)\n", ostr, ch);
5828 if(basic_ostream_char_sentry_create(ostr)) {
5829 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5831 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5832 for(; pad!=0; pad--) {
5833 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5834 state = IOSTATE_badbit;
5840 if(state == IOSTATE_goodbit) {
5841 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5842 state = IOSTATE_badbit;
5845 if(state == IOSTATE_goodbit) {
5846 for(; pad!=0; pad--) {
5847 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5848 state = IOSTATE_badbit;
5854 base->base.wide = 0;
5856 state = IOSTATE_badbit;
5858 basic_ostream_char_sentry_destroy(ostr);
5860 basic_ios_char_setstate(base, state);
5864 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5865 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5866 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5867 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5868 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5869 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5870 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5872 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5873 IOSB_iostate state = IOSTATE_goodbit;
5875 TRACE("(%p %s)\n", ostr, str);
5877 if(basic_ostream_char_sentry_create(ostr)) {
5878 MSVCP_size_t len = strlen(str);
5879 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5881 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5882 for(; pad!=0; pad--) {
5883 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5884 state = IOSTATE_badbit;
5890 if(state == IOSTATE_goodbit) {
5891 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5892 state = IOSTATE_badbit;
5895 if(state == IOSTATE_goodbit) {
5896 for(; pad!=0; pad--) {
5897 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5898 state = IOSTATE_badbit;
5904 base->base.wide = 0;
5906 state = IOSTATE_badbit;
5908 basic_ostream_char_sentry_destroy(ostr);
5910 basic_ios_char_setstate(base, state);
5914 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5915 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5916 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5917 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5918 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5920 TRACE("(%p %p)\n", this, pfunc);
5925 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5926 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5927 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5928 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5929 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5931 TRACE("(%p %p)\n", this, pfunc);
5932 pfunc(basic_ostream_char_get_basic_ios(this));
5936 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5937 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5938 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5939 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5940 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5942 TRACE("(%p %p)\n", this, pfunc);
5943 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5947 /* Caution: basic_ostream uses virtual inheritance. */
5948 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5950 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5953 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5955 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5958 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5960 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5963 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5964 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5965 static basic_ostream_wchar* basic_ostream_wchar_ctor(basic_ostream_wchar *this,
5966 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5968 basic_ios_wchar *base;
5970 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5973 this->vbtable = basic_ostream_wchar_vbtable;
5974 base = basic_ostream_wchar_get_basic_ios(this);
5975 basic_ios_wchar_ctor(base);
5977 base = basic_ostream_wchar_get_basic_ios(this);
5980 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5981 basic_ios_wchar_init(base, strbuf, isstd);
5985 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5986 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5987 static basic_ostream_wchar* basic_ostream_short_ctor(basic_ostream_wchar *this,
5988 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5990 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
5991 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
5995 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5996 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5997 static basic_ostream_wchar* basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
5998 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
6000 basic_ios_wchar *base;
6002 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
6005 this->vbtable = basic_ostream_wchar_vbtable;
6006 base = basic_ostream_wchar_get_basic_ios(this);
6007 basic_ios_wchar_ctor(base);
6009 base = basic_ostream_wchar_get_basic_ios(this);
6012 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6014 ios_base_Addstd(&base->base);
6018 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6019 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6020 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6021 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6022 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
6023 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
6025 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6027 /* don't destroy virtual base here */
6028 TRACE("(%p)\n", this);
6031 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6032 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6033 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6034 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6035 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
6036 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
6038 TRACE("(%p)\n", this);
6039 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
6040 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
6043 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
6044 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
6046 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6048 TRACE("(%p %x)\n", this, flags);
6051 /* we have an array, with the number of elements stored before the first object */
6052 INT_PTR i, *ptr = (INT_PTR *)this-1;
6054 for(i=*ptr-1; i>=0; i--)
6055 basic_ostream_wchar_vbase_dtor(this+i);
6056 MSVCRT_operator_delete(ptr);
6058 basic_ostream_wchar_vbase_dtor(this);
6060 MSVCRT_operator_delete(this);
6066 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
6067 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
6068 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
6069 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
6070 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
6071 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
6073 /* this function is not matching C++ specification */
6074 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6076 TRACE("(%p)\n", this);
6078 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
6079 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
6080 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6084 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6085 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6086 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6087 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6088 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
6090 return basic_ostream_wchar_flush(ostream);
6093 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6094 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6095 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6096 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6097 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
6099 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6101 TRACE("(%p)\n", this);
6103 if(base->base.fmtfl & FMTFLAG_unitbuf)
6104 basic_ostream_wchar_flush(this);
6107 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6108 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6109 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6110 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6111 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
6112 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
6114 TRACE("(%p)\n", this);
6115 basic_ostream_wchar__Osfx(this);
6118 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6120 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6122 if(basic_ios_wchar_rdbuf_get(base))
6123 basic_streambuf_wchar__Lock(base->strbuf);
6125 if(ios_base_good(&base->base) && base->stream)
6126 basic_ostream_wchar_flush(base->stream);
6128 return ios_base_good(&base->base);
6131 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6133 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6135 if(ios_base_good(&base->base) && !__uncaught_exception())
6136 basic_ostream_wchar_osfx(ostr);
6138 if(basic_ios_wchar_rdbuf_get(base))
6139 basic_streambuf_wchar__Unlock(base->strbuf);
6142 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6143 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6144 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6145 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6146 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6147 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6149 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6151 TRACE("(%p)\n", this);
6153 if(ios_base_good(&base->base) && base->stream)
6154 basic_ostream_wchar_flush(base->stream);
6155 return ios_base_good(&base->base);
6158 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6159 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6160 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6161 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6162 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6163 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6165 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6167 TRACE("(%p %c)\n", this, ch);
6169 if(!basic_ostream_wchar_sentry_create(this)
6170 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6171 basic_ostream_wchar_sentry_destroy(this);
6172 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6176 basic_ostream_wchar_sentry_destroy(this);
6180 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6181 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6182 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6183 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6184 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6185 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6187 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6189 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6191 if(!ios_base_fail(&base->base)) {
6194 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6195 &seek, pos, OPENMODE_out);
6196 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6197 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6202 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6203 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6204 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6205 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6206 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6207 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6209 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6211 TRACE("(%p)\n", this);
6213 if(!ios_base_fail(&base->base)) {
6214 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6215 ret, 0, SEEKDIR_cur, OPENMODE_out);
6224 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6225 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6226 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6227 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6228 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6229 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6231 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6233 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6235 if(!basic_ostream_wchar_sentry_create(this)
6236 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6237 basic_ostream_wchar_sentry_destroy(this);
6238 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6242 basic_ostream_wchar_sentry_destroy(this);
6246 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6248 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6249 int state = IOSTATE_goodbit;
6251 TRACE("(%p %d)\n", this, val);
6253 if(basic_ostream_wchar_sentry_create(this)) {
6254 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6255 ostreambuf_iterator_wchar dest = {0, strbuf};
6257 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6258 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6259 ? (LONG)((unsigned short)val) : (LONG)val);
6261 basic_ostream_wchar_sentry_destroy(this);
6263 basic_ios_wchar_setstate(base, state);
6267 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6268 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6269 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6270 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6272 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6273 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6276 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6278 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6279 int state = IOSTATE_goodbit;
6281 TRACE("(%p %d)\n", this, val);
6283 if(basic_ostream_wchar_sentry_create(this)) {
6284 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6285 ostreambuf_iterator_wchar dest = {0, strbuf};
6287 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6289 basic_ostream_wchar_sentry_destroy(this);
6291 basic_ios_wchar_setstate(base, state);
6295 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6296 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6297 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6298 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6299 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6300 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6302 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6303 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6306 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6308 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6309 int state = IOSTATE_goodbit;
6311 TRACE("(%p %u)\n", this, val);
6313 if(basic_ostream_wchar_sentry_create(this)) {
6314 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6315 ostreambuf_iterator_wchar dest = {0, strbuf};
6317 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6319 basic_ostream_wchar_sentry_destroy(this);
6321 basic_ios_wchar_setstate(base, state);
6325 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6326 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6327 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6328 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6329 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6330 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6332 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6333 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6336 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6338 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6339 int state = IOSTATE_goodbit;
6341 TRACE("(%p %f)\n", this, val);
6343 if(basic_ostream_wchar_sentry_create(this)) {
6344 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6345 ostreambuf_iterator_wchar dest = {0, strbuf};
6347 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6349 basic_ostream_wchar_sentry_destroy(this);
6351 basic_ios_wchar_setstate(base, state);
6355 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6356 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6357 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6358 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6360 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6361 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6364 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6366 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6367 int state = IOSTATE_goodbit;
6369 TRACE("(%p %lf)\n", this, val);
6371 if(basic_ostream_wchar_sentry_create(this)) {
6372 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6373 ostreambuf_iterator_wchar dest = {0, strbuf};
6375 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6377 basic_ostream_wchar_sentry_destroy(this);
6379 basic_ios_wchar_setstate(base, state);
6383 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6384 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6385 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6386 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6388 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6389 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6392 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6394 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6395 int state = IOSTATE_goodbit;
6397 TRACE("(%p %lf)\n", this, val);
6399 if(basic_ostream_wchar_sentry_create(this)) {
6400 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6401 ostreambuf_iterator_wchar dest = {0, strbuf};
6403 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6405 basic_ostream_wchar_sentry_destroy(this);
6407 basic_ios_wchar_setstate(base, state);
6411 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6412 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6413 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6414 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6416 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6417 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6420 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6421 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6422 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6423 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6424 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6425 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6427 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6428 IOSB_iostate state = IOSTATE_badbit;
6429 unsigned short c = '\n';
6431 TRACE("(%p %p)\n", this, val);
6433 if(basic_ostream_wchar_sentry_create(this)) {
6434 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6435 c = basic_streambuf_wchar_snextc(val)) {
6436 state = IOSTATE_goodbit;
6438 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6439 state = IOSTATE_badbit;
6444 state = IOSTATE_badbit;
6446 basic_ostream_wchar_sentry_destroy(this);
6448 ios_base_width_set(&base->base, 0);
6449 basic_ios_wchar_setstate(base, state);
6453 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6455 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6456 int state = IOSTATE_goodbit;
6458 TRACE("(%p %p)\n", this, val);
6460 if(basic_ostream_wchar_sentry_create(this)) {
6461 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6462 ostreambuf_iterator_wchar dest = {0, strbuf};
6464 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6466 basic_ostream_wchar_sentry_destroy(this);
6468 basic_ios_wchar_setstate(base, state);
6472 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6473 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6474 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6475 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6477 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6478 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6481 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6483 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6484 int state = IOSTATE_goodbit;
6486 TRACE("(%p)\n", this);
6488 if(basic_ostream_wchar_sentry_create(this)) {
6489 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6490 ostreambuf_iterator_wchar dest = {0, strbuf};
6492 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6494 basic_ostream_wchar_sentry_destroy(this);
6496 basic_ios_wchar_setstate(base, state);
6500 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6501 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6502 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6503 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6505 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6506 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6509 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6511 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6512 int state = IOSTATE_goodbit;
6514 TRACE("(%p)\n", this);
6516 if(basic_ostream_wchar_sentry_create(this)) {
6517 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6518 ostreambuf_iterator_wchar dest = {0, strbuf};
6520 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6522 basic_ostream_wchar_sentry_destroy(this);
6524 basic_ios_wchar_setstate(base, state);
6528 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6529 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6530 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6531 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6533 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6534 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6537 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6539 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6540 int state = IOSTATE_goodbit;
6542 TRACE("(%p %x)\n", this, val);
6544 if(basic_ostream_wchar_sentry_create(this)) {
6545 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6546 ostreambuf_iterator_wchar dest = {0, strbuf};
6548 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6550 basic_ostream_wchar_sentry_destroy(this);
6552 basic_ios_wchar_setstate(base, state);
6556 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6557 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6558 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6559 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6561 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6562 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6565 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6566 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6567 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6568 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6569 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6571 TRACE("(%p)\n", ostr);
6573 basic_ostream_wchar_put(ostr, '\n');
6574 basic_ostream_wchar_flush(ostr);
6578 /* ??$?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 */
6579 /* ??$?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 */
6580 /* ??$?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 */
6581 /* ??$?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 */
6582 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6584 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6585 IOSB_iostate state = IOSTATE_goodbit;
6587 TRACE("(%p %p)\n", ostr, str);
6589 if(basic_ostream_wchar_sentry_create(ostr)) {
6590 MSVCP_size_t len = basic_string_wchar_length(str);
6591 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6593 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6594 for(; pad!=0; pad--) {
6595 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6596 state = IOSTATE_badbit;
6602 if(state == IOSTATE_goodbit) {
6603 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6604 state = IOSTATE_badbit;
6607 if(state == IOSTATE_goodbit) {
6608 for(; pad!=0; pad--) {
6609 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6610 state = IOSTATE_badbit;
6616 base->base.wide = 0;
6618 state = IOSTATE_badbit;
6620 basic_ostream_wchar_sentry_destroy(ostr);
6622 basic_ios_wchar_setstate(base, state);
6626 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6627 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6628 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6629 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6630 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6632 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6633 IOSB_iostate state = IOSTATE_goodbit;
6635 TRACE("(%p %d)\n", ostr, ch);
6637 if(basic_ostream_wchar_sentry_create(ostr)) {
6638 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6640 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6641 for(; pad!=0; pad--) {
6642 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6643 state = IOSTATE_badbit;
6649 if(state == IOSTATE_goodbit) {
6650 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6651 state = IOSTATE_badbit;
6654 if(state == IOSTATE_goodbit) {
6655 for(; pad!=0; pad--) {
6656 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6657 state = IOSTATE_badbit;
6663 base->base.wide = 0;
6665 state = IOSTATE_badbit;
6667 basic_ostream_wchar_sentry_destroy(ostr);
6669 basic_ios_wchar_setstate(base, state);
6673 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6674 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6675 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6676 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6677 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6679 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6680 IOSB_iostate state = IOSTATE_goodbit;
6682 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6684 if(basic_ostream_wchar_sentry_create(ostr)) {
6685 MSVCP_size_t len = wcslen(str);
6686 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6688 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6689 for(; pad!=0; pad--) {
6690 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6691 state = IOSTATE_badbit;
6697 if(state == IOSTATE_goodbit) {
6698 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6699 state = IOSTATE_badbit;
6702 if(state == IOSTATE_goodbit) {
6703 for(; pad!=0; pad--) {
6704 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6705 state = IOSTATE_badbit;
6711 base->base.wide = 0;
6713 state = IOSTATE_badbit;
6715 basic_ostream_wchar_sentry_destroy(ostr);
6717 basic_ios_wchar_setstate(base, state);
6721 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6722 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6723 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6724 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6725 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6726 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6727 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6729 TRACE("(%p %p)\n", this, pfunc);
6734 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6735 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6736 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6737 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6738 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6739 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6740 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6742 TRACE("(%p %p)\n", this, pfunc);
6743 pfunc(basic_ostream_wchar_get_basic_ios(this));
6747 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6748 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6749 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6750 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6751 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6752 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6753 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6755 TRACE("(%p %p)\n", this, pfunc);
6756 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6760 /* Caution: basic_istream uses virtual inheritance. */
6761 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6763 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6766 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6768 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6771 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6773 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6776 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6777 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6778 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)
6780 basic_ios_char *base;
6782 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6785 this->vbtable = basic_istream_char_vbtable;
6786 base = basic_istream_char_get_basic_ios(this);
6787 basic_ios_char_ctor(base);
6789 base = basic_istream_char_get_basic_ios(this);
6792 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6795 basic_ios_char_init(base, strbuf, isstd);
6799 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6800 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6801 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6802 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6804 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6807 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6808 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6809 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6810 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6812 basic_ios_char *base;
6814 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6817 this->vbtable = basic_istream_char_vbtable;
6818 base = basic_istream_char_get_basic_ios(this);
6819 basic_ios_char_ctor(base);
6821 base = basic_istream_char_get_basic_ios(this);
6824 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6825 ios_base_Addstd(&base->base);
6829 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6830 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6831 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6832 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6834 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6836 /* don't destroy virtual base here */
6837 TRACE("(%p)\n", this);
6840 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6841 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6842 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6843 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6845 TRACE("(%p)\n", this);
6846 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6847 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6850 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6851 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6853 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6855 TRACE("(%p %x)\n", this, flags);
6858 /* we have an array, with the number of elements stored before the first object */
6859 INT_PTR i, *ptr = (INT_PTR *)this-1;
6861 for(i=*ptr-1; i>=0; i--)
6862 basic_istream_char_vbase_dtor(this+i);
6863 MSVCRT_operator_delete(ptr);
6865 basic_istream_char_vbase_dtor(this);
6867 MSVCRT_operator_delete(this);
6873 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6874 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6875 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6877 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6879 TRACE("(%p %d)\n", this, noskip);
6881 if(ios_base_good(&base->base)) {
6882 if(basic_ios_char_tie_get(base))
6883 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6885 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6886 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6887 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
6890 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6891 ch = basic_streambuf_char_snextc(strbuf)) {
6893 basic_ios_char_setstate(base, IOSTATE_eofbit);
6897 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6903 if(!ios_base_good(&base->base)) {
6904 basic_ios_char_setstate(base, IOSTATE_failbit);
6911 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6912 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6913 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6914 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6916 return basic_istream_char__Ipfx(this, noskip);
6919 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6920 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6921 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6922 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6924 TRACE("(%p)\n", this);
6927 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6929 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6931 if(basic_ios_char_rdbuf_get(base))
6932 basic_streambuf_char__Lock(base->strbuf);
6934 return basic_istream_char_ipfx(istr, noskip);
6937 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6939 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6941 if(basic_ios_char_rdbuf_get(base))
6942 basic_streambuf_char__Unlock(base->strbuf);
6945 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6946 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6947 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6948 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6950 TRACE("(%p)\n", this);
6954 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6955 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6956 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6957 int __thiscall basic_istream_char_get(basic_istream_char *this)
6959 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6962 TRACE("(%p)\n", this);
6966 if(!basic_istream_char_sentry_create(this, TRUE)) {
6967 basic_istream_char_sentry_destroy(this);
6971 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6972 basic_istream_char_sentry_destroy(this);
6974 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6981 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6982 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6983 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6984 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6988 TRACE("(%p %p)\n", this, ch);
6990 ret = basic_istream_char_get(this);
6996 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6997 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6998 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
6999 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7001 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7004 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7008 if(basic_istream_char_sentry_create(this, TRUE)) {
7009 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7011 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
7012 ch = basic_streambuf_char_snextc(strbuf)) {
7013 if(ch==EOF || ch==delim)
7021 basic_istream_char_sentry_destroy(this);
7023 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7024 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7030 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7031 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7032 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
7033 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
7035 return basic_istream_char_get_str_delim(this, str, count, '\n');
7038 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7039 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7040 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
7041 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
7043 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7046 TRACE("(%p %p %c)\n", this, strbuf, delim);
7050 if(basic_istream_char_sentry_create(this, TRUE)) {
7051 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
7053 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
7054 ch = basic_streambuf_char_snextc(strbuf_read)) {
7055 if(ch==EOF || ch==delim)
7058 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
7063 basic_istream_char_sentry_destroy(this);
7065 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7066 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7070 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7071 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7072 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
7073 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
7075 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
7078 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7079 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7080 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
7081 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7083 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7084 int ch = (unsigned char)delim;
7086 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7090 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7091 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7094 ch = basic_streambuf_char_sbumpc(strbuf);
7096 if(ch==EOF || ch==(unsigned char)delim)
7104 if(ch == (unsigned char)delim)
7106 else if(ch != EOF) {
7107 ch = basic_streambuf_char_sgetc(strbuf);
7109 if(ch == (unsigned char)delim) {
7110 basic_streambuf_char__Gninc(strbuf);
7115 basic_istream_char_sentry_destroy(this);
7117 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7118 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7124 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7125 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7126 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7127 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7129 return basic_istream_char_getline_delim(this, str, count, '\n');
7132 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7133 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7134 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7135 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7137 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7138 int ch = (unsigned char)delim;
7141 TRACE("(%p %ld %d)\n", this, count, delim);
7145 if(basic_istream_char_sentry_create(this, TRUE)) {
7146 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7147 state = IOSTATE_goodbit;
7150 ch = basic_streambuf_char_sbumpc(strbuf);
7153 state = IOSTATE_eofbit;
7157 if(ch==(unsigned char)delim)
7161 if(count != INT_MAX)
7165 state = IOSTATE_failbit;
7166 basic_istream_char_sentry_destroy(this);
7168 basic_ios_char_setstate(base, state);
7172 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7173 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7174 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7176 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7179 TRACE("(%p)\n", istream);
7181 if(basic_istream_char_sentry_create(istream, TRUE)) {
7182 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7183 const ctype_char *ctype = ctype_char_use_facet(&strbuf->loc);
7185 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7186 ch = basic_streambuf_char_snextc(strbuf)) {
7191 basic_istream_char_sentry_destroy(istream);
7194 basic_ios_char_setstate(base, IOSTATE_eofbit);
7198 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7199 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7200 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7201 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7203 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7206 TRACE("(%p)\n", this);
7210 if(basic_istream_char_sentry_create(this, TRUE))
7211 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7212 basic_istream_char_sentry_destroy(this);
7215 basic_ios_char_setstate(base, IOSTATE_eofbit);
7220 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7221 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7222 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7224 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7225 IOSB_iostate state = IOSTATE_goodbit;
7227 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7229 if(basic_istream_char_sentry_create(this, TRUE)) {
7230 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7232 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7233 if(this->count != count)
7234 state |= IOSTATE_failbit | IOSTATE_eofbit;
7238 basic_istream_char_sentry_destroy(this);
7240 basic_ios_char_setstate(base, state);
7244 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7245 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7246 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7247 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7249 return basic_istream_char__Read_s(this, str, count, count);
7252 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7253 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7254 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7256 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7257 IOSB_iostate state = IOSTATE_goodbit;
7259 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7263 if(basic_istream_char_sentry_create(this, TRUE)) {
7264 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7269 state |= IOSTATE_eofbit;
7271 basic_istream_char__Read_s(this, str, size, avail);
7273 state |= IOSTATE_failbit;
7275 basic_istream_char_sentry_destroy(this);
7277 basic_ios_char_setstate(base, state);
7281 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7282 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7283 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7284 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7286 return basic_istream_char__Readsome_s(this, str, count, count);
7289 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7290 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7291 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7292 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7294 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7295 IOSB_iostate state = IOSTATE_goodbit;
7297 TRACE("(%p %c)\n", this, ch);
7301 if(basic_istream_char_sentry_create(this, TRUE)) {
7302 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7304 if(!ios_base_good(&base->base))
7305 state |= IOSTATE_failbit;
7306 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7307 state |= IOSTATE_badbit;
7309 basic_istream_char_sentry_destroy(this);
7311 basic_ios_char_setstate(base, state);
7315 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7316 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7317 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7318 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7320 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7321 IOSB_iostate state = IOSTATE_goodbit;
7323 TRACE("(%p)\n", this);
7327 if(basic_istream_char_sentry_create(this, TRUE)) {
7328 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7330 if(!ios_base_good(&base->base))
7331 state |= IOSTATE_failbit;
7332 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7333 state |= IOSTATE_badbit;
7335 basic_istream_char_sentry_destroy(this);
7337 basic_ios_char_setstate(base, state);
7341 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7342 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7343 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7344 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7346 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7347 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7349 TRACE("(%p)\n", this);
7354 if(basic_istream_char_sentry_create(this, TRUE)) {
7355 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7356 basic_istream_char_sentry_destroy(this);
7360 basic_istream_char_sentry_destroy(this);
7362 basic_ios_char_setstate(base, IOSTATE_badbit);
7366 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7367 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7368 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7369 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7371 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7373 TRACE("(%p %p)\n", this, ret);
7375 if(ios_base_fail(&base->base)) {
7382 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7383 ret, 0, SEEKDIR_cur, OPENMODE_in);
7385 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7386 basic_ios_char_setstate(base, IOSTATE_failbit);
7391 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7392 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7393 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7394 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7396 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7398 TRACE("(%p %ld %d)\n", this, off, dir);
7400 if(!ios_base_fail(&base->base)) {
7401 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7404 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7406 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7407 basic_ios_char_setstate(base, IOSTATE_failbit);
7409 basic_ios_char_clear(base, IOSTATE_goodbit);
7412 basic_ios_char_clear(base, IOSTATE_goodbit);
7417 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7418 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7419 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7420 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7422 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7424 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7426 if(!ios_base_fail(&base->base)) {
7427 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7430 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7432 if(ret.off==-1 && ret.pos==0 && ret.state==0)
7433 basic_ios_char_setstate(base, IOSTATE_failbit);
7435 basic_ios_char_clear(base, IOSTATE_goodbit);
7438 basic_ios_char_clear(base, IOSTATE_goodbit);
7443 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7444 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7445 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7446 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7448 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7449 int state = IOSTATE_goodbit;
7451 TRACE("(%p %p)\n", this, v);
7453 if(basic_istream_char_sentry_create(this, FALSE)) {
7454 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7455 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7456 istreambuf_iterator_char first={0}, last={0};
7459 first.strbuf = strbuf;
7460 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7462 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7465 state |= IOSTATE_failbit;
7467 basic_istream_char_sentry_destroy(this);
7469 basic_ios_char_setstate(base, state);
7473 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7474 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7475 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7476 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7478 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7479 int state = IOSTATE_goodbit;
7481 TRACE("(%p %p)\n", this, v);
7483 if(basic_istream_char_sentry_create(this, FALSE)) {
7484 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7485 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7486 istreambuf_iterator_char first={0}, last={0};
7488 first.strbuf = strbuf;
7489 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7491 basic_istream_char_sentry_destroy(this);
7493 basic_ios_char_setstate(base, state);
7497 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7498 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7499 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7500 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7502 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7503 int state = IOSTATE_goodbit;
7505 TRACE("(%p %p)\n", this, v);
7507 if(basic_istream_char_sentry_create(this, FALSE)) {
7508 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7509 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7510 istreambuf_iterator_char first={0}, last={0};
7512 first.strbuf = strbuf;
7513 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7515 basic_istream_char_sentry_destroy(this);
7517 basic_ios_char_setstate(base, state);
7521 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7522 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7523 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7524 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7526 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7527 int state = IOSTATE_goodbit;
7529 TRACE("(%p %p)\n", this, v);
7531 if(basic_istream_char_sentry_create(this, FALSE)) {
7532 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7533 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7534 istreambuf_iterator_char first={0}, last={0};
7536 first.strbuf = strbuf;
7537 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7539 basic_istream_char_sentry_destroy(this);
7541 basic_ios_char_setstate(base, state);
7545 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7546 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7547 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7548 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7550 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7551 int state = IOSTATE_goodbit;
7553 TRACE("(%p %p)\n", this, v);
7555 if(basic_istream_char_sentry_create(this, FALSE)) {
7556 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7557 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7558 istreambuf_iterator_char first={0}, last={0};
7560 first.strbuf = strbuf;
7561 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7563 basic_istream_char_sentry_destroy(this);
7565 basic_ios_char_setstate(base, state);
7569 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7570 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7571 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7572 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7574 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7575 int state = IOSTATE_goodbit;
7577 TRACE("(%p %p)\n", this, v);
7579 if(basic_istream_char_sentry_create(this, FALSE)) {
7580 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7581 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7582 istreambuf_iterator_char first={0}, last={0};
7584 first.strbuf = strbuf;
7585 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7587 basic_istream_char_sentry_destroy(this);
7589 basic_ios_char_setstate(base, state);
7593 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7594 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7595 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7596 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7598 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7599 int state = IOSTATE_goodbit;
7601 TRACE("(%p %p)\n", this, v);
7603 if(basic_istream_char_sentry_create(this, FALSE)) {
7604 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7605 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7606 istreambuf_iterator_char first={0}, last={0};
7608 first.strbuf = strbuf;
7609 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7611 basic_istream_char_sentry_destroy(this);
7613 basic_ios_char_setstate(base, state);
7617 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7618 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7619 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7620 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7622 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7623 int state = IOSTATE_goodbit;
7625 TRACE("(%p %p)\n", this, v);
7627 if(basic_istream_char_sentry_create(this, FALSE)) {
7628 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7629 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7630 istreambuf_iterator_char first={0}, last={0};
7632 first.strbuf = strbuf;
7633 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7635 basic_istream_char_sentry_destroy(this);
7637 basic_ios_char_setstate(base, state);
7641 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7642 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7643 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7644 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7646 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7647 int state = IOSTATE_goodbit;
7649 TRACE("(%p %p)\n", this, v);
7651 if(basic_istream_char_sentry_create(this, FALSE)) {
7652 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7653 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7654 istreambuf_iterator_char first={0}, last={0};
7656 first.strbuf = strbuf;
7657 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7659 basic_istream_char_sentry_destroy(this);
7661 basic_ios_char_setstate(base, state);
7665 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7666 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7667 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7668 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7670 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7671 int state = IOSTATE_goodbit;
7673 TRACE("(%p %p)\n", this, v);
7675 if(basic_istream_char_sentry_create(this, FALSE)) {
7676 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7677 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7678 istreambuf_iterator_char first={0}, last={0};
7680 first.strbuf = strbuf;
7681 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7683 basic_istream_char_sentry_destroy(this);
7685 basic_ios_char_setstate(base, state);
7689 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7690 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7691 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7692 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7694 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7695 int state = IOSTATE_goodbit;
7697 TRACE("(%p %p)\n", this, v);
7699 if(basic_istream_char_sentry_create(this, FALSE)) {
7700 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7701 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7702 istreambuf_iterator_char first={0}, last={0};
7704 first.strbuf = strbuf;
7705 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7707 basic_istream_char_sentry_destroy(this);
7709 basic_ios_char_setstate(base, state);
7713 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7714 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7715 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7716 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7718 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7719 int state = IOSTATE_goodbit;
7721 TRACE("(%p %p)\n", this, v);
7723 if(basic_istream_char_sentry_create(this, FALSE)) {
7724 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7725 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7726 istreambuf_iterator_char first={0}, last={0};
7728 first.strbuf = strbuf;
7729 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7731 basic_istream_char_sentry_destroy(this);
7733 basic_ios_char_setstate(base, state);
7737 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7738 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7739 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7740 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7742 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7743 int state = IOSTATE_goodbit;
7745 TRACE("(%p %p)\n", this, v);
7747 if(basic_istream_char_sentry_create(this, FALSE)) {
7748 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7749 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7750 istreambuf_iterator_char first={0}, last={0};
7752 first.strbuf = strbuf;
7753 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7755 basic_istream_char_sentry_destroy(this);
7757 basic_ios_char_setstate(base, state);
7761 /* ??$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 */
7762 /* ??$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 */
7763 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7764 basic_istream_char *istream, basic_string_char *str, char delim)
7766 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7767 IOSB_iostate state = IOSTATE_goodbit;
7768 int c = (unsigned char)delim;
7770 TRACE("(%p %p %c)\n", istream, str, delim);
7772 if(basic_istream_char_sentry_create(istream, TRUE)) {
7773 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7774 basic_string_char_clear(str);
7776 c = basic_streambuf_char_sgetc(strbuf);
7777 for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
7778 basic_string_char_append_ch(str, c);
7779 if(c==EOF) state |= IOSTATE_eofbit;
7780 else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf);
7782 if(!basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit;
7784 basic_istream_char_sentry_destroy(istream);
7786 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
7790 /* ??$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 */
7791 /* ??$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 */
7792 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7793 basic_istream_char *istream, basic_string_char *str)
7795 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7798 /* ??$?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 */
7799 /* ??$?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 */
7800 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7801 basic_istream_char *istream, basic_string_char *str)
7803 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7804 IOSB_iostate state = IOSTATE_failbit;
7807 TRACE("(%p %p)\n", istream, str);
7809 if(basic_istream_char_sentry_create(istream, FALSE)) {
7810 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7811 MSVCP_size_t count = ios_base_width_get(&base->base);
7816 basic_string_char_clear(str);
7818 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7819 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7820 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7821 state = IOSTATE_goodbit;
7822 basic_string_char_append_ch(str, c);
7825 basic_istream_char_sentry_destroy(istream);
7827 ios_base_width_set(&base->base, 0);
7828 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7832 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7833 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7834 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7835 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7836 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7837 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7838 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7840 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7841 IOSB_iostate state = IOSTATE_failbit;
7844 TRACE("(%p %p)\n", istream, str);
7846 if(basic_istream_char_sentry_create(istream, FALSE)) {
7847 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7848 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7850 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7851 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7852 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7853 state = IOSTATE_goodbit;
7857 basic_istream_char_sentry_destroy(istream);
7860 ios_base_width_set(&base->base, 0);
7861 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7865 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7866 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7867 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7868 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7869 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7870 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7871 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7873 IOSB_iostate state = IOSTATE_failbit;
7876 TRACE("(%p %p)\n", istream, ch);
7878 if(basic_istream_char_sentry_create(istream, FALSE)) {
7879 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7880 basic_istream_char_get_basic_ios(istream)));
7882 state = IOSTATE_goodbit;
7886 basic_istream_char_sentry_destroy(istream);
7888 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7889 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7893 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7894 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7895 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7896 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7897 basic_istream_char *this, basic_streambuf_char *streambuf)
7899 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7900 IOSB_iostate state = IOSTATE_failbit;
7903 TRACE("(%p %p)\n", this, streambuf);
7905 if(basic_istream_char_sentry_create(this, FALSE)) {
7906 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7907 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7908 state = IOSTATE_goodbit;
7909 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7913 basic_istream_char_sentry_destroy(this);
7915 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7919 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7920 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7921 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7922 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7923 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7925 TRACE("(%p %p)\n", this, pfunc);
7930 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7931 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7932 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7933 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7934 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7936 TRACE("(%p %p)\n", this, pfunc);
7937 pfunc(basic_istream_char_get_basic_ios(this));
7941 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7942 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7943 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7944 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7945 ios_base* (__cdecl *pfunc)(ios_base*))
7947 TRACE("(%p %p)\n", this, pfunc);
7948 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7952 /* Caution: basic_istream uses virtual inheritance. */
7953 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7955 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7958 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7960 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7963 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7965 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7968 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7969 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7970 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7971 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7973 basic_ios_wchar *base;
7975 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7978 this->vbtable = basic_istream_wchar_vbtable;
7979 base = basic_istream_wchar_get_basic_ios(this);
7980 basic_ios_wchar_ctor(base);
7982 base = basic_istream_wchar_get_basic_ios(this);
7985 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7988 basic_ios_wchar_init(base, strbuf, isstd);
7992 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7993 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7994 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7995 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7997 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
7998 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8002 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8003 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8004 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
8005 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8007 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8010 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8011 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8012 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
8013 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
8014 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8016 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8019 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8020 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8021 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
8022 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8024 basic_ios_wchar *base;
8026 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
8029 this->vbtable = basic_istream_wchar_vbtable;
8030 base = basic_istream_wchar_get_basic_ios(this);
8031 basic_ios_wchar_ctor(base);
8033 base = basic_istream_wchar_get_basic_ios(this);
8036 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8037 ios_base_Addstd(&base->base);
8041 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8042 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8043 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
8044 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
8045 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8047 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
8048 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8052 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8053 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8054 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8055 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8056 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
8057 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
8059 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8061 /* don't destroy virtual base here */
8062 TRACE("(%p)\n", this);
8065 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8066 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8067 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8068 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8069 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
8070 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
8072 TRACE("(%p)\n", this);
8073 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
8074 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
8077 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
8078 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
8080 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8082 TRACE("(%p %x)\n", this, flags);
8085 /* we have an array, with the number of elements stored before the first object */
8086 INT_PTR i, *ptr = (INT_PTR *)this-1;
8088 for(i=*ptr-1; i>=0; i--)
8089 basic_istream_wchar_vbase_dtor(this+i);
8090 MSVCRT_operator_delete(ptr);
8092 basic_istream_wchar_vbase_dtor(this);
8094 MSVCRT_operator_delete(this);
8100 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8101 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8102 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8103 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8104 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8106 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8108 TRACE("(%p %d)\n", this, noskip);
8110 if(ios_base_good(&base->base)) {
8111 if(basic_ios_wchar_tie_get(base))
8112 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8114 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8115 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8116 const ctype_wchar *ctype = ctype_wchar_use_facet(&base->strbuf->loc);
8119 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8120 ch = basic_streambuf_wchar_snextc(strbuf)) {
8122 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8126 if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8132 if(!ios_base_good(&base->base)) {
8133 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8139 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8140 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8141 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8142 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8143 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8144 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8146 return basic_istream_wchar__Ipfx(this, noskip);
8149 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8150 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8151 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8152 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8153 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8154 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8156 TRACE("(%p)\n", this);
8159 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8161 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8163 if(basic_ios_wchar_rdbuf_get(base))
8164 basic_streambuf_wchar__Lock(base->strbuf);
8166 return basic_istream_wchar_ipfx(istr, noskip);
8169 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8171 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8173 if(basic_ios_wchar_rdbuf_get(base))
8174 basic_streambuf_wchar__Unlock(base->strbuf);
8177 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8178 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8179 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8180 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8181 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8182 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8184 TRACE("(%p)\n", this);
8188 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8189 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8190 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8191 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8192 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8193 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8195 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8198 TRACE("(%p)\n", this);
8202 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8203 basic_istream_wchar_sentry_destroy(this);
8207 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8208 basic_istream_wchar_sentry_destroy(this);
8210 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8217 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8218 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8219 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8220 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8221 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8222 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8226 TRACE("(%p %p)\n", this, ch);
8228 ret = basic_istream_wchar_get(this);
8234 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8235 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8236 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8237 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8238 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8239 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8241 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8242 unsigned short ch = delim;
8244 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8248 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8249 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8251 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8252 ch = basic_streambuf_wchar_snextc(strbuf)) {
8253 if(ch==WEOF || ch==delim)
8261 basic_istream_wchar_sentry_destroy(this);
8263 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8264 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8270 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8271 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8272 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8273 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8274 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8275 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8277 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8280 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8281 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8282 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8283 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8284 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8285 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8287 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8288 unsigned short ch = delim;
8290 TRACE("(%p %p %c)\n", this, strbuf, delim);
8294 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8295 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8297 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8298 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8299 if(ch==WEOF || ch==delim)
8302 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8307 basic_istream_wchar_sentry_destroy(this);
8309 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8310 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8314 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8315 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8316 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8317 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8318 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8319 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8321 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8324 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8325 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8326 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8327 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8328 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8329 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8331 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8332 unsigned short ch = delim;
8334 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8338 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8339 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8342 ch = basic_streambuf_wchar_sbumpc(strbuf);
8344 if(ch==WEOF || ch==delim)
8354 else if(ch != WEOF) {
8355 ch = basic_streambuf_wchar_sgetc(strbuf);
8358 basic_streambuf_wchar__Gninc(strbuf);
8363 basic_istream_wchar_sentry_destroy(this);
8365 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8366 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8372 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8373 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8374 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8375 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8376 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8377 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8379 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8382 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8383 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8384 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8385 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8386 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8387 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8389 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8390 unsigned short ch = delim;
8393 TRACE("(%p %ld %d)\n", this, count, delim);
8397 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8398 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8399 state = IOSTATE_goodbit;
8402 ch = basic_streambuf_wchar_sbumpc(strbuf);
8405 state = IOSTATE_eofbit;
8413 if(count != INT_MAX)
8417 state = IOSTATE_failbit;
8418 basic_istream_wchar_sentry_destroy(this);
8420 basic_ios_wchar_setstate(base, state);
8424 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8425 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8426 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8427 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8428 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8430 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8431 unsigned short ch = '\n';
8433 TRACE("(%p)\n", istream);
8435 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8436 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8437 const ctype_wchar *ctype = ctype_wchar_use_facet(&strbuf->loc);
8439 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8440 ch = basic_streambuf_wchar_snextc(strbuf)) {
8445 basic_istream_wchar_sentry_destroy(istream);
8448 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8452 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8453 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8454 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8455 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8456 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8457 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8459 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8460 unsigned short ret = WEOF;
8462 TRACE("(%p)\n", this);
8466 if(basic_istream_wchar_sentry_create(this, TRUE))
8467 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8468 basic_istream_wchar_sentry_destroy(this);
8471 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8476 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8477 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8478 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8479 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8480 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8482 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8483 IOSB_iostate state = IOSTATE_goodbit;
8485 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8487 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8488 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8490 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8491 if(this->count != count)
8492 state |= IOSTATE_failbit | IOSTATE_eofbit;
8496 basic_istream_wchar_sentry_destroy(this);
8498 basic_ios_wchar_setstate(base, state);
8502 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8503 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8504 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8505 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8506 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8507 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8509 return basic_istream_wchar__Read_s(this, str, count, count);
8512 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8513 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8514 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8515 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8516 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8518 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8519 IOSB_iostate state = IOSTATE_goodbit;
8521 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8525 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8526 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8531 state |= IOSTATE_eofbit;
8533 basic_istream_wchar__Read_s(this, str, size, avail);
8535 state |= IOSTATE_failbit;
8537 basic_istream_wchar_sentry_destroy(this);
8539 basic_ios_wchar_setstate(base, state);
8543 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8544 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8545 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8546 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8547 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8548 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8550 return basic_istream_wchar__Readsome_s(this, str, count, count);
8553 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8554 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8555 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8556 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8557 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8558 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8560 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8561 IOSB_iostate state = IOSTATE_goodbit;
8563 TRACE("(%p %c)\n", this, ch);
8567 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8568 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8570 if(!ios_base_good(&base->base))
8571 state |= IOSTATE_failbit;
8572 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8573 state |= IOSTATE_badbit;
8575 basic_istream_wchar_sentry_destroy(this);
8577 basic_ios_wchar_setstate(base, state);
8581 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8582 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8583 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8584 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8585 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8586 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8588 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8589 IOSB_iostate state = IOSTATE_goodbit;
8591 TRACE("(%p)\n", this);
8595 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8596 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8598 if(!ios_base_good(&base->base))
8599 state |= IOSTATE_failbit;
8600 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8601 state |= IOSTATE_badbit;
8603 basic_istream_wchar_sentry_destroy(this);
8605 basic_ios_wchar_setstate(base, state);
8609 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8610 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8611 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8612 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8613 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8614 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8616 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8617 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8619 TRACE("(%p)\n", this);
8624 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8625 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8626 basic_istream_wchar_sentry_destroy(this);
8630 basic_istream_wchar_sentry_destroy(this);
8632 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8636 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8637 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8638 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8639 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8640 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8641 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8643 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8645 TRACE("(%p %p)\n", this, ret);
8647 if(ios_base_fail(&base->base)) {
8654 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8655 ret, 0, SEEKDIR_cur, OPENMODE_in);
8656 if(ret->off==-1 && ret->pos==0 && ret->state==0)
8657 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8662 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8663 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8664 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
8665 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8667 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8669 TRACE("(%p %ld %d)\n", this, off, dir);
8671 if(!ios_base_fail(&base->base)) {
8672 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8675 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8677 if(ret.off==-1 && ret.pos==0 && ret.state==0)
8678 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8680 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8683 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8688 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8689 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8690 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8691 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8692 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8693 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8695 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8697 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8699 if(!ios_base_fail(&base->base)) {
8700 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8703 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8705 if(ret.off==-1 && ret.pos==0 && ret.state==0)
8706 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8708 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8711 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8716 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8718 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8719 int state = IOSTATE_goodbit;
8721 TRACE("(%p %p)\n", this, v);
8723 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8724 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8725 istreambuf_iterator_wchar first={0}, last={0};
8728 first.strbuf = strbuf;
8729 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8731 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8734 state |= IOSTATE_failbit;
8736 basic_istream_wchar_sentry_destroy(this);
8738 basic_ios_wchar_setstate(base, state);
8742 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8743 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8744 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8745 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8747 return basic_istream_read_short(this, v, num_get_short_use_facet(
8748 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8751 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8753 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8754 int state = IOSTATE_goodbit;
8756 TRACE("(%p %p)\n", this, v);
8758 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8759 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8760 istreambuf_iterator_wchar first={0}, last={0};
8762 first.strbuf = strbuf;
8763 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8765 basic_istream_wchar_sentry_destroy(this);
8767 basic_ios_wchar_setstate(base, state);
8771 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8772 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8773 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8774 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8776 return basic_istream_read_int(this, v, num_get_short_use_facet(
8777 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8780 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8782 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8783 int state = IOSTATE_goodbit;
8785 TRACE("(%p %p)\n", this, v);
8787 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8788 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8789 istreambuf_iterator_wchar first={0}, last={0};
8791 first.strbuf = strbuf;
8792 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8794 basic_istream_wchar_sentry_destroy(this);
8796 basic_ios_wchar_setstate(base, state);
8800 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8801 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8802 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8803 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8805 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8806 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8809 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8811 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8812 int state = IOSTATE_goodbit;
8814 TRACE("(%p %p)\n", this, v);
8816 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8817 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8818 istreambuf_iterator_wchar first={0}, last={0};
8820 first.strbuf = strbuf;
8821 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8823 basic_istream_wchar_sentry_destroy(this);
8825 basic_ios_wchar_setstate(base, state);
8829 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8830 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8831 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8832 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8834 return basic_istream_read_long(this, v, num_get_short_use_facet(
8835 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8838 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8840 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8841 int state = IOSTATE_goodbit;
8843 TRACE("(%p %p)\n", this, v);
8845 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8846 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8847 istreambuf_iterator_wchar first={0}, last={0};
8849 first.strbuf = strbuf;
8850 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8852 basic_istream_wchar_sentry_destroy(this);
8854 basic_ios_wchar_setstate(base, state);
8858 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8859 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8860 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8861 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8863 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8864 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8867 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8869 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8870 int state = IOSTATE_goodbit;
8872 TRACE("(%p %p)\n", this, v);
8874 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8875 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8876 istreambuf_iterator_wchar first={0}, last={0};
8878 first.strbuf = strbuf;
8879 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8881 basic_istream_wchar_sentry_destroy(this);
8883 basic_ios_wchar_setstate(base, state);
8887 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8888 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8889 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8890 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8892 return basic_istream_read_float(this, v, num_get_short_use_facet(
8893 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8896 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8898 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8899 int state = IOSTATE_goodbit;
8901 TRACE("(%p %p)\n", this, v);
8903 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8904 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8905 istreambuf_iterator_wchar first={0}, last={0};
8907 first.strbuf = strbuf;
8908 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8910 basic_istream_wchar_sentry_destroy(this);
8912 basic_ios_wchar_setstate(base, state);
8916 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8917 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8918 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8919 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8921 return basic_istream_read_double(this, v, num_get_short_use_facet(
8922 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8925 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8927 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8928 int state = IOSTATE_goodbit;
8930 TRACE("(%p %p)\n", this, v);
8932 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8933 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8934 istreambuf_iterator_wchar first={0}, last={0};
8936 first.strbuf = strbuf;
8937 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8939 basic_istream_wchar_sentry_destroy(this);
8941 basic_ios_wchar_setstate(base, state);
8945 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8946 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8947 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8948 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8950 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8951 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8954 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8956 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8957 int state = IOSTATE_goodbit;
8959 TRACE("(%p %p)\n", this, v);
8961 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8962 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8963 istreambuf_iterator_wchar first={0}, last={0};
8965 first.strbuf = strbuf;
8966 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8968 basic_istream_wchar_sentry_destroy(this);
8970 basic_ios_wchar_setstate(base, state);
8974 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8975 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8976 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8977 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8979 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8980 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8983 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8985 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8986 int state = IOSTATE_goodbit;
8988 TRACE("(%p %p)\n", this, v);
8990 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8991 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8992 istreambuf_iterator_wchar first={0}, last={0};
8994 first.strbuf = strbuf;
8995 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
8997 basic_istream_wchar_sentry_destroy(this);
8999 basic_ios_wchar_setstate(base, state);
9003 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
9004 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
9005 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
9006 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
9008 return basic_istream_read_int64(this, v, num_get_short_use_facet(
9009 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9012 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
9014 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9015 int state = IOSTATE_goodbit;
9017 TRACE("(%p %p)\n", this, v);
9019 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9020 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9021 istreambuf_iterator_wchar first={0}, last={0};
9023 first.strbuf = strbuf;
9024 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
9026 basic_istream_wchar_sentry_destroy(this);
9028 basic_ios_wchar_setstate(base, state);
9032 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
9033 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
9034 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
9035 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9037 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
9038 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9041 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
9043 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9044 int state = IOSTATE_goodbit;
9046 TRACE("(%p %p)\n", this, v);
9048 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9049 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9050 istreambuf_iterator_wchar first={0}, last={0};
9052 first.strbuf = strbuf;
9053 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
9055 basic_istream_wchar_sentry_destroy(this);
9057 basic_ios_wchar_setstate(base, state);
9061 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
9062 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
9063 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
9064 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9066 return basic_istream_read_bool(this, v, num_get_short_use_facet(
9067 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9070 /* ??$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 */
9071 /* ??$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 */
9072 /* ??$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 */
9073 /* ??$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 */
9074 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
9075 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
9077 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9078 IOSB_iostate state = IOSTATE_goodbit;
9081 TRACE("(%p %p %c)\n", istream, str, delim);
9083 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
9084 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9085 basic_string_wchar_clear(str);
9087 c = basic_streambuf_wchar_sgetc(strbuf);
9088 for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
9089 basic_string_wchar_append_ch(str, c);
9090 if(c==delim) basic_streambuf_wchar_sbumpc(strbuf);
9091 else if(c==WEOF) state |= IOSTATE_eofbit;
9093 if(!basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit;
9095 basic_istream_wchar_sentry_destroy(istream);
9097 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state);
9101 /* ??$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 */
9102 /* ??$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 */
9103 /* ??$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 */
9104 /* ??$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 */
9105 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
9106 basic_istream_wchar *istream, basic_string_wchar *str)
9108 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
9111 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
9112 basic_string_wchar *str, const ctype_wchar *ctype)
9114 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9115 IOSB_iostate state = IOSTATE_failbit;
9118 TRACE("(%p %p)\n", istream, str);
9120 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9121 MSVCP_size_t count = ios_base_width_get(&base->base);
9126 basic_string_wchar_clear(str);
9128 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9129 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9130 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9131 state = IOSTATE_goodbit;
9132 basic_string_wchar_append_ch(str, c);
9135 basic_istream_wchar_sentry_destroy(istream);
9137 ios_base_width_set(&base->base, 0);
9138 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9142 /* ??$?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 */
9143 /* ??$?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 */
9144 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9145 basic_istream_wchar *istream, basic_string_wchar *str)
9147 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9148 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9151 /* ??$?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 */
9152 /* ??$?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 */
9153 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9154 basic_istream_wchar *istream, basic_string_wchar *str)
9156 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9157 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9160 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9162 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9163 IOSB_iostate state = IOSTATE_failbit;
9164 unsigned short c = '\n';
9166 TRACE("(%p %p)\n", istream, str);
9168 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9169 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9171 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9172 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9173 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9174 state = IOSTATE_goodbit;
9178 basic_istream_wchar_sentry_destroy(istream);
9181 ios_base_width_set(&base->base, 0);
9182 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9186 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9187 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9188 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9190 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9191 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9194 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9195 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9196 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9197 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9198 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9200 IOSB_iostate state = IOSTATE_failbit;
9201 unsigned short c = 0;
9203 TRACE("(%p %p)\n", istream, ch);
9205 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9206 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9207 basic_istream_wchar_get_basic_ios(istream)));
9209 state = IOSTATE_goodbit;
9213 basic_istream_wchar_sentry_destroy(istream);
9215 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9216 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9220 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9221 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9222 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9223 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9224 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9225 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9226 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9228 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9229 IOSB_iostate state = IOSTATE_failbit;
9230 unsigned short c = '\n';
9232 TRACE("(%p %p)\n", this, streambuf);
9234 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9235 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9236 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9237 state = IOSTATE_goodbit;
9238 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9242 basic_istream_wchar_sentry_destroy(this);
9244 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9248 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9249 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9250 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9251 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9252 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9253 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9254 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9256 TRACE("(%p %p)\n", this, pfunc);
9261 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9262 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9263 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9264 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9265 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9266 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9267 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9269 TRACE("(%p %p)\n", this, pfunc);
9270 pfunc(basic_istream_wchar_get_basic_ios(this));
9274 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9275 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9276 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9277 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9278 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9279 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9280 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9282 TRACE("(%p %p)\n", this, pfunc);
9283 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9287 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9289 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9292 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9294 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9297 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9298 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9299 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9300 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9302 basic_ios_char *basic_ios;
9304 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9307 this->base1.vbtable = basic_iostream_char_vbtable1;
9308 this->base2.vbtable = basic_iostream_char_vbtable2;
9309 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9310 basic_ios_char_ctor(basic_ios);
9312 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9315 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9317 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9318 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9322 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9323 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9324 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9325 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9327 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9329 TRACE("(%p)\n", this);
9330 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9331 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9334 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9335 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9336 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9337 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9339 TRACE("(%p)\n", this);
9340 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9341 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9344 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9345 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9347 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9349 TRACE("(%p %x)\n", this, flags);
9352 /* we have an array, with the number of elements stored before the first object */
9353 INT_PTR i, *ptr = (INT_PTR *)this-1;
9355 for(i=*ptr-1; i>=0; i--)
9356 basic_iostream_char_vbase_dtor(this+i);
9357 MSVCRT_operator_delete(ptr);
9359 basic_iostream_char_vbase_dtor(this);
9361 MSVCRT_operator_delete(this);
9367 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9369 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9372 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9374 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9377 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9378 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9379 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9380 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9382 basic_ios_wchar *basic_ios;
9384 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9387 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9388 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9389 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9390 basic_ios_wchar_ctor(basic_ios);
9392 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9395 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9396 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9398 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9402 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9403 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9404 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9405 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9406 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9408 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9409 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9413 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9414 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9415 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9416 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9417 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9418 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9420 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9422 TRACE("(%p)\n", this);
9423 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9424 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9427 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9428 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9429 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9430 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9431 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9432 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9434 TRACE("(%p)\n", this);
9435 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9436 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9439 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9440 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9442 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9444 TRACE("(%p %x)\n", this, flags);
9447 /* we have an array, with the number of elements stored before the first object */
9448 INT_PTR i, *ptr = (INT_PTR *)this-1;
9450 for(i=*ptr-1; i>=0; i--)
9451 basic_iostream_wchar_vbase_dtor(this+i);
9452 MSVCRT_operator_delete(ptr);
9454 basic_iostream_wchar_vbase_dtor(this);
9456 MSVCRT_operator_delete(this);
9462 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9464 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9467 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9469 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9472 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9473 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9474 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9475 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9477 basic_ios_char *basic_ios;
9479 TRACE("(%p %d)\n", this, virt_init);
9482 this->base.vbtable = basic_ofstream_char_vbtable;
9483 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9484 basic_ios_char_ctor(basic_ios);
9486 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9489 basic_filebuf_char_ctor(&this->filebuf);
9490 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9491 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9495 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9496 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9497 static basic_ofstream_char* basic_ofstream_char_ctor_file(
9498 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9500 basic_ios_char *basic_ios;
9502 TRACE("(%p %p %d)\n", this, file, virt_init);
9505 this->base.vbtable = basic_ofstream_char_vbtable;
9506 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9507 basic_ios_char_ctor(basic_ios);
9509 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9512 basic_filebuf_char_ctor_file(&this->filebuf, file);
9513 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9514 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9518 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9519 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9520 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor, 12)
9521 basic_ofstream_char* __thiscall basic_ofstream_char_copy_ctor(basic_ofstream_char *this,
9522 basic_ofstream_char *copy, MSVCP_bool virt_init)
9524 TRACE("(%p %p %d)\n", this, copy, virt_init);
9525 return basic_ofstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9528 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9529 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9530 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 16)
9531 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9532 const char *name, int mode, MSVCP_bool virt_init)
9534 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9536 basic_ofstream_char_ctor(this, virt_init);
9538 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9539 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9540 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9545 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9546 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9547 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9548 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9550 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9552 TRACE("(%p)\n", this);
9554 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9555 basic_filebuf_char_dtor(&this->filebuf);
9558 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9559 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9560 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9561 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9563 TRACE("(%p)\n", this);
9565 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9566 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9569 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9570 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9572 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9574 TRACE("(%p %x)\n", this, flags);
9577 /* we have an array, with the number of elements stored before the first object */
9578 INT_PTR i, *ptr = (INT_PTR *)this-1;
9580 for(i=*ptr-1; i>=0; i--)
9581 basic_ofstream_char_vbase_dtor(this+i);
9582 MSVCRT_operator_delete(ptr);
9584 basic_ofstream_char_vbase_dtor(this);
9586 MSVCRT_operator_delete(this);
9592 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9593 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9594 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9595 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9597 TRACE("(%p)\n", this);
9599 if(!basic_filebuf_char_close(&this->filebuf)) {
9600 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9601 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9605 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9606 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9607 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9608 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9610 TRACE("(%p)\n", this);
9611 return basic_filebuf_char_is_open(&this->filebuf);
9614 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9615 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9616 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9617 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9618 const char *name, int mode)
9620 TRACE("(%p %s %d)\n", this, name, mode);
9622 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9623 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9624 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9628 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9629 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9630 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9631 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9632 const char *name, short mode)
9634 basic_ofstream_char_open(this, name, mode);
9637 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9638 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9639 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9640 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9642 TRACE("(%p)\n", this);
9643 return (basic_filebuf_char*)&this->filebuf;
9646 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9648 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9651 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9653 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9656 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9657 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9658 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9660 basic_ios_wchar *basic_ios;
9662 TRACE("(%p %d)\n", this, virt_init);
9665 this->base.vbtable = basic_ofstream_wchar_vbtable;
9666 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9667 basic_ios_wchar_ctor(basic_ios);
9669 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9672 basic_filebuf_wchar_ctor(&this->filebuf);
9673 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9674 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9678 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9679 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9680 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9681 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9683 basic_ofstream_wchar_ctor(this, virt_init);
9684 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9688 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9689 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9690 static basic_ofstream_wchar* basic_ofstream_wchar_ctor_file(
9691 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9693 basic_ios_wchar *basic_ios;
9695 TRACE("(%p %p %d)\n", this, file, virt_init);
9698 this->base.vbtable = basic_ofstream_wchar_vbtable;
9699 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9700 basic_ios_wchar_ctor(basic_ios);
9702 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9705 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9706 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9707 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9711 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9712 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9713 static basic_ofstream_wchar* basic_ofstream_short_ctor_file(
9714 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9716 basic_ofstream_wchar_ctor_file(this, file, virt_init);
9717 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9721 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9722 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9723 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor, 12)
9724 basic_ofstream_wchar* __thiscall basic_ofstream_short_copy_ctor(basic_ofstream_wchar *this,
9725 basic_ofstream_wchar *copy, MSVCP_bool virt_init)
9727 TRACE("(%p %p %d)\n", this, copy, virt_init);
9728 return basic_ofstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9731 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9732 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9733 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 16)
9734 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
9735 const char *name, int mode, MSVCP_bool virt_init)
9737 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9739 basic_ofstream_short_ctor(this, virt_init);
9741 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9742 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9743 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9748 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9749 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9750 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9751 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9752 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9753 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9755 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9757 TRACE("(%p)\n", this);
9759 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9760 basic_filebuf_wchar_dtor(&this->filebuf);
9763 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9764 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9765 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9766 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9767 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9768 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9770 TRACE("(%p)\n", this);
9772 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9773 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9776 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9777 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9779 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9781 TRACE("(%p %x)\n", this, flags);
9784 /* we have an array, with the number of elements stored before the first object */
9785 INT_PTR i, *ptr = (INT_PTR *)this-1;
9787 for(i=*ptr-1; i>=0; i--)
9788 basic_ofstream_wchar_vbase_dtor(this+i);
9789 MSVCRT_operator_delete(ptr);
9791 basic_ofstream_wchar_vbase_dtor(this);
9793 MSVCRT_operator_delete(this);
9799 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9800 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9801 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9802 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9803 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9804 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9806 TRACE("(%p)\n", this);
9808 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9809 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9810 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9814 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9815 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9816 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9817 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9818 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9819 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9821 TRACE("(%p)\n", this);
9822 return basic_filebuf_wchar_is_open(&this->filebuf);
9825 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9826 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9827 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9828 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9829 const char *name, int mode)
9831 TRACE("(%p %s %d)\n", this, name, mode);
9833 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9834 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9835 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9839 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9840 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9841 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9842 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9843 const char *name, int mode)
9845 basic_ofstream_wchar_open(this, name, mode);
9848 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9849 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9850 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9851 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9852 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9853 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9855 TRACE("(%p)\n", this);
9856 return (basic_filebuf_wchar*)&this->filebuf;
9859 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9861 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9864 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9866 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9869 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9870 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9871 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9872 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9874 basic_ios_char *basic_ios;
9876 TRACE("(%p %d)\n", this, virt_init);
9879 this->base.vbtable = basic_ifstream_char_vbtable;
9880 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9881 basic_ios_char_ctor(basic_ios);
9883 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9886 basic_filebuf_char_ctor(&this->filebuf);
9887 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9888 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9892 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9893 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9894 static basic_ifstream_char* basic_ifstream_char_ctor_file(
9895 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
9897 basic_ios_char *basic_ios;
9899 TRACE("(%p %p %d)\n", this, file, virt_init);
9902 this->base.vbtable = basic_ifstream_char_vbtable;
9903 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9904 basic_ios_char_ctor(basic_ios);
9906 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9909 basic_filebuf_char_ctor_file(&this->filebuf, file);
9910 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9911 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9915 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9916 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9917 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor, 12)
9918 basic_ifstream_char* __thiscall basic_ifstream_char_copy_ctor(basic_ifstream_char *this,
9919 const basic_ifstream_char *copy, MSVCP_bool virt_init)
9921 TRACE("(%p %p %d)\n", this, copy, virt_init);
9922 return basic_ifstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9925 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9926 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9927 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 16)
9928 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
9929 const char *name, int mode, MSVCP_bool virt_init)
9931 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9933 basic_ifstream_char_ctor(this, virt_init);
9935 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9936 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9937 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9942 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9943 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9944 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9945 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9947 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9949 TRACE("(%p)\n", this);
9951 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9952 basic_filebuf_char_dtor(&this->filebuf);
9955 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9956 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9957 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9958 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9960 TRACE("(%p)\n", this);
9962 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9963 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9966 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9967 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9969 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9971 TRACE("(%p %x)\n", this, flags);
9974 /* we have an array, with the number of elements stored before the first object */
9975 INT_PTR i, *ptr = (INT_PTR *)this-1;
9977 for(i=*ptr-1; i>=0; i--)
9978 basic_ifstream_char_vbase_dtor(this+i);
9979 MSVCRT_operator_delete(ptr);
9981 basic_ifstream_char_vbase_dtor(this);
9983 MSVCRT_operator_delete(this);
9989 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9990 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9991 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9992 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9994 TRACE("(%p)\n", this);
9996 if(!basic_filebuf_char_close(&this->filebuf)) {
9997 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9998 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10002 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10003 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10004 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
10005 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
10007 TRACE("(%p)\n", this);
10008 return basic_filebuf_char_is_open(&this->filebuf);
10011 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10012 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10013 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
10014 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
10015 const char *name, int mode)
10017 TRACE("(%p %s %d)\n", this, name, mode);
10019 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10020 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10021 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10025 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10026 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10027 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
10028 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
10029 const char *name, short mode)
10031 basic_ifstream_char_open(this, name, mode);
10034 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10035 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10036 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
10037 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
10039 TRACE("(%p)\n", this);
10040 return (basic_filebuf_char*)&this->filebuf;
10043 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
10045 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
10048 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10050 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
10053 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10054 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10055 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10057 basic_ios_wchar *basic_ios;
10059 TRACE("(%p %d)\n", this, virt_init);
10062 this->base.vbtable = basic_ifstream_wchar_vbtable;
10063 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10064 basic_ios_wchar_ctor(basic_ios);
10066 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10069 basic_filebuf_wchar_ctor(&this->filebuf);
10070 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10071 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10075 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10076 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10077 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
10078 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10080 basic_ifstream_wchar_ctor(this, virt_init);
10081 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10085 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10086 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10087 static basic_ifstream_wchar* basic_ifstream_wchar_ctor_file(
10088 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10090 basic_ios_wchar *basic_ios;
10092 TRACE("(%p %p %d)\n", this, file, virt_init);
10095 this->base.vbtable = basic_ifstream_wchar_vbtable;
10096 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10097 basic_ios_wchar_ctor(basic_ios);
10099 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10102 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10103 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10104 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10108 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10109 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10110 static basic_ifstream_wchar* basic_ifstream_short_ctor_file(
10111 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10113 basic_ifstream_wchar_ctor_file(this, file, virt_init);
10114 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10118 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10119 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10120 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor, 12)
10121 basic_ifstream_wchar* __thiscall basic_ifstream_short_copy_ctor(basic_ifstream_wchar *this,
10122 basic_ifstream_wchar *copy, MSVCP_bool virt_init)
10124 TRACE("(%p %p %d)\n", this, copy, virt_init);
10125 return basic_ifstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10128 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
10129 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
10130 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 16)
10131 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
10132 const char *name, int mode, MSVCP_bool virt_init)
10134 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10136 basic_ifstream_short_ctor(this, virt_init);
10138 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10139 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10140 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10145 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10146 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10147 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10148 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10149 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
10150 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
10152 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10154 TRACE("(%p)\n", this);
10156 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10157 basic_filebuf_wchar_dtor(&this->filebuf);
10160 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10161 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10162 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10163 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10164 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10165 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10167 TRACE("(%p)\n", this);
10169 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10170 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10173 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10174 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10176 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10178 TRACE("(%p %x)\n", this, flags);
10181 /* we have an array, with the number of elements stored before the first object */
10182 INT_PTR i, *ptr = (INT_PTR *)this-1;
10184 for(i=*ptr-1; i>=0; i--)
10185 basic_ifstream_wchar_vbase_dtor(this+i);
10186 MSVCRT_operator_delete(ptr);
10188 basic_ifstream_wchar_vbase_dtor(this);
10190 MSVCRT_operator_delete(this);
10196 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10197 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10198 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10199 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10200 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10201 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10203 TRACE("(%p)\n", this);
10205 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10206 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10207 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10211 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10212 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10213 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10214 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10215 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10216 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10218 TRACE("(%p)\n", this);
10219 return basic_filebuf_wchar_is_open(&this->filebuf);
10222 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
10223 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
10224 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
10225 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10226 const char *name, int mode)
10228 TRACE("(%p %s %d)\n", this, name, mode);
10230 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10231 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10232 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10236 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
10237 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
10238 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10239 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10240 const char *name, short mode)
10242 basic_ifstream_wchar_open(this, name, mode);
10245 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10246 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10247 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10248 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10249 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10250 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10252 TRACE("(%p)\n", this);
10253 return (basic_filebuf_wchar*)&this->filebuf;
10256 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10258 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10261 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10263 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10266 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10267 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10268 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10269 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10271 basic_ios_char *basic_ios;
10273 TRACE("(%p %d)\n", this, virt_init);
10276 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10277 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10278 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10279 basic_ios_char_ctor(basic_ios);
10281 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10284 basic_filebuf_char_ctor(&this->filebuf);
10285 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10286 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10290 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10291 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10292 static basic_fstream_char* basic_fstream_char_ctor_file(basic_fstream_char *this,
10293 FILE *file, MSVCP_bool virt_init)
10295 basic_ios_char *basic_ios;
10297 TRACE("(%p %p %d)\n", this, file, virt_init);
10300 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10301 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10302 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10303 basic_ios_char_ctor(basic_ios);
10305 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10308 basic_filebuf_char_ctor_file(&this->filebuf, file);
10309 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10310 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10314 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
10315 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
10316 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor, 12)
10317 basic_fstream_char* __thiscall basic_fstream_char_copy_ctor(basic_fstream_char *this,
10318 basic_fstream_char *copy, MSVCP_bool virt_init)
10320 TRACE("(%p %p %d)\n", this, copy, virt_init);
10321 return basic_fstream_char_ctor_file(this, copy->filebuf.file, virt_init);
10324 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
10325 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
10326 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 16)
10327 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10328 const char *name, int mode, MSVCP_bool virt_init)
10330 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10332 basic_fstream_char_ctor(this, virt_init);
10334 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10335 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10336 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10341 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10342 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10343 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10344 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10346 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10348 TRACE("(%p)\n", this);
10350 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10351 basic_filebuf_char_dtor(&this->filebuf);
10354 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10355 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10356 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10357 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10359 TRACE("(%p)\n", this);
10361 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10362 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10365 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10366 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10368 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10370 TRACE("(%p %x)\n", this, flags);
10373 /* we have an array, with the number of elements stored before the first object */
10374 INT_PTR i, *ptr = (INT_PTR *)this-1;
10376 for(i=*ptr-1; i>=0; i--)
10377 basic_fstream_char_vbase_dtor(this+i);
10378 MSVCRT_operator_delete(ptr);
10380 basic_fstream_char_vbase_dtor(this);
10382 MSVCRT_operator_delete(this);
10388 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10389 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10390 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10391 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10393 TRACE("(%p)\n", this);
10395 if(!basic_filebuf_char_close(&this->filebuf)) {
10396 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10397 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10401 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10402 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10403 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10404 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10406 TRACE("(%p)\n", this);
10407 return basic_filebuf_char_is_open(&this->filebuf);
10410 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10411 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10412 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10413 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10414 const char *name, int mode)
10416 TRACE("(%p %s %d)\n", this, name, mode);
10418 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10419 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10420 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10424 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10425 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10426 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10427 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10428 const char *name, int mode)
10430 basic_fstream_char_open(this, name, mode);
10433 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10434 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10435 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10436 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10438 TRACE("(%p)\n", this);
10439 return (basic_filebuf_char*)&this->filebuf;
10442 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10444 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10447 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10449 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10452 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10453 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10454 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10456 basic_ios_wchar *basic_ios;
10458 TRACE("(%p %d)\n", this, virt_init);
10461 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10462 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10463 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10464 basic_ios_wchar_ctor(basic_ios);
10466 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10469 basic_filebuf_wchar_ctor(&this->filebuf);
10470 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10471 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10475 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10476 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10477 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10478 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10480 basic_fstream_wchar_ctor(this, virt_init);
10481 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10485 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10486 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10487 static basic_fstream_wchar* basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
10488 FILE *file, MSVCP_bool virt_init)
10490 basic_ios_wchar *basic_ios;
10492 TRACE("(%p %p %d)\n", this, file, virt_init);
10495 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10496 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10497 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10498 basic_ios_wchar_ctor(basic_ios);
10500 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10503 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10504 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10505 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10509 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10510 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10511 static basic_fstream_wchar* basic_fstream_short_ctor_file(basic_fstream_wchar *this,
10512 FILE *file, MSVCP_bool virt_init)
10514 basic_fstream_wchar_ctor_file(this, file, virt_init);
10515 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10519 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10520 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10521 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor, 12)
10522 basic_fstream_wchar* __thiscall basic_fstream_short_copy_ctor(basic_fstream_wchar *this,
10523 basic_fstream_wchar *copy, MSVCP_bool virt_init)
10525 TRACE("(%p %p %d)\n", this, copy, virt_init);
10526 return basic_fstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10529 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10530 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10531 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 16)
10532 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
10533 const char *name, int mode, MSVCP_bool virt_init)
10535 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10537 basic_fstream_short_ctor(this, virt_init);
10539 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10540 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10541 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10546 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10547 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10548 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10549 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10550 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10551 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10553 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10555 TRACE("(%p)\n", this);
10557 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10558 basic_filebuf_wchar_dtor(&this->filebuf);
10561 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10562 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10563 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10564 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10565 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10566 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10568 TRACE("(%p)\n", this);
10570 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10571 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10574 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10575 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10577 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10579 TRACE("(%p %x)\n", this, flags);
10582 /* we have an array, with the number of elements stored before the first object */
10583 INT_PTR i, *ptr = (INT_PTR *)this-1;
10585 for(i=*ptr-1; i>=0; i--)
10586 basic_fstream_wchar_vbase_dtor(this+i);
10587 MSVCRT_operator_delete(ptr);
10589 basic_fstream_wchar_vbase_dtor(this);
10591 MSVCRT_operator_delete(this);
10597 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10598 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10599 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10600 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10601 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10602 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10604 TRACE("(%p)\n", this);
10606 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10607 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10608 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10612 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10613 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10614 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10615 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10616 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10617 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10619 TRACE("(%p)\n", this);
10620 return basic_filebuf_wchar_is_open(&this->filebuf);
10623 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10624 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10625 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10626 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10627 const char *name, int mode)
10629 TRACE("(%p %s %d)\n", this, name, mode);
10631 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10632 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10633 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10637 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10638 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10639 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10640 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10641 const char *name, int mode)
10643 basic_fstream_wchar_open(this, name, mode);
10646 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10647 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10648 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10649 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10650 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10651 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10653 TRACE("(%p)\n", this);
10654 return (basic_filebuf_wchar*)&this->filebuf;
10657 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10659 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10662 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10664 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10667 /* ??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 */
10668 /* ??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 */
10669 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10670 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10671 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10673 basic_ios_char *basic_ios;
10675 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10678 this->base.vbtable = basic_ostringstream_char_vbtable;
10679 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10680 basic_ios_char_ctor(basic_ios);
10682 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10685 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10686 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10687 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10691 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10692 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10693 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10694 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10695 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10697 basic_ios_char *basic_ios;
10699 TRACE("(%p %d %d)\n", this, mode, virt_init);
10702 this->base.vbtable = basic_ostringstream_char_vbtable;
10703 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10704 basic_ios_char_ctor(basic_ios);
10706 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10709 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10710 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10711 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10715 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10716 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10717 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
10718 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10719 basic_ostringstream_char *this, MSVCP_bool virt_init)
10721 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
10724 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10725 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10726 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10727 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10729 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10731 TRACE("(%p)\n", this);
10733 basic_stringbuf_char_dtor(&this->strbuf);
10734 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10737 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10738 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10739 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10740 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10742 TRACE("(%p)\n", this);
10744 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10745 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10748 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10749 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10751 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10753 TRACE("(%p %x)\n", this, flags);
10756 /* we have an array, with the number of elements stored before the first object */
10757 INT_PTR i, *ptr = (INT_PTR *)this-1;
10759 for(i=*ptr-1; i>=0; i--)
10760 basic_ostringstream_char_vbase_dtor(this+i);
10761 MSVCRT_operator_delete(ptr);
10763 basic_ostringstream_char_vbase_dtor(this);
10765 MSVCRT_operator_delete(this);
10771 /* ?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 */
10772 /* ?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 */
10773 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10774 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10776 TRACE("(%p)\n", this);
10777 return (basic_stringbuf_char*)&this->strbuf;
10780 /* ?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 */
10781 /* ?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 */
10782 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10783 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10785 TRACE("(%p %p)\n", this, str);
10786 basic_stringbuf_char_str_set(&this->strbuf, str);
10789 /* ?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 */
10790 /* ?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 */
10791 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10792 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10794 TRACE("(%p %p)\n", this, ret);
10795 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10798 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10800 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10803 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10805 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10808 /* ??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 */
10809 /* ??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 */
10810 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10811 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10813 basic_ios_wchar *basic_ios;
10815 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10818 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10819 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10820 basic_ios_wchar_ctor(basic_ios);
10822 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10825 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10826 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10827 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10831 /* ??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 */
10832 /* ??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 */
10833 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10834 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10835 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10837 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10838 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10842 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10843 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10844 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10845 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10847 basic_ios_wchar *basic_ios;
10849 TRACE("(%p %d %d)\n", this, mode, virt_init);
10852 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10853 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10854 basic_ios_wchar_ctor(basic_ios);
10856 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10859 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10860 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10861 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10865 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10866 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10867 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10868 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10869 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10871 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10872 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10876 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10877 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10878 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
10879 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10880 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
10882 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
10885 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10886 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10887 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10888 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10889 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10890 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10892 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10894 TRACE("(%p)\n", this);
10896 basic_stringbuf_wchar_dtor(&this->strbuf);
10897 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10900 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10901 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10902 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10903 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10904 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10905 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10907 TRACE("(%p)\n", this);
10909 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10910 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10913 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10914 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10916 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10918 TRACE("(%p %x)\n", this, flags);
10921 /* we have an array, with the number of elements stored before the first object */
10922 INT_PTR i, *ptr = (INT_PTR *)this-1;
10924 for(i=*ptr-1; i>=0; i--)
10925 basic_ostringstream_wchar_vbase_dtor(this+i);
10926 MSVCRT_operator_delete(ptr);
10928 basic_ostringstream_wchar_vbase_dtor(this);
10930 MSVCRT_operator_delete(this);
10936 /* ?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 */
10937 /* ?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 */
10938 /* ?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 */
10939 /* ?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 */
10940 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10941 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10943 TRACE("(%p)\n", this);
10944 return (basic_stringbuf_wchar*)&this->strbuf;
10947 /* ?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 */
10948 /* ?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 */
10949 /* ?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 */
10950 /* ?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 */
10951 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10952 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10954 TRACE("(%p %p)\n", this, str);
10955 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10958 /* ?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 */
10959 /* ?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 */
10960 /* ?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 */
10961 /* ?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 */
10962 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10963 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10965 TRACE("(%p %p)\n", this, ret);
10966 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10969 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10971 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10974 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10976 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10979 /* ??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 */
10980 /* ??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 */
10981 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10982 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10983 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10985 basic_ios_char *basic_ios;
10987 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10990 this->base.vbtable = basic_istringstream_char_vbtable;
10991 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10992 basic_ios_char_ctor(basic_ios);
10994 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10997 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10998 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10999 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11003 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11004 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11005 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
11006 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
11007 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
11009 basic_ios_char *basic_ios;
11011 TRACE("(%p %d %d)\n", this, mode, virt_init);
11014 this->base.vbtable = basic_istringstream_char_vbtable;
11015 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11016 basic_ios_char_ctor(basic_ios);
11018 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11021 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11022 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11023 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11027 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11028 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11029 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
11030 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
11031 basic_istringstream_char *this, MSVCP_bool virt_init)
11033 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
11036 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11037 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11038 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
11039 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
11041 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11043 TRACE("(%p)\n", this);
11045 basic_stringbuf_char_dtor(&this->strbuf);
11046 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11049 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11050 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11051 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
11052 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
11054 TRACE("(%p)\n", this);
11056 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
11057 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
11060 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
11061 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11063 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11065 TRACE("(%p %x)\n", this, flags);
11068 /* we have an array, with the number of elements stored before the first object */
11069 INT_PTR i, *ptr = (INT_PTR *)this-1;
11071 for(i=*ptr-1; i>=0; i--)
11072 basic_istringstream_char_vbase_dtor(this+i);
11073 MSVCRT_operator_delete(ptr);
11075 basic_istringstream_char_vbase_dtor(this);
11077 MSVCRT_operator_delete(this);
11083 /* ?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 */
11084 /* ?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 */
11085 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
11086 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
11088 TRACE("(%p)\n", this);
11089 return (basic_stringbuf_char*)&this->strbuf;
11092 /* ?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 */
11093 /* ?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 */
11094 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
11095 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
11097 TRACE("(%p %p)\n", this, str);
11098 basic_stringbuf_char_str_set(&this->strbuf, str);
11101 /* ?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 */
11102 /* ?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 */
11103 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
11104 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
11106 TRACE("(%p %p)\n", this, ret);
11107 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11110 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
11112 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
11115 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11117 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
11120 /* ??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 */
11121 /* ??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 */
11122 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
11123 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11125 basic_ios_wchar *basic_ios;
11127 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11130 this->base.vbtable = basic_istringstream_wchar_vbtable;
11131 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11132 basic_ios_wchar_ctor(basic_ios);
11134 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11137 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11138 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11139 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11143 /* ??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 */
11144 /* ??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 */
11145 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
11146 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
11147 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11149 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
11150 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11154 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11155 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11156 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
11157 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11159 basic_ios_wchar *basic_ios;
11161 TRACE("(%p %d %d)\n", this, mode, virt_init);
11164 this->base.vbtable = basic_istringstream_wchar_vbtable;
11165 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11166 basic_ios_wchar_ctor(basic_ios);
11168 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11171 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11172 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11173 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11177 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11178 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11179 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11180 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11181 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11183 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11184 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11188 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11189 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11190 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11191 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11192 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11194 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
11197 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11198 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11199 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11200 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11201 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11202 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11204 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11206 TRACE("(%p)\n", this);
11208 basic_stringbuf_wchar_dtor(&this->strbuf);
11209 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11212 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11213 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11214 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11215 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11216 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11217 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11219 TRACE("(%p)\n", this);
11221 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11222 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11225 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11226 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11228 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11230 TRACE("(%p %x)\n", this, flags);
11233 /* we have an array, with the number of elements stored before the first object */
11234 INT_PTR i, *ptr = (INT_PTR *)this-1;
11236 for(i=*ptr-1; i>=0; i--)
11237 basic_istringstream_wchar_vbase_dtor(this+i);
11238 MSVCRT_operator_delete(ptr);
11240 basic_istringstream_wchar_vbase_dtor(this);
11242 MSVCRT_operator_delete(this);
11248 /* ?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 */
11249 /* ?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 */
11250 /* ?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 */
11251 /* ?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 */
11252 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11253 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11255 TRACE("(%p)\n", this);
11256 return (basic_stringbuf_wchar*)&this->strbuf;
11259 /* ?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 */
11260 /* ?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 */
11261 /* ?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 */
11262 /* ?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 */
11263 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11264 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11266 TRACE("(%p %p)\n", this, str);
11267 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11270 /* ?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 */
11271 /* ?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 */
11272 /* ?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 */
11273 /* ?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 */
11274 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11275 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11277 TRACE("(%p %p)\n", this, ret);
11278 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11281 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11283 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11286 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11288 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11291 /* ??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 */
11292 /* ??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 */
11293 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11294 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11295 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11297 basic_ios_char *basic_ios;
11299 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11302 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11303 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11304 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11305 basic_ios_char_ctor(basic_ios);
11307 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11310 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11311 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11312 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11316 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11317 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11318 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11319 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11320 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11322 basic_ios_char *basic_ios;
11324 TRACE("(%p %d %d)\n", this, mode, virt_init);
11327 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11328 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11329 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11330 basic_ios_char_ctor(basic_ios);
11332 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11335 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11336 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11337 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11341 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11342 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11343 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
11344 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11345 basic_stringstream_char *this, MSVCP_bool virt_init)
11347 return basic_stringstream_char_ctor_mode(
11348 this, OPENMODE_out|OPENMODE_in, virt_init);
11351 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11352 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11353 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11354 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11356 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11358 TRACE("(%p)\n", this);
11360 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11361 basic_stringbuf_char_dtor(&this->strbuf);
11364 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11365 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11366 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11367 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11369 TRACE("(%p)\n", this);
11371 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11372 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11375 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11376 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11378 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11380 TRACE("(%p %x)\n", this, flags);
11383 /* we have an array, with the number of elements stored before the first object */
11384 INT_PTR i, *ptr = (INT_PTR *)this-1;
11386 for(i=*ptr-1; i>=0; i--)
11387 basic_stringstream_char_vbase_dtor(this+i);
11388 MSVCRT_operator_delete(ptr);
11390 basic_stringstream_char_vbase_dtor(this);
11392 MSVCRT_operator_delete(this);
11398 /* ?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 */
11399 /* ?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 */
11400 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11401 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11403 TRACE("(%p)\n", this);
11404 return (basic_stringbuf_char*)&this->strbuf;
11407 /* ?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 */
11408 /* ?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 */
11409 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11410 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11412 TRACE("(%p %p)\n", this, str);
11413 basic_stringbuf_char_str_set(&this->strbuf, str);
11416 /* ?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 */
11417 /* ?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 */
11418 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11419 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11421 TRACE("(%p %p)\n", this, ret);
11422 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11425 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11427 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11430 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11432 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11435 /* ??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 */
11436 /* ??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 */
11437 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11438 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11440 basic_ios_wchar *basic_ios;
11442 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11445 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11446 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11447 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11448 basic_ios_wchar_ctor(basic_ios);
11450 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11453 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11454 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11455 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11459 /* ??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 */
11460 /* ??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 */
11461 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11462 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11463 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11465 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11466 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11470 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11471 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11472 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11473 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11475 basic_ios_wchar *basic_ios;
11477 TRACE("(%p %d %d)\n", this, mode, virt_init);
11480 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11481 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11482 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11483 basic_ios_wchar_ctor(basic_ios);
11485 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11488 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11489 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11490 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11494 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11495 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11496 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11497 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11498 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11500 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11501 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11505 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11506 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11507 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
11508 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11509 basic_stringstream_wchar *this, MSVCP_bool virt_init)
11511 return basic_stringstream_short_ctor_mode(
11512 this, OPENMODE_out|OPENMODE_in, virt_init);
11515 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11516 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11517 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11518 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11519 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11520 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11522 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11524 TRACE("(%p)\n", this);
11526 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11527 basic_stringbuf_wchar_dtor(&this->strbuf);
11530 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11531 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11532 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11533 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11534 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11535 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11537 TRACE("(%p)\n", this);
11539 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11540 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11543 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11544 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11546 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11548 TRACE("(%p %x)\n", this, flags);
11551 /* we have an array, with the number of elements stored before the first object */
11552 INT_PTR i, *ptr = (INT_PTR *)this-1;
11554 for(i=*ptr-1; i>=0; i--)
11555 basic_stringstream_wchar_vbase_dtor(this+i);
11556 MSVCRT_operator_delete(ptr);
11558 basic_stringstream_wchar_vbase_dtor(this);
11560 MSVCRT_operator_delete(this);
11566 /* ?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 */
11567 /* ?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 */
11568 /* ?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 */
11569 /* ?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 */
11570 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11571 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11573 TRACE("(%p)\n", this);
11574 return (basic_stringbuf_wchar*)&this->strbuf;
11577 /* ?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 */
11578 /* ?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 */
11579 /* ?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 */
11580 /* ?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 */
11581 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11582 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11584 TRACE("(%p %p)\n", this, str);
11585 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11588 /* ?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 */
11589 /* ?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 */
11590 /* ?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 */
11591 /* ?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 */
11592 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11593 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11595 TRACE("(%p %p)\n", this, ret);
11596 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11599 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11600 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11601 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11602 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11604 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11606 this->minsize = 32;
11607 this->endsave = NULL;
11608 this->strmode = mode;
11609 this->palloc = NULL;
11610 this->pfree = NULL;
11613 this->strmode |= STRSTATE_Dynamic;
11614 if(len > this->minsize)
11615 this->minsize = len;
11616 this->seekhigh = NULL;
11625 this->seekhigh = g+len;
11626 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11628 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11631 /* ??0strstreambuf@std@@QAE@PACH0@Z */
11632 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
11633 /* ??0strstreambuf@std@@QAE@PADH0@Z */
11634 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
11635 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
11636 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
11637 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
11639 TRACE("(%p %p %ld %p)\n", this, g, len, p);
11641 basic_streambuf_char_ctor(&this->base);
11642 this->base.vtable = &MSVCP_strstreambuf_vtable;
11644 strstreambuf__Init(this, len, g, p, 0);
11648 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11649 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11650 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11651 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11653 TRACE("(%p)\n", this);
11655 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11657 this->pfree(basic_streambuf_char_eback(&this->base));
11659 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11662 this->endsave = NULL;
11663 this->seekhigh = NULL;
11664 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11665 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11666 basic_streambuf_char_setp(&this->base, NULL, NULL);
11669 /* ??1strstreambuf@std@@UAE@XZ */
11670 /* ??1strstreambuf@std@@UEAA@XZ */
11671 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11672 void __thiscall strstreambuf_dtor(strstreambuf *this)
11674 TRACE("(%p)\n", this);
11676 strstreambuf__Tidy(this);
11677 basic_streambuf_char_dtor(&this->base);
11680 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11681 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11683 TRACE("(%p %x)\n", this, flags);
11685 /* we have an array, with the number of elements stored before the first object */
11686 INT_PTR i, *ptr = (INT_PTR *)this-1;
11688 for(i=*ptr-1; i>=0; i--)
11689 strstreambuf_dtor(this+i);
11690 MSVCRT_operator_delete(ptr);
11692 strstreambuf_dtor(this);
11694 MSVCRT_operator_delete(this);
11700 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11701 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11702 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11703 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11705 TRACE("(%p %d)\n", this, freeze);
11707 if(!freeze == !(this->strmode *STRSTATE_Frozen))
11711 this->strmode |= STRSTATE_Frozen;
11712 this->endsave = basic_streambuf_char_epptr(&this->base);
11713 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11714 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11716 this->strmode &= ~STRSTATE_Frozen;
11717 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11718 basic_streambuf_char_pptr(&this->base), this->endsave);
11722 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11723 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11724 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11725 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11727 MSVCP_size_t old_size, size;
11730 TRACE("(%p %d)\n", this, c);
11735 if(this->strmode & STRSTATE_Frozen)
11738 ptr = basic_streambuf_char_pptr(&this->base);
11739 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11740 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11742 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11745 ptr = basic_streambuf_char_eback(&this->base);
11746 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11748 size = old_size + old_size/2;
11749 if(size < this->minsize)
11750 size = this->minsize;
11753 buf = this->palloc(size);
11755 buf = MSVCRT_operator_new(size);
11759 memcpy(buf, ptr, old_size);
11760 if(this->strmode & STRSTATE_Allocated) {
11764 MSVCRT_operator_delete(ptr);
11767 this->strmode |= STRSTATE_Allocated;
11769 this->seekhigh = buf;
11770 basic_streambuf_char_setp(&this->base, buf, buf+size);
11771 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11773 this->seekhigh = this->seekhigh-ptr+buf;
11774 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11775 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11776 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11777 basic_streambuf_char_pptr(&this->base));
11780 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11783 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11784 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11785 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11786 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11788 char *ptr = basic_streambuf_char_gptr(&this->base);
11790 TRACE("(%p %d)\n", this, c);
11792 if(ptr<=basic_streambuf_char_eback(&this->base)
11793 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11796 basic_streambuf_char_gbump(&this->base, -1);
11799 if(this->strmode & STRSTATE_Constant)
11800 return (unsigned char)c;
11802 return (unsigned char)(ptr[0] = c);
11805 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
11806 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
11807 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11808 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11810 char *eback = basic_streambuf_char_eback(&this->base);
11811 char *pptr = basic_streambuf_char_pptr(&this->base);
11812 char *gptr = basic_streambuf_char_gptr(&this->base);
11814 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11819 if(pptr > this->seekhigh)
11820 this->seekhigh = pptr;
11822 if((mode & OPENMODE_in) && gptr) {
11823 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11825 else if(way == SEEKDIR_end)
11826 off += this->seekhigh-eback;
11827 else if(way != SEEKDIR_beg)
11830 if(off<0 || off>this->seekhigh-eback) {
11833 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11834 if((mode & OPENMODE_out) && pptr) {
11835 basic_streambuf_char_setp_next(&this->base, eback,
11836 gptr, basic_streambuf_char_epptr(&this->base));
11839 }else if((mode & OPENMODE_out) && pptr) {
11840 if(way == SEEKDIR_cur)
11842 else if(way == SEEKDIR_end)
11843 off += this->seekhigh-eback;
11844 else if(way != SEEKDIR_beg)
11847 if(off<0 || off>this->seekhigh-eback)
11850 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11859 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11860 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11861 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11862 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11864 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11866 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
11871 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11874 /* ?underflow@strstreambuf@std@@MAEHXZ */
11875 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11876 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11877 int __thiscall strstreambuf_underflow(strstreambuf *this)
11879 char *gptr = basic_streambuf_char_gptr(&this->base);
11882 TRACE("(%p)\n", this);
11887 if(gptr < basic_streambuf_char_egptr(&this->base))
11888 return (unsigned char)(*gptr);
11890 pptr = basic_streambuf_char_gptr(&this->base);
11891 if(pptr > this->seekhigh)
11892 this->seekhigh = pptr;
11894 if(this->seekhigh <= gptr)
11897 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11898 gptr, this->seekhigh);
11899 return (unsigned char)(*gptr);
11902 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
11904 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
11907 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
11909 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
11912 /* ??0ostrstream@std@@QAE@PADHH@Z */
11913 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
11914 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11916 basic_ios_char *basic_ios;
11918 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11921 this->base.vbtable = ostrstream_vbtable;
11922 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11923 basic_ios_char_ctor(basic_ios);
11925 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11928 strstreambuf_ctor_get_put(&this->buf, buf, size,
11929 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11930 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, FALSE);
11931 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
11935 /* ??1ostrstream@std@@UAE@XZ */
11936 /* ??1ostrstream@std@@UEAA@XZ */
11937 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
11938 void __thiscall ostrstream_dtor(basic_ios_char *base)
11940 ostrstream *this = ostrstream_from_basic_ios(base);
11942 TRACE("(%p)\n", this);
11944 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11945 strstreambuf_dtor(&this->buf);
11948 static void ostrstream_vbase_dtor(ostrstream *this)
11950 TRACE("(%p)\n", this);
11952 ostrstream_dtor(ostrstream_to_basic_ios(this));
11953 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11956 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
11957 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11959 ostrstream *this = ostrstream_from_basic_ios(base);
11961 TRACE("(%p %x)\n", this, flags);
11964 /* we have an array, with the number of elements stored before the first object */
11965 INT_PTR i, *ptr = (INT_PTR *)this-1;
11967 for(i=*ptr-1; i>=0; i--)
11968 ostrstream_vbase_dtor(this+i);
11969 MSVCRT_operator_delete(ptr);
11971 ostrstream_vbase_dtor(this);
11973 MSVCRT_operator_delete(this);
11979 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
11981 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
11984 /* ??1istrstream@std@@UAE@XZ */
11985 /* ??1istrstream@std@@UEAA@XZ */
11986 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
11987 void __thiscall istrstream_dtor(basic_ios_char *base)
11989 istrstream *this = istrstream_from_basic_ios(base);
11991 TRACE("(%p)\n", this);
11993 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11994 strstreambuf_dtor(&this->buf);
11997 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
11999 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
12002 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
12004 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
12007 /* ??0strstream@std@@QAE@PADHH@Z */
12008 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
12009 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
12010 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
12012 basic_ios_char *basic_ios;
12014 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
12017 this->base.base1.vbtable = strstream_vbtable1;
12018 this->base.base2.vbtable = strstream_vbtable2;
12019 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12020 basic_ios_char_ctor(basic_ios);
12022 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12025 strstreambuf_ctor_get_put(&this->buf, buf, size,
12026 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
12027 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
12028 basic_ios->base.vtable = &MSVCP_strstream_vtable;
12032 /* ??1strstream@std@@UAE@XZ */
12033 /* ??1strstream@std@@UEAA@XZ */
12034 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
12035 void __thiscall strstream_dtor(basic_ios_char *base)
12037 strstream *this = strstream_from_basic_ios(base);
12039 TRACE("(%p)\n", this);
12041 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
12042 strstreambuf_dtor(&this->buf);
12045 static void strstream_vbase_dtor(strstream *this)
12047 TRACE("(%p)\n", this);
12049 strstream_dtor(strstream_to_basic_ios(this));
12050 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
12053 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
12054 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
12056 strstream *this = strstream_from_basic_ios(base);
12058 TRACE("(%p %x)\n", this, flags);
12061 /* we have an array, with the number of elements stored before the first object */
12062 INT_PTR i, *ptr = (INT_PTR *)this-1;
12064 for(i=*ptr-1; i>=0; i--)
12065 strstream_vbase_dtor(this+i);
12066 MSVCRT_operator_delete(ptr);
12068 strstream_vbase_dtor(this);
12070 MSVCRT_operator_delete(this);
12076 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
12078 ios_base_precision_set(base, prec);
12081 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
12082 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12083 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
12085 TRACE("(%p %ld)\n", ret, prec);
12087 ret->pfunc = setprecision_func;
12092 static void __cdecl setw_func(ios_base *base, streamsize width)
12094 ios_base_width_set(base, width);
12097 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
12098 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12099 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
12101 TRACE("(%p %ld)\n", ret, width);
12103 ret->pfunc = setw_func;
12108 static void __cdecl resetioflags_func(ios_base *base, int mask)
12110 ios_base_setf_mask(base, 0, mask);
12113 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12114 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
12116 TRACE("(%p %d)\n", ret, mask);
12118 ret->pfunc = resetioflags_func;
12123 static void __cdecl setiosflags_func(ios_base *base, int mask)
12125 ios_base_setf_mask(base, FMTFLAG_mask, mask);
12128 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12129 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
12131 TRACE("(%p %d)\n", ret, mask);
12133 ret->pfunc = setiosflags_func;
12138 static void __cdecl setbase_func(ios_base *base, int set_base)
12141 set_base = FMTFLAG_dec;
12142 else if(set_base == 8)
12143 set_base = FMTFLAG_oct;
12144 else if(set_base == 16)
12145 set_base = FMTFLAG_hex;
12149 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
12152 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
12153 manip_int* __cdecl setbase(manip_int *ret, int base)
12155 TRACE("(%p %d)\n", ret, base);
12157 ret->pfunc = setbase_func;
12162 static basic_filebuf_char filebuf_char_stdin;
12163 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12165 basic_istream_char obj;
12166 basic_ios_char vbase;
12168 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12169 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12170 basic_istream_char *_Ptr_cin = &cin.obj;
12172 static basic_filebuf_wchar filebuf_short_stdin;
12173 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12175 basic_istream_wchar obj;
12176 basic_ios_wchar vbase;
12177 } ucin = { { 0 } };
12178 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12179 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12180 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12182 static basic_filebuf_wchar filebuf_wchar_stdin;
12183 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12185 basic_istream_wchar obj;
12186 basic_ios_wchar vbase;
12187 } wcin = { { 0 } };
12188 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12189 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12190 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12192 static basic_filebuf_char filebuf_char_stdout;
12193 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12195 basic_ostream_char obj;
12196 basic_ios_char vbase;
12197 } cout = { { 0 } };
12198 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12199 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12200 basic_ostream_char *_Ptr_cout = &cout.obj;
12202 static basic_filebuf_wchar filebuf_short_stdout;
12203 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12205 basic_ostream_wchar obj;
12206 basic_ios_wchar vbase;
12207 } ucout = { { 0 } };
12208 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12209 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12210 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12212 static basic_filebuf_wchar filebuf_wchar_stdout;
12213 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12215 basic_ostream_wchar obj;
12216 basic_ios_wchar vbase;
12217 } wcout = { { 0 } };
12218 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12219 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12220 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12222 static basic_filebuf_char filebuf_char_stderr;
12223 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12225 basic_ostream_char obj;
12226 basic_ios_char vbase;
12227 } cerr = { { 0 } };
12228 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12229 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12230 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12232 static basic_filebuf_wchar filebuf_short_stderr;
12233 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12235 basic_ostream_wchar obj;
12236 basic_ios_wchar vbase;
12237 } ucerr = { { 0 } };
12238 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12239 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12240 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12242 static basic_filebuf_wchar filebuf_wchar_stderr;
12243 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12245 basic_ostream_wchar obj;
12246 basic_ios_wchar vbase;
12247 } wcerr = { { 0 } };
12248 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12249 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12250 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12252 static basic_filebuf_char filebuf_char_log;
12253 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12255 basic_ostream_char obj;
12256 basic_ios_char vbase;
12257 } clog = { { 0 } };
12258 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12259 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12260 basic_ostream_char *_Ptr_clog = &clog.obj;
12262 static basic_filebuf_wchar filebuf_short_log;
12263 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12265 basic_ostream_wchar obj;
12266 basic_ios_wchar vbase;
12267 } uclog = { { 0 } };
12268 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12269 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12270 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12272 static basic_filebuf_wchar filebuf_wchar_log;
12273 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12275 basic_ostream_wchar obj;
12276 basic_ios_wchar vbase;
12277 } wclog = { { 0 } };
12278 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12279 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12280 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12282 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12283 int ios_base_Init__Init_cnt = -1;
12285 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12286 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12287 static void ios_base_Init__Init_ctor(void *this)
12289 TRACE("(%p)\n", this);
12291 if(ios_base_Init__Init_cnt < 0)
12292 ios_base_Init__Init_cnt = 1;
12294 ios_base_Init__Init_cnt++;
12297 /* ??0Init@ios_base@std@@QAE@XZ */
12298 /* ??0Init@ios_base@std@@QEAA@XZ */
12299 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12300 void* __thiscall ios_base_Init_ctor(void *this)
12302 ios_base_Init__Init_ctor(this);
12306 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12307 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12308 static void ios_base_Init__Init_dtor(void *this)
12310 TRACE("(%p)\n", this);
12312 ios_base_Init__Init_cnt--;
12313 if(!ios_base_Init__Init_cnt) {
12314 basic_ostream_char_flush(&cout.obj);
12315 basic_ostream_char_flush(&cerr.obj);
12316 basic_ostream_char_flush(&clog.obj);
12320 /* ??1Init@ios_base@std@@QAE@XZ */
12321 /* ??1Init@ios_base@std@@QEAA@XZ */
12322 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12323 void __thiscall ios_base_Init_dtor(void *this)
12325 ios_base_Init__Init_dtor(this);
12328 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12329 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12330 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12331 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12333 TRACE("(%p %p)\n", this, rhs);
12337 /* ?_Init_cnt@_Winit@std@@0HA */
12338 int _Winit__Init_cnt = -1;
12340 /* ??0_Winit@std@@QAE@XZ */
12341 /* ??0_Winit@std@@QEAA@XZ */
12342 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12343 void* __thiscall _Winit_ctor(void *this)
12345 TRACE("(%p)\n", this);
12347 if(_Winit__Init_cnt < 0)
12348 _Winit__Init_cnt = 1;
12350 _Winit__Init_cnt++;
12355 /* ??1_Winit@std@@QAE@XZ */
12356 /* ??1_Winit@std@@QAE@XZ */
12357 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12358 void __thiscall _Winit_dtor(void *this)
12360 TRACE("(%p)\n", this);
12362 _Winit__Init_cnt--;
12363 if(!_Winit__Init_cnt) {
12364 basic_ostream_wchar_flush(&wcout.obj);
12365 basic_ostream_wchar_flush(&wcerr.obj);
12366 basic_ostream_wchar_flush(&wclog.obj);
12370 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12371 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12372 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12373 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12375 TRACE("(%p %p)\n", this, rhs);
12379 void init_io(void *base)
12382 init_iosb_rtti(base);
12383 init_ios_base_rtti(base);
12384 init_basic_ios_char_rtti(base);
12385 init_basic_ios_wchar_rtti(base);
12386 init_basic_ios_short_rtti(base);
12387 init_basic_streambuf_char_rtti(base);
12388 init_basic_streambuf_wchar_rtti(base);
12389 init_basic_streambuf_short_rtti(base);
12390 init_basic_filebuf_char_rtti(base);
12391 init_basic_filebuf_wchar_rtti(base);
12392 init_basic_filebuf_short_rtti(base);
12393 init_basic_stringbuf_char_rtti(base);
12394 init_basic_stringbuf_wchar_rtti(base);
12395 init_basic_stringbuf_short_rtti(base);
12396 init_basic_ostream_char_rtti(base);
12397 init_basic_ostream_wchar_rtti(base);
12398 init_basic_ostream_short_rtti(base);
12399 init_basic_istream_char_rtti(base);
12400 init_basic_istream_wchar_rtti(base);
12401 init_basic_istream_short_rtti(base);
12402 init_basic_iostream_char_rtti(base);
12403 init_basic_iostream_wchar_rtti(base);
12404 init_basic_iostream_short_rtti(base);
12405 init_basic_ofstream_char_rtti(base);
12406 init_basic_ofstream_wchar_rtti(base);
12407 init_basic_ofstream_short_rtti(base);
12408 init_basic_ifstream_char_rtti(base);
12409 init_basic_ifstream_wchar_rtti(base);
12410 init_basic_ifstream_short_rtti(base);
12411 init_basic_fstream_char_rtti(base);
12412 init_basic_fstream_wchar_rtti(base);
12413 init_basic_fstream_short_rtti(base);
12414 init_basic_ostringstream_char_rtti(base);
12415 init_basic_ostringstream_wchar_rtti(base);
12416 init_basic_ostringstream_short_rtti(base);
12417 init_basic_istringstream_char_rtti(base);
12418 init_basic_istringstream_wchar_rtti(base);
12419 init_basic_istringstream_short_rtti(base);
12420 init_basic_stringstream_char_rtti(base);
12421 init_basic_stringstream_wchar_rtti(base);
12422 init_basic_stringstream_short_rtti(base);
12423 init_strstreambuf_rtti(base);
12424 init_strstream_rtti(base);
12425 init_ostrstream_rtti(base);
12428 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12429 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12431 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12432 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12434 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12435 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12437 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12438 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
12440 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12441 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
12443 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12444 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
12446 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12447 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
12449 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12450 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
12452 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12453 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
12455 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12456 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
12458 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12459 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
12461 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12462 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
12467 basic_istream_char_vbase_dtor(&cin.obj);
12468 basic_filebuf_char_dtor(&filebuf_char_stdin);
12470 basic_istream_wchar_vbase_dtor(&ucin.obj);
12471 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12473 basic_istream_wchar_vbase_dtor(&wcin.obj);
12474 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12476 basic_ostream_char_vbase_dtor(&cout.obj);
12477 basic_filebuf_char_dtor(&filebuf_char_stdout);
12479 basic_ostream_wchar_vbase_dtor(&ucout.obj);
12480 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12482 basic_ostream_wchar_vbase_dtor(&wcout.obj);
12483 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12485 basic_ostream_char_vbase_dtor(&cerr.obj);
12486 basic_filebuf_char_dtor(&filebuf_char_stderr);
12488 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
12489 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
12491 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
12492 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
12494 basic_ostream_char_vbase_dtor(&clog.obj);
12495 basic_filebuf_char_dtor(&filebuf_char_log);
12497 basic_ostream_wchar_vbase_dtor(&uclog.obj);
12498 basic_filebuf_wchar_dtor(&filebuf_short_log);
12500 basic_ostream_wchar_vbase_dtor(&wclog.obj);
12501 basic_filebuf_wchar_dtor(&filebuf_wchar_log);