2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
33 /* ?_Index@ios_base@std@@0HA */
34 int ios_base_Index = 0;
35 /* ?_Sync@ios_base@std@@0_NA */
36 MSVCP_bool ios_base_Sync = FALSE;
40 __int64 DECLSPEC_ALIGN(8) pos;
44 static inline const char* debugstr_fpos_int(fpos_int *fpos)
46 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
50 void (__cdecl *pfunc)(ios_base*, streamsize);
55 void (__cdecl *pfunc)(ios_base*, int);
63 } basic_filebuf__Initfl;
66 basic_streambuf_char base;
70 basic_string_char *str;
77 basic_streambuf_wchar base;
81 basic_string_char *str;
85 } basic_filebuf_wchar;
88 STRINGBUF_allocated = 1,
89 STRINGBUF_no_write = 2,
90 STRINGBUF_no_read = 4,
93 } basic_stringbuf_state;
96 basic_streambuf_char base;
101 char allocator; /* empty struct */
102 } basic_stringbuf_char;
105 basic_streambuf_wchar base;
110 char allocator; /* empty struct */
111 } basic_stringbuf_wchar;
115 basic_streambuf_char *strbuf;
116 struct _basic_ostream_char *stream;
122 basic_streambuf_wchar *strbuf;
123 struct _basic_ostream_wchar *stream;
127 typedef struct _basic_ostream_char {
129 /* virtual inheritance
130 * basic_ios_char basic_ios;
132 } basic_ostream_char;
134 typedef struct _basic_ostream_wchar {
136 /* virtual inheritance
137 * basic_ios_wchar basic_ios;
139 } basic_ostream_wchar;
144 /* virtual inheritance
145 * basic_ios_char basic_ios;
147 } basic_istream_char;
152 /* virtual inheritance
153 * basic_ios_wchar basic_ios;
155 } basic_istream_wchar;
158 basic_istream_char base1;
159 basic_ostream_char base2;
160 /* virtual inheritance
161 * basic_ios_char basic_ios;
163 } basic_iostream_char;
166 basic_istream_wchar base1;
167 basic_ostream_wchar base2;
168 /* virtual inheritance
169 * basic_ios_wchar basic_ios;
171 } basic_iostream_wchar;
174 basic_ostream_char base;
175 basic_filebuf_char filebuf;
176 /* virtual inheritance
177 * basic_ios_char basic_ios;
179 } basic_ofstream_char;
182 basic_ostream_wchar base;
183 basic_filebuf_wchar filebuf;
184 /* virtual inheritance
185 * basic_ios_wchar basic_ios;
187 } basic_ofstream_wchar;
190 basic_istream_char base;
191 basic_filebuf_char filebuf;
192 /* virtual inheritance
193 * basic_ios_char basic_ios;
195 } basic_ifstream_char;
198 basic_istream_wchar base;
199 basic_filebuf_wchar filebuf;
200 /* virtual inheritance
201 * basic_ios_wchar basic_ios;
203 } basic_ifstream_wchar;
206 basic_iostream_char base;
207 basic_filebuf_char filebuf;
208 /* virtual inheritance
209 * basic_ios_char basic_ios;
211 } basic_fstream_char;
214 basic_iostream_wchar base;
215 basic_filebuf_wchar filebuf;
216 /* virtual inheritance
217 * basic_ios_char basic_ios;
219 } basic_fstream_wchar;
222 basic_ostream_char base;
223 basic_stringbuf_char strbuf;
224 /* virtual inheritance
225 * basic_ios_char basic_ios;
227 } basic_ostringstream_char;
230 basic_ostream_wchar base;
231 basic_stringbuf_wchar strbuf;
232 /* virtual inheritance
233 * basic_ios_wchar basic_ios;
235 } basic_ostringstream_wchar;
238 basic_istream_char base;
239 basic_stringbuf_char strbuf;
240 /* virtual inheritance
241 * basic_ios_char basic_ios;
243 } basic_istringstream_char;
246 basic_istream_wchar base;
247 basic_stringbuf_wchar strbuf;
248 /* virtual inheritance
249 * basic_ios_wchar basic_ios;
251 } basic_istringstream_wchar;
254 basic_iostream_char base;
255 basic_stringbuf_char strbuf;
256 /* virtual inheritance
257 * basic_ios_char basic_ios;
259 } basic_stringstream_char;
262 basic_iostream_wchar base;
263 basic_stringbuf_wchar strbuf;
264 /* virtual inheritance
265 * basic_ios_wchar basic_ios;
267 } basic_stringstream_wchar;
270 STRSTATE_Allocated = 1,
271 STRSTATE_Constant = 2,
272 STRSTATE_Dynamic = 4,
274 } strstreambuf__Strstate;
277 basic_streambuf_char base;
282 void* (__cdecl *palloc)(MSVCP_size_t);
283 void (__cdecl *pfree)(void*);
287 basic_ostream_char base;
289 /* virtual inheritance
290 * basic_ios_char basic_ios;
295 basic_istream_char base;
297 /* virtual inheritance
298 * basic_ios_char basic_ios;
303 basic_iostream_char base;
305 /* virtual inheritance
306 * basic_ios_char basic_ios;
310 extern const vtable_ptr MSVCP_iosb_vtable;
312 /* ??_7ios_base@std@@6B@ */
313 extern const vtable_ptr MSVCP_ios_base_vtable;
315 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
316 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
318 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
319 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
321 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
322 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
324 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
325 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
327 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
328 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
330 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
331 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
333 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
334 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
336 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
337 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
339 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
340 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
342 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
343 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
345 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
346 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
348 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
349 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
351 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
352 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
353 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
354 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
356 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
357 const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)};
358 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
359 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
361 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
362 const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)};
363 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
364 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
366 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
367 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
368 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
369 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
371 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
372 const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)};
373 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
374 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
376 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
377 const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)};
378 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
379 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
381 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
382 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
383 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
384 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
385 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
386 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
388 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
389 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
390 const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)};
391 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
392 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
393 const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)};
394 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
395 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
396 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
397 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
399 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
400 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
401 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
402 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
404 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
405 const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
406 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
407 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
409 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
410 const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
411 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
412 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
414 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
415 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
416 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
417 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
419 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
420 const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
421 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
422 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
424 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
425 const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
426 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
427 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
429 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
430 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
431 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
432 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
433 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
434 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
436 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
437 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
438 const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)};
439 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
440 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
441 const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
442 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
443 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
444 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
445 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
447 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
448 const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)};
449 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
450 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
452 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
453 const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
454 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
455 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
457 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
458 const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
459 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
460 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
462 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
463 const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)};
464 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
465 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
467 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
468 const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
469 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
470 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
472 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
473 const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
474 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
475 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
477 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
478 const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)};
479 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
480 const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
481 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
482 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
484 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
485 const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
486 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
487 const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
488 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
489 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
491 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
492 const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
493 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
494 const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
495 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
496 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
498 /* ??_7strstreambuf@std@@6B */
499 extern const vtable_ptr MSVCP_strstreambuf_vtable;
501 static const int ostrstream_vbtable[] = {0, sizeof(ostrstream)};
502 extern const vtable_ptr MSVCP_ostrstream_vtable;
504 static const int istrstream_vbtable[] = {0, sizeof(istrstream)};
506 static const int strstream_vbtable1[] = {0, sizeof(strstream)};
507 static const int strstream_vbtable2[] = {0, sizeof(strstream)-FIELD_OFFSET(strstream, base.base2)};
508 extern const vtable_ptr MSVCP_strstream_vtable;
510 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@")
511 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@")
512 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
513 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
514 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
515 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@")
516 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
517 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
518 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
519 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
520 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
521 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@")
522 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
523 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
524 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
525 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@")
526 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
527 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
528 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
529 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
530 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
531 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
532 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
533 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
534 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
535 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
536 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
537 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
538 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
539 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
540 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
541 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@")
542 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
543 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
544 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
545 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
546 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
547 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
548 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
549 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
550 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@")
551 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
552 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
553 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
554 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
555 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
556 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
557 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
558 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
559 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
560 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
561 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
562 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
563 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
564 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
565 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@")
566 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
567 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
568 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
569 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
570 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
571 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
572 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
573 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
574 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
575 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
576 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
577 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
578 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
579 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@")
580 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
581 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
582 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
583 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
584 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
585 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
586 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
587 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
588 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
589 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
590 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
591 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@")
592 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
593 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
594 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
595 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
596 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
597 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
598 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
599 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
600 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
601 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
602 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
603 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
604 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
605 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
606 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
607 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@")
608 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
609 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
610 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
611 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
612 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
613 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
614 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
615 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
616 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
617 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
618 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
619 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
620 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
621 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
622 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
623 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
624 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
625 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
626 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
627 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
628 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
629 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
630 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
631 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
632 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
633 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
634 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
635 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
636 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
637 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
638 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
639 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
640 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
641 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
642 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
643 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
644 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
645 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
646 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
647 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
648 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
649 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
650 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
651 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
652 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
653 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
654 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
655 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
656 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
657 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@")
658 DEFINE_RTTI_DATA4(ostrstream, sizeof(ostrstream),
659 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
660 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
661 "?AVostrstream@std@@")
662 DEFINE_RTTI_DATA8(strstream, sizeof(strstream),
663 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
664 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
665 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
666 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
667 "?AVstrstream@std@@")
670 void __asm_dummy_vtables(void) {
673 VTABLE_ADD_FUNC(iosb_vector_dtor));
674 __ASM_VTABLE(ios_base,
675 VTABLE_ADD_FUNC(ios_base_vector_dtor));
676 __ASM_VTABLE(basic_ios_char,
677 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
678 __ASM_VTABLE(basic_ios_wchar,
679 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
680 __ASM_VTABLE(basic_ios_short,
681 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
682 __ASM_VTABLE(basic_streambuf_char,
683 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
684 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
685 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
686 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
687 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
688 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
689 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
690 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
691 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
692 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
693 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
694 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
695 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
696 __ASM_VTABLE(basic_streambuf_wchar,
697 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
698 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
699 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
700 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
701 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
702 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
703 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
704 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
705 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
706 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
707 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
708 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
710 __ASM_VTABLE(basic_streambuf_short,
711 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
712 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
713 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
714 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
715 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
716 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
717 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
718 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
719 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
720 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
721 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
722 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
723 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
724 __ASM_VTABLE(basic_filebuf_char,
725 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
726 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
727 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
728 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
729 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
730 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
731 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
732 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
733 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
734 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
735 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
736 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
737 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
738 __ASM_VTABLE(basic_filebuf_wchar,
739 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
740 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
741 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
742 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
743 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
744 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
745 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
746 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
747 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
748 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
749 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
750 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
751 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
752 __ASM_VTABLE(basic_filebuf_short,
753 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
754 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
755 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
756 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
757 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
758 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
759 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
760 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
761 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
762 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
763 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
764 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
765 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
766 __ASM_VTABLE(basic_stringbuf_char,
767 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
768 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
769 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
770 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
771 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
772 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
773 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
774 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
775 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
776 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
777 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
778 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
779 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
780 __ASM_VTABLE(basic_stringbuf_wchar,
781 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
782 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
783 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
784 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
785 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
786 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
787 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
788 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
789 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
790 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
791 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
792 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
793 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
794 __ASM_VTABLE(basic_stringbuf_short,
795 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
796 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
797 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
798 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
799 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
800 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
801 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
802 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
803 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
804 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
805 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
806 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
807 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
808 __ASM_VTABLE(basic_ostream_char,
809 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
810 __ASM_VTABLE(basic_ostream_wchar,
811 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
812 __ASM_VTABLE(basic_ostream_short,
813 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
814 __ASM_VTABLE(basic_istream_char,
815 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
816 __ASM_VTABLE(basic_istream_wchar,
817 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
818 __ASM_VTABLE(basic_istream_short,
819 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
820 __ASM_VTABLE(basic_iostream_char,
821 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
822 __ASM_VTABLE(basic_iostream_wchar,
823 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
824 __ASM_VTABLE(basic_iostream_short,
825 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
826 __ASM_VTABLE(basic_ofstream_char,
827 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
828 __ASM_VTABLE(basic_ofstream_wchar,
829 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
830 __ASM_VTABLE(basic_ofstream_short,
831 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
832 __ASM_VTABLE(basic_ifstream_char,
833 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
834 __ASM_VTABLE(basic_ifstream_wchar,
835 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
836 __ASM_VTABLE(basic_ifstream_short,
837 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
838 __ASM_VTABLE(basic_fstream_char,
839 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
840 __ASM_VTABLE(basic_fstream_wchar,
841 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
842 __ASM_VTABLE(basic_fstream_short,
843 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
844 __ASM_VTABLE(basic_ostringstream_char,
845 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
846 __ASM_VTABLE(basic_ostringstream_wchar,
847 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
848 __ASM_VTABLE(basic_ostringstream_short,
849 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
850 __ASM_VTABLE(basic_istringstream_char,
851 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
852 __ASM_VTABLE(basic_istringstream_wchar,
853 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
854 __ASM_VTABLE(basic_istringstream_short,
855 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
856 __ASM_VTABLE(basic_stringstream_char,
857 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
858 __ASM_VTABLE(basic_stringstream_wchar,
859 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
860 __ASM_VTABLE(basic_stringstream_short,
861 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
862 __ASM_VTABLE(strstreambuf,
863 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
864 VTABLE_ADD_FUNC(strstreambuf_overflow)
865 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
866 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
867 VTABLE_ADD_FUNC(strstreambuf_underflow)
868 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
869 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
870 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
871 VTABLE_ADD_FUNC(strstreambuf_seekoff)
872 VTABLE_ADD_FUNC(strstreambuf_seekpos)
873 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
874 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
875 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
876 __ASM_VTABLE(ostrstream,
877 VTABLE_ADD_FUNC(ostrstream_vector_dtor));
878 __ASM_VTABLE(strstream,
879 VTABLE_ADD_FUNC(strstream_vector_dtor));
884 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
885 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
886 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
887 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
889 TRACE("(%p %p %p %p)\n", this, first, next, last);
893 this->wsize = last-next;
896 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
897 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
898 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
899 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
901 basic_streambuf_char_setp_next(this, first, first, last);
904 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
905 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
906 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
907 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
909 TRACE("(%p %p %p %p)\n", this, first, next, last);
913 this->rsize = last-next;
916 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
917 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
918 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
919 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
921 TRACE("(%p)\n", this);
923 this->prbuf = &this->rbuf;
924 this->pwbuf = &this->wbuf;
925 this->prpos = &this->rpos;
926 this->pwpos = &this->wpos;
927 this->prsize = &this->rsize;
928 this->pwsize = &this->wsize;
930 basic_streambuf_char_setp(this, NULL, NULL);
931 basic_streambuf_char_setg(this, NULL, NULL, NULL);
934 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
935 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
936 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
937 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
939 TRACE("(%p %d)\n", this, uninitialized);
940 this->vtable = &MSVCP_basic_streambuf_char_vtable;
944 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
945 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
946 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
947 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
949 TRACE("(%p)\n", this);
951 this->vtable = &MSVCP_basic_streambuf_char_vtable;
952 locale_ctor(&this->loc);
953 basic_streambuf_char__Init_empty(this);
958 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
959 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
960 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
961 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
963 TRACE("(%p)\n", this);
965 locale_dtor(&this->loc);
968 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
969 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
971 TRACE("(%p %x)\n", this, flags);
973 /* we have an array, with the number of elements stored before the first object */
974 INT_PTR i, *ptr = (INT_PTR *)this-1;
976 for(i=*ptr-1; i>=0; i--)
977 basic_streambuf_char_dtor(this+i);
978 MSVCRT_operator_delete(ptr);
980 basic_streambuf_char_dtor(this);
982 MSVCRT_operator_delete(this);
988 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
989 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
990 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
992 TRACE("(%p)\n", this);
993 return *this->prpos ? *this->prsize : 0;
996 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
997 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
998 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
999 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
1001 TRACE("(%p)\n", this);
1004 return *this->prpos;
1007 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1008 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1009 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
1010 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
1012 TRACE("(%p)\n", this);
1014 return (*this->prpos)++;
1017 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1018 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1019 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
1021 TRACE("(%p)\n", this);
1024 return *this->prpos;
1027 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1028 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1029 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
1030 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1032 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1042 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1043 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1044 static void basic_streambuf_char__Lock(basic_streambuf_char *this)
1046 TRACE("(%p)\n", this);
1049 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1050 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1051 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1053 TRACE("(%p)\n", this);
1054 return *this->pwpos ? *this->pwsize : 0;
1057 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1058 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1059 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1060 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1062 TRACE("(%p)\n", this);
1064 return (*this->pwpos)++;
1067 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1068 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1069 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1070 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1071 int, (basic_streambuf_char*), (this))
1072 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1074 TRACE("(%p)\n", this);
1078 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1079 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1080 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1081 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1082 int, (basic_streambuf_char*), (this))
1083 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1087 TRACE("(%p)\n", this);
1089 if(call_basic_streambuf_char_underflow(this)==EOF)
1092 ret = (unsigned char)**this->prpos;
1098 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1099 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1100 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1102 streamsize copied, chunk;
1105 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1107 for(copied=0; copied<count && size;) {
1108 chunk = basic_streambuf_char__Gnavail(this);
1109 if(chunk > count-copied)
1110 chunk = count-copied;
1113 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1114 *this->prpos += chunk;
1115 *this->prsize -= chunk;
1118 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1130 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1131 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1132 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1134 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1135 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1138 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1139 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1140 static void basic_streambuf_char__Unlock(basic_streambuf_char *this)
1142 TRACE("(%p)\n", this);
1145 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1146 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1147 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1148 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1150 TRACE("(%p)\n", this);
1151 return *this->prbuf;
1154 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1155 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1156 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1157 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1159 TRACE("(%p)\n", this);
1160 return *this->prpos;
1163 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1164 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1165 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1166 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1168 TRACE("(%p)\n", this);
1169 return *this->prpos+*this->prsize;
1172 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1173 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1174 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1175 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1177 TRACE("(%p)\n", this);
1178 return *this->pwpos+*this->pwsize;
1181 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1182 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1183 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1184 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1186 TRACE("(%p %d)\n", this, off);
1187 *this->prpos += off;
1188 *this->prsize -= off;
1191 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1192 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1193 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1194 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1195 void, (basic_streambuf_char*, const locale*), (this, loc))
1196 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1198 TRACE("(%p %p)\n", this, loc);
1201 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1202 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1203 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1204 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1205 int, (basic_streambuf_char*, int), (this, ch))
1206 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1208 TRACE("(%p %d)\n", this, ch);
1212 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1213 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1214 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1215 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1216 int, (basic_streambuf_char*, int), (this, ch))
1217 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1219 TRACE("(%p %d)\n", this, ch);
1223 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1224 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1225 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1226 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1228 TRACE("(%p)\n", this);
1229 return *this->pwbuf;
1232 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1233 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1235 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1237 TRACE("(%p %d)\n", this, off);
1238 *this->pwpos += off;
1239 *this->pwsize -= off;
1242 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1243 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1244 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1245 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1247 TRACE("(%p)\n", this);
1248 return *this->pwpos;
1251 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1252 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1253 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1254 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1256 TRACE("(%p %p)\n", this, loc);
1257 memcpy(ret, &this->loc, sizeof(locale));
1258 call_basic_streambuf_char_imbue(this, loc);
1259 locale_copy_ctor(&this->loc, loc);
1263 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1264 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1265 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1266 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1267 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1268 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1269 fpos_int *ret, streamoff off, int way, int mode)
1271 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1278 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1279 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1280 static fpos_int* basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1281 fpos_int *ret, streamoff off, int way, int mode)
1283 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1284 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1287 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1288 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1289 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1290 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1291 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1292 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1293 fpos_int *ret, fpos_int pos, int mode)
1295 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1302 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1303 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1304 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1305 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1306 fpos_int *ret, fpos_int pos, int mode)
1308 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1309 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1312 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1313 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1314 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1315 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1316 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1317 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1319 TRACE("(%p %p %ld)\n", this, buf, count);
1323 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1324 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1325 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1326 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1328 TRACE("(%p %p %ld)\n", this, buf, count);
1329 return call_basic_streambuf_char_setbuf(this, buf, count);
1332 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1333 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1334 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1335 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1336 int, (basic_streambuf_char*), (this))
1337 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1339 TRACE("(%p)\n", this);
1343 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1344 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1345 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1346 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1348 TRACE("(%p)\n", this);
1349 return call_basic_streambuf_char_sync(this);
1352 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1353 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1354 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1355 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1357 TRACE("(%p %p %ld)\n", this, ptr, count);
1358 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1361 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1362 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1363 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1364 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1365 streamsize, (basic_streambuf_char*), (this))
1366 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1368 TRACE("(%p)\n", this);
1372 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1373 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1374 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1375 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1379 TRACE("(%p)\n", this);
1381 ret = basic_streambuf_char__Gnavail(this);
1382 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1385 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1386 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1387 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1388 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1390 TRACE("(%p %d)\n", this, ch);
1391 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1394 return (unsigned char)ch;
1397 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch);
1400 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1401 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1402 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1403 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1405 TRACE("(%p %d)\n", this, ch);
1406 return basic_streambuf_char__Pnavail(this) ?
1407 (*basic_streambuf_char__Pninc(this) = ch) :
1408 call_basic_streambuf_char_overflow(this, (unsigned char)ch);
1411 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1412 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1413 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1414 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1416 TRACE("(%p)\n", this);
1417 if(*this->prpos && *this->prpos>*this->prbuf) {
1420 return (unsigned char)**this->prpos;
1423 return call_basic_streambuf_char_pbackfail(this, EOF);
1426 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1427 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1428 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1429 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1431 TRACE("(%p)\n", this);
1432 if(basic_streambuf_char__Gnavail(this))
1433 basic_streambuf_char__Gninc(this);
1435 call_basic_streambuf_char_uflow(this);
1438 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1439 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1440 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1441 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1443 TRACE("(%p)\n", this);
1444 return basic_streambuf_char__Gnavail(this) ?
1445 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1448 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1449 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1450 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1451 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1453 TRACE("(%p)\n", this);
1454 return basic_streambuf_char__Gnavail(this) ?
1455 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1458 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1459 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1460 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1461 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1463 TRACE("(%p)\n", this);
1465 if(basic_streambuf_char__Gnavail(this) > 1)
1466 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1467 return basic_streambuf_char_sbumpc(this)==EOF ?
1468 EOF : basic_streambuf_char_sgetc(this);
1471 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1472 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1473 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1474 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1475 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1476 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1478 TRACE("(%p %p %ld)\n", this, ptr, count);
1479 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1482 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1483 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1484 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1485 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1486 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1487 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1489 streamsize copied, chunk;
1491 TRACE("(%p %p %ld)\n", this, ptr, count);
1493 for(copied=0; copied<count;) {
1494 chunk = basic_streambuf_char__Pnavail(this);
1495 if(chunk > count-copied)
1496 chunk = count-copied;
1499 memcpy(*this->pwpos, ptr+copied, chunk);
1500 *this->pwpos += chunk;
1501 *this->pwsize -= chunk;
1503 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) {
1513 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1514 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1515 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1516 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1518 TRACE("(%p %p %ld)\n", this, ptr, count);
1519 return call_basic_streambuf_char_xsputn(this, ptr, count);
1522 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@XZ */
1523 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@XZ */
1524 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
1525 locale* __thiscall basic_streambuf_char_getloc(basic_streambuf_char *this, locale *ret)
1527 TRACE("(%p %p)\n", this, ret);
1528 return locale_copy_ctor(ret, &this->loc);
1531 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1532 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1533 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1534 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1535 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1536 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1538 TRACE("(%p %p %p %p)\n", this, first, next, last);
1542 this->wsize = last-next;
1545 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1546 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1547 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1548 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1549 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1550 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1552 basic_streambuf_wchar_setp_next(this, first, first, last);
1555 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1556 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1557 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1558 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1559 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1560 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1562 TRACE("(%p %p %p %p)\n", this, first, next, last);
1566 this->rsize = last-next;
1569 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1570 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1571 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1572 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1573 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1574 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1576 TRACE("(%p)\n", this);
1578 this->prbuf = &this->rbuf;
1579 this->pwbuf = &this->wbuf;
1580 this->prpos = &this->rpos;
1581 this->pwpos = &this->wpos;
1582 this->prsize = &this->rsize;
1583 this->pwsize = &this->wsize;
1585 basic_streambuf_wchar_setp(this, NULL, NULL);
1586 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1589 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1590 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1591 static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1593 TRACE("(%p %d)\n", this, uninitialized);
1594 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1598 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1599 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1600 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1601 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1603 TRACE("(%p %d)\n", this, uninitialized);
1604 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1605 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1609 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1610 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1611 static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1613 TRACE("(%p)\n", this);
1615 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1616 locale_ctor(&this->loc);
1617 basic_streambuf_wchar__Init_empty(this);
1622 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1623 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1624 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1625 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1627 TRACE("(%p)\n", this);
1628 basic_streambuf_wchar_ctor(this);
1629 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1633 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1634 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1635 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1636 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1637 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1638 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1640 TRACE("(%p)\n", this);
1642 locale_dtor(&this->loc);
1645 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1646 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1648 TRACE("(%p %x)\n", this, flags);
1650 /* we have an array, with the number of elements stored before the first object */
1651 INT_PTR i, *ptr = (INT_PTR *)this-1;
1653 for(i=*ptr-1; i>=0; i--)
1654 basic_streambuf_wchar_dtor(this+i);
1655 MSVCRT_operator_delete(ptr);
1657 basic_streambuf_wchar_dtor(this);
1659 MSVCRT_operator_delete(this);
1665 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1666 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1667 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1668 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1669 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1671 TRACE("(%p)\n", this);
1672 return *this->prpos ? *this->prsize : 0;
1675 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1676 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1677 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1678 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1679 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1680 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1682 TRACE("(%p)\n", this);
1685 return *this->prpos;
1688 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1689 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1690 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1691 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1692 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1693 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1695 TRACE("(%p)\n", this);
1697 return (*this->prpos)++;
1700 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1701 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1702 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1703 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1704 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1706 TRACE("(%p)\n", this);
1709 return *this->prpos;
1712 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1713 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1714 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1715 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1716 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1717 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)
1719 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1729 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1730 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1731 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1732 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1733 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1735 TRACE("(%p)\n", this);
1738 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1739 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1740 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1741 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1742 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1744 TRACE("(%p)\n", this);
1745 return *this->pwpos ? *this->pwsize : 0;
1748 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1749 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1750 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1751 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1752 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1753 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1755 TRACE("(%p)\n", this);
1757 return (*this->pwpos)++;
1760 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1761 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1762 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1763 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1764 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1765 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1766 unsigned short, (basic_streambuf_wchar*), (this))
1767 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1769 TRACE("(%p)\n", this);
1773 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1774 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1775 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1776 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1777 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1778 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1779 unsigned short, (basic_streambuf_wchar*), (this))
1780 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1784 TRACE("(%p)\n", this);
1786 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1789 ret = **this->prpos;
1795 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1796 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1797 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1798 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1799 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1801 streamsize copied, chunk;
1804 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1806 for(copied=0; copied<count && size;) {
1807 chunk = basic_streambuf_wchar__Gnavail(this);
1808 if(chunk > count-copied)
1809 chunk = count-copied;
1812 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1813 *this->prpos += chunk;
1814 *this->prsize -= chunk;
1816 size -= chunk*sizeof(wchar_t);
1817 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1829 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1830 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1831 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1832 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1833 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1835 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1836 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1839 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1840 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1841 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1842 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1843 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1845 TRACE("(%p)\n", this);
1848 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1849 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1850 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1851 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1852 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1853 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1855 TRACE("(%p)\n", this);
1856 return *this->prbuf;
1859 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1860 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1861 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1862 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1863 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1864 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1866 TRACE("(%p)\n", this);
1867 return *this->prpos;
1870 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1871 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1872 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1873 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1874 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1875 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1877 TRACE("(%p)\n", this);
1878 return *this->prpos+*this->prsize;
1881 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1882 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1883 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1884 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1885 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1886 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1888 TRACE("(%p)\n", this);
1889 return *this->pwpos+*this->pwsize;
1892 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1893 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1894 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1895 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1896 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1897 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1899 TRACE("(%p %d)\n", this, off);
1900 *this->prpos += off;
1901 *this->prsize -= off;
1904 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1905 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1906 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1907 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1908 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1909 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1910 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1911 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1913 TRACE("(%p %p)\n", this, loc);
1916 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1917 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1918 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1919 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1920 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1921 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1922 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1923 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1925 TRACE("(%p %d)\n", this, ch);
1929 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1930 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1931 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1932 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1933 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1934 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1935 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1936 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1938 TRACE("(%p %d)\n", this, ch);
1942 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1943 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1944 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1945 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1946 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1947 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1949 TRACE("(%p)\n", this);
1950 return *this->pwbuf;
1953 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1954 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1955 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1956 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1957 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1958 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1960 TRACE("(%p %d)\n", this, off);
1961 *this->pwpos += off;
1962 *this->pwsize -= off;
1965 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1966 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1967 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1968 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1969 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1970 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1972 TRACE("(%p)\n", this);
1973 return *this->pwpos;
1976 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1977 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1978 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1979 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1980 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1981 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1983 TRACE("(%p %p)\n", this, loc);
1984 memcpy(ret, &this->loc, sizeof(locale));
1985 call_basic_streambuf_wchar_imbue(this, loc);
1986 locale_copy_ctor(&this->loc, loc);
1990 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1991 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1992 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1993 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1994 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1995 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1996 fpos_int *ret, streamoff off, int way, int mode)
1998 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2005 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2006 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2007 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2008 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2009 static fpos_int* basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2010 fpos_int *ret, streamoff off, int way, int mode)
2012 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2013 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2016 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2017 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2018 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2019 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2020 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2021 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2022 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2023 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2024 fpos_int *ret, fpos_int pos, int mode)
2026 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2033 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2034 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2035 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2036 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2037 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2038 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2039 fpos_int *ret, fpos_int pos, int mode)
2041 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2042 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2045 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2046 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2047 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2048 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2049 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2050 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2051 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2052 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2054 TRACE("(%p %p %ld)\n", this, buf, count);
2058 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2059 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2060 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2061 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2062 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2063 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2065 TRACE("(%p %p %ld)\n", this, buf, count);
2066 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2069 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2070 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2071 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2072 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2073 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2074 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2075 int, (basic_streambuf_wchar*), (this))
2076 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2078 TRACE("(%p)\n", this);
2082 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2083 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2084 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2085 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2086 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2087 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2089 TRACE("(%p)\n", this);
2090 return call_basic_streambuf_wchar_sync(this);
2093 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2094 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2095 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2096 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2097 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2098 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2100 TRACE("(%p %p %ld)\n", this, ptr, count);
2101 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2104 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2105 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2106 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2107 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2108 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2109 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2110 streamsize, (basic_streambuf_wchar*), (this))
2111 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2113 TRACE("(%p)\n", this);
2117 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2118 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2119 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2120 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2121 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2122 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2126 TRACE("(%p)\n", this);
2128 ret = basic_streambuf_wchar__Gnavail(this);
2129 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2132 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2133 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2134 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2135 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2136 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2137 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2139 TRACE("(%p %d)\n", this, ch);
2140 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2146 return call_basic_streambuf_wchar_pbackfail(this, ch);
2149 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2150 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2151 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2152 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2153 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2154 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2156 TRACE("(%p %d)\n", this, ch);
2157 return basic_streambuf_wchar__Pnavail(this) ?
2158 (*basic_streambuf_wchar__Pninc(this) = ch) :
2159 call_basic_streambuf_wchar_overflow(this, ch);
2162 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2163 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2164 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2165 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2166 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2167 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2169 TRACE("(%p)\n", this);
2170 if(*this->prpos && *this->prpos>*this->prbuf) {
2173 return **this->prpos;
2176 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2179 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2180 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2181 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2182 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2183 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2184 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2186 TRACE("(%p)\n", this);
2187 if(basic_streambuf_wchar__Gnavail(this))
2188 basic_streambuf_wchar__Gninc(this);
2190 call_basic_streambuf_wchar_uflow(this);
2193 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2194 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2195 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2196 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2197 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2198 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2200 TRACE("(%p)\n", this);
2201 return basic_streambuf_wchar__Gnavail(this) ?
2202 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2205 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2206 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2207 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2208 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2209 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2210 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2212 TRACE("(%p)\n", this);
2213 return basic_streambuf_wchar__Gnavail(this) ?
2214 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2217 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2218 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2219 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2220 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2221 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2222 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2224 TRACE("(%p)\n", this);
2226 if(basic_streambuf_wchar__Gnavail(this) > 1)
2227 return *basic_streambuf_wchar__Gnpreinc(this);
2228 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2229 WEOF : basic_streambuf_wchar_sgetc(this);
2232 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2233 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2234 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2235 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2236 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2237 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2238 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2239 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2241 TRACE("(%p %p %ld)\n", this, ptr, count);
2242 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2245 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2246 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2247 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2248 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2249 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2250 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2251 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2252 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2254 streamsize copied, chunk;
2256 TRACE("(%p %p %ld)\n", this, ptr, count);
2258 for(copied=0; copied<count;) {
2259 chunk = basic_streambuf_wchar__Pnavail(this);
2260 if(chunk > count-copied)
2261 chunk = count-copied;
2264 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2265 *this->pwpos += chunk;
2266 *this->pwsize -= chunk;
2268 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2278 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2279 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2280 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2281 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2282 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2283 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2285 TRACE("(%p %p %ld)\n", this, ptr, count);
2286 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2289 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@XZ */
2290 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@XZ */
2291 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
2292 locale* __thiscall basic_streambuf_wchar_getloc(basic_streambuf_wchar *this, locale *ret)
2294 TRACE("(%p %p)\n", this, ret);
2295 return locale_copy_ctor(ret, &this->loc);
2298 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2299 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2300 int basic_filebuf_char__Init__Stinit = 0;
2302 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2303 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2304 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2305 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2307 TRACE("(%p %p %d)\n", this, file, which);
2310 this->state0 = basic_filebuf_char__Init__Stinit;
2311 this->state = basic_filebuf_char__Init__Stinit;
2313 this->close = (which == INITFL_open);
2316 basic_streambuf_char__Init_empty(&this->base);
2318 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2319 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2322 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
2323 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
2324 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 4)
2325 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this)
2327 TRACE("(%p)\n", this);
2329 this->cvt = codecvt_char_use_facet(&this->base.loc);
2330 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_char_id.id, LC_CTYPE);
2331 if(codecvt_base_always_noconv(&this->cvt->base)) {
2334 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2335 basic_string_char_ctor(this->str);
2339 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2340 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2341 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2342 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2344 basic_filebuf_char *ret = this;
2346 TRACE("(%p)\n", this);
2348 if(!this->file || fclose(this->file))
2351 basic_filebuf_char__Init(this, NULL, INITFL_close);
2355 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2356 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2357 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2358 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2360 TRACE("(%p %p)\n", this, file);
2362 basic_streambuf_char_ctor(&this->base);
2363 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2365 locale_ctor(&this->loc);
2366 basic_filebuf_char__Init(this, file, INITFL_new);
2370 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2371 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2372 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2373 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2375 return basic_filebuf_char_ctor_file(this, NULL);
2378 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2379 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2380 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2381 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2383 TRACE("(%p %d)\n", this, uninitialized);
2385 basic_streambuf_char_ctor_uninitialized(&this->base, 0);
2386 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2387 locale_ctor(&this->loc);
2391 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2392 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2393 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2394 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2396 TRACE("(%p)\n", this);
2399 basic_filebuf_char_close(this);
2401 basic_string_char_dtor(this->str);
2402 MSVCRT_operator_delete(this->str);
2404 locale_dtor(&this->loc);
2405 basic_streambuf_char_dtor(&this->base);
2408 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2409 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2411 TRACE("(%p %x)\n", this, flags);
2413 /* we have an array, with the number of elements stored before the first object */
2414 INT_PTR i, *ptr = (INT_PTR *)this-1;
2416 for(i=*ptr-1; i>=0; i--)
2417 basic_filebuf_char_dtor(this+i);
2418 MSVCRT_operator_delete(ptr);
2420 basic_filebuf_char_dtor(this);
2422 MSVCRT_operator_delete(this);
2428 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2429 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2430 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2431 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2433 TRACE("(%p)\n", this);
2434 return this->file != NULL;
2437 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2438 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2439 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2441 static const wchar_t rW[] = {'r',0};
2442 static const struct {
2444 const wchar_t str[4];
2445 const wchar_t str_bin[4];
2447 {OPENMODE_out, {'w',0}, {'w','b',0}},
2448 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2449 {OPENMODE_app, {'a',0}, {'a','b',0}},
2450 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2451 {OPENMODE_in, {'r',0}, {'r','b',0}},
2452 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2453 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2454 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2455 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2458 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2462 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2464 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2465 if(str_mode[mode_idx].mode == real_mode)
2467 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2470 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2475 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2476 && (f = _wfopen(name, rW))) {
2481 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2482 : str_mode[mode_idx].str, prot);
2486 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2494 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2495 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2496 static FILE* _Fiopen(const char *name, int mode, int prot)
2498 wchar_t nameW[FILENAME_MAX];
2500 TRACE("(%s %d %d)\n", name, mode, prot);
2502 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2504 return _Fiopen_wchar(nameW, mode, prot);
2507 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2508 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2509 FILE* __cdecl ___Fiopen(const char *name, int mode)
2511 TRACE("(%p %d)\n", name, mode);
2512 return _Fiopen(name, mode, _SH_DENYNO);
2515 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2516 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2517 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2518 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2519 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2523 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2525 if(basic_filebuf_char_is_open(this))
2528 if(!(f = _Fiopen_wchar(name, mode, prot)))
2531 basic_filebuf_char__Init(this, f, INITFL_open);
2532 basic_filebuf_char__Initcvt(this);
2536 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2537 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2538 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2540 wchar_t nameW[FILENAME_MAX];
2542 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2544 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2546 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2549 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2550 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2551 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2552 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2554 TRACE("(%p %p %d)\n", this, name, mode);
2555 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2558 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2559 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2560 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2561 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2563 TRACE("(%p %p %d)\n", this, name, mode);
2564 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2567 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2568 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2569 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2570 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2572 char *ptr, ch = c, *to_next;
2573 const char *from_next;
2577 TRACE("(%p %d)\n", this, c);
2579 if(!basic_filebuf_char_is_open(this))
2585 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2588 basic_string_char_clear(this->str);
2589 basic_string_char_append_len_ch(this->str, 8, '\0');
2590 ptr = this->str->ptr;
2591 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1, &from_next,
2592 ptr, ptr+basic_string_char_length(this->str), &to_next);
2595 case CODECVT_partial:
2596 if(from_next == &ch)
2599 if(!fwrite(ptr, to_next-ptr, 1, this->file))
2602 case CODECVT_noconv:
2603 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2609 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2610 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2611 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2612 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2614 TRACE("(%p %d)\n", this, c);
2616 if(!basic_filebuf_char_is_open(this))
2619 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2620 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2621 basic_streambuf_char__Gndec(&this->base);
2622 return c==EOF ? !c : c;
2623 }else if(c == EOF) {
2625 }else if(!this->cvt) {
2626 return ungetc(c, this->file);
2627 }else if(basic_string_char_length(this->str)) {
2631 b = e+this->str->size-1;
2632 for(cur = b; cur>=e; cur--) {
2633 if(ungetc(*cur, this->file) == EOF) {
2634 for(; cur<=b; cur++)
2639 basic_string_char_clear(this->str);
2640 this->state = this->state0;
2647 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2648 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2649 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2650 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2653 const char *buf_next;
2656 TRACE("(%p)\n", this);
2658 if(!basic_filebuf_char_is_open(this))
2661 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2662 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2664 c = fgetc(this->file);
2665 if(!this->cvt || c==EOF)
2668 basic_string_char_clear(this->str);
2669 this->state0 = this->state;
2671 basic_string_char_append_ch(this->str, c);
2672 this->state = this->state0;
2674 switch(codecvt_char_in(this->cvt, &this->state, this->str->ptr,
2675 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
2676 case CODECVT_partial:
2678 case CODECVT_noconv:
2679 return (unsigned char)this->str->ptr[0];
2681 return (unsigned char)ch;
2686 c = fgetc(this->file);
2692 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2693 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2694 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2695 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2699 TRACE("(%p)\n", this);
2701 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2702 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2704 ret = call_basic_streambuf_char_uflow(&this->base);
2706 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2710 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2711 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2712 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2713 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2714 fpos_int *ret, streamoff off, int way, int mode)
2718 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2720 if(!basic_filebuf_char_is_open(this) || fseek(this->file, off, way)) {
2727 fgetpos(this->file, &pos);
2730 ret->state = this->state;
2734 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2735 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2736 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2737 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2738 fpos_int *ret, fpos_int pos, int mode)
2742 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2744 if(!basic_filebuf_char_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2745 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2752 fgetpos(this->file, &fpos);
2755 ret->state = this->state;
2759 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2760 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2761 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2762 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2764 TRACE("(%p %p %ld)\n", this, buf, count);
2766 if(!basic_filebuf_char_is_open(this))
2769 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2772 basic_filebuf_char__Init(this, this->file, INITFL_open);
2776 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2777 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2778 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2779 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2781 TRACE("(%p)\n", this);
2783 if(!basic_filebuf_char_is_open(this))
2786 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2788 return fflush(this->file);
2791 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2792 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2793 int basic_filebuf_short__Init__Stinit = 0;
2795 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2796 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2797 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2799 TRACE("(%p %p %d)\n", this, file, which);
2802 this->state0 = basic_filebuf_short__Init__Stinit;
2803 this->state = basic_filebuf_short__Init__Stinit;
2805 this->close = (which == INITFL_open);
2808 basic_streambuf_wchar__Init_empty(&this->base);
2811 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2812 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2813 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2814 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2816 TRACE("(%p %p %d)\n", this, file, which);
2819 this->state0 = basic_filebuf_short__Init__Stinit;
2820 this->state = basic_filebuf_short__Init__Stinit;
2822 this->close = (which == INITFL_open);
2825 basic_streambuf_wchar__Init_empty(&this->base);
2828 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2829 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2830 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 4)
2831 void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this)
2833 TRACE("(%p)\n", this);
2835 this->cvt = codecvt_short_use_facet(&this->base.loc);
2836 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_short_id.id, LC_CTYPE);
2837 if(codecvt_base_always_noconv(&this->cvt->base)) {
2840 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2841 basic_string_char_ctor(this->str);
2845 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2846 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2847 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2848 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2849 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2850 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2852 basic_filebuf_wchar *ret = this;
2854 TRACE("(%p)\n", this);
2856 if(!this->file || fclose(this->file))
2859 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2863 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2864 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2865 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2867 TRACE("(%p %p)\n", this, file);
2869 basic_streambuf_wchar_ctor(&this->base);
2870 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2872 locale_ctor(&this->loc);
2873 basic_filebuf_wchar__Init(this, file, INITFL_new);
2877 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2878 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2879 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2880 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2882 TRACE("(%p %p)\n", this, file);
2884 basic_streambuf_short_ctor(&this->base);
2885 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2887 locale_ctor(&this->loc);
2888 basic_filebuf_short__Init(this, file, INITFL_new);
2892 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2893 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2894 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2896 return basic_filebuf_wchar_ctor_file(this, NULL);
2899 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2900 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2901 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2902 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2904 return basic_filebuf_short_ctor_file(this, NULL);
2907 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2908 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2909 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
2910 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
2912 TRACE("(%p %d)\n", this, uninitialized);
2914 basic_streambuf_short_ctor_uninitialized(&this->base, 0);
2915 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2916 locale_ctor(&this->loc);
2920 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2921 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2922 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2923 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2924 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
2925 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
2927 TRACE("(%p)\n", this);
2930 basic_filebuf_wchar_close(this);
2932 basic_string_char_dtor(this->str);
2933 MSVCRT_operator_delete(this->str);
2935 locale_dtor(&this->loc);
2936 basic_streambuf_wchar_dtor(&this->base);
2939 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
2940 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
2942 TRACE("(%p %x)\n", this, flags);
2944 /* we have an array, with the number of elements stored before the first object */
2945 INT_PTR i, *ptr = (INT_PTR *)this-1;
2947 for(i=*ptr-1; i>=0; i--)
2948 basic_filebuf_wchar_dtor(this+i);
2949 MSVCRT_operator_delete(ptr);
2951 basic_filebuf_wchar_dtor(this);
2953 MSVCRT_operator_delete(this);
2959 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
2960 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
2961 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2962 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2963 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
2964 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
2966 TRACE("(%p)\n", this);
2967 return this->file != NULL;
2970 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
2971 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2972 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
2973 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2974 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
2978 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2980 if(basic_filebuf_wchar_is_open(this))
2983 if(!(f = _Fiopen_wchar(name, mode, prot)))
2986 basic_filebuf_wchar__Init(this, f, INITFL_open);
2987 basic_filebuf_wchar__Initcvt(this);
2991 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
2992 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2993 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
2995 wchar_t nameW[FILENAME_MAX];
2997 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2999 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3001 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3004 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3005 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3006 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3007 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3009 TRACE("(%p %p %d)\n", this, name, mode);
3010 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3013 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3014 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3015 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3016 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3018 TRACE("(%p %p %d)\n", this, name, mode);
3019 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3022 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3023 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3024 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3025 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3026 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3027 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3029 char *ptr, *to_next;
3031 const wchar_t *from_next;
3035 TRACE("(%p %d)\n", this, c);
3037 if(!basic_filebuf_wchar_is_open(this))
3043 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3046 basic_string_char_clear(this->str);
3047 basic_string_char_append_len_ch(this->str, 8, '\0');
3048 ptr = this->str->ptr;
3049 ret = codecvt_wchar_out(this->cvt, &this->state, &ch, &ch+1, &from_next,
3050 ptr, ptr+basic_string_char_length(this->str), &to_next);
3053 case CODECVT_partial:
3054 if(from_next == &ch)
3058 if(!fwrite(ptr, to_next-ptr, 1, this->file))
3061 case CODECVT_noconv:
3062 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3068 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3069 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3070 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3071 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3072 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3073 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3075 TRACE("(%p %d)\n", this, c);
3077 if(!basic_filebuf_wchar_is_open(this))
3080 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3081 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3082 basic_streambuf_wchar__Gndec(&this->base);
3083 return c==WEOF ? !c : c;
3084 }else if(c == WEOF) {
3086 }else if(!this->cvt) {
3087 return ungetwc(c, this->file);
3088 }else if(basic_string_char_length(this->str)) {
3092 b = e+this->str->size-1;
3093 for(cur = b; cur>=e; cur--) {
3094 if(ungetc(*cur, this->file) == EOF) {
3095 for(; cur<=b; cur++)
3100 basic_string_char_clear(this->str);
3101 this->state = this->state0;
3108 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3109 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3110 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3111 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3112 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3113 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3115 wchar_t ch, *to_next;
3116 const char *buf_next;
3119 TRACE("(%p)\n", this);
3121 if(!basic_filebuf_wchar_is_open(this))
3124 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3125 return *basic_streambuf_wchar__Gninc(&this->base);
3128 return fgetwc(this->file);
3130 basic_string_char_clear(this->str);
3131 this->state0 = this->state;
3133 if((c = fgetc(this->file)) == EOF)
3135 basic_string_char_append_ch(this->str, c);
3136 this->state = this->state0;
3138 switch(codecvt_wchar_in(this->cvt, &this->state, this->str->ptr,
3139 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
3140 case CODECVT_partial:
3142 case CODECVT_noconv:
3143 if(this->str->size < sizeof(unsigned short)/sizeof(char))
3145 return *(unsigned short*)this->str->ptr;
3147 return (unsigned short)ch;
3154 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3155 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3156 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3157 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3158 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3159 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3163 TRACE("(%p)\n", this);
3165 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3166 return *basic_streambuf_wchar_gptr(&this->base);
3168 ret = call_basic_streambuf_wchar_uflow(&this->base);
3170 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3174 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3175 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3176 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3177 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3178 fpos_int *ret, streamoff off, int way, int mode)
3182 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3184 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, off, way)) {
3191 fgetpos(this->file, &pos);
3194 ret->state = this->state;
3198 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3199 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3200 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3201 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3202 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3203 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3204 fpos_int *ret, fpos_int pos, int mode)
3208 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3210 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3211 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3218 fgetpos(this->file, &fpos);
3221 ret->state = this->state;
3225 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3226 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3227 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3228 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3230 TRACE("(%p %p %ld)\n", this, buf, count);
3232 if(!basic_filebuf_wchar_is_open(this))
3235 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3238 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3242 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3243 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3244 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3245 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3247 TRACE("(%p %p %ld)\n", this, buf, count);
3249 if(!basic_filebuf_wchar_is_open(this))
3252 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3255 basic_filebuf_short__Init(this, this->file, INITFL_open);
3259 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3260 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3261 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3262 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3263 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3264 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3266 TRACE("(%p)\n", this);
3268 if(!basic_filebuf_wchar_is_open(this))
3271 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3273 return fflush(this->file);
3276 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3277 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3278 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3279 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3280 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate, 8)
3281 int __thiscall basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3285 if(!(mode & OPENMODE_in))
3286 state |= STRINGBUF_no_read;
3288 if(!(mode & OPENMODE_out))
3289 state |= STRINGBUF_no_write;
3291 if(mode & OPENMODE_ate)
3292 state |= STRINGBUF_at_end;
3294 if(mode & OPENMODE_app)
3295 state |= STRINGBUF_append;
3300 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3301 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3302 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3303 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3305 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3307 basic_streambuf_char__Init_empty(&this->base);
3309 this->state = state;
3310 this->seekhigh = NULL;
3313 char *buf = MSVCRT_operator_new(count);
3315 ERR("Out of memory\n");
3316 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3319 memcpy(buf, str, count);
3320 this->seekhigh = buf + count;
3322 this->state |= STRINGBUF_allocated;
3324 if(!(state & STRINGBUF_no_read))
3325 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3327 if(!(state & STRINGBUF_no_write)) {
3328 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3330 if(!basic_streambuf_char_gptr(&this->base))
3331 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3336 /* ??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 */
3337 /* ??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 */
3338 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3339 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3340 const basic_string_char *str, IOSB_openmode mode)
3342 TRACE("(%p %p %d)\n", this, str, mode);
3344 basic_streambuf_char_ctor(&this->base);
3345 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3347 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3348 str->size, basic_stringbuf_char__Getstate(this, mode));
3352 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3353 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3354 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3355 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3356 basic_stringbuf_char *this, IOSB_openmode mode)
3358 TRACE("(%p %d)\n", this, mode);
3360 basic_streambuf_char_ctor(&this->base);
3361 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3363 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3367 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3368 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3369 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3370 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3372 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3375 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3376 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3377 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3378 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3380 TRACE("(%p)\n", this);
3382 if(this->state & STRINGBUF_allocated) {
3383 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3384 this->seekhigh = NULL;
3385 this->state &= ~STRINGBUF_allocated;
3388 basic_streambuf_char__Init_empty(&this->base);
3391 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3392 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3393 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3394 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3396 TRACE("(%p)\n", this);
3398 basic_stringbuf_char__Tidy(this);
3399 basic_streambuf_char_dtor(&this->base);
3402 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3403 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3405 TRACE("(%p %x)\n", this, flags);
3408 /* we have an array, with the number of elements stored before the first object */
3409 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3411 for (i = *ptr - 1; i >= 0; i--)
3412 basic_stringbuf_char_dtor(this+i);
3414 MSVCRT_operator_delete(ptr);
3416 basic_stringbuf_char_dtor(this);
3419 MSVCRT_operator_delete(this);
3425 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3426 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3427 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3428 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3430 MSVCP_size_t oldsize, size;
3433 TRACE("(%p %x)\n", this, meta);
3437 if(this->state & STRINGBUF_no_write)
3440 ptr = basic_streambuf_char_pptr(&this->base);
3441 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3442 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3443 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3445 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3446 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3448 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3451 buf = MSVCRT_operator_new(size);
3453 ERR("Out of memory\n");
3454 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3458 this->seekhigh = buf;
3459 basic_streambuf_char_setp(&this->base, buf, buf+size);
3460 if(this->state & STRINGBUF_no_read)
3461 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3463 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3465 this->state |= STRINGBUF_allocated;
3467 ptr = basic_streambuf_char_eback(&this->base);
3468 memcpy(buf, ptr, oldsize);
3470 this->seekhigh = buf+(this->seekhigh-ptr);
3471 basic_streambuf_char_setp_next(&this->base, buf,
3472 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3473 if(this->state & STRINGBUF_no_read)
3474 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3476 basic_streambuf_char_setg(&this->base, buf,
3477 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3478 basic_streambuf_char_pptr(&this->base)+1);
3480 MSVCRT_operator_delete(ptr);
3483 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3486 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3487 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3488 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3489 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3493 TRACE("(%p %x)\n", this, c);
3495 cur = basic_streambuf_char_gptr(&this->base);
3496 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3497 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3502 basic_streambuf_char_gbump(&this->base, -1);
3503 return c==EOF ? !EOF : c;
3506 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3507 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3508 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3509 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3513 TRACE("(%p)\n", this);
3515 cur = basic_streambuf_char_gptr(&this->base);
3516 if(!cur || this->state&STRINGBUF_no_read)
3519 ptr = basic_streambuf_char_pptr(&this->base);
3520 if(this->seekhigh < ptr)
3521 this->seekhigh = ptr;
3523 ptr = basic_streambuf_char_egptr(&this->base);
3524 if(this->seekhigh > ptr)
3525 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3527 if(cur < this->seekhigh)
3528 return (unsigned char)*cur;
3532 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3533 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3534 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3535 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3536 fpos_int *ret, streamoff off, int way, int mode)
3538 char *beg, *cur_r, *cur_w;
3540 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3542 cur_w = basic_streambuf_char_pptr(&this->base);
3543 if(cur_w > this->seekhigh)
3544 this->seekhigh = cur_w;
3550 beg = basic_streambuf_char_eback(&this->base);
3551 cur_r = basic_streambuf_char_gptr(&this->base);
3552 if((mode & OPENMODE_in) && cur_r) {
3553 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3555 else if(way == SEEKDIR_end)
3556 off += this->seekhigh-beg;
3557 else if(way != SEEKDIR_beg)
3560 if(off<0 || off>this->seekhigh-beg) {
3563 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3564 if((mode & OPENMODE_out) && cur_w) {
3565 basic_streambuf_char_setp_next(&this->base, beg,
3566 basic_streambuf_char_gptr(&this->base),
3567 basic_streambuf_char_epptr(&this->base));
3570 }else if((mode & OPENMODE_out) && cur_w) {
3571 if(way == SEEKDIR_cur)
3573 else if(way == SEEKDIR_end)
3574 off += this->seekhigh-beg;
3575 else if(way != SEEKDIR_beg)
3578 if(off<0 || off>this->seekhigh-beg)
3581 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3590 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3591 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3592 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3593 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3594 fpos_int *ret, fpos_int pos, int mode)
3596 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3598 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3603 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3606 /* ?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 */
3607 /* ?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 */
3608 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3609 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3611 TRACE("(%p %p)\n", this, str);
3613 basic_stringbuf_char__Tidy(this);
3614 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3617 /* ?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 */
3618 /* ?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 */
3619 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3620 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3624 TRACE("(%p)\n", this);
3626 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3629 ptr = basic_streambuf_char_pbase(&this->base);
3630 pptr = basic_streambuf_char_pptr(&this->base);
3632 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3635 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3636 ptr = basic_streambuf_char_eback(&this->base);
3637 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3640 return basic_string_char_ctor(ret);
3643 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3644 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3645 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3646 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3647 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3648 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3649 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate, 8)
3650 int __thiscall basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3654 if(!(mode & OPENMODE_in))
3655 state |= STRINGBUF_no_read;
3657 if(!(mode & OPENMODE_out))
3658 state |= STRINGBUF_no_write;
3660 if(mode & OPENMODE_ate)
3661 state |= STRINGBUF_at_end;
3663 if(mode & OPENMODE_app)
3664 state |= STRINGBUF_append;
3669 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3670 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3671 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3672 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3673 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3674 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3676 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3678 basic_streambuf_wchar__Init_empty(&this->base);
3680 this->state = state;
3681 this->seekhigh = NULL;
3684 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3686 ERR("Out of memory\n");
3687 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3690 memcpy(buf, str, count*sizeof(wchar_t));
3691 this->seekhigh = buf + count;
3693 this->state |= STRINGBUF_allocated;
3695 if(!(state & STRINGBUF_no_read))
3696 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3698 if(!(state & STRINGBUF_no_write)) {
3699 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3701 if(!basic_streambuf_wchar_gptr(&this->base))
3702 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3707 /* ??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 */
3708 /* ??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 */
3709 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3710 const basic_string_wchar *str, IOSB_openmode mode)
3712 TRACE("(%p %p %d)\n", this, str, mode);
3714 basic_streambuf_wchar_ctor(&this->base);
3715 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3717 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3718 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3722 /* ??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 */
3723 /* ??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 */
3724 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3725 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3726 const basic_string_wchar *str, IOSB_openmode mode)
3728 basic_stringbuf_wchar_ctor_str(this, str, mode);
3729 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3733 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3734 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3735 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3736 basic_stringbuf_wchar *this, IOSB_openmode mode)
3738 TRACE("(%p %d)\n", this, mode);
3740 basic_streambuf_wchar_ctor(&this->base);
3741 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3743 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3747 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3748 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3749 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3750 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3751 basic_stringbuf_wchar *this, IOSB_openmode mode)
3753 basic_stringbuf_wchar_ctor_mode(this, mode);
3754 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3758 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3759 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3760 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3761 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3763 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3766 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3767 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3768 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3769 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3770 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3771 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3773 TRACE("(%p)\n", this);
3775 if(this->state & STRINGBUF_allocated) {
3776 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3777 this->seekhigh = NULL;
3778 this->state &= ~STRINGBUF_allocated;
3781 basic_streambuf_wchar__Init_empty(&this->base);
3784 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3785 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3786 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3787 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3788 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3789 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3791 TRACE("(%p)\n", this);
3793 basic_stringbuf_wchar__Tidy(this);
3794 basic_streambuf_wchar_dtor(&this->base);
3797 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3798 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3800 TRACE("(%p %x)\n", this, flags);
3803 /* we have an array, with the number of elements stored before the first object */
3804 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3806 for (i = *ptr - 1; i >= 0; i--)
3807 basic_stringbuf_wchar_dtor(this+i);
3809 MSVCRT_operator_delete(ptr);
3811 basic_stringbuf_wchar_dtor(this);
3814 MSVCRT_operator_delete(this);
3820 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3821 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3822 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3823 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3824 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3825 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3827 MSVCP_size_t oldsize, size;
3830 TRACE("(%p %x)\n", this, meta);
3834 if(this->state & STRINGBUF_no_write)
3837 ptr = basic_streambuf_wchar_pptr(&this->base);
3838 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3839 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3840 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3842 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3843 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3845 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3848 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3850 ERR("Out of memory\n");
3851 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3855 this->seekhigh = buf;
3856 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3857 if(this->state & STRINGBUF_no_read)
3858 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3860 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3862 this->state |= STRINGBUF_allocated;
3864 ptr = basic_streambuf_wchar_eback(&this->base);
3865 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3867 this->seekhigh = buf+(this->seekhigh-ptr);
3868 basic_streambuf_wchar_setp_next(&this->base, buf,
3869 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
3870 if(this->state & STRINGBUF_no_read)
3871 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3873 basic_streambuf_wchar_setg(&this->base, buf,
3874 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
3875 basic_streambuf_wchar_pptr(&this->base)+1);
3877 MSVCRT_operator_delete(ptr);
3880 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3883 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3884 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3885 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3886 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3887 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
3888 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
3892 TRACE("(%p %x)\n", this, c);
3894 cur = basic_streambuf_wchar_gptr(&this->base);
3895 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
3896 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3901 basic_streambuf_wchar_gbump(&this->base, -1);
3902 return c==WEOF ? !WEOF : c;
3905 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3906 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3907 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3908 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3909 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
3910 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
3914 TRACE("(%p)\n", this);
3916 cur = basic_streambuf_wchar_gptr(&this->base);
3917 if(!cur || this->state&STRINGBUF_no_read)
3920 ptr = basic_streambuf_wchar_pptr(&this->base);
3921 if(this->seekhigh < ptr)
3922 this->seekhigh = ptr;
3924 ptr = basic_streambuf_wchar_egptr(&this->base);
3925 if(this->seekhigh > ptr)
3926 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
3928 if(cur < this->seekhigh)
3933 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3934 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3935 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
3936 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
3937 fpos_int *ret, streamoff off, int way, int mode)
3939 wchar_t *beg, *cur_r, *cur_w;
3941 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3943 cur_w = basic_streambuf_wchar_pptr(&this->base);
3944 if(cur_w > this->seekhigh)
3945 this->seekhigh = cur_w;
3951 beg = basic_streambuf_wchar_eback(&this->base);
3952 cur_r = basic_streambuf_wchar_gptr(&this->base);
3953 if((mode & OPENMODE_in) && cur_r) {
3954 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3956 else if(way == SEEKDIR_end)
3957 off += this->seekhigh-beg;
3958 else if(way != SEEKDIR_beg)
3961 if(off<0 || off>this->seekhigh-beg) {
3964 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
3965 if((mode & OPENMODE_out) && cur_w) {
3966 basic_streambuf_wchar_setp_next(&this->base, beg,
3967 basic_streambuf_wchar_gptr(&this->base),
3968 basic_streambuf_wchar_epptr(&this->base));
3971 }else if((mode & OPENMODE_out) && cur_w) {
3972 if(way == SEEKDIR_cur)
3974 else if(way == SEEKDIR_end)
3975 off += this->seekhigh-beg;
3976 else if(way != SEEKDIR_beg)
3979 if(off<0 || off>this->seekhigh-beg)
3982 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
3991 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3992 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3993 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3994 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3995 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
3996 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
3997 fpos_int *ret, fpos_int pos, int mode)
3999 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4001 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
4006 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4009 /* ?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 */
4010 /* ?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 */
4011 /* ?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 */
4012 /* ?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 */
4013 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4014 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4016 TRACE("(%p %p)\n", this, str);
4018 basic_stringbuf_wchar__Tidy(this);
4019 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str), str->size, this->state);
4022 /* ?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 */
4023 /* ?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 */
4024 /* ?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 */
4025 /* ?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 */
4026 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4027 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4031 TRACE("(%p)\n", this);
4033 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4036 ptr = basic_streambuf_wchar_pbase(&this->base);
4037 pptr = basic_streambuf_wchar_pptr(&this->base);
4039 return basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4042 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4043 ptr = basic_streambuf_wchar_eback(&this->base);
4044 return basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4047 return basic_string_wchar_ctor(ret);
4050 /* ??0ios_base@std@@IAE@XZ */
4051 /* ??0ios_base@std@@IEAA@XZ */
4052 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4053 ios_base* __thiscall ios_base_ctor(ios_base *this)
4055 TRACE("(%p)\n", this);
4056 this->vtable = &MSVCP_ios_base_vtable;
4057 locale_ctor_uninitialized(&this->loc, 0);
4061 /* ??0ios_base@std@@QAE@ABV01@@Z */
4062 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4063 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4064 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4066 TRACE("(%p %p)\n", this, copy);
4068 this->vtable = &MSVCP_ios_base_vtable;
4072 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4073 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4074 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4075 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4077 IOS_BASE_fnarray *cur;
4079 TRACE("(%p %x)\n", this, event);
4081 for(cur=this->calls; cur; cur=cur->next)
4082 cur->event_handler(event, this, cur->index);
4085 /* ?_Tidy@ios_base@std@@AAAXXZ */
4086 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4087 void CDECL ios_base_Tidy(ios_base *this)
4089 IOS_BASE_iosarray *arr_cur, *arr_next;
4090 IOS_BASE_fnarray *event_cur, *event_next;
4092 TRACE("(%p)\n", this);
4094 ios_base_Callfns(this, EVENT_erase_event);
4096 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4097 arr_next = arr_cur->next;
4098 MSVCRT_operator_delete(arr_cur);
4102 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4103 event_next = event_cur->next;
4104 MSVCRT_operator_delete(event_cur);
4109 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4110 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4111 static void ios_base_Ios_base_dtor(ios_base *obj)
4113 TRACE("(%p)\n", obj);
4114 locale_dtor(&obj->loc);
4118 /* ??1ios_base@std@@UAE@XZ */
4119 /* ??1ios_base@std@@UEAA@XZ */
4120 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4121 void __thiscall ios_base_dtor(ios_base *this)
4123 ios_base_Ios_base_dtor(this);
4126 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4127 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4129 TRACE("(%p %x)\n", this, flags);
4131 /* we have an array, with the number of elements stored before the first object */
4132 INT_PTR i, *ptr = (INT_PTR *)this-1;
4134 for(i=*ptr-1; i>=0; i--)
4135 ios_base_dtor(this+i);
4136 MSVCRT_operator_delete(ptr);
4138 ios_base_dtor(this);
4140 MSVCRT_operator_delete(this);
4146 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4147 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4149 TRACE("(%p %x)\n", this, flags);
4151 INT_PTR *ptr = (INT_PTR *)this-1;
4152 MSVCRT_operator_delete(ptr);
4155 MSVCRT_operator_delete(this);
4161 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4162 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4163 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4164 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4166 IOS_BASE_iosarray *p;
4168 TRACE("(%p %d)\n", this, index);
4170 for(p=this->arr; p; p=p->next) {
4171 if(p->index == index)
4175 for(p=this->arr; p; p=p->next) {
4176 if(!p->long_val && !p->ptr_val) {
4182 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4183 p->next = this->arr;
4191 /* ?iword@ios_base@std@@QAEAAJH@Z */
4192 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4193 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4194 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4196 TRACE("(%p %d)\n", this, index);
4197 return &ios_base_Findarr(this, index)->long_val;
4200 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4201 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4202 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4203 void** __thiscall ios_base_pword(ios_base *this, int index)
4205 TRACE("(%p %d)\n", this, index);
4206 return &ios_base_Findarr(this, index)->ptr_val;
4209 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4210 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4211 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4212 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4214 IOS_BASE_fnarray *event;
4216 TRACE("(%p %p %d)\n", this, callback, index);
4218 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4219 event->next = this->calls;
4220 event->index = index;
4221 event->event_handler = callback;
4222 this->calls = event;
4225 /* ?clear@ios_base@std@@QAEXH_N@Z */
4226 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4227 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4228 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4230 TRACE("(%p %x %x)\n", this, state, reraise);
4232 this->state = state & IOSTATE_mask;
4233 if(!(this->state & this->except))
4237 throw_exception(EXCEPTION_RERAISE, NULL);
4238 else if(this->state & this->except & IOSTATE_eofbit)
4239 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4240 else if(this->state & this->except & IOSTATE_failbit)
4241 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4242 else if(this->state & this->except & IOSTATE_badbit)
4243 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4244 else if(this->state & this->except & IOSTATE__Hardfail)
4245 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4248 /* ?clear@ios_base@std@@QAEXH@Z */
4249 /* ?clear@ios_base@std@@QEAAXH@Z */
4250 static void ios_base_clear(ios_base *this, IOSB_iostate state)
4252 ios_base_clear_reraise(this, state, FALSE);
4255 /* ?exceptions@ios_base@std@@QAEXH@Z */
4256 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4257 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4258 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4260 TRACE("(%p %x)\n", this, state);
4261 this->except = state & IOSTATE_mask;
4262 ios_base_clear(this, this->state);
4265 /* ?exceptions@ios_base@std@@QBEHXZ */
4266 /* ?exceptions@ios_base@std@@QEBAHXZ */
4267 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4268 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4270 TRACE("(%p)\n", this);
4271 return this->except;
4274 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4275 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4276 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4277 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4279 TRACE("(%p %p)\n", this, rhs);
4282 IOS_BASE_iosarray *arr_cur;
4283 IOS_BASE_fnarray *event_cur;
4285 ios_base_Tidy(this);
4287 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4288 if(arr_cur->long_val)
4289 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4290 if(arr_cur->ptr_val)
4291 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4293 this->stdstr = rhs->stdstr;
4294 this->fmtfl = rhs->fmtfl;
4295 this->prec = rhs->prec;
4296 this->wide = rhs->wide;
4297 locale_operator_assign(&this->loc, &rhs->loc);
4299 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4300 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4302 ios_base_Callfns(this, EVENT_copyfmt_event);
4303 ios_base_exceptions_set(this, rhs->except);
4309 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4310 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4311 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4312 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4314 TRACE("(%p %p)\n", this, right);
4317 this->state = right->state;
4318 ios_base_copyfmt(this, right);
4324 /* ?fail@ios_base@std@@QBE_NXZ */
4325 /* ?fail@ios_base@std@@QEBA_NXZ */
4326 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4327 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4329 TRACE("(%p)\n", this);
4330 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4333 /* ??7ios_base@std@@QBE_NXZ */
4334 /* ??7ios_base@std@@QEBA_NXZ */
4335 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4336 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4338 TRACE("(%p)\n", this);
4339 return ios_base_fail(this);
4342 /* ??Bios_base@std@@QBEPAXXZ */
4343 /* ??Bios_base@std@@QEBAPEAXXZ */
4344 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4345 void* __thiscall ios_base_op_fail(const ios_base *this)
4347 TRACE("(%p)\n", this);
4348 return ios_base_fail(this) ? NULL : (void*)this;
4351 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4352 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4353 static void ios_base_Addstd(ios_base *add)
4355 FIXME("(%p) stub\n", add);
4358 /* ?_Init@ios_base@std@@IAEXXZ */
4359 /* ?_Init@ios_base@std@@IEAAXXZ */
4360 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4361 void __thiscall ios_base__Init(ios_base *this)
4363 TRACE("(%p)\n", this);
4366 this->state = this->except = IOSTATE_goodbit;
4367 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4372 locale_ctor(&this->loc);
4375 /* ?bad@ios_base@std@@QBE_NXZ */
4376 /* ?bad@ios_base@std@@QEBA_NXZ */
4377 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4378 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4380 TRACE("(%p)\n", this);
4381 return (this->state & IOSTATE_badbit) != 0;
4384 /* ?eof@ios_base@std@@QBE_NXZ */
4385 /* ?eof@ios_base@std@@QEBA_NXZ */
4386 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4387 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4389 TRACE("(%p)\n", this);
4390 return (this->state & IOSTATE_eofbit) != 0;
4393 /* ?flags@ios_base@std@@QAEHH@Z */
4394 /* ?flags@ios_base@std@@QEAAHH@Z */
4395 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4396 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4398 IOSB_fmtflags ret = this->fmtfl;
4400 TRACE("(%p %x)\n", this, flags);
4402 this->fmtfl = flags & FMTFLAG_mask;
4406 /* ?flags@ios_base@std@@QBEHXZ */
4407 /* ?flags@ios_base@std@@QEBAHXZ */
4408 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4409 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4411 TRACE("(%p)\n", this);
4415 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4416 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4417 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4418 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4420 TRACE("(%p)\n", this);
4421 return locale_copy_ctor(ret, &this->loc);
4424 /* ?good@ios_base@std@@QBE_NXZ */
4425 /* ?good@ios_base@std@@QEBA_NXZ */
4426 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4427 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4429 TRACE("(%p)\n", this);
4430 return this->state == IOSTATE_goodbit;
4433 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4434 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4435 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4436 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4438 TRACE("(%p %p)\n", this, loc);
4440 locale_copy_ctor(&this->loc, loc);
4444 /* ?precision@ios_base@std@@QAEHH@Z */
4445 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4446 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4447 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4449 streamsize ret = this->prec;
4451 TRACE("(%p %ld)\n", this, precision);
4453 this->prec = precision;
4457 /* ?precision@ios_base@std@@QBEHXZ */
4458 /* ?precision@ios_base@std@@QEBA_JXZ */
4459 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4460 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4462 TRACE("(%p)\n", this);
4466 /* ?rdstate@ios_base@std@@QBEHXZ */
4467 /* ?rdstate@ios_base@std@@QEBAHXZ */
4468 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4469 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4471 TRACE("(%p)\n", this);
4475 /* ?setf@ios_base@std@@QAEHHH@Z */
4476 /* ?setf@ios_base@std@@QEAAHHH@Z */
4477 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4478 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4480 IOSB_fmtflags ret = this->fmtfl;
4482 TRACE("(%p %x %x)\n", this, flags, mask);
4484 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4488 /* ?setf@ios_base@std@@QAEHH@Z */
4489 /* ?setf@ios_base@std@@QEAAHH@Z */
4490 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4491 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4493 return ios_base_setf_mask(this, flags, ~0);
4496 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4497 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4498 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4499 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4501 TRACE("(%p %x %x)\n", this, state, reraise);
4503 if(state != IOSTATE_goodbit)
4504 ios_base_clear_reraise(this, this->state | state, reraise);
4507 /* ?setstate@ios_base@std@@QAEXH@Z */
4508 /* ?setstate@ios_base@std@@QEAAXH@Z */
4509 static void ios_base_setstate(ios_base *this, IOSB_iostate state)
4511 ios_base_setstate_reraise(this, state, FALSE);
4514 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4515 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4520 TRACE("(%x)\n", sync);
4522 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4523 ret = ios_base_Sync;
4524 ios_base_Sync = sync;
4525 _Lockit_dtor(&lock);
4529 /* ?unsetf@ios_base@std@@QAEXH@Z */
4530 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4531 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4532 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4534 TRACE("(%p %x)\n", this, flags);
4535 this->fmtfl &= ~flags;
4538 /* ?width@ios_base@std@@QAEHH@Z */
4539 /* ?width@ios_base@std@@QEAA_J_J@Z */
4540 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4541 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4543 streamsize ret = this->wide;
4545 TRACE("(%p %ld)\n", this, width);
4551 /* ?width@ios_base@std@@QBEHXZ */
4552 /* ?width@ios_base@std@@QEBA_JXZ */
4553 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4554 streamsize __thiscall ios_base_width_get(ios_base *this)
4556 TRACE("(%p)\n", this);
4560 /* ?xalloc@ios_base@std@@SAHXZ */
4561 int CDECL ios_base_xalloc(void)
4568 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4569 ret = ios_base_Index++;
4570 _Lockit_dtor(&lock);
4574 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4575 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4576 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4577 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4579 TRACE("(%p)\n", this);
4581 ios_base_ctor(&this->base);
4582 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4586 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4587 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4588 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4589 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4591 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4592 ios_base__Init(&this->base);
4593 this->strbuf = streambuf;
4594 this->stream = NULL;
4598 ios_base_setstate(&this->base, IOSTATE_badbit);
4601 FIXME("standard streams not handled yet\n");
4604 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4605 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4606 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4607 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4609 TRACE("(%p %p)\n", this, strbuf);
4611 basic_ios_char_ctor(this);
4612 basic_ios_char_init(this, strbuf, FALSE);
4616 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4617 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4618 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4619 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4621 TRACE("(%p)\n", this);
4622 ios_base_dtor(&this->base);
4625 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4626 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4628 TRACE("(%p %x)\n", this, flags);
4630 /* we have an array, with the number of elements stored before the first object */
4631 INT_PTR i, *ptr = (INT_PTR *)this-1;
4633 for(i=*ptr-1; i>=0; i--)
4634 basic_ios_char_dtor(this+i);
4635 MSVCRT_operator_delete(ptr);
4637 basic_ios_char_dtor(this);
4639 MSVCRT_operator_delete(this);
4645 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4646 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4647 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4648 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4650 TRACE("(%p %x %x)\n", this, state, reraise);
4651 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4654 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4655 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4656 static void basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4658 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4661 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4662 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4663 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4664 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4666 TRACE("(%p %p)\n", this, copy);
4670 this->stream = copy->stream;
4671 this->fillch = copy->fillch;
4672 ios_base_copyfmt(&this->base, ©->base);
4676 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4677 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4678 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4679 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4681 char ret = this->fillch;
4683 TRACE("(%p %c)\n", this, fill);
4685 this->fillch = fill;
4689 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4690 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4691 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4692 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4694 TRACE("(%p)\n", this);
4695 return this->fillch;
4698 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4699 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4700 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4701 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4703 TRACE("(%p %p %p)\n", this, ret, loc);
4706 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
4710 return ios_base_imbue(&this->base, ret, loc);
4713 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4714 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4715 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
4716 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
4718 TRACE("(%p %c %c)\n", this, ch, def);
4719 return ctype_char_narrow_ch(ctype_char_use_facet(&this->strbuf->loc), ch, def);
4722 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4723 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4724 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
4725 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
4727 basic_streambuf_char *ret = this->strbuf;
4729 TRACE("(%p %p)\n", this, streambuf);
4731 this->strbuf = streambuf;
4732 basic_ios_char_clear(this, IOSTATE_goodbit);
4736 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4737 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4738 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
4739 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
4741 TRACE("(%p)\n", this);
4742 return this->strbuf;
4745 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4746 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4747 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
4748 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4750 TRACE("(%p %x %x)\n", this, state, reraise);
4752 if(state != IOSTATE_goodbit)
4753 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
4756 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4757 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4758 static void basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
4760 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4763 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4764 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4765 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
4766 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
4768 basic_ostream_char *ret = this->stream;
4770 TRACE("(%p %p)\n", this, ostream);
4772 this->stream = ostream;
4776 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4777 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4778 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
4779 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
4781 TRACE("(%p)\n", this);
4782 return this->stream;
4785 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4786 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4787 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
4788 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
4790 TRACE("(%p %c)\n", this, ch);
4791 return ctype_char_widen_ch(ctype_char_use_facet(&this->strbuf->loc), ch);
4795 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4796 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4797 static basic_ios_wchar* basic_ios_wchar_ctor(basic_ios_wchar *this)
4799 TRACE("(%p)\n", this);
4801 ios_base_ctor(&this->base);
4802 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
4806 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4807 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4808 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
4809 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
4811 basic_ios_wchar_ctor(this);
4812 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4816 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4817 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4818 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4819 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4820 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
4821 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
4823 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4824 ios_base__Init(&this->base);
4825 this->strbuf = streambuf;
4826 this->stream = NULL;
4830 ios_base_setstate(&this->base, IOSTATE_badbit);
4833 FIXME("standard streams not handled yet\n");
4836 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4837 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4838 static basic_ios_wchar* basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4840 TRACE("(%p %p)\n", this, strbuf);
4842 basic_ios_wchar_ctor(this);
4843 basic_ios_wchar_init(this, strbuf, FALSE);
4847 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4848 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4849 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
4850 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4852 basic_ios_wchar_ctor_streambuf(this, strbuf);
4853 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4857 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4858 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4859 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4860 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4861 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
4862 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
4864 TRACE("(%p)\n", this);
4865 ios_base_dtor(&this->base);
4868 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
4869 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
4871 TRACE("(%p %x)\n", this, flags);
4873 /* we have an array, with the number of elements stored before the first object */
4874 INT_PTR i, *ptr = (INT_PTR *)this-1;
4876 for(i=*ptr-1; i>=0; i--)
4877 basic_ios_wchar_dtor(this+i);
4878 MSVCRT_operator_delete(ptr);
4880 basic_ios_wchar_dtor(this);
4882 MSVCRT_operator_delete(this);
4888 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4889 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4890 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4891 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4892 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
4893 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
4895 TRACE("(%p %x %x)\n", this, state, reraise);
4896 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4899 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4900 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4901 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4902 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4903 static void basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
4905 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
4908 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
4909 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4910 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4911 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4912 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
4913 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
4915 TRACE("(%p %p)\n", this, copy);
4919 this->stream = copy->stream;
4920 this->fillch = copy->fillch;
4921 ios_base_copyfmt(&this->base, ©->base);
4925 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
4926 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
4927 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4928 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4929 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
4930 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
4932 wchar_t ret = this->fillch;
4934 TRACE("(%p %c)\n", this, fill);
4936 this->fillch = fill;
4940 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
4941 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
4942 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4943 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4944 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
4945 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
4947 TRACE("(%p)\n", this);
4948 return this->fillch;
4951 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4952 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4953 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4954 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4955 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
4956 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
4958 TRACE("(%p %p %p)\n", this, ret, loc);
4961 basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
4965 return ios_base_imbue(&this->base, ret, loc);
4968 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
4969 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
4970 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4971 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4972 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
4973 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
4975 TRACE("(%p %c %c)\n", this, ch, def);
4976 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch, def);
4979 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4980 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4981 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4982 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4983 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
4984 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
4986 basic_streambuf_wchar *ret = this->strbuf;
4988 TRACE("(%p %p)\n", this, streambuf);
4990 this->strbuf = streambuf;
4991 basic_ios_wchar_clear(this, IOSTATE_goodbit);
4995 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4996 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4997 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4998 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4999 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5000 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5002 TRACE("(%p)\n", this);
5003 return this->strbuf;
5006 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5007 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5008 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5009 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5010 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5011 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5013 TRACE("(%p %x %x)\n", this, state, reraise);
5015 if(state != IOSTATE_goodbit)
5016 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5019 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5020 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5021 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5022 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5023 static void basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5025 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5028 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5029 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5030 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5031 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5032 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5033 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5035 basic_ostream_wchar *ret = this->stream;
5037 TRACE("(%p %p)\n", this, ostream);
5039 this->stream = ostream;
5043 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5044 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5045 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5046 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5047 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5048 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5050 TRACE("(%p)\n", this);
5051 return this->stream;
5054 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5055 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5056 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5057 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5058 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5059 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5061 TRACE("(%p %c)\n", this, ch);
5062 return ctype_wchar_widen_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch);
5065 /* Caution: basic_ostream uses virtual inheritance.
5066 * All constructors have additional parameter that says if base class should be initialized.
5067 * Base class needs to be accessed using vbtable.
5069 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5071 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5074 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5076 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5079 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5081 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5084 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5085 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5086 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 20)
5087 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
5088 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool init, MSVCP_bool virt_init)
5090 basic_ios_char *base;
5092 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, init, virt_init);
5095 this->vbtable = basic_ostream_char_vbtable;
5096 base = basic_ostream_char_get_basic_ios(this);
5097 basic_ios_char_ctor(base);
5099 base = basic_ostream_char_get_basic_ios(this);
5102 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5104 basic_ios_char_init(base, strbuf, isstd);
5108 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5109 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5110 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 12)
5111 basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5112 int uninitialized, MSVCP_bool virt_init)
5114 basic_ios_char *base;
5116 TRACE("(%p %d)\n", this, uninitialized);
5119 this->vbtable = basic_ostream_char_vbtable;
5120 base = basic_ostream_char_get_basic_ios(this);
5121 basic_ios_char_ctor(base);
5123 base = basic_ostream_char_get_basic_ios(this);
5126 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5127 ios_base_Addstd(&base->base);
5131 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5132 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5133 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5134 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5136 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5138 /* don't destroy virtual base here */
5139 TRACE("(%p)\n", this);
5142 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5143 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5144 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5145 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5147 TRACE("(%p)\n", this);
5148 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5149 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5152 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5153 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5155 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5157 TRACE("(%p %x)\n", this, flags);
5160 /* we have an array, with the number of elements stored before the first object */
5161 INT_PTR i, *ptr = (INT_PTR *)this-1;
5163 for(i=*ptr-1; i>=0; i--)
5164 basic_ostream_char_vbase_dtor(this+i);
5165 MSVCRT_operator_delete(ptr);
5167 basic_ostream_char_vbase_dtor(this);
5169 MSVCRT_operator_delete(this);
5175 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5176 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5177 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5178 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5180 /* this function is not matching C++ specification */
5181 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5183 TRACE("(%p)\n", this);
5185 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5186 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5187 basic_ios_char_setstate(base, IOSTATE_badbit);
5191 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5192 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5193 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5195 return basic_ostream_char_flush(ostream);
5198 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5199 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5200 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5202 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5204 TRACE("(%p)\n", this);
5206 if(base->base.fmtfl & FMTFLAG_unitbuf)
5207 basic_ostream_char_flush(this);
5210 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5211 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5212 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5213 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5215 TRACE("(%p)\n", this);
5216 basic_ostream_char__Osfx(this);
5219 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5221 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5223 if(basic_ios_char_rdbuf_get(base))
5224 basic_streambuf_char__Lock(base->strbuf);
5226 if(ios_base_good(&base->base) && base->stream)
5227 basic_ostream_char_flush(base->stream);
5229 return ios_base_good(&base->base);
5232 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5234 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5236 if(ios_base_good(&base->base) && !__uncaught_exception())
5237 basic_ostream_char_osfx(ostr);
5239 if(basic_ios_char_rdbuf_get(base))
5240 basic_streambuf_char__Unlock(base->strbuf);
5243 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5244 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5245 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5246 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5248 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5250 TRACE("(%p)\n", this);
5252 if(ios_base_good(&base->base) && base->stream)
5253 basic_ostream_char_flush(base->stream);
5254 return ios_base_good(&base->base);
5257 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5258 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5259 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5260 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5262 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5264 TRACE("(%p %c)\n", this, ch);
5266 if(!basic_ostream_char_sentry_create(this)
5267 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5268 basic_ostream_char_sentry_destroy(this);
5269 basic_ios_char_setstate(base, IOSTATE_badbit);
5273 basic_ostream_char_sentry_destroy(this);
5277 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5278 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5279 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5280 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5282 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5284 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5286 if(!ios_base_fail(&base->base)) {
5289 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5290 &seek, pos, OPENMODE_out);
5291 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5292 basic_ios_char_setstate(base, IOSTATE_failbit);
5297 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5298 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5299 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5300 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5302 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5304 TRACE("(%p)\n", this);
5306 if(!ios_base_fail(&base->base)) {
5307 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5308 ret, 0, SEEKDIR_cur, OPENMODE_out);
5317 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5318 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5319 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5320 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5322 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5324 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5326 if(!basic_ostream_char_sentry_create(this)
5327 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5328 basic_ostream_char_sentry_destroy(this);
5329 basic_ios_char_setstate(base, IOSTATE_badbit);
5333 basic_ostream_char_sentry_destroy(this);
5337 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5338 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5339 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5340 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5342 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5343 int state = IOSTATE_goodbit;
5345 TRACE("(%p %d)\n", this, val);
5347 if(basic_ostream_char_sentry_create(this)) {
5348 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5349 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5350 ostreambuf_iterator_char dest = {0, strbuf};
5352 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5353 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5354 ? (LONG)((unsigned short)val) : (LONG)val);
5356 basic_ostream_char_sentry_destroy(this);
5358 basic_ios_char_setstate(base, state);
5362 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5363 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5364 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5365 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5367 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5368 int state = IOSTATE_goodbit;
5370 TRACE("(%p %u)\n", this, val);
5372 if(basic_ostream_char_sentry_create(this)) {
5373 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5374 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5375 ostreambuf_iterator_char dest = {0, strbuf};
5377 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5379 basic_ostream_char_sentry_destroy(this);
5381 basic_ios_char_setstate(base, state);
5385 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5386 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5387 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5388 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5389 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5390 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5392 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5393 int state = IOSTATE_goodbit;
5395 TRACE("(%p %d)\n", this, val);
5397 if(basic_ostream_char_sentry_create(this)) {
5398 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5399 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5400 ostreambuf_iterator_char dest = {0, strbuf};
5402 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5404 basic_ostream_char_sentry_destroy(this);
5406 basic_ios_char_setstate(base, state);
5410 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5411 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5412 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5413 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5414 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5415 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5417 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5418 int state = IOSTATE_goodbit;
5420 TRACE("(%p %u)\n", this, val);
5422 if(basic_ostream_char_sentry_create(this)) {
5423 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5424 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5425 ostreambuf_iterator_char dest = {0, strbuf};
5427 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5429 basic_ostream_char_sentry_destroy(this);
5431 basic_ios_char_setstate(base, state);
5435 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5436 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5437 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5438 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5440 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5441 int state = IOSTATE_goodbit;
5443 TRACE("(%p %f)\n", this, val);
5445 if(basic_ostream_char_sentry_create(this)) {
5446 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5447 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5448 ostreambuf_iterator_char dest = {0, strbuf};
5450 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5452 basic_ostream_char_sentry_destroy(this);
5454 basic_ios_char_setstate(base, state);
5458 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5459 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5460 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5461 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5463 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5464 int state = IOSTATE_goodbit;
5466 TRACE("(%p %lf)\n", this, val);
5468 if(basic_ostream_char_sentry_create(this)) {
5469 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5470 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5471 ostreambuf_iterator_char dest = {0, strbuf};
5473 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5475 basic_ostream_char_sentry_destroy(this);
5477 basic_ios_char_setstate(base, state);
5481 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5482 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5483 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5484 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5486 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5487 int state = IOSTATE_goodbit;
5489 TRACE("(%p %lf)\n", this, val);
5491 if(basic_ostream_char_sentry_create(this)) {
5492 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5493 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5494 ostreambuf_iterator_char dest = {0, strbuf};
5496 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5498 basic_ostream_char_sentry_destroy(this);
5500 basic_ios_char_setstate(base, state);
5504 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5505 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5506 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5507 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5509 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5510 IOSB_iostate state = IOSTATE_badbit;
5513 TRACE("(%p %p)\n", this, val);
5515 if(basic_ostream_char_sentry_create(this)) {
5516 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5517 c = basic_streambuf_char_snextc(val)) {
5518 state = IOSTATE_goodbit;
5520 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5521 state = IOSTATE_badbit;
5526 state = IOSTATE_badbit;
5528 basic_ostream_char_sentry_destroy(this);
5530 ios_base_width_set(&base->base, 0);
5531 basic_ios_char_setstate(base, state);
5535 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5536 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5537 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5538 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5540 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5541 int state = IOSTATE_goodbit;
5543 TRACE("(%p %p)\n", this, val);
5545 if(basic_ostream_char_sentry_create(this)) {
5546 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5547 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5548 ostreambuf_iterator_char dest = {0, strbuf};
5550 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5552 basic_ostream_char_sentry_destroy(this);
5554 basic_ios_char_setstate(base, state);
5558 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5559 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5560 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5561 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5563 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5564 int state = IOSTATE_goodbit;
5566 TRACE("(%p)\n", this);
5568 if(basic_ostream_char_sentry_create(this)) {
5569 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5570 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5571 ostreambuf_iterator_char dest = {0, strbuf};
5573 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5575 basic_ostream_char_sentry_destroy(this);
5577 basic_ios_char_setstate(base, state);
5581 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5582 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5583 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5584 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5586 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5587 int state = IOSTATE_goodbit;
5589 TRACE("(%p)\n", this);
5591 if(basic_ostream_char_sentry_create(this)) {
5592 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5593 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5594 ostreambuf_iterator_char dest = {0, strbuf};
5596 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5598 basic_ostream_char_sentry_destroy(this);
5600 basic_ios_char_setstate(base, state);
5604 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5605 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5606 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5607 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5609 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5610 int state = IOSTATE_goodbit;
5612 TRACE("(%p %x)\n", this, val);
5614 if(basic_ostream_char_sentry_create(this)) {
5615 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5616 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5617 ostreambuf_iterator_char dest = {0, strbuf};
5619 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5621 basic_ostream_char_sentry_destroy(this);
5623 basic_ios_char_setstate(base, state);
5627 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5628 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5629 basic_ostream_char* __cdecl basic_ostream_char_ends(basic_ostream_char *ostr)
5631 TRACE("(%p)\n", ostr);
5633 basic_ostream_char_put(ostr, 0);
5637 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5638 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5639 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5641 TRACE("(%p)\n", ostr);
5643 basic_ostream_char_put(ostr, '\n');
5644 basic_ostream_char_flush(ostr);
5648 /* $?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 */
5649 /* ??$?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 */
5650 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5652 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5653 IOSB_iostate state = IOSTATE_goodbit;
5655 TRACE("(%p %p)\n", ostr, str);
5657 if(basic_ostream_char_sentry_create(ostr)) {
5658 MSVCP_size_t len = basic_string_char_length(str);
5659 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5661 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5662 for(; pad!=0; pad--) {
5663 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5664 state = IOSTATE_badbit;
5670 if(state == IOSTATE_goodbit) {
5671 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5672 state = IOSTATE_badbit;
5675 if(state == IOSTATE_goodbit) {
5676 for(; pad!=0; pad--) {
5677 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5678 state = IOSTATE_badbit;
5684 base->base.wide = 0;
5686 state = IOSTATE_badbit;
5688 basic_ostream_char_sentry_destroy(ostr);
5690 basic_ios_char_setstate(base, state);
5694 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5695 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5696 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5697 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5698 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5699 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5700 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5702 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5703 IOSB_iostate state = IOSTATE_goodbit;
5705 TRACE("(%p %d)\n", ostr, ch);
5707 if(basic_ostream_char_sentry_create(ostr)) {
5708 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5710 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5711 for(; pad!=0; pad--) {
5712 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5713 state = IOSTATE_badbit;
5719 if(state == IOSTATE_goodbit) {
5720 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5721 state = IOSTATE_badbit;
5724 if(state == IOSTATE_goodbit) {
5725 for(; pad!=0; pad--) {
5726 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5727 state = IOSTATE_badbit;
5733 base->base.wide = 0;
5735 state = IOSTATE_badbit;
5737 basic_ostream_char_sentry_destroy(ostr);
5739 basic_ios_char_setstate(base, state);
5743 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5744 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5745 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5746 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5747 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5748 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5749 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5751 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5752 IOSB_iostate state = IOSTATE_goodbit;
5754 TRACE("(%p %s)\n", ostr, str);
5756 if(basic_ostream_char_sentry_create(ostr)) {
5757 MSVCP_size_t len = strlen(str);
5758 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5760 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5761 for(; pad!=0; pad--) {
5762 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5763 state = IOSTATE_badbit;
5769 if(state == IOSTATE_goodbit) {
5770 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5771 state = IOSTATE_badbit;
5774 if(state == IOSTATE_goodbit) {
5775 for(; pad!=0; pad--) {
5776 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5777 state = IOSTATE_badbit;
5783 base->base.wide = 0;
5785 state = IOSTATE_badbit;
5787 basic_ostream_char_sentry_destroy(ostr);
5789 basic_ios_char_setstate(base, state);
5793 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5794 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5795 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5796 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5797 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5799 TRACE("(%p %p)\n", this, pfunc);
5804 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5805 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5806 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5807 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5808 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5810 TRACE("(%p %p)\n", this, pfunc);
5811 pfunc(basic_ostream_char_get_basic_ios(this));
5815 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5816 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5817 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5818 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5819 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5821 TRACE("(%p %p)\n", this, pfunc);
5822 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5826 /* Caution: basic_ostream uses virtual inheritance. */
5827 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5829 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5832 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5834 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5837 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5839 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5842 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5843 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5844 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor, 20)
5845 basic_ostream_wchar* __thiscall basic_ostream_short_ctor(basic_ostream_wchar *this,
5846 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool init, MSVCP_bool virt_init)
5848 basic_ios_wchar *base;
5850 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, init, virt_init);
5853 this->vbtable = basic_ostream_wchar_vbtable;
5854 base = basic_ostream_wchar_get_basic_ios(this);
5855 basic_ios_wchar_ctor(base);
5857 base = basic_ostream_wchar_get_basic_ios(this);
5860 base->base.vtable = &MSVCP_basic_ostream_short_vtable;
5862 basic_ios_wchar_init(base, strbuf, isstd);
5866 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5867 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5868 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized, 12)
5869 basic_ostream_wchar* __thiscall basic_ostream_short_ctor_uninitialized(basic_ostream_wchar *this,
5870 int uninitialized, MSVCP_bool virt_init)
5872 basic_ios_wchar *base;
5874 TRACE("(%p %d)\n", this, uninitialized);
5877 this->vbtable = basic_ostream_wchar_vbtable;
5878 base = basic_ostream_wchar_get_basic_ios(this);
5879 basic_ios_wchar_ctor(base);
5881 base = basic_ostream_wchar_get_basic_ios(this);
5884 base->base.vtable = &MSVCP_basic_ostream_short_vtable;
5885 ios_base_Addstd(&base->base);
5889 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5890 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5891 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5892 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5893 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
5894 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
5896 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5898 /* don't destroy virtual base here */
5899 TRACE("(%p)\n", this);
5902 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5903 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5904 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5905 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5906 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
5907 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
5909 TRACE("(%p)\n", this);
5910 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5911 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5914 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
5915 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
5917 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5919 TRACE("(%p %x)\n", this, flags);
5922 /* we have an array, with the number of elements stored before the first object */
5923 INT_PTR i, *ptr = (INT_PTR *)this-1;
5925 for(i=*ptr-1; i>=0; i--)
5926 basic_ostream_wchar_vbase_dtor(this+i);
5927 MSVCRT_operator_delete(ptr);
5929 basic_ostream_wchar_vbase_dtor(this);
5931 MSVCRT_operator_delete(this);
5937 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
5938 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
5939 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
5940 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
5941 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
5942 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
5944 /* this function is not matching C++ specification */
5945 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5947 TRACE("(%p)\n", this);
5949 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
5950 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
5951 basic_ios_wchar_setstate(base, IOSTATE_badbit);
5955 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5956 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5957 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5958 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5959 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
5961 return basic_ostream_wchar_flush(ostream);
5964 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5965 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5966 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5967 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5968 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
5970 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5972 TRACE("(%p)\n", this);
5974 if(base->base.fmtfl & FMTFLAG_unitbuf)
5975 basic_ostream_wchar_flush(this);
5978 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5979 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5980 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5981 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5982 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
5983 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
5985 TRACE("(%p)\n", this);
5986 basic_ostream_wchar__Osfx(this);
5989 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
5991 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
5993 if(basic_ios_wchar_rdbuf_get(base))
5994 basic_streambuf_wchar__Lock(base->strbuf);
5996 if(ios_base_good(&base->base) && base->stream)
5997 basic_ostream_wchar_flush(base->stream);
5999 return ios_base_good(&base->base);
6002 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6004 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6006 if(ios_base_good(&base->base) && !__uncaught_exception())
6007 basic_ostream_wchar_osfx(ostr);
6009 if(basic_ios_wchar_rdbuf_get(base))
6010 basic_streambuf_wchar__Unlock(base->strbuf);
6013 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6014 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6015 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6016 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6017 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6018 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6020 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6022 TRACE("(%p)\n", this);
6024 if(ios_base_good(&base->base) && base->stream)
6025 basic_ostream_wchar_flush(base->stream);
6026 return ios_base_good(&base->base);
6029 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6030 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6031 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6032 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6033 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6034 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6036 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6038 TRACE("(%p %c)\n", this, ch);
6040 if(!basic_ostream_wchar_sentry_create(this)
6041 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6042 basic_ostream_wchar_sentry_destroy(this);
6043 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6047 basic_ostream_wchar_sentry_destroy(this);
6051 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6052 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6053 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6054 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6055 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6056 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6058 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6060 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6062 if(!ios_base_fail(&base->base)) {
6065 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6066 &seek, pos, OPENMODE_out);
6067 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6068 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6073 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6074 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6075 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6076 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6077 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6078 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6080 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6082 TRACE("(%p)\n", this);
6084 if(!ios_base_fail(&base->base)) {
6085 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6086 ret, 0, SEEKDIR_cur, OPENMODE_out);
6095 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6096 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6097 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6098 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6099 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6100 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6102 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6104 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6106 if(!basic_ostream_wchar_sentry_create(this)
6107 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6108 basic_ostream_wchar_sentry_destroy(this);
6109 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6113 basic_ostream_wchar_sentry_destroy(this);
6117 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6119 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6120 int state = IOSTATE_goodbit;
6122 TRACE("(%p %d)\n", this, val);
6124 if(basic_ostream_wchar_sentry_create(this)) {
6125 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6126 ostreambuf_iterator_wchar dest = {0, strbuf};
6128 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6129 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6130 ? (LONG)((unsigned short)val) : (LONG)val);
6132 basic_ostream_wchar_sentry_destroy(this);
6134 basic_ios_wchar_setstate(base, state);
6138 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6139 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6140 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6141 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6143 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6144 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6147 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6149 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6150 int state = IOSTATE_goodbit;
6152 TRACE("(%p %d)\n", this, val);
6154 if(basic_ostream_wchar_sentry_create(this)) {
6155 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6156 ostreambuf_iterator_wchar dest = {0, strbuf};
6158 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6160 basic_ostream_wchar_sentry_destroy(this);
6162 basic_ios_wchar_setstate(base, state);
6166 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6167 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6168 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6169 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6170 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6171 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6173 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6174 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6177 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6179 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6180 int state = IOSTATE_goodbit;
6182 TRACE("(%p %u)\n", this, val);
6184 if(basic_ostream_wchar_sentry_create(this)) {
6185 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6186 ostreambuf_iterator_wchar dest = {0, strbuf};
6188 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6190 basic_ostream_wchar_sentry_destroy(this);
6192 basic_ios_wchar_setstate(base, state);
6196 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6197 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6198 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6199 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6200 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6201 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6203 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6204 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6207 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6209 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6210 int state = IOSTATE_goodbit;
6212 TRACE("(%p %f)\n", this, val);
6214 if(basic_ostream_wchar_sentry_create(this)) {
6215 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6216 ostreambuf_iterator_wchar dest = {0, strbuf};
6218 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6220 basic_ostream_wchar_sentry_destroy(this);
6222 basic_ios_wchar_setstate(base, state);
6226 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6227 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6228 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6229 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6231 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6232 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6235 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6237 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6238 int state = IOSTATE_goodbit;
6240 TRACE("(%p %lf)\n", this, val);
6242 if(basic_ostream_wchar_sentry_create(this)) {
6243 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6244 ostreambuf_iterator_wchar dest = {0, strbuf};
6246 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6248 basic_ostream_wchar_sentry_destroy(this);
6250 basic_ios_wchar_setstate(base, state);
6254 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6255 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6256 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6257 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6259 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6260 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6263 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6265 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6266 int state = IOSTATE_goodbit;
6268 TRACE("(%p %lf)\n", this, val);
6270 if(basic_ostream_wchar_sentry_create(this)) {
6271 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6272 ostreambuf_iterator_wchar dest = {0, strbuf};
6274 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6276 basic_ostream_wchar_sentry_destroy(this);
6278 basic_ios_wchar_setstate(base, state);
6282 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6283 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6284 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6285 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6287 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6288 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6291 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6292 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6293 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6294 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6295 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6296 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6298 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6299 IOSB_iostate state = IOSTATE_badbit;
6300 unsigned short c = '\n';
6302 TRACE("(%p %p)\n", this, val);
6304 if(basic_ostream_wchar_sentry_create(this)) {
6305 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6306 c = basic_streambuf_wchar_snextc(val)) {
6307 state = IOSTATE_goodbit;
6309 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6310 state = IOSTATE_badbit;
6315 state = IOSTATE_badbit;
6317 basic_ostream_wchar_sentry_destroy(this);
6319 ios_base_width_set(&base->base, 0);
6320 basic_ios_wchar_setstate(base, state);
6324 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6326 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6327 int state = IOSTATE_goodbit;
6329 TRACE("(%p %p)\n", this, val);
6331 if(basic_ostream_wchar_sentry_create(this)) {
6332 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6333 ostreambuf_iterator_wchar dest = {0, strbuf};
6335 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6337 basic_ostream_wchar_sentry_destroy(this);
6339 basic_ios_wchar_setstate(base, state);
6343 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6344 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6345 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6346 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6348 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6349 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6352 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6354 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6355 int state = IOSTATE_goodbit;
6357 TRACE("(%p)\n", this);
6359 if(basic_ostream_wchar_sentry_create(this)) {
6360 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6361 ostreambuf_iterator_wchar dest = {0, strbuf};
6363 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6365 basic_ostream_wchar_sentry_destroy(this);
6367 basic_ios_wchar_setstate(base, state);
6371 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6372 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6373 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6374 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6376 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6377 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6380 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6382 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6383 int state = IOSTATE_goodbit;
6385 TRACE("(%p)\n", this);
6387 if(basic_ostream_wchar_sentry_create(this)) {
6388 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6389 ostreambuf_iterator_wchar dest = {0, strbuf};
6391 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6393 basic_ostream_wchar_sentry_destroy(this);
6395 basic_ios_wchar_setstate(base, state);
6399 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6400 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6401 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6402 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6404 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6405 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6408 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6410 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6411 int state = IOSTATE_goodbit;
6413 TRACE("(%p %x)\n", this, val);
6415 if(basic_ostream_wchar_sentry_create(this)) {
6416 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6417 ostreambuf_iterator_wchar dest = {0, strbuf};
6419 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6421 basic_ostream_wchar_sentry_destroy(this);
6423 basic_ios_wchar_setstate(base, state);
6427 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6428 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6429 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6430 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6432 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6433 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6436 /* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6437 /* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6438 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6439 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6440 basic_ostream_wchar* __cdecl basic_ostream_wchar_ends(basic_ostream_wchar *ostr)
6442 TRACE("(%p)\n", ostr);
6444 basic_ostream_wchar_put(ostr, 0);
6448 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6449 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6450 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6451 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6452 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6454 TRACE("(%p)\n", ostr);
6456 basic_ostream_wchar_put(ostr, '\n');
6457 basic_ostream_wchar_flush(ostr);
6461 /* ??$?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 */
6462 /* ??$?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 */
6463 /* ??$?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 */
6464 /* ??$?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 */
6465 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6467 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6468 IOSB_iostate state = IOSTATE_goodbit;
6470 TRACE("(%p %p)\n", ostr, str);
6472 if(basic_ostream_wchar_sentry_create(ostr)) {
6473 MSVCP_size_t len = basic_string_wchar_length(str);
6474 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6476 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6477 for(; pad!=0; pad--) {
6478 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6479 state = IOSTATE_badbit;
6485 if(state == IOSTATE_goodbit) {
6486 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6487 state = IOSTATE_badbit;
6490 if(state == IOSTATE_goodbit) {
6491 for(; pad!=0; pad--) {
6492 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6493 state = IOSTATE_badbit;
6499 base->base.wide = 0;
6501 state = IOSTATE_badbit;
6503 basic_ostream_wchar_sentry_destroy(ostr);
6505 basic_ios_wchar_setstate(base, state);
6509 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6510 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6511 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6512 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6513 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6515 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6516 IOSB_iostate state = IOSTATE_goodbit;
6518 TRACE("(%p %d)\n", ostr, ch);
6520 if(basic_ostream_wchar_sentry_create(ostr)) {
6521 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6523 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6524 for(; pad!=0; pad--) {
6525 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6526 state = IOSTATE_badbit;
6532 if(state == IOSTATE_goodbit) {
6533 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6534 state = IOSTATE_badbit;
6537 if(state == IOSTATE_goodbit) {
6538 for(; pad!=0; pad--) {
6539 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6540 state = IOSTATE_badbit;
6546 base->base.wide = 0;
6548 state = IOSTATE_badbit;
6550 basic_ostream_wchar_sentry_destroy(ostr);
6552 basic_ios_wchar_setstate(base, state);
6556 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6557 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6558 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6559 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6560 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6562 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6563 IOSB_iostate state = IOSTATE_goodbit;
6565 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6567 if(basic_ostream_wchar_sentry_create(ostr)) {
6568 MSVCP_size_t len = wcslen(str);
6569 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6571 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6572 for(; pad!=0; pad--) {
6573 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6574 state = IOSTATE_badbit;
6580 if(state == IOSTATE_goodbit) {
6581 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6582 state = IOSTATE_badbit;
6585 if(state == IOSTATE_goodbit) {
6586 for(; pad!=0; pad--) {
6587 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6588 state = IOSTATE_badbit;
6594 base->base.wide = 0;
6596 state = IOSTATE_badbit;
6598 basic_ostream_wchar_sentry_destroy(ostr);
6600 basic_ios_wchar_setstate(base, state);
6604 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6605 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6606 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6607 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6608 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6609 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6610 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6612 TRACE("(%p %p)\n", this, pfunc);
6617 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6618 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6619 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6620 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6621 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6622 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6623 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6625 TRACE("(%p %p)\n", this, pfunc);
6626 pfunc(basic_ostream_wchar_get_basic_ios(this));
6630 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6631 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6632 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6633 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6634 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6635 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6636 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6638 TRACE("(%p %p)\n", this, pfunc);
6639 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6643 /* Caution: basic_istream uses virtual inheritance. */
6644 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6646 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6649 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6651 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6654 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6656 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6659 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6660 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6661 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)
6663 basic_ios_char *base;
6665 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6668 this->vbtable = basic_istream_char_vbtable;
6669 base = basic_istream_char_get_basic_ios(this);
6670 basic_ios_char_ctor(base);
6672 base = basic_istream_char_get_basic_ios(this);
6675 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6678 basic_ios_char_init(base, strbuf, isstd);
6682 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6683 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6684 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6685 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6687 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6690 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6691 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6692 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6693 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6695 basic_ios_char *base;
6697 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6700 this->vbtable = basic_istream_char_vbtable;
6701 base = basic_istream_char_get_basic_ios(this);
6702 basic_ios_char_ctor(base);
6704 base = basic_istream_char_get_basic_ios(this);
6707 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6708 ios_base_Addstd(&base->base);
6712 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6713 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6714 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6715 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6717 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6719 /* don't destroy virtual base here */
6720 TRACE("(%p)\n", this);
6723 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6724 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6725 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6726 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6728 TRACE("(%p)\n", this);
6729 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6730 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6733 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6734 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6736 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6738 TRACE("(%p %x)\n", this, flags);
6741 /* we have an array, with the number of elements stored before the first object */
6742 INT_PTR i, *ptr = (INT_PTR *)this-1;
6744 for(i=*ptr-1; i>=0; i--)
6745 basic_istream_char_vbase_dtor(this+i);
6746 MSVCRT_operator_delete(ptr);
6748 basic_istream_char_vbase_dtor(this);
6750 MSVCRT_operator_delete(this);
6756 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6757 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6758 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6760 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6762 TRACE("(%p %d)\n", this, noskip);
6764 if(ios_base_good(&base->base)) {
6765 if(basic_ios_char_tie_get(base))
6766 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6768 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6769 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6770 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
6773 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6774 ch = basic_streambuf_char_snextc(strbuf)) {
6775 if(ch==EOF || !ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6781 if(!ios_base_good(&base->base)) {
6782 basic_ios_char_setstate(base, IOSTATE_failbit);
6789 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6790 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6791 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6792 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6794 return basic_istream_char__Ipfx(this, noskip);
6797 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6798 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6799 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6800 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6802 TRACE("(%p)\n", this);
6805 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6807 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6809 if(basic_ios_char_rdbuf_get(base))
6810 basic_streambuf_char__Lock(base->strbuf);
6812 return basic_istream_char_ipfx(istr, noskip);
6815 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6817 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6819 if(basic_ios_char_rdbuf_get(base))
6820 basic_streambuf_char__Unlock(base->strbuf);
6823 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6824 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6825 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6826 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6828 TRACE("(%p)\n", this);
6832 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6833 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6834 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6835 int __thiscall basic_istream_char_get(basic_istream_char *this)
6837 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6840 TRACE("(%p)\n", this);
6844 if(!basic_istream_char_sentry_create(this, TRUE)) {
6845 basic_istream_char_sentry_destroy(this);
6849 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6850 basic_istream_char_sentry_destroy(this);
6852 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6859 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6860 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6861 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6862 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6866 TRACE("(%p %p)\n", this, ch);
6868 ret = basic_istream_char_get(this);
6874 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6875 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6876 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
6877 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6879 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6882 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6886 if(basic_istream_char_sentry_create(this, TRUE)) {
6887 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6889 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
6890 ch = basic_streambuf_char_snextc(strbuf)) {
6891 if(ch==EOF || ch==delim)
6899 basic_istream_char_sentry_destroy(this);
6901 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6902 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6908 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6909 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6910 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
6911 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
6913 return basic_istream_char_get_str_delim(this, str, count, '\n');
6916 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6917 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6918 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
6919 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
6921 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6924 TRACE("(%p %p %c)\n", this, strbuf, delim);
6928 if(basic_istream_char_sentry_create(this, TRUE)) {
6929 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
6931 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
6932 ch = basic_streambuf_char_snextc(strbuf_read)) {
6933 if(ch==EOF || ch==delim)
6936 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
6941 basic_istream_char_sentry_destroy(this);
6943 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6944 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6948 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6949 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6950 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
6951 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
6953 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
6956 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6957 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6958 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
6959 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6961 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6962 int ch = (unsigned char)delim;
6964 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6968 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
6969 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6972 ch = basic_streambuf_char_sbumpc(strbuf);
6974 if(ch==EOF || ch==(unsigned char)delim)
6982 if(ch == (unsigned char)delim)
6984 else if(ch != EOF) {
6985 ch = basic_streambuf_char_sgetc(strbuf);
6987 if(ch == (unsigned char)delim) {
6988 basic_streambuf_char__Gninc(strbuf);
6993 basic_istream_char_sentry_destroy(this);
6995 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
6996 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7002 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7003 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7004 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7005 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7007 return basic_istream_char_getline_delim(this, str, count, '\n');
7010 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7011 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7012 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7013 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7015 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7016 int ch = (unsigned char)delim;
7019 TRACE("(%p %ld %d)\n", this, count, delim);
7023 if(basic_istream_char_sentry_create(this, TRUE)) {
7024 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7025 state = IOSTATE_goodbit;
7028 ch = basic_streambuf_char_sbumpc(strbuf);
7031 state = IOSTATE_eofbit;
7035 if(ch==(unsigned char)delim)
7039 if(count != INT_MAX)
7043 state = IOSTATE_failbit;
7044 basic_istream_char_sentry_destroy(this);
7046 basic_ios_char_setstate(base, state);
7050 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7051 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7052 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7054 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7057 TRACE("(%p)\n", istream);
7059 if(basic_istream_char_sentry_create(istream, TRUE)) {
7060 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7061 const ctype_char *ctype = ctype_char_use_facet(&strbuf->loc);
7063 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7064 ch = basic_streambuf_char_snextc(strbuf)) {
7069 basic_istream_char_sentry_destroy(istream);
7072 basic_ios_char_setstate(base, IOSTATE_eofbit);
7076 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7077 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7078 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7079 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7081 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7084 TRACE("(%p)\n", this);
7088 if(basic_istream_char_sentry_create(this, TRUE))
7089 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7090 basic_istream_char_sentry_destroy(this);
7093 basic_ios_char_setstate(base, IOSTATE_eofbit);
7098 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7099 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7100 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7102 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7103 IOSB_iostate state = IOSTATE_goodbit;
7105 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7107 if(basic_istream_char_sentry_create(this, TRUE)) {
7108 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7110 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7111 if(this->count != count)
7112 state |= IOSTATE_failbit | IOSTATE_eofbit;
7116 basic_istream_char_sentry_destroy(this);
7118 basic_ios_char_setstate(base, state);
7122 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7123 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7124 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7125 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7127 return basic_istream_char__Read_s(this, str, count, count);
7130 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7131 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7132 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7134 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7135 IOSB_iostate state = IOSTATE_goodbit;
7137 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7141 if(basic_istream_char_sentry_create(this, TRUE)) {
7142 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7147 state |= IOSTATE_eofbit;
7149 basic_istream_char__Read_s(this, str, size, avail);
7151 state |= IOSTATE_failbit;
7153 basic_istream_char_sentry_destroy(this);
7155 basic_ios_char_setstate(base, state);
7159 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7160 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7161 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7162 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7164 return basic_istream_char__Readsome_s(this, str, count, count);
7167 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7168 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7169 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7170 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7172 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7173 IOSB_iostate state = IOSTATE_goodbit;
7175 TRACE("(%p %c)\n", this, ch);
7179 if(basic_istream_char_sentry_create(this, TRUE)) {
7180 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7182 if(!ios_base_good(&base->base))
7183 state |= IOSTATE_failbit;
7184 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7185 state |= IOSTATE_badbit;
7187 basic_istream_char_sentry_destroy(this);
7189 basic_ios_char_setstate(base, state);
7193 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7194 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7195 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7196 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7198 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7199 IOSB_iostate state = IOSTATE_goodbit;
7201 TRACE("(%p)\n", this);
7205 if(basic_istream_char_sentry_create(this, TRUE)) {
7206 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7208 if(!ios_base_good(&base->base))
7209 state |= IOSTATE_failbit;
7210 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7211 state |= IOSTATE_badbit;
7213 basic_istream_char_sentry_destroy(this);
7215 basic_ios_char_setstate(base, state);
7219 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7220 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7221 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7222 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7224 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7225 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7227 TRACE("(%p)\n", this);
7232 if(basic_istream_char_sentry_create(this, TRUE)) {
7233 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7234 basic_istream_char_sentry_destroy(this);
7238 basic_istream_char_sentry_destroy(this);
7240 basic_ios_char_setstate(base, IOSTATE_badbit);
7244 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7245 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7246 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7247 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7249 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7251 TRACE("(%p %p)\n", this, ret);
7253 if(ios_base_fail(&base->base)) {
7260 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7261 ret, 0, SEEKDIR_cur, OPENMODE_in);
7263 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7264 basic_ios_char_setstate(base, IOSTATE_failbit);
7269 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7270 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7271 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7272 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7274 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7276 TRACE("(%p %ld %d)\n", this, off, dir);
7278 if(!ios_base_fail(&base->base)) {
7279 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7282 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7288 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7289 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7290 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7291 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7293 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7295 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7297 if(!ios_base_fail(&base->base)) {
7298 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7301 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7307 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7308 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7309 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7310 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7312 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7313 int state = IOSTATE_goodbit;
7315 TRACE("(%p %p)\n", this, v);
7317 if(basic_istream_char_sentry_create(this, FALSE)) {
7318 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7319 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7320 istreambuf_iterator_char first={0}, last={0};
7323 first.strbuf = strbuf;
7324 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7326 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7329 state |= IOSTATE_failbit;
7331 basic_istream_char_sentry_destroy(this);
7333 basic_ios_char_setstate(base, state);
7337 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7338 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7339 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7340 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7342 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7343 int state = IOSTATE_goodbit;
7345 TRACE("(%p %p)\n", this, v);
7347 if(basic_istream_char_sentry_create(this, FALSE)) {
7348 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7349 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7350 istreambuf_iterator_char first={0}, last={0};
7352 first.strbuf = strbuf;
7353 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7355 basic_istream_char_sentry_destroy(this);
7357 basic_ios_char_setstate(base, state);
7361 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7362 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7363 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7364 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7366 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7367 int state = IOSTATE_goodbit;
7369 TRACE("(%p %p)\n", this, v);
7371 if(basic_istream_char_sentry_create(this, FALSE)) {
7372 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7373 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7374 istreambuf_iterator_char first={0}, last={0};
7376 first.strbuf = strbuf;
7377 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7379 basic_istream_char_sentry_destroy(this);
7381 basic_ios_char_setstate(base, state);
7385 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7386 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7387 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7388 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7390 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7391 int state = IOSTATE_goodbit;
7393 TRACE("(%p %p)\n", this, v);
7395 if(basic_istream_char_sentry_create(this, FALSE)) {
7396 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7397 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7398 istreambuf_iterator_char first={0}, last={0};
7400 first.strbuf = strbuf;
7401 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7403 basic_istream_char_sentry_destroy(this);
7405 basic_ios_char_setstate(base, state);
7409 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7410 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7411 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7412 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7414 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7415 int state = IOSTATE_goodbit;
7417 TRACE("(%p %p)\n", this, v);
7419 if(basic_istream_char_sentry_create(this, FALSE)) {
7420 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7421 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7422 istreambuf_iterator_char first={0}, last={0};
7424 first.strbuf = strbuf;
7425 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7427 basic_istream_char_sentry_destroy(this);
7429 basic_ios_char_setstate(base, state);
7433 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7434 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7435 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7436 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7438 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7439 int state = IOSTATE_goodbit;
7441 TRACE("(%p %p)\n", this, v);
7443 if(basic_istream_char_sentry_create(this, FALSE)) {
7444 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7445 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7446 istreambuf_iterator_char first={0}, last={0};
7448 first.strbuf = strbuf;
7449 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7451 basic_istream_char_sentry_destroy(this);
7453 basic_ios_char_setstate(base, state);
7457 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7458 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7459 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7460 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7462 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7463 int state = IOSTATE_goodbit;
7465 TRACE("(%p %p)\n", this, v);
7467 if(basic_istream_char_sentry_create(this, FALSE)) {
7468 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7469 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7470 istreambuf_iterator_char first={0}, last={0};
7472 first.strbuf = strbuf;
7473 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7475 basic_istream_char_sentry_destroy(this);
7477 basic_ios_char_setstate(base, state);
7481 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7482 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7483 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7484 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7486 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7487 int state = IOSTATE_goodbit;
7489 TRACE("(%p %p)\n", this, v);
7491 if(basic_istream_char_sentry_create(this, FALSE)) {
7492 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7493 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7494 istreambuf_iterator_char first={0}, last={0};
7496 first.strbuf = strbuf;
7497 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7499 basic_istream_char_sentry_destroy(this);
7501 basic_ios_char_setstate(base, state);
7505 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7506 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7507 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7508 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7510 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7511 int state = IOSTATE_goodbit;
7513 TRACE("(%p %p)\n", this, v);
7515 if(basic_istream_char_sentry_create(this, FALSE)) {
7516 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7517 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7518 istreambuf_iterator_char first={0}, last={0};
7520 first.strbuf = strbuf;
7521 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7523 basic_istream_char_sentry_destroy(this);
7525 basic_ios_char_setstate(base, state);
7529 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7530 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7531 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7532 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7534 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7535 int state = IOSTATE_goodbit;
7537 TRACE("(%p %p)\n", this, v);
7539 if(basic_istream_char_sentry_create(this, FALSE)) {
7540 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7541 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7542 istreambuf_iterator_char first={0}, last={0};
7544 first.strbuf = strbuf;
7545 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7547 basic_istream_char_sentry_destroy(this);
7549 basic_ios_char_setstate(base, state);
7553 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7554 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7555 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7556 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7558 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7559 int state = IOSTATE_goodbit;
7561 TRACE("(%p %p)\n", this, v);
7563 if(basic_istream_char_sentry_create(this, FALSE)) {
7564 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7565 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7566 istreambuf_iterator_char first={0}, last={0};
7568 first.strbuf = strbuf;
7569 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7571 basic_istream_char_sentry_destroy(this);
7573 basic_ios_char_setstate(base, state);
7577 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7578 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7579 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7580 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7582 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7583 int state = IOSTATE_goodbit;
7585 TRACE("(%p %p)\n", this, v);
7587 if(basic_istream_char_sentry_create(this, FALSE)) {
7588 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7589 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7590 istreambuf_iterator_char first={0}, last={0};
7592 first.strbuf = strbuf;
7593 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7595 basic_istream_char_sentry_destroy(this);
7597 basic_ios_char_setstate(base, state);
7601 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7602 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7603 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7604 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7606 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7607 int state = IOSTATE_goodbit;
7609 TRACE("(%p %p)\n", this, v);
7611 if(basic_istream_char_sentry_create(this, FALSE)) {
7612 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7613 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7614 istreambuf_iterator_char first={0}, last={0};
7616 first.strbuf = strbuf;
7617 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7619 basic_istream_char_sentry_destroy(this);
7621 basic_ios_char_setstate(base, state);
7625 /* ??$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 */
7626 /* ??$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 */
7627 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7628 basic_istream_char *istream, basic_string_char *str, char delim)
7630 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7631 IOSB_iostate state = IOSTATE_goodbit;
7632 int c = (unsigned char)delim;
7634 TRACE("(%p %p %c)\n", istream, str, delim);
7636 basic_string_char_clear(str);
7637 if(basic_istream_char_sentry_create(istream, TRUE)) {
7638 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7640 c = basic_streambuf_char_sgetc(strbuf);
7641 for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
7642 basic_string_char_append_ch(str, c);
7643 if(c==EOF) state |= IOSTATE_eofbit;
7644 else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf);
7646 if(!basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit;
7648 basic_istream_char_sentry_destroy(istream);
7650 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
7654 /* ??$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 */
7655 /* ??$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 */
7656 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7657 basic_istream_char *istream, basic_string_char *str)
7659 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7662 /* ??$?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 */
7663 /* ??$?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 */
7664 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7665 basic_istream_char *istream, basic_string_char *str)
7667 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7668 IOSB_iostate state = IOSTATE_failbit;
7671 TRACE("(%p %p)\n", istream, str);
7673 if(basic_istream_char_sentry_create(istream, FALSE)) {
7674 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7675 MSVCP_size_t count = ios_base_width_get(&base->base);
7680 basic_string_char_clear(str);
7682 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7683 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7684 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7685 state = IOSTATE_goodbit;
7686 basic_string_char_append_ch(str, c);
7689 basic_istream_char_sentry_destroy(istream);
7691 ios_base_width_set(&base->base, 0);
7692 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7696 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7697 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7698 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7699 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7700 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7701 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7702 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7704 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7705 IOSB_iostate state = IOSTATE_failbit;
7708 TRACE("(%p %p)\n", istream, str);
7710 if(basic_istream_char_sentry_create(istream, FALSE)) {
7711 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7712 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7714 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7715 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7716 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7717 state = IOSTATE_goodbit;
7721 basic_istream_char_sentry_destroy(istream);
7724 ios_base_width_set(&base->base, 0);
7725 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7729 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7730 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7731 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7732 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7733 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7734 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7735 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7737 IOSB_iostate state = IOSTATE_failbit;
7740 TRACE("(%p %p)\n", istream, ch);
7742 if(basic_istream_char_sentry_create(istream, FALSE)) {
7743 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7744 basic_istream_char_get_basic_ios(istream)));
7746 state = IOSTATE_goodbit;
7750 basic_istream_char_sentry_destroy(istream);
7752 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7753 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7757 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7758 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7759 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7760 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7761 basic_istream_char *this, basic_streambuf_char *streambuf)
7763 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7764 IOSB_iostate state = IOSTATE_failbit;
7767 TRACE("(%p %p)\n", this, streambuf);
7769 if(basic_istream_char_sentry_create(this, FALSE)) {
7770 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7771 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7772 state = IOSTATE_goodbit;
7773 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7777 basic_istream_char_sentry_destroy(this);
7779 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7783 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7784 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7785 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7786 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7787 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7789 TRACE("(%p %p)\n", this, pfunc);
7794 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7795 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7796 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7797 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7798 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7800 TRACE("(%p %p)\n", this, pfunc);
7801 pfunc(basic_istream_char_get_basic_ios(this));
7805 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7806 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7807 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7808 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7809 ios_base* (__cdecl *pfunc)(ios_base*))
7811 TRACE("(%p %p)\n", this, pfunc);
7812 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7816 /* Caution: basic_istream uses virtual inheritance. */
7817 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7819 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7822 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7824 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7827 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7829 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7832 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7833 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7834 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7835 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7837 basic_ios_wchar *base;
7839 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7842 this->vbtable = basic_istream_wchar_vbtable;
7843 base = basic_istream_wchar_get_basic_ios(this);
7844 basic_ios_wchar_ctor(base);
7846 base = basic_istream_wchar_get_basic_ios(this);
7849 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7852 basic_ios_wchar_init(base, strbuf, isstd);
7856 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7857 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7858 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7859 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7861 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
7862 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7866 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7867 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7868 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
7869 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7871 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7874 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7875 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7876 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
7877 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
7878 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7880 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7883 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7884 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7885 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
7886 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7888 basic_ios_wchar *base;
7890 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7893 this->vbtable = basic_istream_wchar_vbtable;
7894 base = basic_istream_wchar_get_basic_ios(this);
7895 basic_ios_wchar_ctor(base);
7897 base = basic_istream_wchar_get_basic_ios(this);
7900 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7901 ios_base_Addstd(&base->base);
7905 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7906 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7907 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
7908 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
7909 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7911 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
7912 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7916 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7917 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7918 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7919 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7920 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
7921 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
7923 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7925 /* don't destroy virtual base here */
7926 TRACE("(%p)\n", this);
7929 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7930 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7931 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7932 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7933 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
7934 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
7936 TRACE("(%p)\n", this);
7937 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7938 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7941 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
7942 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
7944 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7946 TRACE("(%p %x)\n", this, flags);
7949 /* we have an array, with the number of elements stored before the first object */
7950 INT_PTR i, *ptr = (INT_PTR *)this-1;
7952 for(i=*ptr-1; i>=0; i--)
7953 basic_istream_wchar_vbase_dtor(this+i);
7954 MSVCRT_operator_delete(ptr);
7956 basic_istream_wchar_vbase_dtor(this);
7958 MSVCRT_operator_delete(this);
7964 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7965 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7966 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
7967 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
7968 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
7970 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
7972 TRACE("(%p %d)\n", this, noskip);
7974 if(ios_base_good(&base->base)) {
7975 if(basic_ios_wchar_tie_get(base))
7976 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
7978 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
7979 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
7980 const ctype_wchar *ctype = ctype_wchar_use_facet(&base->strbuf->loc);
7983 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
7984 ch = basic_streambuf_wchar_snextc(strbuf)) {
7985 if(ch==WEOF || !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
7991 if(!ios_base_good(&base->base)) {
7992 basic_ios_wchar_setstate(base, IOSTATE_failbit);
7998 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7999 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8000 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8001 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8002 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8003 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8005 return basic_istream_wchar__Ipfx(this, noskip);
8008 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8009 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8010 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8011 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8012 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8013 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8015 TRACE("(%p)\n", this);
8018 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8020 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8022 if(basic_ios_wchar_rdbuf_get(base))
8023 basic_streambuf_wchar__Lock(base->strbuf);
8025 return basic_istream_wchar_ipfx(istr, noskip);
8028 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8030 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8032 if(basic_ios_wchar_rdbuf_get(base))
8033 basic_streambuf_wchar__Unlock(base->strbuf);
8036 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8037 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8038 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8039 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8040 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8041 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8043 TRACE("(%p)\n", this);
8047 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8048 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8049 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8050 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8051 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8052 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8054 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8057 TRACE("(%p)\n", this);
8061 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8062 basic_istream_wchar_sentry_destroy(this);
8066 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8067 basic_istream_wchar_sentry_destroy(this);
8069 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8076 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8077 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8078 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8079 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8080 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8081 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8085 TRACE("(%p %p)\n", this, ch);
8087 ret = basic_istream_wchar_get(this);
8093 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8094 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8095 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8096 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8097 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8098 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8100 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8101 unsigned short ch = delim;
8103 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8107 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8108 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8110 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8111 ch = basic_streambuf_wchar_snextc(strbuf)) {
8112 if(ch==WEOF || ch==delim)
8120 basic_istream_wchar_sentry_destroy(this);
8122 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8123 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8129 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8130 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8131 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8132 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8133 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8134 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8136 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8139 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8140 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8141 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8142 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8143 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8144 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8146 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8147 unsigned short ch = delim;
8149 TRACE("(%p %p %c)\n", this, strbuf, delim);
8153 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8154 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8156 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8157 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8158 if(ch==WEOF || ch==delim)
8161 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8166 basic_istream_wchar_sentry_destroy(this);
8168 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8169 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8173 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8174 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8175 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8176 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8177 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8178 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8180 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8183 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8184 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8185 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8186 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8187 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8188 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8190 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8191 unsigned short ch = delim;
8193 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8197 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8198 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8201 ch = basic_streambuf_wchar_sbumpc(strbuf);
8203 if(ch==WEOF || ch==delim)
8213 else if(ch != WEOF) {
8214 ch = basic_streambuf_wchar_sgetc(strbuf);
8217 basic_streambuf_wchar__Gninc(strbuf);
8222 basic_istream_wchar_sentry_destroy(this);
8224 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8225 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8231 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8232 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8233 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8234 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8235 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8236 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8238 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8241 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8242 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8243 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8244 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8245 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8246 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8248 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8249 unsigned short ch = delim;
8252 TRACE("(%p %ld %d)\n", this, count, delim);
8256 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8257 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8258 state = IOSTATE_goodbit;
8261 ch = basic_streambuf_wchar_sbumpc(strbuf);
8264 state = IOSTATE_eofbit;
8272 if(count != INT_MAX)
8276 state = IOSTATE_failbit;
8277 basic_istream_wchar_sentry_destroy(this);
8279 basic_ios_wchar_setstate(base, state);
8283 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8284 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8285 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8286 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8287 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8289 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8290 unsigned short ch = '\n';
8292 TRACE("(%p)\n", istream);
8294 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8295 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8296 const ctype_wchar *ctype = ctype_wchar_use_facet(&strbuf->loc);
8298 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8299 ch = basic_streambuf_wchar_snextc(strbuf)) {
8304 basic_istream_wchar_sentry_destroy(istream);
8307 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8311 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8312 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8313 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8314 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8315 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8316 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8318 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8319 unsigned short ret = WEOF;
8321 TRACE("(%p)\n", this);
8325 if(basic_istream_wchar_sentry_create(this, TRUE))
8326 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8327 basic_istream_wchar_sentry_destroy(this);
8330 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8335 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8336 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8337 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8338 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8339 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8341 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8342 IOSB_iostate state = IOSTATE_goodbit;
8344 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8346 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8347 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8349 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8350 if(this->count != count)
8351 state |= IOSTATE_failbit | IOSTATE_eofbit;
8355 basic_istream_wchar_sentry_destroy(this);
8357 basic_ios_wchar_setstate(base, state);
8361 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8362 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8363 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8364 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8365 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8366 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8368 return basic_istream_wchar__Read_s(this, str, count, count);
8371 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8372 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8373 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8374 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8375 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8377 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8378 IOSB_iostate state = IOSTATE_goodbit;
8380 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8384 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8385 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8390 state |= IOSTATE_eofbit;
8392 basic_istream_wchar__Read_s(this, str, size, avail);
8394 state |= IOSTATE_failbit;
8396 basic_istream_wchar_sentry_destroy(this);
8398 basic_ios_wchar_setstate(base, state);
8402 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8403 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8404 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8405 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8406 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8407 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8409 return basic_istream_wchar__Readsome_s(this, str, count, count);
8412 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8413 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8414 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8415 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8416 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8417 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8419 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8420 IOSB_iostate state = IOSTATE_goodbit;
8422 TRACE("(%p %c)\n", this, ch);
8426 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8427 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8429 if(!ios_base_good(&base->base))
8430 state |= IOSTATE_failbit;
8431 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8432 state |= IOSTATE_badbit;
8434 basic_istream_wchar_sentry_destroy(this);
8436 basic_ios_wchar_setstate(base, state);
8440 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8441 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8442 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8443 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8444 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8445 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8447 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8448 IOSB_iostate state = IOSTATE_goodbit;
8450 TRACE("(%p)\n", this);
8454 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8455 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8457 if(!ios_base_good(&base->base))
8458 state |= IOSTATE_failbit;
8459 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8460 state |= IOSTATE_badbit;
8462 basic_istream_wchar_sentry_destroy(this);
8464 basic_ios_wchar_setstate(base, state);
8468 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8469 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8470 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8471 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8472 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8473 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8475 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8476 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8478 TRACE("(%p)\n", this);
8483 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8484 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8485 basic_istream_wchar_sentry_destroy(this);
8489 basic_istream_wchar_sentry_destroy(this);
8491 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8495 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8496 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8497 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8498 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8499 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8500 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8502 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8504 TRACE("(%p %p)\n", this, ret);
8506 if(ios_base_fail(&base->base)) {
8513 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8514 ret, 0, SEEKDIR_cur, OPENMODE_in);
8515 if(ret->off==-1 && ret->pos==0 && ret->state==0)
8516 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8521 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8522 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8523 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
8524 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8526 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8528 TRACE("(%p %ld %d)\n", this, off, dir);
8530 if(!ios_base_fail(&base->base)) {
8531 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8534 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8540 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8541 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8542 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8543 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8544 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8545 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8547 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8549 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8551 if(!ios_base_fail(&base->base)) {
8552 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8555 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8561 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8563 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8564 int state = IOSTATE_goodbit;
8566 TRACE("(%p %p)\n", this, v);
8568 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8569 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8570 istreambuf_iterator_wchar first={0}, last={0};
8573 first.strbuf = strbuf;
8574 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8576 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8579 state |= IOSTATE_failbit;
8581 basic_istream_wchar_sentry_destroy(this);
8583 basic_ios_wchar_setstate(base, state);
8587 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8588 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8589 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8590 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8592 return basic_istream_read_short(this, v, num_get_short_use_facet(
8593 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8596 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8598 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8599 int state = IOSTATE_goodbit;
8601 TRACE("(%p %p)\n", this, v);
8603 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8604 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8605 istreambuf_iterator_wchar first={0}, last={0};
8607 first.strbuf = strbuf;
8608 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8610 basic_istream_wchar_sentry_destroy(this);
8612 basic_ios_wchar_setstate(base, state);
8616 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8617 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8618 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8619 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8621 return basic_istream_read_int(this, v, num_get_short_use_facet(
8622 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8625 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8627 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8628 int state = IOSTATE_goodbit;
8630 TRACE("(%p %p)\n", this, v);
8632 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8633 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8634 istreambuf_iterator_wchar first={0}, last={0};
8636 first.strbuf = strbuf;
8637 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8639 basic_istream_wchar_sentry_destroy(this);
8641 basic_ios_wchar_setstate(base, state);
8645 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8646 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8647 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8648 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8650 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8651 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8654 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8656 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8657 int state = IOSTATE_goodbit;
8659 TRACE("(%p %p)\n", this, v);
8661 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8662 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8663 istreambuf_iterator_wchar first={0}, last={0};
8665 first.strbuf = strbuf;
8666 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8668 basic_istream_wchar_sentry_destroy(this);
8670 basic_ios_wchar_setstate(base, state);
8674 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8675 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8676 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8677 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8679 return basic_istream_read_long(this, v, num_get_short_use_facet(
8680 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8683 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8685 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8686 int state = IOSTATE_goodbit;
8688 TRACE("(%p %p)\n", this, v);
8690 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8691 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8692 istreambuf_iterator_wchar first={0}, last={0};
8694 first.strbuf = strbuf;
8695 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8697 basic_istream_wchar_sentry_destroy(this);
8699 basic_ios_wchar_setstate(base, state);
8703 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8704 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8705 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8706 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8708 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8709 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8712 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8714 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8715 int state = IOSTATE_goodbit;
8717 TRACE("(%p %p)\n", this, v);
8719 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8720 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8721 istreambuf_iterator_wchar first={0}, last={0};
8723 first.strbuf = strbuf;
8724 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8726 basic_istream_wchar_sentry_destroy(this);
8728 basic_ios_wchar_setstate(base, state);
8732 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8733 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8734 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8735 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8737 return basic_istream_read_float(this, v, num_get_short_use_facet(
8738 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8741 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8743 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8744 int state = IOSTATE_goodbit;
8746 TRACE("(%p %p)\n", this, v);
8748 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8749 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8750 istreambuf_iterator_wchar first={0}, last={0};
8752 first.strbuf = strbuf;
8753 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8755 basic_istream_wchar_sentry_destroy(this);
8757 basic_ios_wchar_setstate(base, state);
8761 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8762 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8763 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8764 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8766 return basic_istream_read_double(this, v, num_get_short_use_facet(
8767 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8770 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8772 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8773 int state = IOSTATE_goodbit;
8775 TRACE("(%p %p)\n", this, v);
8777 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8778 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8779 istreambuf_iterator_wchar first={0}, last={0};
8781 first.strbuf = strbuf;
8782 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8784 basic_istream_wchar_sentry_destroy(this);
8786 basic_ios_wchar_setstate(base, state);
8790 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8791 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8792 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8793 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8795 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8796 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8799 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8801 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8802 int state = IOSTATE_goodbit;
8804 TRACE("(%p %p)\n", this, v);
8806 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8807 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8808 istreambuf_iterator_wchar first={0}, last={0};
8810 first.strbuf = strbuf;
8811 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8813 basic_istream_wchar_sentry_destroy(this);
8815 basic_ios_wchar_setstate(base, state);
8819 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8820 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8821 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8822 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8824 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8825 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8828 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8830 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8831 int state = IOSTATE_goodbit;
8833 TRACE("(%p %p)\n", this, v);
8835 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8836 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8837 istreambuf_iterator_wchar first={0}, last={0};
8839 first.strbuf = strbuf;
8840 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
8842 basic_istream_wchar_sentry_destroy(this);
8844 basic_ios_wchar_setstate(base, state);
8848 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8849 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8850 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
8851 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
8853 return basic_istream_read_int64(this, v, num_get_short_use_facet(
8854 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8857 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
8859 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8860 int state = IOSTATE_goodbit;
8862 TRACE("(%p %p)\n", this, v);
8864 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8865 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8866 istreambuf_iterator_wchar first={0}, last={0};
8868 first.strbuf = strbuf;
8869 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
8871 basic_istream_wchar_sentry_destroy(this);
8873 basic_ios_wchar_setstate(base, state);
8877 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8878 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8879 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
8880 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
8882 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
8883 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8886 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
8888 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8889 int state = IOSTATE_goodbit;
8891 TRACE("(%p %p)\n", this, v);
8893 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8894 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8895 istreambuf_iterator_wchar first={0}, last={0};
8897 first.strbuf = strbuf;
8898 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
8900 basic_istream_wchar_sentry_destroy(this);
8902 basic_ios_wchar_setstate(base, state);
8906 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8907 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8908 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
8909 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
8911 return basic_istream_read_bool(this, v, num_get_short_use_facet(
8912 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8915 /* ??$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 */
8916 /* ??$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 */
8917 /* ??$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 */
8918 /* ??$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 */
8919 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
8920 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
8922 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8923 IOSB_iostate state = IOSTATE_goodbit;
8926 TRACE("(%p %p %c)\n", istream, str, delim);
8928 basic_string_wchar_clear(str);
8929 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8930 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8932 c = basic_streambuf_wchar_sgetc(strbuf);
8933 for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
8934 basic_string_wchar_append_ch(str, c);
8935 if(c==delim) basic_streambuf_wchar_sbumpc(strbuf);
8936 else if(c==WEOF) state |= IOSTATE_eofbit;
8938 if(!basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit;
8940 basic_istream_wchar_sentry_destroy(istream);
8942 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state);
8946 /* ??$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 */
8947 /* ??$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 */
8948 /* ??$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 */
8949 /* ??$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 */
8950 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
8951 basic_istream_wchar *istream, basic_string_wchar *str)
8953 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
8956 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
8957 basic_string_wchar *str, const ctype_wchar *ctype)
8959 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8960 IOSB_iostate state = IOSTATE_failbit;
8963 TRACE("(%p %p)\n", istream, str);
8965 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
8966 MSVCP_size_t count = ios_base_width_get(&base->base);
8971 basic_string_wchar_clear(str);
8973 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8974 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8975 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
8976 state = IOSTATE_goodbit;
8977 basic_string_wchar_append_ch(str, c);
8980 basic_istream_wchar_sentry_destroy(istream);
8982 ios_base_width_set(&base->base, 0);
8983 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8987 /* ??$?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 */
8988 /* ??$?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 */
8989 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
8990 basic_istream_wchar *istream, basic_string_wchar *str)
8992 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
8993 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
8996 /* ??$?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 */
8997 /* ??$?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 */
8998 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
8999 basic_istream_wchar *istream, basic_string_wchar *str)
9001 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9002 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9005 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9007 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9008 IOSB_iostate state = IOSTATE_failbit;
9009 unsigned short c = '\n';
9011 TRACE("(%p %p)\n", istream, str);
9013 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9014 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9016 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9017 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9018 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9019 state = IOSTATE_goodbit;
9023 basic_istream_wchar_sentry_destroy(istream);
9026 ios_base_width_set(&base->base, 0);
9027 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9031 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9032 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9033 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9035 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9036 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9039 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9040 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9041 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9042 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9043 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9045 IOSB_iostate state = IOSTATE_failbit;
9046 unsigned short c = 0;
9048 TRACE("(%p %p)\n", istream, ch);
9050 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9051 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9052 basic_istream_wchar_get_basic_ios(istream)));
9054 state = IOSTATE_goodbit;
9058 basic_istream_wchar_sentry_destroy(istream);
9060 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9061 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9065 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9066 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9067 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9068 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9069 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9070 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9071 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9073 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9074 IOSB_iostate state = IOSTATE_failbit;
9075 unsigned short c = '\n';
9077 TRACE("(%p %p)\n", this, streambuf);
9079 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9080 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9081 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9082 state = IOSTATE_goodbit;
9083 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9087 basic_istream_wchar_sentry_destroy(this);
9089 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9093 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9094 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9095 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9096 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9097 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9098 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9099 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9101 TRACE("(%p %p)\n", this, pfunc);
9106 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9107 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9108 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9109 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9110 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9111 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9112 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9114 TRACE("(%p %p)\n", this, pfunc);
9115 pfunc(basic_istream_wchar_get_basic_ios(this));
9119 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9120 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9121 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9122 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9123 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9124 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9125 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9127 TRACE("(%p %p)\n", this, pfunc);
9128 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9132 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9134 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9137 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9139 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9142 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9143 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9144 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9145 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9147 basic_ios_char *basic_ios;
9149 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9152 this->base1.vbtable = basic_iostream_char_vbtable1;
9153 this->base2.vbtable = basic_iostream_char_vbtable2;
9154 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9155 basic_ios_char_ctor(basic_ios);
9157 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9160 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9162 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9163 basic_ostream_char_ctor(&this->base2, NULL, FALSE, FALSE, FALSE);
9167 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9168 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9169 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9170 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9172 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9174 TRACE("(%p)\n", this);
9175 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9176 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9179 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9180 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9181 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9182 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9184 TRACE("(%p)\n", this);
9185 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9186 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9189 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9190 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9192 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9194 TRACE("(%p %x)\n", this, flags);
9197 /* we have an array, with the number of elements stored before the first object */
9198 INT_PTR i, *ptr = (INT_PTR *)this-1;
9200 for(i=*ptr-1; i>=0; i--)
9201 basic_iostream_char_vbase_dtor(this+i);
9202 MSVCRT_operator_delete(ptr);
9204 basic_iostream_char_vbase_dtor(this);
9206 MSVCRT_operator_delete(this);
9212 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9214 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9217 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9219 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9222 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9223 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9224 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9225 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9227 basic_ios_wchar *basic_ios;
9229 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9232 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9233 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9234 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9235 basic_ios_wchar_ctor(basic_ios);
9237 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9240 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9241 basic_ostream_short_ctor(&this->base2, NULL, FALSE, FALSE, FALSE);
9243 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9247 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9248 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9249 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9250 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9251 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9253 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9254 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9258 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9259 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9260 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9261 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9262 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9263 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9265 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9267 TRACE("(%p)\n", this);
9268 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9269 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9272 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9273 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9274 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9275 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9276 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9277 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9279 TRACE("(%p)\n", this);
9280 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9281 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9284 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9285 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9287 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9289 TRACE("(%p %x)\n", this, flags);
9292 /* we have an array, with the number of elements stored before the first object */
9293 INT_PTR i, *ptr = (INT_PTR *)this-1;
9295 for(i=*ptr-1; i>=0; i--)
9296 basic_iostream_wchar_vbase_dtor(this+i);
9297 MSVCRT_operator_delete(ptr);
9299 basic_iostream_wchar_vbase_dtor(this);
9301 MSVCRT_operator_delete(this);
9307 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9309 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9312 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9314 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9317 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9318 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9319 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9320 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9322 basic_ios_char *basic_ios;
9324 TRACE("(%p %d)\n", this, virt_init);
9327 this->base.vbtable = basic_ofstream_char_vbtable;
9328 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9329 basic_ios_char_ctor(basic_ios);
9331 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9334 basic_filebuf_char_ctor(&this->filebuf);
9335 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9336 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9340 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9341 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9342 static basic_ofstream_char* basic_ofstream_char_ctor_file(
9343 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9345 basic_ios_char *basic_ios;
9347 TRACE("(%p %p %d)\n", this, file, virt_init);
9350 this->base.vbtable = basic_ofstream_char_vbtable;
9351 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9352 basic_ios_char_ctor(basic_ios);
9354 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9357 basic_filebuf_char_ctor_file(&this->filebuf, file);
9358 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9359 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9363 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9364 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9365 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor, 12)
9366 basic_ofstream_char* __thiscall basic_ofstream_char_copy_ctor(basic_ofstream_char *this,
9367 basic_ofstream_char *copy, MSVCP_bool virt_init)
9369 TRACE("(%p %p %d)\n", this, copy, virt_init);
9370 return basic_ofstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9373 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9374 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9375 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 16)
9376 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9377 const char *name, int mode, MSVCP_bool virt_init)
9379 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9381 basic_ofstream_char_ctor(this, virt_init);
9383 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9384 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9385 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9390 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9391 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9392 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9393 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9395 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9397 TRACE("(%p)\n", this);
9399 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9400 basic_filebuf_char_dtor(&this->filebuf);
9403 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9404 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9405 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9406 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9408 TRACE("(%p)\n", this);
9410 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9411 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9414 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9415 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9417 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9419 TRACE("(%p %x)\n", this, flags);
9422 /* we have an array, with the number of elements stored before the first object */
9423 INT_PTR i, *ptr = (INT_PTR *)this-1;
9425 for(i=*ptr-1; i>=0; i--)
9426 basic_ofstream_char_vbase_dtor(this+i);
9427 MSVCRT_operator_delete(ptr);
9429 basic_ofstream_char_vbase_dtor(this);
9431 MSVCRT_operator_delete(this);
9437 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9438 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9439 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9440 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9442 TRACE("(%p)\n", this);
9444 if(!basic_filebuf_char_close(&this->filebuf)) {
9445 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9446 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9450 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9451 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9452 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9453 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9455 TRACE("(%p)\n", this);
9456 return basic_filebuf_char_is_open(&this->filebuf);
9459 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9460 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9461 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9462 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9463 const char *name, int mode)
9465 TRACE("(%p %s %d)\n", this, name, mode);
9467 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9468 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9469 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9473 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9474 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9475 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9476 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9477 const char *name, short mode)
9479 basic_ofstream_char_open(this, name, mode);
9482 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9483 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9484 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9485 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9487 TRACE("(%p)\n", this);
9488 return (basic_filebuf_char*)&this->filebuf;
9491 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9493 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9496 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9498 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9501 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9502 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9503 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9505 basic_ios_wchar *basic_ios;
9507 TRACE("(%p %d)\n", this, virt_init);
9510 this->base.vbtable = basic_ofstream_wchar_vbtable;
9511 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9512 basic_ios_wchar_ctor(basic_ios);
9514 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9517 basic_filebuf_wchar_ctor(&this->filebuf);
9518 basic_ostream_short_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9519 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9523 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9524 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9525 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9526 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9528 basic_ofstream_wchar_ctor(this, virt_init);
9529 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9533 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9534 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9535 static basic_ofstream_wchar* basic_ofstream_wchar_ctor_file(
9536 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9538 basic_ios_wchar *basic_ios;
9540 TRACE("(%p %p %d)\n", this, file, virt_init);
9543 this->base.vbtable = basic_ofstream_wchar_vbtable;
9544 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9545 basic_ios_wchar_ctor(basic_ios);
9547 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9550 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9551 basic_ostream_short_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9552 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9556 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9557 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9558 static basic_ofstream_wchar* basic_ofstream_short_ctor_file(
9559 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9561 basic_ofstream_wchar_ctor_file(this, file, virt_init);
9562 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9566 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9567 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9568 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor, 12)
9569 basic_ofstream_wchar* __thiscall basic_ofstream_short_copy_ctor(basic_ofstream_wchar *this,
9570 basic_ofstream_wchar *copy, MSVCP_bool virt_init)
9572 TRACE("(%p %p %d)\n", this, copy, virt_init);
9573 return basic_ofstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9576 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9577 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9578 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 16)
9579 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
9580 const char *name, int mode, MSVCP_bool virt_init)
9582 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9584 basic_ofstream_short_ctor(this, virt_init);
9586 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9587 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9588 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9593 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9594 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9595 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9596 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9597 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9598 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9600 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9602 TRACE("(%p)\n", this);
9604 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9605 basic_filebuf_wchar_dtor(&this->filebuf);
9608 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9609 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9610 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9611 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9612 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9613 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9615 TRACE("(%p)\n", this);
9617 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9618 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9621 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9622 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9624 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9626 TRACE("(%p %x)\n", this, flags);
9629 /* we have an array, with the number of elements stored before the first object */
9630 INT_PTR i, *ptr = (INT_PTR *)this-1;
9632 for(i=*ptr-1; i>=0; i--)
9633 basic_ofstream_wchar_vbase_dtor(this+i);
9634 MSVCRT_operator_delete(ptr);
9636 basic_ofstream_wchar_vbase_dtor(this);
9638 MSVCRT_operator_delete(this);
9644 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9645 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9646 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9647 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9648 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9649 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9651 TRACE("(%p)\n", this);
9653 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9654 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9655 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9659 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9660 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9661 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9662 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9663 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9664 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9666 TRACE("(%p)\n", this);
9667 return basic_filebuf_wchar_is_open(&this->filebuf);
9670 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9671 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9672 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9673 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9674 const char *name, int mode)
9676 TRACE("(%p %s %d)\n", this, name, mode);
9678 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9679 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9680 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9684 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9685 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9686 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9687 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9688 const char *name, int mode)
9690 basic_ofstream_wchar_open(this, name, mode);
9693 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9694 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9695 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9696 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9697 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9698 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9700 TRACE("(%p)\n", this);
9701 return (basic_filebuf_wchar*)&this->filebuf;
9704 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9706 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9709 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9711 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9714 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9715 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9716 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9717 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9719 basic_ios_char *basic_ios;
9721 TRACE("(%p %d)\n", this, virt_init);
9724 this->base.vbtable = basic_ifstream_char_vbtable;
9725 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9726 basic_ios_char_ctor(basic_ios);
9728 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9731 basic_filebuf_char_ctor(&this->filebuf);
9732 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9733 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9737 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9738 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9739 static basic_ifstream_char* basic_ifstream_char_ctor_file(
9740 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
9742 basic_ios_char *basic_ios;
9744 TRACE("(%p %p %d)\n", this, file, virt_init);
9747 this->base.vbtable = basic_ifstream_char_vbtable;
9748 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9749 basic_ios_char_ctor(basic_ios);
9751 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9754 basic_filebuf_char_ctor_file(&this->filebuf, file);
9755 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9756 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9760 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9761 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9762 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor, 12)
9763 basic_ifstream_char* __thiscall basic_ifstream_char_copy_ctor(basic_ifstream_char *this,
9764 const basic_ifstream_char *copy, MSVCP_bool virt_init)
9766 TRACE("(%p %p %d)\n", this, copy, virt_init);
9767 return basic_ifstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9770 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9771 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9772 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 16)
9773 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
9774 const char *name, int mode, MSVCP_bool virt_init)
9776 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9778 basic_ifstream_char_ctor(this, virt_init);
9780 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9781 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9782 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9787 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9788 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9789 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9790 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9792 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9794 TRACE("(%p)\n", this);
9796 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9797 basic_filebuf_char_dtor(&this->filebuf);
9800 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9801 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9802 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9803 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9805 TRACE("(%p)\n", this);
9807 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9808 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9811 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9812 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9814 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9816 TRACE("(%p %x)\n", this, flags);
9819 /* we have an array, with the number of elements stored before the first object */
9820 INT_PTR i, *ptr = (INT_PTR *)this-1;
9822 for(i=*ptr-1; i>=0; i--)
9823 basic_ifstream_char_vbase_dtor(this+i);
9824 MSVCRT_operator_delete(ptr);
9826 basic_ifstream_char_vbase_dtor(this);
9828 MSVCRT_operator_delete(this);
9834 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9835 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9836 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9837 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9839 TRACE("(%p)\n", this);
9841 if(!basic_filebuf_char_close(&this->filebuf)) {
9842 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9843 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9847 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9848 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9849 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
9850 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
9852 TRACE("(%p)\n", this);
9853 return basic_filebuf_char_is_open(&this->filebuf);
9856 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9857 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9858 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
9859 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
9860 const char *name, int mode)
9862 TRACE("(%p %s %d)\n", this, name, mode);
9864 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9865 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9866 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9870 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9871 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9872 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
9873 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
9874 const char *name, short mode)
9876 basic_ifstream_char_open(this, name, mode);
9879 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9880 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9881 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
9882 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
9884 TRACE("(%p)\n", this);
9885 return (basic_filebuf_char*)&this->filebuf;
9888 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
9890 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
9893 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9895 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
9898 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9899 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9900 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9902 basic_ios_wchar *basic_ios;
9904 TRACE("(%p %d)\n", this, virt_init);
9907 this->base.vbtable = basic_ifstream_wchar_vbtable;
9908 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9909 basic_ios_wchar_ctor(basic_ios);
9911 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9914 basic_filebuf_wchar_ctor(&this->filebuf);
9915 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9916 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9920 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9921 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9922 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
9923 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9925 basic_ifstream_wchar_ctor(this, virt_init);
9926 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9930 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9931 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9932 static basic_ifstream_wchar* basic_ifstream_wchar_ctor_file(
9933 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9935 basic_ios_wchar *basic_ios;
9937 TRACE("(%p %p %d)\n", this, file, virt_init);
9940 this->base.vbtable = basic_ifstream_wchar_vbtable;
9941 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9942 basic_ios_wchar_ctor(basic_ios);
9944 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9947 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9948 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9949 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9953 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9954 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9955 static basic_ifstream_wchar* basic_ifstream_short_ctor_file(
9956 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9958 basic_ifstream_wchar_ctor_file(this, file, virt_init);
9959 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9963 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9964 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9965 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor, 12)
9966 basic_ifstream_wchar* __thiscall basic_ifstream_short_copy_ctor(basic_ifstream_wchar *this,
9967 basic_ifstream_wchar *copy, MSVCP_bool virt_init)
9969 TRACE("(%p %p %d)\n", this, copy, virt_init);
9970 return basic_ifstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9973 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9974 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9975 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 16)
9976 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
9977 const char *name, int mode, MSVCP_bool virt_init)
9979 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9981 basic_ifstream_short_ctor(this, virt_init);
9983 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9984 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9985 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9990 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9991 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9992 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9993 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9994 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
9995 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
9997 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
9999 TRACE("(%p)\n", this);
10001 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10002 basic_filebuf_wchar_dtor(&this->filebuf);
10005 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10006 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10007 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10008 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10009 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10010 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10012 TRACE("(%p)\n", this);
10014 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10015 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10018 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10019 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10021 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10023 TRACE("(%p %x)\n", this, flags);
10026 /* we have an array, with the number of elements stored before the first object */
10027 INT_PTR i, *ptr = (INT_PTR *)this-1;
10029 for(i=*ptr-1; i>=0; i--)
10030 basic_ifstream_wchar_vbase_dtor(this+i);
10031 MSVCRT_operator_delete(ptr);
10033 basic_ifstream_wchar_vbase_dtor(this);
10035 MSVCRT_operator_delete(this);
10041 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10042 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10043 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10044 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10045 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10046 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10048 TRACE("(%p)\n", this);
10050 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10051 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10052 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10056 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10057 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10058 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10059 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10060 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10061 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10063 TRACE("(%p)\n", this);
10064 return basic_filebuf_wchar_is_open(&this->filebuf);
10067 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
10068 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
10069 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
10070 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10071 const char *name, int mode)
10073 TRACE("(%p %s %d)\n", this, name, mode);
10075 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10076 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10077 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10081 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
10082 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
10083 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10084 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10085 const char *name, short mode)
10087 basic_ifstream_wchar_open(this, name, mode);
10090 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10091 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10092 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10093 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10094 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10095 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10097 TRACE("(%p)\n", this);
10098 return (basic_filebuf_wchar*)&this->filebuf;
10101 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10103 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10106 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10108 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10111 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10112 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10113 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10114 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10116 basic_ios_char *basic_ios;
10118 TRACE("(%p %d)\n", this, virt_init);
10121 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10122 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10123 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10124 basic_ios_char_ctor(basic_ios);
10126 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10129 basic_filebuf_char_ctor(&this->filebuf);
10130 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10131 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10135 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10136 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10137 static basic_fstream_char* basic_fstream_char_ctor_file(basic_fstream_char *this,
10138 FILE *file, MSVCP_bool virt_init)
10140 basic_ios_char *basic_ios;
10142 TRACE("(%p %p %d)\n", this, file, virt_init);
10145 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10146 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10147 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10148 basic_ios_char_ctor(basic_ios);
10150 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10153 basic_filebuf_char_ctor_file(&this->filebuf, file);
10154 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10155 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10159 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
10160 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
10161 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor, 12)
10162 basic_fstream_char* __thiscall basic_fstream_char_copy_ctor(basic_fstream_char *this,
10163 basic_fstream_char *copy, MSVCP_bool virt_init)
10165 TRACE("(%p %p %d)\n", this, copy, virt_init);
10166 return basic_fstream_char_ctor_file(this, copy->filebuf.file, virt_init);
10169 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
10170 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
10171 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 16)
10172 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10173 const char *name, int mode, MSVCP_bool virt_init)
10175 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10177 basic_fstream_char_ctor(this, virt_init);
10179 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10180 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10181 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10186 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10187 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10188 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10189 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10191 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10193 TRACE("(%p)\n", this);
10195 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10196 basic_filebuf_char_dtor(&this->filebuf);
10199 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10200 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10201 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10202 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10204 TRACE("(%p)\n", this);
10206 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10207 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10210 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10211 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10213 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10215 TRACE("(%p %x)\n", this, flags);
10218 /* we have an array, with the number of elements stored before the first object */
10219 INT_PTR i, *ptr = (INT_PTR *)this-1;
10221 for(i=*ptr-1; i>=0; i--)
10222 basic_fstream_char_vbase_dtor(this+i);
10223 MSVCRT_operator_delete(ptr);
10225 basic_fstream_char_vbase_dtor(this);
10227 MSVCRT_operator_delete(this);
10233 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10234 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10235 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10236 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10238 TRACE("(%p)\n", this);
10240 if(!basic_filebuf_char_close(&this->filebuf)) {
10241 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10242 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10246 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10247 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10248 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10249 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10251 TRACE("(%p)\n", this);
10252 return basic_filebuf_char_is_open(&this->filebuf);
10255 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10256 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10257 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10258 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10259 const char *name, int mode)
10261 TRACE("(%p %s %d)\n", this, name, mode);
10263 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10264 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10265 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10269 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10270 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10271 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10272 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10273 const char *name, int mode)
10275 basic_fstream_char_open(this, name, mode);
10278 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10279 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10280 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10281 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10283 TRACE("(%p)\n", this);
10284 return (basic_filebuf_char*)&this->filebuf;
10287 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10289 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10292 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10294 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10297 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10298 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10299 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10301 basic_ios_wchar *basic_ios;
10303 TRACE("(%p %d)\n", this, virt_init);
10306 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10307 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10308 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10309 basic_ios_wchar_ctor(basic_ios);
10311 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10314 basic_filebuf_wchar_ctor(&this->filebuf);
10315 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10316 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10320 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10321 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10322 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10323 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10325 basic_fstream_wchar_ctor(this, virt_init);
10326 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10330 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10331 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10332 static basic_fstream_wchar* basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
10333 FILE *file, MSVCP_bool virt_init)
10335 basic_ios_wchar *basic_ios;
10337 TRACE("(%p %p %d)\n", this, file, virt_init);
10340 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10341 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10342 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10343 basic_ios_wchar_ctor(basic_ios);
10345 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10348 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10349 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10350 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10354 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10355 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10356 static basic_fstream_wchar* basic_fstream_short_ctor_file(basic_fstream_wchar *this,
10357 FILE *file, MSVCP_bool virt_init)
10359 basic_fstream_wchar_ctor_file(this, file, virt_init);
10360 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10364 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10365 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10366 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor, 12)
10367 basic_fstream_wchar* __thiscall basic_fstream_short_copy_ctor(basic_fstream_wchar *this,
10368 basic_fstream_wchar *copy, MSVCP_bool virt_init)
10370 TRACE("(%p %p %d)\n", this, copy, virt_init);
10371 return basic_fstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10374 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10375 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10376 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 16)
10377 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
10378 const char *name, int mode, MSVCP_bool virt_init)
10380 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10382 basic_fstream_short_ctor(this, virt_init);
10384 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10385 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10386 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10391 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10392 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10393 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10394 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10395 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10396 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10398 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10400 TRACE("(%p)\n", this);
10402 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10403 basic_filebuf_wchar_dtor(&this->filebuf);
10406 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10407 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10408 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10409 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10410 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10411 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10413 TRACE("(%p)\n", this);
10415 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10416 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10419 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10420 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10422 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10424 TRACE("(%p %x)\n", this, flags);
10427 /* we have an array, with the number of elements stored before the first object */
10428 INT_PTR i, *ptr = (INT_PTR *)this-1;
10430 for(i=*ptr-1; i>=0; i--)
10431 basic_fstream_wchar_vbase_dtor(this+i);
10432 MSVCRT_operator_delete(ptr);
10434 basic_fstream_wchar_vbase_dtor(this);
10436 MSVCRT_operator_delete(this);
10442 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10443 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10444 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10445 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10446 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10447 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10449 TRACE("(%p)\n", this);
10451 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10452 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10453 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10457 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10458 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10459 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10460 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10461 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10462 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10464 TRACE("(%p)\n", this);
10465 return basic_filebuf_wchar_is_open(&this->filebuf);
10468 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10469 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10470 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10471 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10472 const char *name, int mode)
10474 TRACE("(%p %s %d)\n", this, name, mode);
10476 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10477 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10478 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10482 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10483 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10484 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10485 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10486 const char *name, int mode)
10488 basic_fstream_wchar_open(this, name, mode);
10491 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10492 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10493 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10494 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10495 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10496 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10498 TRACE("(%p)\n", this);
10499 return (basic_filebuf_wchar*)&this->filebuf;
10502 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10504 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10507 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10509 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10512 /* ??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 */
10513 /* ??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 */
10514 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10515 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10516 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10518 basic_ios_char *basic_ios;
10520 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10523 this->base.vbtable = basic_ostringstream_char_vbtable;
10524 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10525 basic_ios_char_ctor(basic_ios);
10527 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10530 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10531 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10532 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10536 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10537 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10538 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10539 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10540 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10542 basic_ios_char *basic_ios;
10544 TRACE("(%p %d %d)\n", this, mode, virt_init);
10547 this->base.vbtable = basic_ostringstream_char_vbtable;
10548 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10549 basic_ios_char_ctor(basic_ios);
10551 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10554 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10555 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10556 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10560 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10561 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10562 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
10563 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10564 basic_ostringstream_char *this, MSVCP_bool virt_init)
10566 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
10569 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10570 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10571 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10572 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10574 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10576 TRACE("(%p)\n", this);
10578 basic_stringbuf_char_dtor(&this->strbuf);
10579 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10582 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10583 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10584 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10585 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10587 TRACE("(%p)\n", this);
10589 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10590 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10593 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10594 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10596 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10598 TRACE("(%p %x)\n", this, flags);
10601 /* we have an array, with the number of elements stored before the first object */
10602 INT_PTR i, *ptr = (INT_PTR *)this-1;
10604 for(i=*ptr-1; i>=0; i--)
10605 basic_ostringstream_char_vbase_dtor(this+i);
10606 MSVCRT_operator_delete(ptr);
10608 basic_ostringstream_char_vbase_dtor(this);
10610 MSVCRT_operator_delete(this);
10616 /* ?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 */
10617 /* ?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 */
10618 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10619 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10621 TRACE("(%p)\n", this);
10622 return (basic_stringbuf_char*)&this->strbuf;
10625 /* ?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 */
10626 /* ?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 */
10627 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10628 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10630 TRACE("(%p %p)\n", this, str);
10631 basic_stringbuf_char_str_set(&this->strbuf, str);
10634 /* ?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 */
10635 /* ?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 */
10636 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10637 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10639 TRACE("(%p %p)\n", this, ret);
10640 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10643 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10645 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10648 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10650 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10653 /* ??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 */
10654 /* ??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 */
10655 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10656 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10658 basic_ios_wchar *basic_ios;
10660 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10663 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10664 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10665 basic_ios_wchar_ctor(basic_ios);
10667 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10670 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10671 basic_ostream_short_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10672 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10676 /* ??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 */
10677 /* ??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 */
10678 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10679 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10680 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10682 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10683 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10687 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10688 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10689 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10690 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10692 basic_ios_wchar *basic_ios;
10694 TRACE("(%p %d %d)\n", this, mode, virt_init);
10697 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10698 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10699 basic_ios_wchar_ctor(basic_ios);
10701 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10704 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10705 basic_ostream_short_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10706 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10710 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10711 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10712 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10713 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10714 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10716 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10717 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10721 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10722 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10723 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
10724 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10725 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
10727 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
10730 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10731 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10732 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10733 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10734 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10735 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10737 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10739 TRACE("(%p)\n", this);
10741 basic_stringbuf_wchar_dtor(&this->strbuf);
10742 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10745 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10746 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10747 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10748 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10749 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10750 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10752 TRACE("(%p)\n", this);
10754 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10755 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10758 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10759 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10761 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10763 TRACE("(%p %x)\n", this, flags);
10766 /* we have an array, with the number of elements stored before the first object */
10767 INT_PTR i, *ptr = (INT_PTR *)this-1;
10769 for(i=*ptr-1; i>=0; i--)
10770 basic_ostringstream_wchar_vbase_dtor(this+i);
10771 MSVCRT_operator_delete(ptr);
10773 basic_ostringstream_wchar_vbase_dtor(this);
10775 MSVCRT_operator_delete(this);
10781 /* ?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 */
10782 /* ?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 */
10783 /* ?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 */
10784 /* ?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 */
10785 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10786 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10788 TRACE("(%p)\n", this);
10789 return (basic_stringbuf_wchar*)&this->strbuf;
10792 /* ?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 */
10793 /* ?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 */
10794 /* ?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 */
10795 /* ?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 */
10796 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10797 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10799 TRACE("(%p %p)\n", this, str);
10800 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10803 /* ?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 */
10804 /* ?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 */
10805 /* ?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 */
10806 /* ?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 */
10807 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10808 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10810 TRACE("(%p %p)\n", this, ret);
10811 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10814 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10816 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10819 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10821 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10824 /* ??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 */
10825 /* ??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 */
10826 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10827 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10828 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10830 basic_ios_char *basic_ios;
10832 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10835 this->base.vbtable = basic_istringstream_char_vbtable;
10836 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10837 basic_ios_char_ctor(basic_ios);
10839 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10842 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10843 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10844 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10848 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10849 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10850 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
10851 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
10852 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
10854 basic_ios_char *basic_ios;
10856 TRACE("(%p %d %d)\n", this, mode, virt_init);
10859 this->base.vbtable = basic_istringstream_char_vbtable;
10860 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10861 basic_ios_char_ctor(basic_ios);
10863 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10866 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
10867 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10868 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10872 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10873 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10874 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
10875 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
10876 basic_istringstream_char *this, MSVCP_bool virt_init)
10878 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
10881 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10882 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10883 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
10884 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
10886 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10888 TRACE("(%p)\n", this);
10890 basic_stringbuf_char_dtor(&this->strbuf);
10891 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10894 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10895 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10896 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
10897 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
10899 TRACE("(%p)\n", this);
10901 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
10902 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10905 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
10906 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10908 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10910 TRACE("(%p %x)\n", this, flags);
10913 /* we have an array, with the number of elements stored before the first object */
10914 INT_PTR i, *ptr = (INT_PTR *)this-1;
10916 for(i=*ptr-1; i>=0; i--)
10917 basic_istringstream_char_vbase_dtor(this+i);
10918 MSVCRT_operator_delete(ptr);
10920 basic_istringstream_char_vbase_dtor(this);
10922 MSVCRT_operator_delete(this);
10928 /* ?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 */
10929 /* ?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 */
10930 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
10931 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
10933 TRACE("(%p)\n", this);
10934 return (basic_stringbuf_char*)&this->strbuf;
10937 /* ?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 */
10938 /* ?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 */
10939 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
10940 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
10942 TRACE("(%p %p)\n", this, str);
10943 basic_stringbuf_char_str_set(&this->strbuf, str);
10946 /* ?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 */
10947 /* ?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 */
10948 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
10949 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
10951 TRACE("(%p %p)\n", this, ret);
10952 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10955 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
10957 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
10960 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10962 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
10965 /* ??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 */
10966 /* ??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 */
10967 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
10968 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10970 basic_ios_wchar *basic_ios;
10972 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10975 this->base.vbtable = basic_istringstream_wchar_vbtable;
10976 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10977 basic_ios_wchar_ctor(basic_ios);
10979 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10982 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10983 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10984 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
10988 /* ??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 */
10989 /* ??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 */
10990 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
10991 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
10992 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10994 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
10995 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
10999 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11000 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11001 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
11002 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11004 basic_ios_wchar *basic_ios;
11006 TRACE("(%p %d %d)\n", this, mode, virt_init);
11009 this->base.vbtable = basic_istringstream_wchar_vbtable;
11010 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11011 basic_ios_wchar_ctor(basic_ios);
11013 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11016 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11017 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11018 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11022 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11023 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11024 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11025 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11026 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11028 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11029 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11033 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11034 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11035 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11036 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11037 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11039 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
11042 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11043 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11044 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11045 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11046 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11047 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11049 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11051 TRACE("(%p)\n", this);
11053 basic_stringbuf_wchar_dtor(&this->strbuf);
11054 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11057 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11058 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11059 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11060 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11061 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11062 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11064 TRACE("(%p)\n", this);
11066 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11067 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11070 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11071 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11073 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11075 TRACE("(%p %x)\n", this, flags);
11078 /* we have an array, with the number of elements stored before the first object */
11079 INT_PTR i, *ptr = (INT_PTR *)this-1;
11081 for(i=*ptr-1; i>=0; i--)
11082 basic_istringstream_wchar_vbase_dtor(this+i);
11083 MSVCRT_operator_delete(ptr);
11085 basic_istringstream_wchar_vbase_dtor(this);
11087 MSVCRT_operator_delete(this);
11093 /* ?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 */
11094 /* ?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 */
11095 /* ?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 */
11096 /* ?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 */
11097 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11098 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11100 TRACE("(%p)\n", this);
11101 return (basic_stringbuf_wchar*)&this->strbuf;
11104 /* ?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 */
11105 /* ?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 */
11106 /* ?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 */
11107 /* ?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 */
11108 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11109 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11111 TRACE("(%p %p)\n", this, str);
11112 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11115 /* ?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 */
11116 /* ?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 */
11117 /* ?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 */
11118 /* ?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 */
11119 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11120 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11122 TRACE("(%p %p)\n", this, ret);
11123 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11126 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11128 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11131 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11133 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11136 /* ??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 */
11137 /* ??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 */
11138 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11139 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11140 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11142 basic_ios_char *basic_ios;
11144 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11147 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11148 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11149 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11150 basic_ios_char_ctor(basic_ios);
11152 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11155 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11156 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11157 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11161 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11162 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11163 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11164 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11165 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11167 basic_ios_char *basic_ios;
11169 TRACE("(%p %d %d)\n", this, mode, virt_init);
11172 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11173 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11174 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11175 basic_ios_char_ctor(basic_ios);
11177 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11180 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11181 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11182 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11186 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11187 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11188 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
11189 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11190 basic_stringstream_char *this, MSVCP_bool virt_init)
11192 return basic_stringstream_char_ctor_mode(
11193 this, OPENMODE_out|OPENMODE_in, virt_init);
11196 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11197 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11198 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11199 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11201 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11203 TRACE("(%p)\n", this);
11205 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11206 basic_stringbuf_char_dtor(&this->strbuf);
11209 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11210 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11211 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11212 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11214 TRACE("(%p)\n", this);
11216 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11217 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11220 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11221 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11223 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11225 TRACE("(%p %x)\n", this, flags);
11228 /* we have an array, with the number of elements stored before the first object */
11229 INT_PTR i, *ptr = (INT_PTR *)this-1;
11231 for(i=*ptr-1; i>=0; i--)
11232 basic_stringstream_char_vbase_dtor(this+i);
11233 MSVCRT_operator_delete(ptr);
11235 basic_stringstream_char_vbase_dtor(this);
11237 MSVCRT_operator_delete(this);
11243 /* ?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 */
11244 /* ?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 */
11245 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11246 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11248 TRACE("(%p)\n", this);
11249 return (basic_stringbuf_char*)&this->strbuf;
11252 /* ?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 */
11253 /* ?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 */
11254 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11255 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11257 TRACE("(%p %p)\n", this, str);
11258 basic_stringbuf_char_str_set(&this->strbuf, str);
11261 /* ?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 */
11262 /* ?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 */
11263 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11264 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11266 TRACE("(%p %p)\n", this, ret);
11267 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11270 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11272 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11275 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11277 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11280 /* ??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 */
11281 /* ??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 */
11282 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11283 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11285 basic_ios_wchar *basic_ios;
11287 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11290 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11291 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11292 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11293 basic_ios_wchar_ctor(basic_ios);
11295 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11298 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11299 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11300 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11304 /* ??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 */
11305 /* ??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 */
11306 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11307 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11308 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11310 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11311 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11315 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11316 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11317 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11318 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11320 basic_ios_wchar *basic_ios;
11322 TRACE("(%p %d %d)\n", this, mode, virt_init);
11325 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11326 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11327 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11328 basic_ios_wchar_ctor(basic_ios);
11330 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11333 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11334 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11335 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11339 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11340 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11341 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11342 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11343 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11345 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11346 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11350 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11351 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11352 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
11353 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11354 basic_stringstream_wchar *this, MSVCP_bool virt_init)
11356 return basic_stringstream_short_ctor_mode(
11357 this, OPENMODE_out|OPENMODE_in, virt_init);
11360 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11361 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11362 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11363 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11364 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11365 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11367 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11369 TRACE("(%p)\n", this);
11371 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11372 basic_stringbuf_wchar_dtor(&this->strbuf);
11375 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11376 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11377 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11378 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11379 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11380 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11382 TRACE("(%p)\n", this);
11384 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11385 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11388 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11389 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11391 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11393 TRACE("(%p %x)\n", this, flags);
11396 /* we have an array, with the number of elements stored before the first object */
11397 INT_PTR i, *ptr = (INT_PTR *)this-1;
11399 for(i=*ptr-1; i>=0; i--)
11400 basic_stringstream_wchar_vbase_dtor(this+i);
11401 MSVCRT_operator_delete(ptr);
11403 basic_stringstream_wchar_vbase_dtor(this);
11405 MSVCRT_operator_delete(this);
11411 /* ?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 */
11412 /* ?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 */
11413 /* ?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 */
11414 /* ?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 */
11415 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11416 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11418 TRACE("(%p)\n", this);
11419 return (basic_stringbuf_wchar*)&this->strbuf;
11422 /* ?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 */
11423 /* ?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 */
11424 /* ?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 */
11425 /* ?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 */
11426 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11427 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11429 TRACE("(%p %p)\n", this, str);
11430 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11433 /* ?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 */
11434 /* ?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 */
11435 /* ?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 */
11436 /* ?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 */
11437 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11438 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11440 TRACE("(%p %p)\n", this, ret);
11441 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11444 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11445 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11446 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11447 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11449 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11451 this->minsize = 32;
11452 this->endsave = NULL;
11453 this->strmode = mode;
11454 this->palloc = NULL;
11455 this->pfree = NULL;
11458 this->strmode |= STRSTATE_Dynamic;
11459 if(len > this->minsize)
11460 this->minsize = len;
11461 this->seekhigh = NULL;
11470 this->seekhigh = g+len;
11471 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11473 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11476 /* ??0strstreambuf@std@@QAE@PACH0@Z */
11477 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
11478 /* ??0strstreambuf@std@@QAE@PADH0@Z */
11479 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
11480 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
11481 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
11482 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
11484 TRACE("(%p %p %ld %p)\n", this, g, len, p);
11486 basic_streambuf_char_ctor(&this->base);
11487 this->base.vtable = &MSVCP_strstreambuf_vtable;
11489 strstreambuf__Init(this, len, g, p, 0);
11493 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11494 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11495 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11496 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11498 TRACE("(%p)\n", this);
11500 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11502 this->pfree(basic_streambuf_char_eback(&this->base));
11504 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11507 this->endsave = NULL;
11508 this->seekhigh = NULL;
11509 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11510 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11511 basic_streambuf_char_setp(&this->base, NULL, NULL);
11514 /* ??1strstreambuf@std@@UAE@XZ */
11515 /* ??1strstreambuf@std@@UEAA@XZ */
11516 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11517 void __thiscall strstreambuf_dtor(strstreambuf *this)
11519 TRACE("(%p)\n", this);
11521 strstreambuf__Tidy(this);
11522 basic_streambuf_char_dtor(&this->base);
11525 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11526 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11528 TRACE("(%p %x)\n", this, flags);
11530 /* we have an array, with the number of elements stored before the first object */
11531 INT_PTR i, *ptr = (INT_PTR *)this-1;
11533 for(i=*ptr-1; i>=0; i--)
11534 strstreambuf_dtor(this+i);
11535 MSVCRT_operator_delete(ptr);
11537 strstreambuf_dtor(this);
11539 MSVCRT_operator_delete(this);
11545 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11546 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11547 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11548 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11550 TRACE("(%p %d)\n", this, freeze);
11552 if(!freeze == !(this->strmode *STRSTATE_Frozen))
11556 this->strmode |= STRSTATE_Frozen;
11557 this->endsave = basic_streambuf_char_epptr(&this->base);
11558 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11559 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11561 this->strmode &= ~STRSTATE_Frozen;
11562 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11563 basic_streambuf_char_pptr(&this->base), this->endsave);
11567 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11568 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11569 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11570 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11572 MSVCP_size_t old_size, size;
11575 TRACE("(%p %d)\n", this, c);
11580 if(this->strmode & STRSTATE_Frozen)
11583 ptr = basic_streambuf_char_pptr(&this->base);
11584 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11585 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11587 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11590 ptr = basic_streambuf_char_eback(&this->base);
11591 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11593 size = old_size + old_size/2;
11594 if(size < this->minsize)
11595 size = this->minsize;
11598 buf = this->palloc(size);
11600 buf = MSVCRT_operator_new(size);
11604 memcpy(buf, ptr, old_size);
11605 if(this->strmode & STRSTATE_Allocated) {
11609 MSVCRT_operator_delete(ptr);
11612 this->strmode |= STRSTATE_Allocated;
11614 this->seekhigh = buf;
11615 basic_streambuf_char_setp(&this->base, buf, buf+size);
11616 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11618 this->seekhigh = this->seekhigh-ptr+buf;
11619 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11620 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11621 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11622 basic_streambuf_char_pptr(&this->base));
11625 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11628 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11629 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11630 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11631 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11633 char *ptr = basic_streambuf_char_gptr(&this->base);
11635 TRACE("(%p %d)\n", this, c);
11637 if(ptr<=basic_streambuf_char_eback(&this->base)
11638 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11641 basic_streambuf_char_gbump(&this->base, -1);
11644 if(this->strmode & STRSTATE_Constant)
11645 return (unsigned char)c;
11647 return (unsigned char)(ptr[0] = c);
11650 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
11651 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
11652 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11653 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11655 char *eback = basic_streambuf_char_eback(&this->base);
11656 char *pptr = basic_streambuf_char_pptr(&this->base);
11657 char *gptr = basic_streambuf_char_gptr(&this->base);
11659 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11664 if(pptr > this->seekhigh)
11665 this->seekhigh = pptr;
11667 if((mode & OPENMODE_in) && gptr) {
11668 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11670 else if(way == SEEKDIR_end)
11671 off += this->seekhigh-eback;
11672 else if(way != SEEKDIR_beg)
11675 if(off<0 || off>this->seekhigh-eback) {
11678 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11679 if((mode & OPENMODE_out) && pptr) {
11680 basic_streambuf_char_setp_next(&this->base, eback,
11681 gptr, basic_streambuf_char_epptr(&this->base));
11684 }else if((mode & OPENMODE_out) && pptr) {
11685 if(way == SEEKDIR_cur)
11687 else if(way == SEEKDIR_end)
11688 off += this->seekhigh-eback;
11689 else if(way != SEEKDIR_beg)
11692 if(off<0 || off>this->seekhigh-eback)
11695 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11704 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11705 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11706 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11707 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11709 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11711 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
11716 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11719 /* ?underflow@strstreambuf@std@@MAEHXZ */
11720 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11721 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11722 int __thiscall strstreambuf_underflow(strstreambuf *this)
11724 char *gptr = basic_streambuf_char_gptr(&this->base);
11727 TRACE("(%p)\n", this);
11732 if(gptr < basic_streambuf_char_egptr(&this->base))
11733 return (unsigned char)(*gptr);
11735 pptr = basic_streambuf_char_gptr(&this->base);
11736 if(pptr > this->seekhigh)
11737 this->seekhigh = pptr;
11739 if(this->seekhigh <= gptr)
11742 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11743 gptr, this->seekhigh);
11744 return (unsigned char)(*gptr);
11747 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
11749 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
11752 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
11754 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
11757 /* ??0ostrstream@std@@QAE@PADHH@Z */
11758 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
11759 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11761 basic_ios_char *basic_ios;
11763 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11766 this->base.vbtable = ostrstream_vbtable;
11767 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11768 basic_ios_char_ctor(basic_ios);
11770 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11773 strstreambuf_ctor_get_put(&this->buf, buf, size,
11774 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11775 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, TRUE, FALSE);
11776 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
11780 /* ??1ostrstream@std@@UAE@XZ */
11781 /* ??1ostrstream@std@@UEAA@XZ */
11782 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
11783 void __thiscall ostrstream_dtor(basic_ios_char *base)
11785 ostrstream *this = ostrstream_from_basic_ios(base);
11787 TRACE("(%p)\n", this);
11789 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11790 strstreambuf_dtor(&this->buf);
11793 static void ostrstream_vbase_dtor(ostrstream *this)
11795 TRACE("(%p)\n", this);
11797 ostrstream_dtor(ostrstream_to_basic_ios(this));
11798 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11801 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
11802 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11804 ostrstream *this = ostrstream_from_basic_ios(base);
11806 TRACE("(%p %x)\n", this, flags);
11809 /* we have an array, with the number of elements stored before the first object */
11810 INT_PTR i, *ptr = (INT_PTR *)this-1;
11812 for(i=*ptr-1; i>=0; i--)
11813 ostrstream_vbase_dtor(this+i);
11814 MSVCRT_operator_delete(ptr);
11816 ostrstream_vbase_dtor(this);
11818 MSVCRT_operator_delete(this);
11824 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
11826 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
11829 /* ??1istrstream@std@@UAE@XZ */
11830 /* ??1istrstream@std@@UEAA@XZ */
11831 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
11832 void __thiscall istrstream_dtor(basic_ios_char *base)
11834 istrstream *this = istrstream_from_basic_ios(base);
11836 TRACE("(%p)\n", this);
11838 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11839 strstreambuf_dtor(&this->buf);
11842 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
11844 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
11847 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
11849 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
11852 /* ??0strstream@std@@QAE@PADHH@Z */
11853 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
11854 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
11855 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11857 basic_ios_char *basic_ios;
11859 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11862 this->base.base1.vbtable = strstream_vbtable1;
11863 this->base.base2.vbtable = strstream_vbtable2;
11864 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11865 basic_ios_char_ctor(basic_ios);
11867 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11870 strstreambuf_ctor_get_put(&this->buf, buf, size,
11871 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11872 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
11873 basic_ios->base.vtable = &MSVCP_strstream_vtable;
11877 /* ??1strstream@std@@UAE@XZ */
11878 /* ??1strstream@std@@UEAA@XZ */
11879 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
11880 void __thiscall strstream_dtor(basic_ios_char *base)
11882 strstream *this = strstream_from_basic_ios(base);
11884 TRACE("(%p)\n", this);
11886 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11887 strstreambuf_dtor(&this->buf);
11890 static void strstream_vbase_dtor(strstream *this)
11892 TRACE("(%p)\n", this);
11894 strstream_dtor(strstream_to_basic_ios(this));
11895 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11898 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
11899 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11901 strstream *this = strstream_from_basic_ios(base);
11903 TRACE("(%p %x)\n", this, flags);
11906 /* we have an array, with the number of elements stored before the first object */
11907 INT_PTR i, *ptr = (INT_PTR *)this-1;
11909 for(i=*ptr-1; i>=0; i--)
11910 strstream_vbase_dtor(this+i);
11911 MSVCRT_operator_delete(ptr);
11913 strstream_vbase_dtor(this);
11915 MSVCRT_operator_delete(this);
11921 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
11923 ios_base_precision_set(base, prec);
11926 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
11927 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11928 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
11930 TRACE("(%p %ld)\n", ret, prec);
11932 ret->pfunc = setprecision_func;
11937 static void __cdecl setw_func(ios_base *base, streamsize width)
11939 ios_base_width_set(base, width);
11942 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
11943 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11944 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
11946 TRACE("(%p %ld)\n", ret, width);
11948 ret->pfunc = setw_func;
11953 static void __cdecl resetioflags_func(ios_base *base, int mask)
11955 ios_base_setf_mask(base, 0, mask);
11958 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11959 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
11961 TRACE("(%p %d)\n", ret, mask);
11963 ret->pfunc = resetioflags_func;
11968 static void __cdecl setiosflags_func(ios_base *base, int mask)
11970 ios_base_setf_mask(base, FMTFLAG_mask, mask);
11973 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11974 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
11976 TRACE("(%p %d)\n", ret, mask);
11978 ret->pfunc = setiosflags_func;
11983 static void __cdecl setbase_func(ios_base *base, int set_base)
11986 set_base = FMTFLAG_dec;
11987 else if(set_base == 8)
11988 set_base = FMTFLAG_oct;
11989 else if(set_base == 16)
11990 set_base = FMTFLAG_hex;
11994 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
11997 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
11998 manip_int* __cdecl setbase(manip_int *ret, int base)
12000 TRACE("(%p %d)\n", ret, base);
12002 ret->pfunc = setbase_func;
12007 static basic_filebuf_char filebuf_char_stdin;
12008 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12010 basic_istream_char obj;
12011 basic_ios_char vbase;
12013 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12014 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12015 basic_istream_char *_Ptr_cin = &cin.obj;
12017 static basic_filebuf_wchar filebuf_short_stdin;
12018 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12020 basic_istream_wchar obj;
12021 basic_ios_wchar vbase;
12022 } ucin = { { 0 } };
12023 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12024 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12025 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12027 static basic_filebuf_wchar filebuf_wchar_stdin;
12028 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12030 basic_istream_wchar obj;
12031 basic_ios_wchar vbase;
12032 } wcin = { { 0 } };
12033 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12034 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12035 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12037 static basic_filebuf_char filebuf_char_stdout;
12038 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12040 basic_ostream_char obj;
12041 basic_ios_char vbase;
12042 } cout = { { 0 } };
12043 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12044 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12045 basic_ostream_char *_Ptr_cout = &cout.obj;
12047 static basic_filebuf_wchar filebuf_short_stdout;
12048 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12050 basic_ostream_wchar obj;
12051 basic_ios_wchar vbase;
12052 } ucout = { { 0 } };
12053 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12054 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12055 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12057 static basic_filebuf_wchar filebuf_wchar_stdout;
12058 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12060 basic_ostream_wchar obj;
12061 basic_ios_wchar vbase;
12062 } wcout = { { 0 } };
12063 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12064 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12065 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12067 static basic_filebuf_char filebuf_char_stderr;
12068 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12070 basic_ostream_char obj;
12071 basic_ios_char vbase;
12072 } cerr = { { 0 } };
12073 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12074 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12075 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12077 static basic_filebuf_wchar filebuf_short_stderr;
12078 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12080 basic_ostream_wchar obj;
12081 basic_ios_wchar vbase;
12082 } ucerr = { { 0 } };
12083 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12084 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12085 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12087 static basic_filebuf_wchar filebuf_wchar_stderr;
12088 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12090 basic_ostream_wchar obj;
12091 basic_ios_wchar vbase;
12092 } wcerr = { { 0 } };
12093 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12094 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12095 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12097 static basic_filebuf_char filebuf_char_log;
12098 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12100 basic_ostream_char obj;
12101 basic_ios_char vbase;
12102 } clog = { { 0 } };
12103 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12104 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12105 basic_ostream_char *_Ptr_clog = &clog.obj;
12107 static basic_filebuf_wchar filebuf_short_log;
12108 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12110 basic_ostream_wchar obj;
12111 basic_ios_wchar vbase;
12112 } uclog = { { 0 } };
12113 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12114 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12115 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12117 static basic_filebuf_wchar filebuf_wchar_log;
12118 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12120 basic_ostream_wchar obj;
12121 basic_ios_wchar vbase;
12122 } wclog = { { 0 } };
12123 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12124 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12125 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12127 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12128 int ios_base_Init__Init_cnt = -1;
12130 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12131 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12132 static void ios_base_Init__Init_ctor(void *this)
12134 TRACE("(%p)\n", this);
12136 if(ios_base_Init__Init_cnt < 0)
12137 ios_base_Init__Init_cnt = 1;
12139 ios_base_Init__Init_cnt++;
12142 /* ??0Init@ios_base@std@@QAE@XZ */
12143 /* ??0Init@ios_base@std@@QEAA@XZ */
12144 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12145 void* __thiscall ios_base_Init_ctor(void *this)
12147 ios_base_Init__Init_ctor(this);
12151 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12152 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12153 static void ios_base_Init__Init_dtor(void *this)
12155 TRACE("(%p)\n", this);
12157 ios_base_Init__Init_cnt--;
12158 if(!ios_base_Init__Init_cnt) {
12159 basic_ostream_char_flush(&cout.obj);
12160 basic_ostream_char_flush(&cerr.obj);
12161 basic_ostream_char_flush(&clog.obj);
12165 /* ??1Init@ios_base@std@@QAE@XZ */
12166 /* ??1Init@ios_base@std@@QEAA@XZ */
12167 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12168 void __thiscall ios_base_Init_dtor(void *this)
12170 ios_base_Init__Init_dtor(this);
12173 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12174 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12175 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12176 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12178 TRACE("(%p %p)\n", this, rhs);
12182 /* ?_Init_cnt@_Winit@std@@0HA */
12183 int _Winit__Init_cnt = -1;
12185 /* ??0_Winit@std@@QAE@XZ */
12186 /* ??0_Winit@std@@QEAA@XZ */
12187 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12188 void* __thiscall _Winit_ctor(void *this)
12190 TRACE("(%p)\n", this);
12192 if(_Winit__Init_cnt < 0)
12193 _Winit__Init_cnt = 1;
12195 _Winit__Init_cnt++;
12200 /* ??1_Winit@std@@QAE@XZ */
12201 /* ??1_Winit@std@@QAE@XZ */
12202 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12203 void __thiscall _Winit_dtor(void *this)
12205 TRACE("(%p)\n", this);
12207 _Winit__Init_cnt--;
12208 if(!_Winit__Init_cnt) {
12209 basic_ostream_wchar_flush(&wcout.obj);
12210 basic_ostream_wchar_flush(&wcerr.obj);
12211 basic_ostream_wchar_flush(&wclog.obj);
12215 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12216 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12217 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12218 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12220 TRACE("(%p %p)\n", this, rhs);
12224 void init_io(void *base)
12227 init_iosb_rtti(base);
12228 init_ios_base_rtti(base);
12229 init_basic_ios_char_rtti(base);
12230 init_basic_ios_wchar_rtti(base);
12231 init_basic_ios_short_rtti(base);
12232 init_basic_streambuf_char_rtti(base);
12233 init_basic_streambuf_wchar_rtti(base);
12234 init_basic_streambuf_short_rtti(base);
12235 init_basic_filebuf_char_rtti(base);
12236 init_basic_filebuf_wchar_rtti(base);
12237 init_basic_filebuf_short_rtti(base);
12238 init_basic_stringbuf_char_rtti(base);
12239 init_basic_stringbuf_wchar_rtti(base);
12240 init_basic_stringbuf_short_rtti(base);
12241 init_basic_ostream_char_rtti(base);
12242 init_basic_ostream_wchar_rtti(base);
12243 init_basic_ostream_short_rtti(base);
12244 init_basic_istream_char_rtti(base);
12245 init_basic_istream_wchar_rtti(base);
12246 init_basic_istream_short_rtti(base);
12247 init_basic_iostream_char_rtti(base);
12248 init_basic_iostream_wchar_rtti(base);
12249 init_basic_iostream_short_rtti(base);
12250 init_basic_ofstream_char_rtti(base);
12251 init_basic_ofstream_wchar_rtti(base);
12252 init_basic_ofstream_short_rtti(base);
12253 init_basic_ifstream_char_rtti(base);
12254 init_basic_ifstream_wchar_rtti(base);
12255 init_basic_ifstream_short_rtti(base);
12256 init_basic_fstream_char_rtti(base);
12257 init_basic_fstream_wchar_rtti(base);
12258 init_basic_fstream_short_rtti(base);
12259 init_basic_ostringstream_char_rtti(base);
12260 init_basic_ostringstream_wchar_rtti(base);
12261 init_basic_ostringstream_short_rtti(base);
12262 init_basic_istringstream_char_rtti(base);
12263 init_basic_istringstream_wchar_rtti(base);
12264 init_basic_istringstream_short_rtti(base);
12265 init_basic_stringstream_char_rtti(base);
12266 init_basic_stringstream_wchar_rtti(base);
12267 init_basic_stringstream_short_rtti(base);
12268 init_strstreambuf_rtti(base);
12269 init_strstream_rtti(base);
12270 init_ostrstream_rtti(base);
12273 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12274 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12276 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12277 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12279 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12280 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12282 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12283 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12285 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12286 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12288 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12289 basic_ostream_short_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12291 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12292 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12294 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12295 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12297 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12298 basic_ostream_short_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12300 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12301 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12303 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12304 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12306 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12307 basic_ostream_short_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12312 basic_istream_char_vbase_dtor(&cin.obj);
12313 basic_filebuf_char_dtor(&filebuf_char_stdin);
12315 basic_istream_wchar_vbase_dtor(&ucin.obj);
12316 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12318 basic_istream_wchar_vbase_dtor(&wcin.obj);
12319 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12321 basic_ostream_char_vbase_dtor(&cout.obj);
12322 basic_filebuf_char_dtor(&filebuf_char_stdout);
12324 basic_ostream_wchar_vbase_dtor(&ucout.obj);
12325 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12327 basic_ostream_wchar_vbase_dtor(&wcout.obj);
12328 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12330 basic_ostream_char_vbase_dtor(&cerr.obj);
12331 basic_filebuf_char_dtor(&filebuf_char_stderr);
12333 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
12334 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
12336 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
12337 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
12339 basic_ostream_char_vbase_dtor(&clog.obj);
12340 basic_filebuf_char_dtor(&filebuf_char_log);
12342 basic_ostream_wchar_vbase_dtor(&uclog.obj);
12343 basic_filebuf_wchar_dtor(&filebuf_short_log);
12345 basic_ostream_wchar_vbase_dtor(&wclog.obj);
12346 basic_filebuf_wchar_dtor(&filebuf_wchar_log);