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@JHH@Z */
1264 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@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@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1991 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1992 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1993 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1994 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1995 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1996 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1997 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1998 fpos_int *ret, streamoff off, int way, int mode)
2000 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2007 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2008 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2009 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2010 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2011 static fpos_int* basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2012 fpos_int *ret, streamoff off, int way, int mode)
2014 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2015 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2018 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2019 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2020 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2021 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2022 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2023 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2024 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2025 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2026 fpos_int *ret, fpos_int pos, int mode)
2028 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2035 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2036 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2037 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2038 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2039 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2040 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2041 fpos_int *ret, fpos_int pos, int mode)
2043 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2044 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2047 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2048 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2049 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2050 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2051 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2052 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2053 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2054 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2056 TRACE("(%p %p %ld)\n", this, buf, count);
2060 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2061 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2062 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2063 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2064 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2065 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2067 TRACE("(%p %p %ld)\n", this, buf, count);
2068 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2071 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2072 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2073 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2074 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2075 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2076 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2077 int, (basic_streambuf_wchar*), (this))
2078 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2080 TRACE("(%p)\n", this);
2084 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2085 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2086 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2087 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2088 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2089 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2091 TRACE("(%p)\n", this);
2092 return call_basic_streambuf_wchar_sync(this);
2095 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2096 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2097 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2098 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2099 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2100 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2102 TRACE("(%p %p %ld)\n", this, ptr, count);
2103 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2106 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2107 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2108 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2109 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2110 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2111 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2112 streamsize, (basic_streambuf_wchar*), (this))
2113 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2115 TRACE("(%p)\n", this);
2119 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2120 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2121 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2122 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2123 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2124 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2128 TRACE("(%p)\n", this);
2130 ret = basic_streambuf_wchar__Gnavail(this);
2131 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2134 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2135 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2136 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2137 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2138 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2139 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2141 TRACE("(%p %d)\n", this, ch);
2142 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2148 return call_basic_streambuf_wchar_pbackfail(this, ch);
2151 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2152 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2153 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2154 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2155 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2156 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2158 TRACE("(%p %d)\n", this, ch);
2159 return basic_streambuf_wchar__Pnavail(this) ?
2160 (*basic_streambuf_wchar__Pninc(this) = ch) :
2161 call_basic_streambuf_wchar_overflow(this, ch);
2164 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2165 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2166 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2167 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2168 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2169 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2171 TRACE("(%p)\n", this);
2172 if(*this->prpos && *this->prpos>*this->prbuf) {
2175 return **this->prpos;
2178 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2181 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2182 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2183 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2184 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2185 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2186 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2188 TRACE("(%p)\n", this);
2189 if(basic_streambuf_wchar__Gnavail(this))
2190 basic_streambuf_wchar__Gninc(this);
2192 call_basic_streambuf_wchar_uflow(this);
2195 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2196 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2197 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2198 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2199 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2200 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2202 TRACE("(%p)\n", this);
2203 return basic_streambuf_wchar__Gnavail(this) ?
2204 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2207 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2208 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2209 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2210 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2211 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2212 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2214 TRACE("(%p)\n", this);
2215 return basic_streambuf_wchar__Gnavail(this) ?
2216 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2219 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2220 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2221 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2222 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2223 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2224 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2226 TRACE("(%p)\n", this);
2228 if(basic_streambuf_wchar__Gnavail(this) > 1)
2229 return *basic_streambuf_wchar__Gnpreinc(this);
2230 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2231 WEOF : basic_streambuf_wchar_sgetc(this);
2234 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2235 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2236 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2237 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2238 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2239 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2240 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2241 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2243 TRACE("(%p %p %ld)\n", this, ptr, count);
2244 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2247 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2248 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2249 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2250 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2251 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2252 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2253 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2254 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2256 streamsize copied, chunk;
2258 TRACE("(%p %p %ld)\n", this, ptr, count);
2260 for(copied=0; copied<count;) {
2261 chunk = basic_streambuf_wchar__Pnavail(this);
2262 if(chunk > count-copied)
2263 chunk = count-copied;
2266 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2267 *this->pwpos += chunk;
2268 *this->pwsize -= chunk;
2270 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2280 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2281 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2282 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2283 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2284 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2285 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2287 TRACE("(%p %p %ld)\n", this, ptr, count);
2288 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2291 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@XZ */
2292 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@XZ */
2293 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
2294 locale* __thiscall basic_streambuf_wchar_getloc(basic_streambuf_wchar *this, locale *ret)
2296 TRACE("(%p %p)\n", this, ret);
2297 return locale_copy_ctor(ret, &this->loc);
2300 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2301 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2302 int basic_filebuf_char__Init__Stinit = 0;
2304 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2305 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2306 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2307 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2309 TRACE("(%p %p %d)\n", this, file, which);
2312 this->state0 = basic_filebuf_char__Init__Stinit;
2313 this->state = basic_filebuf_char__Init__Stinit;
2315 this->close = (which == INITFL_open);
2318 basic_streambuf_char__Init_empty(&this->base);
2320 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2321 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2324 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
2325 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
2326 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 4)
2327 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this)
2329 TRACE("(%p)\n", this);
2331 this->cvt = codecvt_char_use_facet(&this->base.loc);
2332 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_char_id.id, LC_CTYPE);
2333 if(codecvt_base_always_noconv(&this->cvt->base)) {
2336 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2337 basic_string_char_ctor(this->str);
2341 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2342 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2343 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2344 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2346 basic_filebuf_char *ret = this;
2348 TRACE("(%p)\n", this);
2350 if(!this->file || fclose(this->file))
2353 basic_filebuf_char__Init(this, NULL, INITFL_close);
2357 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2358 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2359 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2360 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2362 TRACE("(%p %p)\n", this, file);
2364 basic_streambuf_char_ctor(&this->base);
2365 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2367 locale_ctor(&this->loc);
2368 basic_filebuf_char__Init(this, file, INITFL_new);
2372 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2373 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2374 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2375 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2377 return basic_filebuf_char_ctor_file(this, NULL);
2380 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2381 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2382 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2383 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2385 TRACE("(%p %d)\n", this, uninitialized);
2387 basic_streambuf_char_ctor_uninitialized(&this->base, 0);
2388 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2389 locale_ctor(&this->loc);
2393 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2394 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2395 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2396 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2398 TRACE("(%p)\n", this);
2401 basic_filebuf_char_close(this);
2403 basic_string_char_dtor(this->str);
2404 MSVCRT_operator_delete(this->str);
2406 locale_dtor(&this->loc);
2407 basic_streambuf_char_dtor(&this->base);
2410 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2411 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2413 TRACE("(%p %x)\n", this, flags);
2415 /* we have an array, with the number of elements stored before the first object */
2416 INT_PTR i, *ptr = (INT_PTR *)this-1;
2418 for(i=*ptr-1; i>=0; i--)
2419 basic_filebuf_char_dtor(this+i);
2420 MSVCRT_operator_delete(ptr);
2422 basic_filebuf_char_dtor(this);
2424 MSVCRT_operator_delete(this);
2430 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2431 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2432 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2433 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2435 TRACE("(%p)\n", this);
2436 return this->file != NULL;
2439 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2440 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2441 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2443 static const wchar_t rW[] = {'r',0};
2444 static const struct {
2446 const wchar_t str[4];
2447 const wchar_t str_bin[4];
2449 {OPENMODE_out, {'w',0}, {'w','b',0}},
2450 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2451 {OPENMODE_app, {'a',0}, {'a','b',0}},
2452 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2453 {OPENMODE_in, {'r',0}, {'r','b',0}},
2454 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2455 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2456 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2457 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2460 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2464 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2466 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2467 if(str_mode[mode_idx].mode == real_mode)
2469 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2472 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2477 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2478 && (f = _wfopen(name, rW))) {
2483 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2484 : str_mode[mode_idx].str, prot);
2488 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2496 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2497 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2498 static FILE* _Fiopen(const char *name, int mode, int prot)
2500 wchar_t nameW[FILENAME_MAX];
2502 TRACE("(%s %d %d)\n", name, mode, prot);
2504 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2506 return _Fiopen_wchar(nameW, mode, prot);
2509 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2510 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2511 FILE* __cdecl ___Fiopen(const char *name, int mode)
2513 TRACE("(%p %d)\n", name, mode);
2514 return _Fiopen(name, mode, _SH_DENYNO);
2517 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2518 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2519 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2520 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2521 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2525 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2527 if(basic_filebuf_char_is_open(this))
2530 if(!(f = _Fiopen_wchar(name, mode, prot)))
2533 basic_filebuf_char__Init(this, f, INITFL_open);
2534 basic_filebuf_char__Initcvt(this);
2538 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2539 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2540 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2542 wchar_t nameW[FILENAME_MAX];
2544 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2546 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2548 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2551 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2552 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2553 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2554 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2556 TRACE("(%p %p %d)\n", this, name, mode);
2557 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2560 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2561 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2562 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2563 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2565 TRACE("(%p %p %d)\n", this, name, mode);
2566 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2569 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2570 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2571 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2572 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2574 char *ptr, ch = c, *to_next;
2575 const char *from_next;
2579 TRACE("(%p %d)\n", this, c);
2581 if(!basic_filebuf_char_is_open(this))
2587 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2590 basic_string_char_clear(this->str);
2591 basic_string_char_append_len_ch(this->str, 8, '\0');
2592 ptr = this->str->ptr;
2593 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1, &from_next,
2594 ptr, ptr+basic_string_char_length(this->str), &to_next);
2597 case CODECVT_partial:
2598 if(from_next == &ch)
2601 if(!fwrite(ptr, to_next-ptr, 1, this->file))
2604 case CODECVT_noconv:
2605 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2611 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2612 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2613 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2614 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2616 TRACE("(%p %d)\n", this, c);
2618 if(!basic_filebuf_char_is_open(this))
2621 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2622 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2623 basic_streambuf_char__Gndec(&this->base);
2624 return c==EOF ? !c : c;
2625 }else if(c == EOF) {
2627 }else if(!this->cvt) {
2628 return ungetc(c, this->file);
2629 }else if(basic_string_char_length(this->str)) {
2633 b = e+this->str->size-1;
2634 for(cur = b; cur>=e; cur--) {
2635 if(ungetc(*cur, this->file) == EOF) {
2636 for(; cur<=b; cur++)
2641 basic_string_char_clear(this->str);
2642 this->state = this->state0;
2649 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2650 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2651 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2652 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2655 const char *buf_next;
2658 TRACE("(%p)\n", this);
2660 if(!basic_filebuf_char_is_open(this))
2663 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2664 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2666 c = fgetc(this->file);
2667 if(!this->cvt || c==EOF)
2670 basic_string_char_clear(this->str);
2671 this->state0 = this->state;
2673 basic_string_char_append_ch(this->str, c);
2674 this->state = this->state0;
2676 switch(codecvt_char_in(this->cvt, &this->state, this->str->ptr,
2677 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
2678 case CODECVT_partial:
2680 case CODECVT_noconv:
2681 return (unsigned char)this->str->ptr[0];
2683 return (unsigned char)ch;
2688 c = fgetc(this->file);
2694 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2695 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2696 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2697 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2701 TRACE("(%p)\n", this);
2703 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2704 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2706 ret = call_basic_streambuf_char_uflow(&this->base);
2708 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2712 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2713 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2714 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2715 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2716 fpos_int *ret, streamoff off, int way, int mode)
2720 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2722 if(!basic_filebuf_char_is_open(this) || fseek(this->file, off, way)) {
2729 fgetpos(this->file, &pos);
2732 ret->state = this->state;
2736 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2737 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2738 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2739 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2740 fpos_int *ret, fpos_int pos, int mode)
2744 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2746 if(!basic_filebuf_char_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2747 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2754 fgetpos(this->file, &fpos);
2757 ret->state = this->state;
2761 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2762 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2763 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2764 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2766 TRACE("(%p %p %ld)\n", this, buf, count);
2768 if(!basic_filebuf_char_is_open(this))
2771 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2774 basic_filebuf_char__Init(this, this->file, INITFL_open);
2778 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2779 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2780 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2781 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2783 TRACE("(%p)\n", this);
2785 if(!basic_filebuf_char_is_open(this))
2788 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2790 return fflush(this->file);
2793 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2794 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2795 int basic_filebuf_short__Init__Stinit = 0;
2797 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2798 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2799 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2801 TRACE("(%p %p %d)\n", this, file, which);
2804 this->state0 = basic_filebuf_short__Init__Stinit;
2805 this->state = basic_filebuf_short__Init__Stinit;
2807 this->close = (which == INITFL_open);
2810 basic_streambuf_wchar__Init_empty(&this->base);
2813 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2814 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2815 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2816 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2818 TRACE("(%p %p %d)\n", this, file, which);
2821 this->state0 = basic_filebuf_short__Init__Stinit;
2822 this->state = basic_filebuf_short__Init__Stinit;
2824 this->close = (which == INITFL_open);
2827 basic_streambuf_wchar__Init_empty(&this->base);
2830 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2831 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2832 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 4)
2833 void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this)
2835 TRACE("(%p)\n", this);
2837 this->cvt = codecvt_short_use_facet(&this->base.loc);
2838 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_short_id.id, LC_CTYPE);
2839 if(codecvt_base_always_noconv(&this->cvt->base)) {
2842 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2843 basic_string_char_ctor(this->str);
2847 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2848 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2849 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2850 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2851 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2852 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2854 basic_filebuf_wchar *ret = this;
2856 TRACE("(%p)\n", this);
2858 if(!this->file || fclose(this->file))
2861 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2865 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2866 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2867 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2869 TRACE("(%p %p)\n", this, file);
2871 basic_streambuf_wchar_ctor(&this->base);
2872 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2874 locale_ctor(&this->loc);
2875 basic_filebuf_wchar__Init(this, file, INITFL_new);
2879 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2880 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2881 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2882 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2884 TRACE("(%p %p)\n", this, file);
2886 basic_streambuf_short_ctor(&this->base);
2887 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2889 locale_ctor(&this->loc);
2890 basic_filebuf_short__Init(this, file, INITFL_new);
2894 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2895 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2896 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2898 return basic_filebuf_wchar_ctor_file(this, NULL);
2901 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2902 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2903 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2904 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2906 return basic_filebuf_short_ctor_file(this, NULL);
2909 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2910 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2911 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
2912 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
2914 TRACE("(%p %d)\n", this, uninitialized);
2916 basic_streambuf_short_ctor_uninitialized(&this->base, 0);
2917 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2918 locale_ctor(&this->loc);
2922 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2923 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2924 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2925 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2926 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
2927 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
2929 TRACE("(%p)\n", this);
2932 basic_filebuf_wchar_close(this);
2934 basic_string_char_dtor(this->str);
2935 MSVCRT_operator_delete(this->str);
2937 locale_dtor(&this->loc);
2938 basic_streambuf_wchar_dtor(&this->base);
2941 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
2942 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
2944 TRACE("(%p %x)\n", this, flags);
2946 /* we have an array, with the number of elements stored before the first object */
2947 INT_PTR i, *ptr = (INT_PTR *)this-1;
2949 for(i=*ptr-1; i>=0; i--)
2950 basic_filebuf_wchar_dtor(this+i);
2951 MSVCRT_operator_delete(ptr);
2953 basic_filebuf_wchar_dtor(this);
2955 MSVCRT_operator_delete(this);
2961 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
2962 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
2963 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2964 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2965 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
2966 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
2968 TRACE("(%p)\n", this);
2969 return this->file != NULL;
2972 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
2973 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2974 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
2975 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2976 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
2980 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2982 if(basic_filebuf_wchar_is_open(this))
2985 if(!(f = _Fiopen_wchar(name, mode, prot)))
2988 basic_filebuf_wchar__Init(this, f, INITFL_open);
2989 basic_filebuf_wchar__Initcvt(this);
2993 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
2994 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2995 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
2997 wchar_t nameW[FILENAME_MAX];
2999 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3001 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3003 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3006 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3007 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3008 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3009 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3011 TRACE("(%p %p %d)\n", this, name, mode);
3012 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3015 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3016 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3017 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3018 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3020 TRACE("(%p %p %d)\n", this, name, mode);
3021 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3024 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3025 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3026 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3027 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3028 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3029 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3031 char *ptr, *to_next;
3033 const wchar_t *from_next;
3037 TRACE("(%p %d)\n", this, c);
3039 if(!basic_filebuf_wchar_is_open(this))
3045 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3048 basic_string_char_clear(this->str);
3049 basic_string_char_append_len_ch(this->str, 8, '\0');
3050 ptr = this->str->ptr;
3051 ret = codecvt_wchar_out(this->cvt, &this->state, &ch, &ch+1, &from_next,
3052 ptr, ptr+basic_string_char_length(this->str), &to_next);
3055 case CODECVT_partial:
3056 if(from_next == &ch)
3060 if(!fwrite(ptr, to_next-ptr, 1, this->file))
3063 case CODECVT_noconv:
3064 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3070 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3071 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3072 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3073 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3074 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3075 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3077 TRACE("(%p %d)\n", this, c);
3079 if(!basic_filebuf_wchar_is_open(this))
3082 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3083 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3084 basic_streambuf_wchar__Gndec(&this->base);
3085 return c==WEOF ? !c : c;
3086 }else if(c == WEOF) {
3088 }else if(!this->cvt) {
3089 return ungetwc(c, this->file);
3090 }else if(basic_string_char_length(this->str)) {
3094 b = e+this->str->size-1;
3095 for(cur = b; cur>=e; cur--) {
3096 if(ungetc(*cur, this->file) == EOF) {
3097 for(; cur<=b; cur++)
3102 basic_string_char_clear(this->str);
3103 this->state = this->state0;
3110 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3111 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3112 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3113 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3114 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3115 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3117 wchar_t ch, *to_next;
3118 const char *buf_next;
3121 TRACE("(%p)\n", this);
3123 if(!basic_filebuf_wchar_is_open(this))
3126 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3127 return *basic_streambuf_wchar__Gninc(&this->base);
3130 return fgetwc(this->file);
3132 basic_string_char_clear(this->str);
3133 this->state0 = this->state;
3135 if((c = fgetc(this->file)) == EOF)
3137 basic_string_char_append_ch(this->str, c);
3138 this->state = this->state0;
3140 switch(codecvt_wchar_in(this->cvt, &this->state, this->str->ptr,
3141 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
3142 case CODECVT_partial:
3144 case CODECVT_noconv:
3145 if(this->str->size < sizeof(unsigned short)/sizeof(char))
3147 return *(unsigned short*)this->str->ptr;
3149 return (unsigned short)ch;
3156 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3157 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3158 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3159 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3160 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3161 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3165 TRACE("(%p)\n", this);
3167 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3168 return *basic_streambuf_wchar_gptr(&this->base);
3170 ret = call_basic_streambuf_wchar_uflow(&this->base);
3172 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3176 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3177 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3178 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3179 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3180 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3181 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3182 fpos_int *ret, streamoff off, int way, int mode)
3186 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3188 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, off, way)) {
3195 fgetpos(this->file, &pos);
3198 ret->state = this->state;
3202 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3203 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3204 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3205 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3206 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3207 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3208 fpos_int *ret, fpos_int pos, int mode)
3212 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3214 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3215 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3222 fgetpos(this->file, &fpos);
3225 ret->state = this->state;
3229 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3230 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3231 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3232 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3234 TRACE("(%p %p %ld)\n", this, buf, count);
3236 if(!basic_filebuf_wchar_is_open(this))
3239 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3242 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3246 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3247 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3248 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3249 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3251 TRACE("(%p %p %ld)\n", this, buf, count);
3253 if(!basic_filebuf_wchar_is_open(this))
3256 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3259 basic_filebuf_short__Init(this, this->file, INITFL_open);
3263 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3264 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3265 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3266 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3267 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3268 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3270 TRACE("(%p)\n", this);
3272 if(!basic_filebuf_wchar_is_open(this))
3275 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3277 return fflush(this->file);
3280 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3281 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3282 static int basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3286 if(!(mode & OPENMODE_in))
3287 state |= STRINGBUF_no_read;
3289 if(!(mode & OPENMODE_out))
3290 state |= STRINGBUF_no_write;
3292 if(mode & OPENMODE_ate)
3293 state |= STRINGBUF_at_end;
3295 if(mode & OPENMODE_app)
3296 state |= STRINGBUF_append;
3301 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3302 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3303 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3304 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3306 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3308 basic_streambuf_char__Init_empty(&this->base);
3310 this->state = state;
3311 this->seekhigh = NULL;
3314 char *buf = MSVCRT_operator_new(count);
3316 ERR("Out of memory\n");
3317 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3320 memcpy(buf, str, count);
3321 this->seekhigh = buf + count;
3323 this->state |= STRINGBUF_allocated;
3325 if(!(state & STRINGBUF_no_read))
3326 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3328 if(!(state & STRINGBUF_no_write)) {
3329 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3331 if(!basic_streambuf_char_gptr(&this->base))
3332 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3337 /* ??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 */
3338 /* ??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 */
3339 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3340 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3341 const basic_string_char *str, IOSB_openmode mode)
3343 TRACE("(%p %p %d)\n", this, str, mode);
3345 basic_streambuf_char_ctor(&this->base);
3346 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3348 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3349 str->size, basic_stringbuf_char__Getstate(this, mode));
3353 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3354 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3355 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3356 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3357 basic_stringbuf_char *this, IOSB_openmode mode)
3359 TRACE("(%p %d)\n", this, mode);
3361 basic_streambuf_char_ctor(&this->base);
3362 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3364 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3368 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3369 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3370 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3371 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3373 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3376 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3377 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3378 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3379 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3381 TRACE("(%p)\n", this);
3383 if(this->state & STRINGBUF_allocated) {
3384 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3385 this->seekhigh = NULL;
3386 this->state &= ~STRINGBUF_allocated;
3389 basic_streambuf_char__Init_empty(&this->base);
3392 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3393 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3394 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3395 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3397 TRACE("(%p)\n", this);
3399 basic_stringbuf_char__Tidy(this);
3400 basic_streambuf_char_dtor(&this->base);
3403 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3404 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3406 TRACE("(%p %x)\n", this, flags);
3409 /* we have an array, with the number of elements stored before the first object */
3410 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3412 for (i = *ptr - 1; i >= 0; i--)
3413 basic_stringbuf_char_dtor(this+i);
3415 MSVCRT_operator_delete(ptr);
3417 basic_stringbuf_char_dtor(this);
3420 MSVCRT_operator_delete(this);
3426 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3427 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3428 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3429 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3431 MSVCP_size_t oldsize, size;
3434 TRACE("(%p %x)\n", this, meta);
3438 if(this->state & STRINGBUF_no_write)
3441 ptr = basic_streambuf_char_pptr(&this->base);
3442 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3443 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3444 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3446 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3447 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3449 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3452 buf = MSVCRT_operator_new(size);
3454 ERR("Out of memory\n");
3455 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3459 this->seekhigh = buf;
3460 basic_streambuf_char_setp(&this->base, buf, buf+size);
3461 if(this->state & STRINGBUF_no_read)
3462 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3464 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3466 this->state |= STRINGBUF_allocated;
3468 ptr = basic_streambuf_char_eback(&this->base);
3469 memcpy(buf, ptr, oldsize);
3471 this->seekhigh = buf+(this->seekhigh-ptr);
3472 basic_streambuf_char_setp_next(&this->base, buf,
3473 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3474 if(this->state & STRINGBUF_no_read)
3475 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3477 basic_streambuf_char_setg(&this->base, buf,
3478 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3479 basic_streambuf_char_pptr(&this->base)+1);
3481 MSVCRT_operator_delete(ptr);
3484 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3487 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3488 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3489 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3490 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3494 TRACE("(%p %x)\n", this, c);
3496 cur = basic_streambuf_char_gptr(&this->base);
3497 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3498 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3503 basic_streambuf_char_gbump(&this->base, -1);
3504 return c==EOF ? !EOF : c;
3507 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3508 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3509 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3510 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3514 TRACE("(%p)\n", this);
3516 cur = basic_streambuf_char_gptr(&this->base);
3517 if(!cur || this->state&STRINGBUF_no_read)
3520 ptr = basic_streambuf_char_pptr(&this->base);
3521 if(this->seekhigh < ptr)
3522 this->seekhigh = ptr;
3524 ptr = basic_streambuf_char_egptr(&this->base);
3525 if(this->seekhigh > ptr)
3526 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3528 if(cur < this->seekhigh)
3529 return (unsigned char)*cur;
3533 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3534 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3535 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3536 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3537 fpos_int *ret, streamoff off, int way, int mode)
3539 char *beg, *cur_r, *cur_w;
3541 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3543 cur_w = basic_streambuf_char_pptr(&this->base);
3544 if(cur_w > this->seekhigh)
3545 this->seekhigh = cur_w;
3551 beg = basic_streambuf_char_eback(&this->base);
3552 cur_r = basic_streambuf_char_gptr(&this->base);
3553 if((mode & OPENMODE_in) && cur_r) {
3554 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3556 else if(way == SEEKDIR_end)
3557 off += this->seekhigh-beg;
3558 else if(way != SEEKDIR_beg)
3561 if(off<0 || off>this->seekhigh-beg) {
3564 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3565 if((mode & OPENMODE_out) && cur_w) {
3566 basic_streambuf_char_setp_next(&this->base, beg,
3567 basic_streambuf_char_gptr(&this->base),
3568 basic_streambuf_char_epptr(&this->base));
3571 }else if((mode & OPENMODE_out) && cur_w) {
3572 if(way == SEEKDIR_cur)
3574 else if(way == SEEKDIR_end)
3575 off += this->seekhigh-beg;
3576 else if(way != SEEKDIR_beg)
3579 if(off<0 || off>this->seekhigh-beg)
3582 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3591 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3592 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3593 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3594 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3595 fpos_int *ret, fpos_int pos, int mode)
3597 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3599 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3604 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3607 /* ?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 */
3608 /* ?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 */
3609 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3610 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3612 TRACE("(%p %p)\n", this, str);
3614 basic_stringbuf_char__Tidy(this);
3615 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3618 /* ?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 */
3619 /* ?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 */
3620 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3621 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3625 TRACE("(%p)\n", this);
3627 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3630 ptr = basic_streambuf_char_pbase(&this->base);
3631 pptr = basic_streambuf_char_pptr(&this->base);
3633 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3636 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3637 ptr = basic_streambuf_char_eback(&this->base);
3638 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3641 return basic_string_char_ctor(ret);
3644 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3645 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3646 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3647 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3648 static int basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3652 if(!(mode & OPENMODE_in))
3653 state |= STRINGBUF_no_read;
3655 if(!(mode & OPENMODE_out))
3656 state |= STRINGBUF_no_write;
3658 if(mode & OPENMODE_ate)
3659 state |= STRINGBUF_at_end;
3661 if(mode & OPENMODE_app)
3662 state |= STRINGBUF_append;
3667 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3668 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3669 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3670 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3671 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3672 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3674 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3676 basic_streambuf_wchar__Init_empty(&this->base);
3678 this->state = state;
3679 this->seekhigh = NULL;
3682 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3684 ERR("Out of memory\n");
3685 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3688 memcpy(buf, str, count*sizeof(wchar_t));
3689 this->seekhigh = buf + count;
3691 this->state |= STRINGBUF_allocated;
3693 if(!(state & STRINGBUF_no_read))
3694 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3696 if(!(state & STRINGBUF_no_write)) {
3697 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3699 if(!basic_streambuf_wchar_gptr(&this->base))
3700 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3705 /* ??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 */
3706 /* ??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 */
3707 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3708 const basic_string_wchar *str, IOSB_openmode mode)
3710 TRACE("(%p %p %d)\n", this, str, mode);
3712 basic_streambuf_wchar_ctor(&this->base);
3713 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3715 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3716 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3720 /* ??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 */
3721 /* ??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 */
3722 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3723 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3724 const basic_string_wchar *str, IOSB_openmode mode)
3726 basic_stringbuf_wchar_ctor_str(this, str, mode);
3727 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3731 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3732 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3733 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3734 basic_stringbuf_wchar *this, IOSB_openmode mode)
3736 TRACE("(%p %d)\n", this, mode);
3738 basic_streambuf_wchar_ctor(&this->base);
3739 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3741 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3745 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3746 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3747 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3748 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3749 basic_stringbuf_wchar *this, IOSB_openmode mode)
3751 basic_stringbuf_wchar_ctor_mode(this, mode);
3752 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3756 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3757 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3758 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3759 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3761 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3764 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3765 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3766 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3767 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3768 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3769 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3771 TRACE("(%p)\n", this);
3773 if(this->state & STRINGBUF_allocated) {
3774 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3775 this->seekhigh = NULL;
3776 this->state &= ~STRINGBUF_allocated;
3779 basic_streambuf_wchar__Init_empty(&this->base);
3782 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3783 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3784 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3785 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3786 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3787 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3789 TRACE("(%p)\n", this);
3791 basic_stringbuf_wchar__Tidy(this);
3792 basic_streambuf_wchar_dtor(&this->base);
3795 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3796 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3798 TRACE("(%p %x)\n", this, flags);
3801 /* we have an array, with the number of elements stored before the first object */
3802 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3804 for (i = *ptr - 1; i >= 0; i--)
3805 basic_stringbuf_wchar_dtor(this+i);
3807 MSVCRT_operator_delete(ptr);
3809 basic_stringbuf_wchar_dtor(this);
3812 MSVCRT_operator_delete(this);
3818 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3819 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3820 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3821 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3822 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3823 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3825 MSVCP_size_t oldsize, size;
3828 TRACE("(%p %x)\n", this, meta);
3832 if(this->state & STRINGBUF_no_write)
3835 ptr = basic_streambuf_wchar_pptr(&this->base);
3836 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3837 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3838 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3840 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3841 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3843 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3846 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3848 ERR("Out of memory\n");
3849 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3853 this->seekhigh = buf;
3854 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3855 if(this->state & STRINGBUF_no_read)
3856 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3858 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3860 this->state |= STRINGBUF_allocated;
3862 ptr = basic_streambuf_wchar_eback(&this->base);
3863 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3865 this->seekhigh = buf+(this->seekhigh-ptr);
3866 basic_streambuf_wchar_setp_next(&this->base, buf,
3867 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
3868 if(this->state & STRINGBUF_no_read)
3869 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3871 basic_streambuf_wchar_setg(&this->base, buf,
3872 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
3873 basic_streambuf_wchar_pptr(&this->base)+1);
3875 MSVCRT_operator_delete(ptr);
3878 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3881 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3882 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3883 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3884 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3885 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
3886 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
3890 TRACE("(%p %x)\n", this, c);
3892 cur = basic_streambuf_wchar_gptr(&this->base);
3893 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
3894 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3899 basic_streambuf_wchar_gbump(&this->base, -1);
3900 return c==WEOF ? !WEOF : c;
3903 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3904 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3905 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3906 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3907 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
3908 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
3912 TRACE("(%p)\n", this);
3914 cur = basic_streambuf_wchar_gptr(&this->base);
3915 if(!cur || this->state&STRINGBUF_no_read)
3918 ptr = basic_streambuf_wchar_pptr(&this->base);
3919 if(this->seekhigh < ptr)
3920 this->seekhigh = ptr;
3922 ptr = basic_streambuf_wchar_egptr(&this->base);
3923 if(this->seekhigh > ptr)
3924 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
3926 if(cur < this->seekhigh)
3931 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3932 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3933 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3934 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@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@_N@Z */
5085 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5086 static basic_ostream_char* basic_ostream_char_ctor(basic_ostream_char *this,
5087 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5089 basic_ios_char *base;
5091 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5094 this->vbtable = basic_ostream_char_vbtable;
5095 base = basic_ostream_char_get_basic_ios(this);
5096 basic_ios_char_ctor(base);
5098 base = basic_ostream_char_get_basic_ios(this);
5101 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5102 basic_ios_char_init(base, strbuf, isstd);
5106 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5107 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5108 static basic_ostream_char* basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5109 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5111 basic_ios_char *base;
5113 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5116 this->vbtable = basic_ostream_char_vbtable;
5117 base = basic_ostream_char_get_basic_ios(this);
5118 basic_ios_char_ctor(base);
5120 base = basic_ostream_char_get_basic_ios(this);
5123 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5125 ios_base_Addstd(&base->base);
5129 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5130 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5131 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5132 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5134 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5136 /* don't destroy virtual base here */
5137 TRACE("(%p)\n", this);
5140 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5141 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5142 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5143 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5145 TRACE("(%p)\n", this);
5146 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5147 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5150 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5151 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5153 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5155 TRACE("(%p %x)\n", this, flags);
5158 /* we have an array, with the number of elements stored before the first object */
5159 INT_PTR i, *ptr = (INT_PTR *)this-1;
5161 for(i=*ptr-1; i>=0; i--)
5162 basic_ostream_char_vbase_dtor(this+i);
5163 MSVCRT_operator_delete(ptr);
5165 basic_ostream_char_vbase_dtor(this);
5167 MSVCRT_operator_delete(this);
5173 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5174 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5175 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5176 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5178 /* this function is not matching C++ specification */
5179 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5181 TRACE("(%p)\n", this);
5183 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5184 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5185 basic_ios_char_setstate(base, IOSTATE_badbit);
5189 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5190 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5191 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5193 return basic_ostream_char_flush(ostream);
5196 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5197 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5198 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5200 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5202 TRACE("(%p)\n", this);
5204 if(base->base.fmtfl & FMTFLAG_unitbuf)
5205 basic_ostream_char_flush(this);
5208 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5209 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5210 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5211 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5213 TRACE("(%p)\n", this);
5214 basic_ostream_char__Osfx(this);
5217 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5219 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5221 if(basic_ios_char_rdbuf_get(base))
5222 basic_streambuf_char__Lock(base->strbuf);
5224 if(ios_base_good(&base->base) && base->stream)
5225 basic_ostream_char_flush(base->stream);
5227 return ios_base_good(&base->base);
5230 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5232 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5234 if(ios_base_good(&base->base) && !__uncaught_exception())
5235 basic_ostream_char_osfx(ostr);
5237 if(basic_ios_char_rdbuf_get(base))
5238 basic_streambuf_char__Unlock(base->strbuf);
5241 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5242 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5243 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5244 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5246 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5248 TRACE("(%p)\n", this);
5250 if(ios_base_good(&base->base) && base->stream)
5251 basic_ostream_char_flush(base->stream);
5252 return ios_base_good(&base->base);
5255 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5256 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5257 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5258 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5260 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5262 TRACE("(%p %c)\n", this, ch);
5264 if(!basic_ostream_char_sentry_create(this)
5265 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5266 basic_ostream_char_sentry_destroy(this);
5267 basic_ios_char_setstate(base, IOSTATE_badbit);
5271 basic_ostream_char_sentry_destroy(this);
5275 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5276 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5277 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5278 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5280 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5282 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5284 if(!ios_base_fail(&base->base)) {
5287 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5288 &seek, pos, OPENMODE_out);
5289 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5290 basic_ios_char_setstate(base, IOSTATE_failbit);
5295 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5296 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5297 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5298 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5300 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5302 TRACE("(%p)\n", this);
5304 if(!ios_base_fail(&base->base)) {
5305 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5306 ret, 0, SEEKDIR_cur, OPENMODE_out);
5315 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5316 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5317 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5318 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5320 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5322 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5324 if(!basic_ostream_char_sentry_create(this)
5325 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5326 basic_ostream_char_sentry_destroy(this);
5327 basic_ios_char_setstate(base, IOSTATE_badbit);
5331 basic_ostream_char_sentry_destroy(this);
5335 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5336 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5337 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5338 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5340 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5341 int state = IOSTATE_goodbit;
5343 TRACE("(%p %d)\n", this, val);
5345 if(basic_ostream_char_sentry_create(this)) {
5346 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5347 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5348 ostreambuf_iterator_char dest = {0, strbuf};
5350 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5351 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5352 ? (LONG)((unsigned short)val) : (LONG)val);
5354 basic_ostream_char_sentry_destroy(this);
5356 basic_ios_char_setstate(base, state);
5360 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5361 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5362 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5363 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5365 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5366 int state = IOSTATE_goodbit;
5368 TRACE("(%p %u)\n", this, val);
5370 if(basic_ostream_char_sentry_create(this)) {
5371 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5372 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5373 ostreambuf_iterator_char dest = {0, strbuf};
5375 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5377 basic_ostream_char_sentry_destroy(this);
5379 basic_ios_char_setstate(base, state);
5383 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5384 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5385 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5386 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5387 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5388 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5390 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5391 int state = IOSTATE_goodbit;
5393 TRACE("(%p %d)\n", this, val);
5395 if(basic_ostream_char_sentry_create(this)) {
5396 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5397 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5398 ostreambuf_iterator_char dest = {0, strbuf};
5400 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5402 basic_ostream_char_sentry_destroy(this);
5404 basic_ios_char_setstate(base, state);
5408 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5409 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5410 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5411 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5412 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5413 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5415 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5416 int state = IOSTATE_goodbit;
5418 TRACE("(%p %u)\n", this, val);
5420 if(basic_ostream_char_sentry_create(this)) {
5421 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5422 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5423 ostreambuf_iterator_char dest = {0, strbuf};
5425 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5427 basic_ostream_char_sentry_destroy(this);
5429 basic_ios_char_setstate(base, state);
5433 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5434 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5435 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5436 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5438 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5439 int state = IOSTATE_goodbit;
5441 TRACE("(%p %f)\n", this, val);
5443 if(basic_ostream_char_sentry_create(this)) {
5444 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5445 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5446 ostreambuf_iterator_char dest = {0, strbuf};
5448 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5450 basic_ostream_char_sentry_destroy(this);
5452 basic_ios_char_setstate(base, state);
5456 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5457 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5458 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5459 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5461 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5462 int state = IOSTATE_goodbit;
5464 TRACE("(%p %lf)\n", this, val);
5466 if(basic_ostream_char_sentry_create(this)) {
5467 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5468 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5469 ostreambuf_iterator_char dest = {0, strbuf};
5471 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5473 basic_ostream_char_sentry_destroy(this);
5475 basic_ios_char_setstate(base, state);
5479 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5480 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5481 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5482 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5484 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5485 int state = IOSTATE_goodbit;
5487 TRACE("(%p %lf)\n", this, val);
5489 if(basic_ostream_char_sentry_create(this)) {
5490 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5491 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5492 ostreambuf_iterator_char dest = {0, strbuf};
5494 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5496 basic_ostream_char_sentry_destroy(this);
5498 basic_ios_char_setstate(base, state);
5502 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5503 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5504 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5505 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5507 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5508 IOSB_iostate state = IOSTATE_badbit;
5511 TRACE("(%p %p)\n", this, val);
5513 if(basic_ostream_char_sentry_create(this)) {
5514 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5515 c = basic_streambuf_char_snextc(val)) {
5516 state = IOSTATE_goodbit;
5518 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5519 state = IOSTATE_badbit;
5524 state = IOSTATE_badbit;
5526 basic_ostream_char_sentry_destroy(this);
5528 ios_base_width_set(&base->base, 0);
5529 basic_ios_char_setstate(base, state);
5533 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5534 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5535 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5536 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5538 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5539 int state = IOSTATE_goodbit;
5541 TRACE("(%p %p)\n", this, val);
5543 if(basic_ostream_char_sentry_create(this)) {
5544 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5545 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5546 ostreambuf_iterator_char dest = {0, strbuf};
5548 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5550 basic_ostream_char_sentry_destroy(this);
5552 basic_ios_char_setstate(base, state);
5556 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5557 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5558 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5559 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5561 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5562 int state = IOSTATE_goodbit;
5564 TRACE("(%p)\n", this);
5566 if(basic_ostream_char_sentry_create(this)) {
5567 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5568 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5569 ostreambuf_iterator_char dest = {0, strbuf};
5571 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5573 basic_ostream_char_sentry_destroy(this);
5575 basic_ios_char_setstate(base, state);
5579 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5580 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5581 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5582 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5584 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5585 int state = IOSTATE_goodbit;
5587 TRACE("(%p)\n", this);
5589 if(basic_ostream_char_sentry_create(this)) {
5590 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5591 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5592 ostreambuf_iterator_char dest = {0, strbuf};
5594 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5596 basic_ostream_char_sentry_destroy(this);
5598 basic_ios_char_setstate(base, state);
5602 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5603 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5604 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5605 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5607 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5608 int state = IOSTATE_goodbit;
5610 TRACE("(%p %x)\n", this, val);
5612 if(basic_ostream_char_sentry_create(this)) {
5613 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5614 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5615 ostreambuf_iterator_char dest = {0, strbuf};
5617 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5619 basic_ostream_char_sentry_destroy(this);
5621 basic_ios_char_setstate(base, state);
5625 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5626 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5627 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5629 TRACE("(%p)\n", ostr);
5631 basic_ostream_char_put(ostr, '\n');
5632 basic_ostream_char_flush(ostr);
5636 /* $?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 */
5637 /* ??$?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 */
5638 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5640 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5641 IOSB_iostate state = IOSTATE_goodbit;
5643 TRACE("(%p %p)\n", ostr, str);
5645 if(basic_ostream_char_sentry_create(ostr)) {
5646 MSVCP_size_t len = basic_string_char_length(str);
5647 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5649 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5650 for(; pad!=0; pad--) {
5651 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5652 state = IOSTATE_badbit;
5658 if(state == IOSTATE_goodbit) {
5659 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5660 state = IOSTATE_badbit;
5663 if(state == IOSTATE_goodbit) {
5664 for(; pad!=0; pad--) {
5665 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5666 state = IOSTATE_badbit;
5672 base->base.wide = 0;
5674 state = IOSTATE_badbit;
5676 basic_ostream_char_sentry_destroy(ostr);
5678 basic_ios_char_setstate(base, state);
5682 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5683 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5684 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5685 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5686 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5687 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5688 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5690 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5691 IOSB_iostate state = IOSTATE_goodbit;
5693 TRACE("(%p %d)\n", ostr, ch);
5695 if(basic_ostream_char_sentry_create(ostr)) {
5696 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5698 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5699 for(; pad!=0; pad--) {
5700 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5701 state = IOSTATE_badbit;
5707 if(state == IOSTATE_goodbit) {
5708 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5709 state = IOSTATE_badbit;
5712 if(state == IOSTATE_goodbit) {
5713 for(; pad!=0; pad--) {
5714 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5715 state = IOSTATE_badbit;
5721 base->base.wide = 0;
5723 state = IOSTATE_badbit;
5725 basic_ostream_char_sentry_destroy(ostr);
5727 basic_ios_char_setstate(base, state);
5731 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5732 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5733 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5734 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5735 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5736 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5737 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5739 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5740 IOSB_iostate state = IOSTATE_goodbit;
5742 TRACE("(%p %s)\n", ostr, str);
5744 if(basic_ostream_char_sentry_create(ostr)) {
5745 MSVCP_size_t len = strlen(str);
5746 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5748 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5749 for(; pad!=0; pad--) {
5750 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5751 state = IOSTATE_badbit;
5757 if(state == IOSTATE_goodbit) {
5758 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5759 state = IOSTATE_badbit;
5762 if(state == IOSTATE_goodbit) {
5763 for(; pad!=0; pad--) {
5764 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5765 state = IOSTATE_badbit;
5771 base->base.wide = 0;
5773 state = IOSTATE_badbit;
5775 basic_ostream_char_sentry_destroy(ostr);
5777 basic_ios_char_setstate(base, state);
5781 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5782 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5783 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5784 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5785 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5787 TRACE("(%p %p)\n", this, pfunc);
5792 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5793 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5794 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5795 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5796 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5798 TRACE("(%p %p)\n", this, pfunc);
5799 pfunc(basic_ostream_char_get_basic_ios(this));
5803 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5804 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5805 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5806 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5807 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5809 TRACE("(%p %p)\n", this, pfunc);
5810 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5814 /* Caution: basic_ostream uses virtual inheritance. */
5815 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5817 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5820 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5822 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5825 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5827 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5830 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5831 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5832 static basic_ostream_wchar* basic_ostream_wchar_ctor(basic_ostream_wchar *this,
5833 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5835 basic_ios_wchar *base;
5837 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5840 this->vbtable = basic_ostream_wchar_vbtable;
5841 base = basic_ostream_wchar_get_basic_ios(this);
5842 basic_ios_wchar_ctor(base);
5844 base = basic_ostream_wchar_get_basic_ios(this);
5847 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5848 basic_ios_wchar_init(base, strbuf, isstd);
5852 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5853 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5854 static basic_ostream_wchar* basic_ostream_short_ctor(basic_ostream_wchar *this,
5855 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5857 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
5858 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
5862 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5863 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5864 static basic_ostream_wchar* basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
5865 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5867 basic_ios_wchar *base;
5869 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5872 this->vbtable = basic_ostream_wchar_vbtable;
5873 base = basic_ostream_wchar_get_basic_ios(this);
5874 basic_ios_wchar_ctor(base);
5876 base = basic_ostream_wchar_get_basic_ios(this);
5879 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5881 ios_base_Addstd(&base->base);
5885 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5886 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5887 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5888 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5889 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
5890 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
5892 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5894 /* don't destroy virtual base here */
5895 TRACE("(%p)\n", this);
5898 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5899 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5900 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5901 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5902 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
5903 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
5905 TRACE("(%p)\n", this);
5906 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5907 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5910 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
5911 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
5913 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5915 TRACE("(%p %x)\n", this, flags);
5918 /* we have an array, with the number of elements stored before the first object */
5919 INT_PTR i, *ptr = (INT_PTR *)this-1;
5921 for(i=*ptr-1; i>=0; i--)
5922 basic_ostream_wchar_vbase_dtor(this+i);
5923 MSVCRT_operator_delete(ptr);
5925 basic_ostream_wchar_vbase_dtor(this);
5927 MSVCRT_operator_delete(this);
5933 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
5934 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
5935 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
5936 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
5937 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
5938 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
5940 /* this function is not matching C++ specification */
5941 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5943 TRACE("(%p)\n", this);
5945 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
5946 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
5947 basic_ios_wchar_setstate(base, IOSTATE_badbit);
5951 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5952 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5953 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5954 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5955 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
5957 return basic_ostream_wchar_flush(ostream);
5960 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5961 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5962 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5963 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5964 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
5966 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5968 TRACE("(%p)\n", this);
5970 if(base->base.fmtfl & FMTFLAG_unitbuf)
5971 basic_ostream_wchar_flush(this);
5974 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5975 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5976 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5977 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5978 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
5979 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
5981 TRACE("(%p)\n", this);
5982 basic_ostream_wchar__Osfx(this);
5985 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
5987 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
5989 if(basic_ios_wchar_rdbuf_get(base))
5990 basic_streambuf_wchar__Lock(base->strbuf);
5992 if(ios_base_good(&base->base) && base->stream)
5993 basic_ostream_wchar_flush(base->stream);
5995 return ios_base_good(&base->base);
5998 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6000 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6002 if(ios_base_good(&base->base) && !__uncaught_exception())
6003 basic_ostream_wchar_osfx(ostr);
6005 if(basic_ios_wchar_rdbuf_get(base))
6006 basic_streambuf_wchar__Unlock(base->strbuf);
6009 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6010 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6011 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6012 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6013 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6014 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6016 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6018 TRACE("(%p)\n", this);
6020 if(ios_base_good(&base->base) && base->stream)
6021 basic_ostream_wchar_flush(base->stream);
6022 return ios_base_good(&base->base);
6025 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6026 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6027 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6028 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6029 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6030 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6032 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6034 TRACE("(%p %c)\n", this, ch);
6036 if(!basic_ostream_wchar_sentry_create(this)
6037 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6038 basic_ostream_wchar_sentry_destroy(this);
6039 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6043 basic_ostream_wchar_sentry_destroy(this);
6047 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6048 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6049 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6050 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6051 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6052 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6054 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6056 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6058 if(!ios_base_fail(&base->base)) {
6061 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6062 &seek, pos, OPENMODE_out);
6063 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6064 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6069 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6070 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6071 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6072 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6073 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6074 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6076 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6078 TRACE("(%p)\n", this);
6080 if(!ios_base_fail(&base->base)) {
6081 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6082 ret, 0, SEEKDIR_cur, OPENMODE_out);
6091 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6092 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6093 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6094 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6095 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6096 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6098 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6100 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6102 if(!basic_ostream_wchar_sentry_create(this)
6103 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6104 basic_ostream_wchar_sentry_destroy(this);
6105 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6109 basic_ostream_wchar_sentry_destroy(this);
6113 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6115 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6116 int state = IOSTATE_goodbit;
6118 TRACE("(%p %d)\n", this, val);
6120 if(basic_ostream_wchar_sentry_create(this)) {
6121 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6122 ostreambuf_iterator_wchar dest = {0, strbuf};
6124 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6125 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6126 ? (LONG)((unsigned short)val) : (LONG)val);
6128 basic_ostream_wchar_sentry_destroy(this);
6130 basic_ios_wchar_setstate(base, state);
6134 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6135 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6136 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6137 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6139 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6140 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6143 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6145 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6146 int state = IOSTATE_goodbit;
6148 TRACE("(%p %d)\n", this, val);
6150 if(basic_ostream_wchar_sentry_create(this)) {
6151 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6152 ostreambuf_iterator_wchar dest = {0, strbuf};
6154 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6156 basic_ostream_wchar_sentry_destroy(this);
6158 basic_ios_wchar_setstate(base, state);
6162 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6163 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6164 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6165 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6166 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6167 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6169 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6170 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6173 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6175 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6176 int state = IOSTATE_goodbit;
6178 TRACE("(%p %u)\n", this, val);
6180 if(basic_ostream_wchar_sentry_create(this)) {
6181 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6182 ostreambuf_iterator_wchar dest = {0, strbuf};
6184 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6186 basic_ostream_wchar_sentry_destroy(this);
6188 basic_ios_wchar_setstate(base, state);
6192 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6193 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6194 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6195 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6196 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6197 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6199 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6200 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6203 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6205 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6206 int state = IOSTATE_goodbit;
6208 TRACE("(%p %f)\n", this, val);
6210 if(basic_ostream_wchar_sentry_create(this)) {
6211 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6212 ostreambuf_iterator_wchar dest = {0, strbuf};
6214 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6216 basic_ostream_wchar_sentry_destroy(this);
6218 basic_ios_wchar_setstate(base, state);
6222 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6223 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6224 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6225 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6227 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6228 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6231 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6233 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6234 int state = IOSTATE_goodbit;
6236 TRACE("(%p %lf)\n", this, val);
6238 if(basic_ostream_wchar_sentry_create(this)) {
6239 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6240 ostreambuf_iterator_wchar dest = {0, strbuf};
6242 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6244 basic_ostream_wchar_sentry_destroy(this);
6246 basic_ios_wchar_setstate(base, state);
6250 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6251 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6252 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6253 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6255 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6256 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6259 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6261 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6262 int state = IOSTATE_goodbit;
6264 TRACE("(%p %lf)\n", this, val);
6266 if(basic_ostream_wchar_sentry_create(this)) {
6267 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6268 ostreambuf_iterator_wchar dest = {0, strbuf};
6270 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6272 basic_ostream_wchar_sentry_destroy(this);
6274 basic_ios_wchar_setstate(base, state);
6278 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6279 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6280 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6281 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6283 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6284 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6287 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6288 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6289 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6290 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6291 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6292 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6294 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6295 IOSB_iostate state = IOSTATE_badbit;
6296 unsigned short c = '\n';
6298 TRACE("(%p %p)\n", this, val);
6300 if(basic_ostream_wchar_sentry_create(this)) {
6301 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6302 c = basic_streambuf_wchar_snextc(val)) {
6303 state = IOSTATE_goodbit;
6305 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6306 state = IOSTATE_badbit;
6311 state = IOSTATE_badbit;
6313 basic_ostream_wchar_sentry_destroy(this);
6315 ios_base_width_set(&base->base, 0);
6316 basic_ios_wchar_setstate(base, state);
6320 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6322 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6323 int state = IOSTATE_goodbit;
6325 TRACE("(%p %p)\n", this, val);
6327 if(basic_ostream_wchar_sentry_create(this)) {
6328 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6329 ostreambuf_iterator_wchar dest = {0, strbuf};
6331 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6333 basic_ostream_wchar_sentry_destroy(this);
6335 basic_ios_wchar_setstate(base, state);
6339 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6340 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6341 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6342 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6344 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6345 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6348 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6350 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6351 int state = IOSTATE_goodbit;
6353 TRACE("(%p)\n", this);
6355 if(basic_ostream_wchar_sentry_create(this)) {
6356 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6357 ostreambuf_iterator_wchar dest = {0, strbuf};
6359 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6361 basic_ostream_wchar_sentry_destroy(this);
6363 basic_ios_wchar_setstate(base, state);
6367 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6368 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6369 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6370 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6372 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6373 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6376 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6378 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6379 int state = IOSTATE_goodbit;
6381 TRACE("(%p)\n", this);
6383 if(basic_ostream_wchar_sentry_create(this)) {
6384 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6385 ostreambuf_iterator_wchar dest = {0, strbuf};
6387 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6389 basic_ostream_wchar_sentry_destroy(this);
6391 basic_ios_wchar_setstate(base, state);
6395 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6396 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6397 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6398 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6400 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6401 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6404 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6406 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6407 int state = IOSTATE_goodbit;
6409 TRACE("(%p %x)\n", this, val);
6411 if(basic_ostream_wchar_sentry_create(this)) {
6412 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6413 ostreambuf_iterator_wchar dest = {0, strbuf};
6415 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6417 basic_ostream_wchar_sentry_destroy(this);
6419 basic_ios_wchar_setstate(base, state);
6423 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6424 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6425 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6426 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6428 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6429 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6432 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6433 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6434 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6435 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6436 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6438 TRACE("(%p)\n", ostr);
6440 basic_ostream_wchar_put(ostr, '\n');
6441 basic_ostream_wchar_flush(ostr);
6445 /* ??$?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 */
6446 /* ??$?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 */
6447 /* ??$?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 */
6448 /* ??$?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 */
6449 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6451 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6452 IOSB_iostate state = IOSTATE_goodbit;
6454 TRACE("(%p %p)\n", ostr, str);
6456 if(basic_ostream_wchar_sentry_create(ostr)) {
6457 MSVCP_size_t len = basic_string_wchar_length(str);
6458 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6460 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6461 for(; pad!=0; pad--) {
6462 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6463 state = IOSTATE_badbit;
6469 if(state == IOSTATE_goodbit) {
6470 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6471 state = IOSTATE_badbit;
6474 if(state == IOSTATE_goodbit) {
6475 for(; pad!=0; pad--) {
6476 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6477 state = IOSTATE_badbit;
6483 base->base.wide = 0;
6485 state = IOSTATE_badbit;
6487 basic_ostream_wchar_sentry_destroy(ostr);
6489 basic_ios_wchar_setstate(base, state);
6493 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6494 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6495 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6496 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6497 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6499 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6500 IOSB_iostate state = IOSTATE_goodbit;
6502 TRACE("(%p %d)\n", ostr, ch);
6504 if(basic_ostream_wchar_sentry_create(ostr)) {
6505 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6507 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6508 for(; pad!=0; pad--) {
6509 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6510 state = IOSTATE_badbit;
6516 if(state == IOSTATE_goodbit) {
6517 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6518 state = IOSTATE_badbit;
6521 if(state == IOSTATE_goodbit) {
6522 for(; pad!=0; pad--) {
6523 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6524 state = IOSTATE_badbit;
6530 base->base.wide = 0;
6532 state = IOSTATE_badbit;
6534 basic_ostream_wchar_sentry_destroy(ostr);
6536 basic_ios_wchar_setstate(base, state);
6540 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6541 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6542 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6543 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6544 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6546 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6547 IOSB_iostate state = IOSTATE_goodbit;
6549 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6551 if(basic_ostream_wchar_sentry_create(ostr)) {
6552 MSVCP_size_t len = wcslen(str);
6553 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6555 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6556 for(; pad!=0; pad--) {
6557 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6558 state = IOSTATE_badbit;
6564 if(state == IOSTATE_goodbit) {
6565 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6566 state = IOSTATE_badbit;
6569 if(state == IOSTATE_goodbit) {
6570 for(; pad!=0; pad--) {
6571 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6572 state = IOSTATE_badbit;
6578 base->base.wide = 0;
6580 state = IOSTATE_badbit;
6582 basic_ostream_wchar_sentry_destroy(ostr);
6584 basic_ios_wchar_setstate(base, state);
6588 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6589 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6590 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6591 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6592 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6593 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6594 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6596 TRACE("(%p %p)\n", this, pfunc);
6601 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6602 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6603 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6604 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6605 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6606 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6607 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6609 TRACE("(%p %p)\n", this, pfunc);
6610 pfunc(basic_ostream_wchar_get_basic_ios(this));
6614 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6615 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6616 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6617 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6618 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6619 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6620 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6622 TRACE("(%p %p)\n", this, pfunc);
6623 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6627 /* Caution: basic_istream uses virtual inheritance. */
6628 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6630 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6633 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6635 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6638 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6640 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6643 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6644 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6645 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)
6647 basic_ios_char *base;
6649 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6652 this->vbtable = basic_istream_char_vbtable;
6653 base = basic_istream_char_get_basic_ios(this);
6654 basic_ios_char_ctor(base);
6656 base = basic_istream_char_get_basic_ios(this);
6659 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6662 basic_ios_char_init(base, strbuf, isstd);
6666 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6667 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6668 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6669 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6671 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6674 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6675 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6676 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6677 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6679 basic_ios_char *base;
6681 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6684 this->vbtable = basic_istream_char_vbtable;
6685 base = basic_istream_char_get_basic_ios(this);
6686 basic_ios_char_ctor(base);
6688 base = basic_istream_char_get_basic_ios(this);
6691 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6692 ios_base_Addstd(&base->base);
6696 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6697 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6698 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6699 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6701 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6703 /* don't destroy virtual base here */
6704 TRACE("(%p)\n", this);
6707 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6708 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6709 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6710 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6712 TRACE("(%p)\n", this);
6713 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6714 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6717 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6718 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6720 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6722 TRACE("(%p %x)\n", this, flags);
6725 /* we have an array, with the number of elements stored before the first object */
6726 INT_PTR i, *ptr = (INT_PTR *)this-1;
6728 for(i=*ptr-1; i>=0; i--)
6729 basic_istream_char_vbase_dtor(this+i);
6730 MSVCRT_operator_delete(ptr);
6732 basic_istream_char_vbase_dtor(this);
6734 MSVCRT_operator_delete(this);
6740 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6741 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6742 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6744 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6746 TRACE("(%p %d)\n", this, noskip);
6748 if(ios_base_good(&base->base)) {
6749 if(basic_ios_char_tie_get(base))
6750 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6752 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6753 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6754 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
6757 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6758 ch = basic_streambuf_char_snextc(strbuf)) {
6759 if(ch==EOF || !ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6765 if(!ios_base_good(&base->base)) {
6766 basic_ios_char_setstate(base, IOSTATE_failbit);
6773 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6774 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6775 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6776 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6778 return basic_istream_char__Ipfx(this, noskip);
6781 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6782 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6783 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6784 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6786 TRACE("(%p)\n", this);
6789 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6791 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6793 if(basic_ios_char_rdbuf_get(base))
6794 basic_streambuf_char__Lock(base->strbuf);
6796 return basic_istream_char_ipfx(istr, noskip);
6799 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6801 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6803 if(basic_ios_char_rdbuf_get(base))
6804 basic_streambuf_char__Unlock(base->strbuf);
6807 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6808 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6809 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6810 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6812 TRACE("(%p)\n", this);
6816 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6817 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6818 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6819 int __thiscall basic_istream_char_get(basic_istream_char *this)
6821 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6824 TRACE("(%p)\n", this);
6828 if(!basic_istream_char_sentry_create(this, TRUE)) {
6829 basic_istream_char_sentry_destroy(this);
6833 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6834 basic_istream_char_sentry_destroy(this);
6836 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6843 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6844 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6845 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6846 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6850 TRACE("(%p %p)\n", this, ch);
6852 ret = basic_istream_char_get(this);
6858 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6859 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6860 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
6861 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6863 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6866 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6870 if(basic_istream_char_sentry_create(this, TRUE)) {
6871 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6873 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
6874 ch = basic_streambuf_char_snextc(strbuf)) {
6875 if(ch==EOF || ch==delim)
6883 basic_istream_char_sentry_destroy(this);
6885 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6886 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6892 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6893 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6894 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
6895 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
6897 return basic_istream_char_get_str_delim(this, str, count, '\n');
6900 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6901 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6902 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
6903 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
6905 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6908 TRACE("(%p %p %c)\n", this, strbuf, delim);
6912 if(basic_istream_char_sentry_create(this, TRUE)) {
6913 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
6915 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
6916 ch = basic_streambuf_char_snextc(strbuf_read)) {
6917 if(ch==EOF || ch==delim)
6920 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
6925 basic_istream_char_sentry_destroy(this);
6927 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6928 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6932 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6933 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6934 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
6935 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
6937 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
6940 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6941 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6942 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
6943 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6945 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6946 int ch = (unsigned char)delim;
6948 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6952 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
6953 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6956 ch = basic_streambuf_char_sbumpc(strbuf);
6958 if(ch==EOF || ch==(unsigned char)delim)
6966 if(ch == (unsigned char)delim)
6968 else if(ch != EOF) {
6969 ch = basic_streambuf_char_sgetc(strbuf);
6971 if(ch == (unsigned char)delim) {
6972 basic_streambuf_char__Gninc(strbuf);
6977 basic_istream_char_sentry_destroy(this);
6979 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
6980 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
6986 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6987 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6988 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
6989 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
6991 return basic_istream_char_getline_delim(this, str, count, '\n');
6994 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
6995 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6996 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
6997 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
6999 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7000 int ch = (unsigned char)delim;
7003 TRACE("(%p %ld %d)\n", this, count, delim);
7007 if(basic_istream_char_sentry_create(this, TRUE)) {
7008 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7009 state = IOSTATE_goodbit;
7012 ch = basic_streambuf_char_sbumpc(strbuf);
7015 state = IOSTATE_eofbit;
7019 if(ch==(unsigned char)delim)
7023 if(count != INT_MAX)
7027 state = IOSTATE_failbit;
7028 basic_istream_char_sentry_destroy(this);
7030 basic_ios_char_setstate(base, state);
7034 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7035 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7036 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7038 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7041 TRACE("(%p)\n", istream);
7043 if(basic_istream_char_sentry_create(istream, TRUE)) {
7044 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7045 const ctype_char *ctype = ctype_char_use_facet(&strbuf->loc);
7047 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7048 ch = basic_streambuf_char_snextc(strbuf)) {
7053 basic_istream_char_sentry_destroy(istream);
7056 basic_ios_char_setstate(base, IOSTATE_eofbit);
7060 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7061 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7062 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7063 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7065 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7068 TRACE("(%p)\n", this);
7072 if(basic_istream_char_sentry_create(this, TRUE))
7073 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7074 basic_istream_char_sentry_destroy(this);
7077 basic_ios_char_setstate(base, IOSTATE_eofbit);
7082 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7083 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7084 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7086 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7087 IOSB_iostate state = IOSTATE_goodbit;
7089 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7091 if(basic_istream_char_sentry_create(this, TRUE)) {
7092 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7094 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7095 if(this->count != count)
7096 state |= IOSTATE_failbit | IOSTATE_eofbit;
7100 basic_istream_char_sentry_destroy(this);
7102 basic_ios_char_setstate(base, state);
7106 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7107 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7108 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7109 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7111 return basic_istream_char__Read_s(this, str, count, count);
7114 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7115 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7116 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7118 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7119 IOSB_iostate state = IOSTATE_goodbit;
7121 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7125 if(basic_istream_char_sentry_create(this, TRUE)) {
7126 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7131 state |= IOSTATE_eofbit;
7133 basic_istream_char__Read_s(this, str, size, avail);
7135 state |= IOSTATE_failbit;
7137 basic_istream_char_sentry_destroy(this);
7139 basic_ios_char_setstate(base, state);
7143 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7144 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7145 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7146 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7148 return basic_istream_char__Readsome_s(this, str, count, count);
7151 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7152 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7153 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7154 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7156 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7157 IOSB_iostate state = IOSTATE_goodbit;
7159 TRACE("(%p %c)\n", this, ch);
7163 if(basic_istream_char_sentry_create(this, TRUE)) {
7164 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7166 if(!ios_base_good(&base->base))
7167 state |= IOSTATE_failbit;
7168 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7169 state |= IOSTATE_badbit;
7171 basic_istream_char_sentry_destroy(this);
7173 basic_ios_char_setstate(base, state);
7177 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7178 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7179 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7180 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7182 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7183 IOSB_iostate state = IOSTATE_goodbit;
7185 TRACE("(%p)\n", this);
7189 if(basic_istream_char_sentry_create(this, TRUE)) {
7190 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7192 if(!ios_base_good(&base->base))
7193 state |= IOSTATE_failbit;
7194 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7195 state |= IOSTATE_badbit;
7197 basic_istream_char_sentry_destroy(this);
7199 basic_ios_char_setstate(base, state);
7203 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7204 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7205 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7206 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7208 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7209 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7211 TRACE("(%p)\n", this);
7216 if(basic_istream_char_sentry_create(this, TRUE)) {
7217 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7218 basic_istream_char_sentry_destroy(this);
7222 basic_istream_char_sentry_destroy(this);
7224 basic_ios_char_setstate(base, IOSTATE_badbit);
7228 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7229 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7230 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7231 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7233 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7235 TRACE("(%p %p)\n", this, ret);
7237 if(ios_base_fail(&base->base)) {
7244 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7245 ret, 0, SEEKDIR_cur, OPENMODE_in);
7247 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7248 basic_ios_char_setstate(base, IOSTATE_failbit);
7253 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7254 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7255 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7256 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7258 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7260 TRACE("(%p %ld %d)\n", this, off, dir);
7262 if(!ios_base_fail(&base->base)) {
7263 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7266 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7272 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7273 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7274 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7275 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7277 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7279 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7281 if(!ios_base_fail(&base->base)) {
7282 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7285 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7291 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7292 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7293 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7294 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7296 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7297 int state = IOSTATE_goodbit;
7299 TRACE("(%p %p)\n", this, v);
7301 if(basic_istream_char_sentry_create(this, FALSE)) {
7302 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7303 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7304 istreambuf_iterator_char first={0}, last={0};
7307 first.strbuf = strbuf;
7308 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7310 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7313 state |= IOSTATE_failbit;
7315 basic_istream_char_sentry_destroy(this);
7317 basic_ios_char_setstate(base, state);
7321 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7322 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7323 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7324 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7326 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7327 int state = IOSTATE_goodbit;
7329 TRACE("(%p %p)\n", this, v);
7331 if(basic_istream_char_sentry_create(this, FALSE)) {
7332 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7333 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7334 istreambuf_iterator_char first={0}, last={0};
7336 first.strbuf = strbuf;
7337 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7339 basic_istream_char_sentry_destroy(this);
7341 basic_ios_char_setstate(base, state);
7345 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7346 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7347 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7348 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7350 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7351 int state = IOSTATE_goodbit;
7353 TRACE("(%p %p)\n", this, v);
7355 if(basic_istream_char_sentry_create(this, FALSE)) {
7356 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7357 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7358 istreambuf_iterator_char first={0}, last={0};
7360 first.strbuf = strbuf;
7361 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7363 basic_istream_char_sentry_destroy(this);
7365 basic_ios_char_setstate(base, state);
7369 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7370 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7371 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7372 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7374 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7375 int state = IOSTATE_goodbit;
7377 TRACE("(%p %p)\n", this, v);
7379 if(basic_istream_char_sentry_create(this, FALSE)) {
7380 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7381 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7382 istreambuf_iterator_char first={0}, last={0};
7384 first.strbuf = strbuf;
7385 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7387 basic_istream_char_sentry_destroy(this);
7389 basic_ios_char_setstate(base, state);
7393 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7394 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7395 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7396 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7398 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7399 int state = IOSTATE_goodbit;
7401 TRACE("(%p %p)\n", this, v);
7403 if(basic_istream_char_sentry_create(this, FALSE)) {
7404 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7405 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7406 istreambuf_iterator_char first={0}, last={0};
7408 first.strbuf = strbuf;
7409 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7411 basic_istream_char_sentry_destroy(this);
7413 basic_ios_char_setstate(base, state);
7417 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7418 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7419 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7420 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7422 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7423 int state = IOSTATE_goodbit;
7425 TRACE("(%p %p)\n", this, v);
7427 if(basic_istream_char_sentry_create(this, FALSE)) {
7428 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7429 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7430 istreambuf_iterator_char first={0}, last={0};
7432 first.strbuf = strbuf;
7433 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7435 basic_istream_char_sentry_destroy(this);
7437 basic_ios_char_setstate(base, state);
7441 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7442 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7443 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7444 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7446 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7447 int state = IOSTATE_goodbit;
7449 TRACE("(%p %p)\n", this, v);
7451 if(basic_istream_char_sentry_create(this, FALSE)) {
7452 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7453 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7454 istreambuf_iterator_char first={0}, last={0};
7456 first.strbuf = strbuf;
7457 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7459 basic_istream_char_sentry_destroy(this);
7461 basic_ios_char_setstate(base, state);
7465 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7466 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7467 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7468 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7470 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7471 int state = IOSTATE_goodbit;
7473 TRACE("(%p %p)\n", this, v);
7475 if(basic_istream_char_sentry_create(this, FALSE)) {
7476 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7477 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7478 istreambuf_iterator_char first={0}, last={0};
7480 first.strbuf = strbuf;
7481 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7483 basic_istream_char_sentry_destroy(this);
7485 basic_ios_char_setstate(base, state);
7489 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7490 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7491 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7492 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7494 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7495 int state = IOSTATE_goodbit;
7497 TRACE("(%p %p)\n", this, v);
7499 if(basic_istream_char_sentry_create(this, FALSE)) {
7500 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7501 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7502 istreambuf_iterator_char first={0}, last={0};
7504 first.strbuf = strbuf;
7505 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7507 basic_istream_char_sentry_destroy(this);
7509 basic_ios_char_setstate(base, state);
7513 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7514 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7515 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7516 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7518 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7519 int state = IOSTATE_goodbit;
7521 TRACE("(%p %p)\n", this, v);
7523 if(basic_istream_char_sentry_create(this, FALSE)) {
7524 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7525 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7526 istreambuf_iterator_char first={0}, last={0};
7528 first.strbuf = strbuf;
7529 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7531 basic_istream_char_sentry_destroy(this);
7533 basic_ios_char_setstate(base, state);
7537 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7538 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7539 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7540 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7542 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7543 int state = IOSTATE_goodbit;
7545 TRACE("(%p %p)\n", this, v);
7547 if(basic_istream_char_sentry_create(this, FALSE)) {
7548 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7549 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7550 istreambuf_iterator_char first={0}, last={0};
7552 first.strbuf = strbuf;
7553 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7555 basic_istream_char_sentry_destroy(this);
7557 basic_ios_char_setstate(base, state);
7561 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7562 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7563 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7564 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7566 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7567 int state = IOSTATE_goodbit;
7569 TRACE("(%p %p)\n", this, v);
7571 if(basic_istream_char_sentry_create(this, FALSE)) {
7572 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7573 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7574 istreambuf_iterator_char first={0}, last={0};
7576 first.strbuf = strbuf;
7577 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7579 basic_istream_char_sentry_destroy(this);
7581 basic_ios_char_setstate(base, state);
7585 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7586 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7587 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7588 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7590 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7591 int state = IOSTATE_goodbit;
7593 TRACE("(%p %p)\n", this, v);
7595 if(basic_istream_char_sentry_create(this, FALSE)) {
7596 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7597 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7598 istreambuf_iterator_char first={0}, last={0};
7600 first.strbuf = strbuf;
7601 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7603 basic_istream_char_sentry_destroy(this);
7605 basic_ios_char_setstate(base, state);
7609 /* ??$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 */
7610 /* ??$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 */
7611 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7612 basic_istream_char *istream, basic_string_char *str, char delim)
7614 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7615 IOSB_iostate state = IOSTATE_goodbit;
7616 int c = (unsigned char)delim;
7618 TRACE("(%p %p %c)\n", istream, str, delim);
7620 basic_string_char_clear(str);
7621 if(basic_istream_char_sentry_create(istream, TRUE)) {
7622 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7624 c = basic_streambuf_char_sgetc(strbuf);
7625 for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
7626 basic_string_char_append_ch(str, c);
7627 if(c==EOF) state |= IOSTATE_eofbit;
7628 else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf);
7630 if(!basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit;
7632 basic_istream_char_sentry_destroy(istream);
7634 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
7638 /* ??$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 */
7639 /* ??$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 */
7640 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7641 basic_istream_char *istream, basic_string_char *str)
7643 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7646 /* ??$?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 */
7647 /* ??$?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 */
7648 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7649 basic_istream_char *istream, basic_string_char *str)
7651 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7652 IOSB_iostate state = IOSTATE_failbit;
7655 TRACE("(%p %p)\n", istream, str);
7657 if(basic_istream_char_sentry_create(istream, FALSE)) {
7658 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7659 MSVCP_size_t count = ios_base_width_get(&base->base);
7664 basic_string_char_clear(str);
7666 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7667 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7668 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7669 state = IOSTATE_goodbit;
7670 basic_string_char_append_ch(str, c);
7673 basic_istream_char_sentry_destroy(istream);
7675 ios_base_width_set(&base->base, 0);
7676 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7680 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7681 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7682 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7683 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7684 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7685 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7686 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7688 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7689 IOSB_iostate state = IOSTATE_failbit;
7692 TRACE("(%p %p)\n", istream, str);
7694 if(basic_istream_char_sentry_create(istream, FALSE)) {
7695 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7696 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7698 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7699 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7700 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7701 state = IOSTATE_goodbit;
7705 basic_istream_char_sentry_destroy(istream);
7708 ios_base_width_set(&base->base, 0);
7709 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7713 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7714 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7715 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7716 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7717 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7718 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7719 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7721 IOSB_iostate state = IOSTATE_failbit;
7724 TRACE("(%p %p)\n", istream, ch);
7726 if(basic_istream_char_sentry_create(istream, FALSE)) {
7727 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7728 basic_istream_char_get_basic_ios(istream)));
7730 state = IOSTATE_goodbit;
7734 basic_istream_char_sentry_destroy(istream);
7736 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7737 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7741 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7742 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7743 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7744 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7745 basic_istream_char *this, basic_streambuf_char *streambuf)
7747 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7748 IOSB_iostate state = IOSTATE_failbit;
7751 TRACE("(%p %p)\n", this, streambuf);
7753 if(basic_istream_char_sentry_create(this, FALSE)) {
7754 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7755 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7756 state = IOSTATE_goodbit;
7757 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7761 basic_istream_char_sentry_destroy(this);
7763 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7767 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7768 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7769 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7770 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7771 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7773 TRACE("(%p %p)\n", this, pfunc);
7778 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7779 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7780 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7781 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7782 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7784 TRACE("(%p %p)\n", this, pfunc);
7785 pfunc(basic_istream_char_get_basic_ios(this));
7789 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7790 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7791 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7792 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7793 ios_base* (__cdecl *pfunc)(ios_base*))
7795 TRACE("(%p %p)\n", this, pfunc);
7796 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7800 /* Caution: basic_istream uses virtual inheritance. */
7801 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7803 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7806 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7808 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7811 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7813 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7816 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7817 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7818 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7819 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7821 basic_ios_wchar *base;
7823 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7826 this->vbtable = basic_istream_wchar_vbtable;
7827 base = basic_istream_wchar_get_basic_ios(this);
7828 basic_ios_wchar_ctor(base);
7830 base = basic_istream_wchar_get_basic_ios(this);
7833 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7836 basic_ios_wchar_init(base, strbuf, isstd);
7840 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7841 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7842 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7843 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7845 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
7846 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7850 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7851 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7852 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
7853 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7855 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7858 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7859 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7860 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
7861 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
7862 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7864 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7867 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7868 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7869 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
7870 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7872 basic_ios_wchar *base;
7874 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7877 this->vbtable = basic_istream_wchar_vbtable;
7878 base = basic_istream_wchar_get_basic_ios(this);
7879 basic_ios_wchar_ctor(base);
7881 base = basic_istream_wchar_get_basic_ios(this);
7884 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7885 ios_base_Addstd(&base->base);
7889 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7890 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7891 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
7892 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
7893 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7895 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
7896 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7900 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7901 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7902 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7903 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7904 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
7905 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
7907 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7909 /* don't destroy virtual base here */
7910 TRACE("(%p)\n", this);
7913 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7914 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7915 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7916 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7917 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
7918 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
7920 TRACE("(%p)\n", this);
7921 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7922 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7925 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
7926 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
7928 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7930 TRACE("(%p %x)\n", this, flags);
7933 /* we have an array, with the number of elements stored before the first object */
7934 INT_PTR i, *ptr = (INT_PTR *)this-1;
7936 for(i=*ptr-1; i>=0; i--)
7937 basic_istream_wchar_vbase_dtor(this+i);
7938 MSVCRT_operator_delete(ptr);
7940 basic_istream_wchar_vbase_dtor(this);
7942 MSVCRT_operator_delete(this);
7948 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7949 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7950 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
7951 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
7952 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
7954 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
7956 TRACE("(%p %d)\n", this, noskip);
7958 if(ios_base_good(&base->base)) {
7959 if(basic_ios_wchar_tie_get(base))
7960 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
7962 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
7963 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
7964 const ctype_wchar *ctype = ctype_wchar_use_facet(&base->strbuf->loc);
7967 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
7968 ch = basic_streambuf_wchar_snextc(strbuf)) {
7969 if(ch==WEOF || !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
7975 if(!ios_base_good(&base->base)) {
7976 basic_ios_wchar_setstate(base, IOSTATE_failbit);
7982 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7983 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7984 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
7985 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
7986 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
7987 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
7989 return basic_istream_wchar__Ipfx(this, noskip);
7992 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7993 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7994 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7995 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7996 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
7997 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
7999 TRACE("(%p)\n", this);
8002 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8004 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8006 if(basic_ios_wchar_rdbuf_get(base))
8007 basic_streambuf_wchar__Lock(base->strbuf);
8009 return basic_istream_wchar_ipfx(istr, noskip);
8012 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8014 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8016 if(basic_ios_wchar_rdbuf_get(base))
8017 basic_streambuf_wchar__Unlock(base->strbuf);
8020 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8021 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8022 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8023 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8024 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8025 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8027 TRACE("(%p)\n", this);
8031 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8032 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8033 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8034 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8035 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8036 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8038 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8041 TRACE("(%p)\n", this);
8045 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8046 basic_istream_wchar_sentry_destroy(this);
8050 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8051 basic_istream_wchar_sentry_destroy(this);
8053 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8060 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8061 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8062 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8063 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8064 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8065 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8069 TRACE("(%p %p)\n", this, ch);
8071 ret = basic_istream_wchar_get(this);
8077 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8078 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8079 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8080 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8081 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8082 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8084 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8085 unsigned short ch = delim;
8087 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8091 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8092 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8094 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8095 ch = basic_streambuf_wchar_snextc(strbuf)) {
8096 if(ch==WEOF || ch==delim)
8104 basic_istream_wchar_sentry_destroy(this);
8106 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8107 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8113 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8114 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8115 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8116 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8117 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8118 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8120 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8123 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8124 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8125 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8126 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8127 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8128 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8130 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8131 unsigned short ch = delim;
8133 TRACE("(%p %p %c)\n", this, strbuf, delim);
8137 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8138 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8140 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8141 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8142 if(ch==WEOF || ch==delim)
8145 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8150 basic_istream_wchar_sentry_destroy(this);
8152 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8153 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8157 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8158 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8159 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8160 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8161 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8162 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8164 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8167 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8168 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8169 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8170 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8171 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8172 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8174 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8175 unsigned short ch = delim;
8177 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8181 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8182 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8185 ch = basic_streambuf_wchar_sbumpc(strbuf);
8187 if(ch==WEOF || ch==delim)
8197 else if(ch != WEOF) {
8198 ch = basic_streambuf_wchar_sgetc(strbuf);
8201 basic_streambuf_wchar__Gninc(strbuf);
8206 basic_istream_wchar_sentry_destroy(this);
8208 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8209 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8215 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8216 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8217 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8218 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8219 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8220 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8222 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8225 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8226 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8227 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8228 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8229 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8230 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8232 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8233 unsigned short ch = delim;
8236 TRACE("(%p %ld %d)\n", this, count, delim);
8240 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8241 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8242 state = IOSTATE_goodbit;
8245 ch = basic_streambuf_wchar_sbumpc(strbuf);
8248 state = IOSTATE_eofbit;
8256 if(count != INT_MAX)
8260 state = IOSTATE_failbit;
8261 basic_istream_wchar_sentry_destroy(this);
8263 basic_ios_wchar_setstate(base, state);
8267 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8268 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8269 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8270 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8271 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8273 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8274 unsigned short ch = '\n';
8276 TRACE("(%p)\n", istream);
8278 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8279 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8280 const ctype_wchar *ctype = ctype_wchar_use_facet(&strbuf->loc);
8282 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8283 ch = basic_streambuf_wchar_snextc(strbuf)) {
8288 basic_istream_wchar_sentry_destroy(istream);
8291 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8295 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8296 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8297 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8298 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8299 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8300 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8302 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8303 unsigned short ret = WEOF;
8305 TRACE("(%p)\n", this);
8309 if(basic_istream_wchar_sentry_create(this, TRUE))
8310 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8311 basic_istream_wchar_sentry_destroy(this);
8314 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8319 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8320 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8321 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8322 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8323 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8325 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8326 IOSB_iostate state = IOSTATE_goodbit;
8328 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8330 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8331 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8333 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8334 if(this->count != count)
8335 state |= IOSTATE_failbit | IOSTATE_eofbit;
8339 basic_istream_wchar_sentry_destroy(this);
8341 basic_ios_wchar_setstate(base, state);
8345 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8346 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8347 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8348 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8349 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8350 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8352 return basic_istream_wchar__Read_s(this, str, count, count);
8355 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8356 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8357 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8358 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8359 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8361 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8362 IOSB_iostate state = IOSTATE_goodbit;
8364 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8368 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8369 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8374 state |= IOSTATE_eofbit;
8376 basic_istream_wchar__Read_s(this, str, size, avail);
8378 state |= IOSTATE_failbit;
8380 basic_istream_wchar_sentry_destroy(this);
8382 basic_ios_wchar_setstate(base, state);
8386 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8387 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8388 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8389 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8390 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8391 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8393 return basic_istream_wchar__Readsome_s(this, str, count, count);
8396 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8397 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8398 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8399 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8400 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8401 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8403 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8404 IOSB_iostate state = IOSTATE_goodbit;
8406 TRACE("(%p %c)\n", this, ch);
8410 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8411 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8413 if(!ios_base_good(&base->base))
8414 state |= IOSTATE_failbit;
8415 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8416 state |= IOSTATE_badbit;
8418 basic_istream_wchar_sentry_destroy(this);
8420 basic_ios_wchar_setstate(base, state);
8424 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8425 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8426 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8427 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8428 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8429 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8431 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8432 IOSB_iostate state = IOSTATE_goodbit;
8434 TRACE("(%p)\n", this);
8438 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8439 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8441 if(!ios_base_good(&base->base))
8442 state |= IOSTATE_failbit;
8443 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8444 state |= IOSTATE_badbit;
8446 basic_istream_wchar_sentry_destroy(this);
8448 basic_ios_wchar_setstate(base, state);
8452 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8453 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8454 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8455 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8456 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8457 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8459 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8460 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8462 TRACE("(%p)\n", this);
8467 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8468 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8469 basic_istream_wchar_sentry_destroy(this);
8473 basic_istream_wchar_sentry_destroy(this);
8475 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8479 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8480 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8481 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8482 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8483 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8484 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8486 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8488 TRACE("(%p %p)\n", this, ret);
8490 if(ios_base_fail(&base->base)) {
8497 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8498 ret, 0, SEEKDIR_cur, OPENMODE_in);
8499 if(ret->off==-1 && ret->pos==0 && ret->state==0)
8500 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8505 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8506 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8507 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
8508 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8510 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8512 TRACE("(%p %ld %d)\n", this, off, dir);
8514 if(!ios_base_fail(&base->base)) {
8515 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8518 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8524 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8525 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8526 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8527 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8528 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8529 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8531 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8533 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8535 if(!ios_base_fail(&base->base)) {
8536 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8539 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8545 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8547 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8548 int state = IOSTATE_goodbit;
8550 TRACE("(%p %p)\n", this, v);
8552 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8553 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8554 istreambuf_iterator_wchar first={0}, last={0};
8557 first.strbuf = strbuf;
8558 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8560 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8563 state |= IOSTATE_failbit;
8565 basic_istream_wchar_sentry_destroy(this);
8567 basic_ios_wchar_setstate(base, state);
8571 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8572 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8573 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8574 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8576 return basic_istream_read_short(this, v, num_get_short_use_facet(
8577 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8580 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8582 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8583 int state = IOSTATE_goodbit;
8585 TRACE("(%p %p)\n", this, v);
8587 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8588 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8589 istreambuf_iterator_wchar first={0}, last={0};
8591 first.strbuf = strbuf;
8592 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8594 basic_istream_wchar_sentry_destroy(this);
8596 basic_ios_wchar_setstate(base, state);
8600 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8601 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8602 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8603 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8605 return basic_istream_read_int(this, v, num_get_short_use_facet(
8606 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8609 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8611 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8612 int state = IOSTATE_goodbit;
8614 TRACE("(%p %p)\n", this, v);
8616 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8617 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8618 istreambuf_iterator_wchar first={0}, last={0};
8620 first.strbuf = strbuf;
8621 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8623 basic_istream_wchar_sentry_destroy(this);
8625 basic_ios_wchar_setstate(base, state);
8629 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8630 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8631 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8632 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8634 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8635 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8638 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8640 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8641 int state = IOSTATE_goodbit;
8643 TRACE("(%p %p)\n", this, v);
8645 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8646 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8647 istreambuf_iterator_wchar first={0}, last={0};
8649 first.strbuf = strbuf;
8650 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8652 basic_istream_wchar_sentry_destroy(this);
8654 basic_ios_wchar_setstate(base, state);
8658 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8659 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8660 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8661 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8663 return basic_istream_read_long(this, v, num_get_short_use_facet(
8664 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8667 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8669 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8670 int state = IOSTATE_goodbit;
8672 TRACE("(%p %p)\n", this, v);
8674 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8675 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8676 istreambuf_iterator_wchar first={0}, last={0};
8678 first.strbuf = strbuf;
8679 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8681 basic_istream_wchar_sentry_destroy(this);
8683 basic_ios_wchar_setstate(base, state);
8687 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8688 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8689 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8690 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8692 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8693 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8696 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8698 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8699 int state = IOSTATE_goodbit;
8701 TRACE("(%p %p)\n", this, v);
8703 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8704 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8705 istreambuf_iterator_wchar first={0}, last={0};
8707 first.strbuf = strbuf;
8708 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8710 basic_istream_wchar_sentry_destroy(this);
8712 basic_ios_wchar_setstate(base, state);
8716 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8717 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8718 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8719 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8721 return basic_istream_read_float(this, v, num_get_short_use_facet(
8722 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8725 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8727 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8728 int state = IOSTATE_goodbit;
8730 TRACE("(%p %p)\n", this, v);
8732 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8733 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8734 istreambuf_iterator_wchar first={0}, last={0};
8736 first.strbuf = strbuf;
8737 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8739 basic_istream_wchar_sentry_destroy(this);
8741 basic_ios_wchar_setstate(base, state);
8745 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8746 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8747 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8748 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8750 return basic_istream_read_double(this, v, num_get_short_use_facet(
8751 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8754 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8756 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8757 int state = IOSTATE_goodbit;
8759 TRACE("(%p %p)\n", this, v);
8761 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8762 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8763 istreambuf_iterator_wchar first={0}, last={0};
8765 first.strbuf = strbuf;
8766 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8768 basic_istream_wchar_sentry_destroy(this);
8770 basic_ios_wchar_setstate(base, state);
8774 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8775 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8776 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8777 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8779 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8780 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8783 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8785 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8786 int state = IOSTATE_goodbit;
8788 TRACE("(%p %p)\n", this, v);
8790 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8791 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8792 istreambuf_iterator_wchar first={0}, last={0};
8794 first.strbuf = strbuf;
8795 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8797 basic_istream_wchar_sentry_destroy(this);
8799 basic_ios_wchar_setstate(base, state);
8803 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8804 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8805 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8806 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8808 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8809 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8812 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8814 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8815 int state = IOSTATE_goodbit;
8817 TRACE("(%p %p)\n", this, v);
8819 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8820 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8821 istreambuf_iterator_wchar first={0}, last={0};
8823 first.strbuf = strbuf;
8824 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
8826 basic_istream_wchar_sentry_destroy(this);
8828 basic_ios_wchar_setstate(base, state);
8832 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8833 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8834 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
8835 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
8837 return basic_istream_read_int64(this, v, num_get_short_use_facet(
8838 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8841 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
8843 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8844 int state = IOSTATE_goodbit;
8846 TRACE("(%p %p)\n", this, v);
8848 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8849 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8850 istreambuf_iterator_wchar first={0}, last={0};
8852 first.strbuf = strbuf;
8853 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
8855 basic_istream_wchar_sentry_destroy(this);
8857 basic_ios_wchar_setstate(base, state);
8861 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8862 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8863 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
8864 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
8866 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
8867 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8870 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
8872 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8873 int state = IOSTATE_goodbit;
8875 TRACE("(%p %p)\n", this, v);
8877 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8878 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8879 istreambuf_iterator_wchar first={0}, last={0};
8881 first.strbuf = strbuf;
8882 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
8884 basic_istream_wchar_sentry_destroy(this);
8886 basic_ios_wchar_setstate(base, state);
8890 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8891 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8892 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
8893 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
8895 return basic_istream_read_bool(this, v, num_get_short_use_facet(
8896 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8899 /* ??$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 */
8900 /* ??$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 */
8901 /* ??$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 */
8902 /* ??$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 */
8903 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
8904 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
8906 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8907 IOSB_iostate state = IOSTATE_goodbit;
8910 TRACE("(%p %p %c)\n", istream, str, delim);
8912 basic_string_wchar_clear(str);
8913 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8914 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8916 c = basic_streambuf_wchar_sgetc(strbuf);
8917 for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
8918 basic_string_wchar_append_ch(str, c);
8919 if(c==delim) basic_streambuf_wchar_sbumpc(strbuf);
8920 else if(c==WEOF) state |= IOSTATE_eofbit;
8922 if(!basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit;
8924 basic_istream_wchar_sentry_destroy(istream);
8926 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state);
8930 /* ??$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 */
8931 /* ??$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 */
8932 /* ??$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 */
8933 /* ??$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 */
8934 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
8935 basic_istream_wchar *istream, basic_string_wchar *str)
8937 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
8940 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
8941 basic_string_wchar *str, const ctype_wchar *ctype)
8943 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8944 IOSB_iostate state = IOSTATE_failbit;
8947 TRACE("(%p %p)\n", istream, str);
8949 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
8950 MSVCP_size_t count = ios_base_width_get(&base->base);
8955 basic_string_wchar_clear(str);
8957 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8958 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8959 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
8960 state = IOSTATE_goodbit;
8961 basic_string_wchar_append_ch(str, c);
8964 basic_istream_wchar_sentry_destroy(istream);
8966 ios_base_width_set(&base->base, 0);
8967 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8971 /* ??$?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 */
8972 /* ??$?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 */
8973 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
8974 basic_istream_wchar *istream, basic_string_wchar *str)
8976 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
8977 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
8980 /* ??$?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 */
8981 /* ??$?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 */
8982 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
8983 basic_istream_wchar *istream, basic_string_wchar *str)
8985 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
8986 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
8989 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
8991 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8992 IOSB_iostate state = IOSTATE_failbit;
8993 unsigned short c = '\n';
8995 TRACE("(%p %p)\n", istream, str);
8997 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
8998 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9000 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9001 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9002 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9003 state = IOSTATE_goodbit;
9007 basic_istream_wchar_sentry_destroy(istream);
9010 ios_base_width_set(&base->base, 0);
9011 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9015 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9016 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9017 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9019 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9020 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9023 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9024 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9025 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9026 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9027 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9029 IOSB_iostate state = IOSTATE_failbit;
9030 unsigned short c = 0;
9032 TRACE("(%p %p)\n", istream, ch);
9034 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9035 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9036 basic_istream_wchar_get_basic_ios(istream)));
9038 state = IOSTATE_goodbit;
9042 basic_istream_wchar_sentry_destroy(istream);
9044 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9045 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9049 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9050 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9051 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9052 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9053 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9054 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9055 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9057 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9058 IOSB_iostate state = IOSTATE_failbit;
9059 unsigned short c = '\n';
9061 TRACE("(%p %p)\n", this, streambuf);
9063 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9064 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9065 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9066 state = IOSTATE_goodbit;
9067 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9071 basic_istream_wchar_sentry_destroy(this);
9073 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9077 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9078 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9079 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9080 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9081 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9082 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9083 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9085 TRACE("(%p %p)\n", this, pfunc);
9090 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9091 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9092 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9093 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9094 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9095 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9096 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9098 TRACE("(%p %p)\n", this, pfunc);
9099 pfunc(basic_istream_wchar_get_basic_ios(this));
9103 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9104 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9105 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9106 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9107 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9108 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9109 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9111 TRACE("(%p %p)\n", this, pfunc);
9112 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9116 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9118 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9121 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9123 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9126 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9127 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9128 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9129 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9131 basic_ios_char *basic_ios;
9133 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9136 this->base1.vbtable = basic_iostream_char_vbtable1;
9137 this->base2.vbtable = basic_iostream_char_vbtable2;
9138 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9139 basic_ios_char_ctor(basic_ios);
9141 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9144 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9146 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9147 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9151 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9152 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9153 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9154 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9156 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9158 TRACE("(%p)\n", this);
9159 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9160 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9163 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9164 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9165 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9166 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9168 TRACE("(%p)\n", this);
9169 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9170 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9173 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9174 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9176 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9178 TRACE("(%p %x)\n", this, flags);
9181 /* we have an array, with the number of elements stored before the first object */
9182 INT_PTR i, *ptr = (INT_PTR *)this-1;
9184 for(i=*ptr-1; i>=0; i--)
9185 basic_iostream_char_vbase_dtor(this+i);
9186 MSVCRT_operator_delete(ptr);
9188 basic_iostream_char_vbase_dtor(this);
9190 MSVCRT_operator_delete(this);
9196 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9198 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9201 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9203 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9206 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9207 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9208 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9209 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9211 basic_ios_wchar *basic_ios;
9213 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9216 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9217 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9218 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9219 basic_ios_wchar_ctor(basic_ios);
9221 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9224 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9225 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9227 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9231 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9232 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9233 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9234 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9235 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9237 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9238 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9242 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9243 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9244 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9245 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9246 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9247 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9249 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9251 TRACE("(%p)\n", this);
9252 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9253 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9256 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9257 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9258 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9259 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9260 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9261 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9263 TRACE("(%p)\n", this);
9264 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9265 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9268 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9269 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9271 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9273 TRACE("(%p %x)\n", this, flags);
9276 /* we have an array, with the number of elements stored before the first object */
9277 INT_PTR i, *ptr = (INT_PTR *)this-1;
9279 for(i=*ptr-1; i>=0; i--)
9280 basic_iostream_wchar_vbase_dtor(this+i);
9281 MSVCRT_operator_delete(ptr);
9283 basic_iostream_wchar_vbase_dtor(this);
9285 MSVCRT_operator_delete(this);
9291 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9293 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9296 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9298 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9301 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9302 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9303 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9304 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9306 basic_ios_char *basic_ios;
9308 TRACE("(%p %d)\n", this, virt_init);
9311 this->base.vbtable = basic_ofstream_char_vbtable;
9312 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9313 basic_ios_char_ctor(basic_ios);
9315 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9318 basic_filebuf_char_ctor(&this->filebuf);
9319 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9320 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9324 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9325 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9326 static basic_ofstream_char* basic_ofstream_char_ctor_file(
9327 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9329 basic_ios_char *basic_ios;
9331 TRACE("(%p %p %d)\n", this, file, virt_init);
9334 this->base.vbtable = basic_ofstream_char_vbtable;
9335 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9336 basic_ios_char_ctor(basic_ios);
9338 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9341 basic_filebuf_char_ctor_file(&this->filebuf, file);
9342 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9343 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9347 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9348 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9349 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor, 12)
9350 basic_ofstream_char* __thiscall basic_ofstream_char_copy_ctor(basic_ofstream_char *this,
9351 basic_ofstream_char *copy, MSVCP_bool virt_init)
9353 TRACE("(%p %p %d)\n", this, copy, virt_init);
9354 return basic_ofstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9357 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9358 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9359 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 16)
9360 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9361 const char *name, int mode, MSVCP_bool virt_init)
9363 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9365 basic_ofstream_char_ctor(this, virt_init);
9367 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9368 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9369 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9374 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9375 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9376 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9377 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9379 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9381 TRACE("(%p)\n", this);
9383 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9384 basic_filebuf_char_dtor(&this->filebuf);
9387 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9388 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9389 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9390 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9392 TRACE("(%p)\n", this);
9394 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9395 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9398 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9399 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9401 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9403 TRACE("(%p %x)\n", this, flags);
9406 /* we have an array, with the number of elements stored before the first object */
9407 INT_PTR i, *ptr = (INT_PTR *)this-1;
9409 for(i=*ptr-1; i>=0; i--)
9410 basic_ofstream_char_vbase_dtor(this+i);
9411 MSVCRT_operator_delete(ptr);
9413 basic_ofstream_char_vbase_dtor(this);
9415 MSVCRT_operator_delete(this);
9421 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9422 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9423 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9424 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9426 TRACE("(%p)\n", this);
9428 if(!basic_filebuf_char_close(&this->filebuf)) {
9429 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9430 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9434 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9435 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9436 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9437 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9439 TRACE("(%p)\n", this);
9440 return basic_filebuf_char_is_open(&this->filebuf);
9443 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9444 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9445 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9446 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9447 const char *name, int mode)
9449 TRACE("(%p %s %d)\n", this, name, mode);
9451 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9452 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9453 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9457 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9458 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9459 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9460 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9461 const char *name, short mode)
9463 basic_ofstream_char_open(this, name, mode);
9466 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9467 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9468 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9469 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9471 TRACE("(%p)\n", this);
9472 return (basic_filebuf_char*)&this->filebuf;
9475 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9477 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9480 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9482 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9485 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9486 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9487 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9489 basic_ios_wchar *basic_ios;
9491 TRACE("(%p %d)\n", this, virt_init);
9494 this->base.vbtable = basic_ofstream_wchar_vbtable;
9495 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9496 basic_ios_wchar_ctor(basic_ios);
9498 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9501 basic_filebuf_wchar_ctor(&this->filebuf);
9502 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9503 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9507 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9508 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9509 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9510 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9512 basic_ofstream_wchar_ctor(this, virt_init);
9513 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9517 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9518 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9519 static basic_ofstream_wchar* basic_ofstream_wchar_ctor_file(
9520 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9522 basic_ios_wchar *basic_ios;
9524 TRACE("(%p %p %d)\n", this, file, virt_init);
9527 this->base.vbtable = basic_ofstream_wchar_vbtable;
9528 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9529 basic_ios_wchar_ctor(basic_ios);
9531 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9534 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9535 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9536 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9540 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9541 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9542 static basic_ofstream_wchar* basic_ofstream_short_ctor_file(
9543 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9545 basic_ofstream_wchar_ctor_file(this, file, virt_init);
9546 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9550 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9551 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9552 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor, 12)
9553 basic_ofstream_wchar* __thiscall basic_ofstream_short_copy_ctor(basic_ofstream_wchar *this,
9554 basic_ofstream_wchar *copy, MSVCP_bool virt_init)
9556 TRACE("(%p %p %d)\n", this, copy, virt_init);
9557 return basic_ofstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9560 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9561 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9562 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 16)
9563 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
9564 const char *name, int mode, MSVCP_bool virt_init)
9566 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9568 basic_ofstream_short_ctor(this, virt_init);
9570 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9571 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9572 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9577 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9578 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9579 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9580 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9581 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9582 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9584 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9586 TRACE("(%p)\n", this);
9588 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9589 basic_filebuf_wchar_dtor(&this->filebuf);
9592 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9593 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9594 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9595 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9596 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9597 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9599 TRACE("(%p)\n", this);
9601 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9602 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9605 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9606 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9608 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9610 TRACE("(%p %x)\n", this, flags);
9613 /* we have an array, with the number of elements stored before the first object */
9614 INT_PTR i, *ptr = (INT_PTR *)this-1;
9616 for(i=*ptr-1; i>=0; i--)
9617 basic_ofstream_wchar_vbase_dtor(this+i);
9618 MSVCRT_operator_delete(ptr);
9620 basic_ofstream_wchar_vbase_dtor(this);
9622 MSVCRT_operator_delete(this);
9628 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9629 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9630 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9631 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9632 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9633 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9635 TRACE("(%p)\n", this);
9637 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9638 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9639 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9643 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9644 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9645 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9646 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9647 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9648 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9650 TRACE("(%p)\n", this);
9651 return basic_filebuf_wchar_is_open(&this->filebuf);
9654 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9655 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9656 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9657 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9658 const char *name, int mode)
9660 TRACE("(%p %s %d)\n", this, name, mode);
9662 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9663 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9664 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9668 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9669 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9670 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9671 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9672 const char *name, int mode)
9674 basic_ofstream_wchar_open(this, name, mode);
9677 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9678 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9679 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9680 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9681 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9682 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9684 TRACE("(%p)\n", this);
9685 return (basic_filebuf_wchar*)&this->filebuf;
9688 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9690 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9693 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9695 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9698 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9699 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9700 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9701 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9703 basic_ios_char *basic_ios;
9705 TRACE("(%p %d)\n", this, virt_init);
9708 this->base.vbtable = basic_ifstream_char_vbtable;
9709 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9710 basic_ios_char_ctor(basic_ios);
9712 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9715 basic_filebuf_char_ctor(&this->filebuf);
9716 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9717 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9721 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9722 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9723 static basic_ifstream_char* basic_ifstream_char_ctor_file(
9724 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
9726 basic_ios_char *basic_ios;
9728 TRACE("(%p %p %d)\n", this, file, virt_init);
9731 this->base.vbtable = basic_ifstream_char_vbtable;
9732 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9733 basic_ios_char_ctor(basic_ios);
9735 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9738 basic_filebuf_char_ctor_file(&this->filebuf, file);
9739 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9740 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9744 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9745 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9746 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor, 12)
9747 basic_ifstream_char* __thiscall basic_ifstream_char_copy_ctor(basic_ifstream_char *this,
9748 const basic_ifstream_char *copy, MSVCP_bool virt_init)
9750 TRACE("(%p %p %d)\n", this, copy, virt_init);
9751 return basic_ifstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9754 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9755 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9756 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 16)
9757 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
9758 const char *name, int mode, MSVCP_bool virt_init)
9760 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9762 basic_ifstream_char_ctor(this, virt_init);
9764 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9765 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9766 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9771 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9772 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9773 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9774 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9776 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9778 TRACE("(%p)\n", this);
9780 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9781 basic_filebuf_char_dtor(&this->filebuf);
9784 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9785 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9786 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9787 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9789 TRACE("(%p)\n", this);
9791 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9792 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9795 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9796 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9798 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9800 TRACE("(%p %x)\n", this, flags);
9803 /* we have an array, with the number of elements stored before the first object */
9804 INT_PTR i, *ptr = (INT_PTR *)this-1;
9806 for(i=*ptr-1; i>=0; i--)
9807 basic_ifstream_char_vbase_dtor(this+i);
9808 MSVCRT_operator_delete(ptr);
9810 basic_ifstream_char_vbase_dtor(this);
9812 MSVCRT_operator_delete(this);
9818 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9819 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9820 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9821 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9823 TRACE("(%p)\n", this);
9825 if(!basic_filebuf_char_close(&this->filebuf)) {
9826 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9827 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9831 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9832 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9833 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
9834 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
9836 TRACE("(%p)\n", this);
9837 return basic_filebuf_char_is_open(&this->filebuf);
9840 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9841 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9842 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
9843 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
9844 const char *name, int mode)
9846 TRACE("(%p %s %d)\n", this, name, mode);
9848 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9849 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9850 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9854 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9855 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9856 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
9857 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
9858 const char *name, short mode)
9860 basic_ifstream_char_open(this, name, mode);
9863 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9864 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9865 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
9866 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
9868 TRACE("(%p)\n", this);
9869 return (basic_filebuf_char*)&this->filebuf;
9872 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
9874 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
9877 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9879 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
9882 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9883 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9884 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9886 basic_ios_wchar *basic_ios;
9888 TRACE("(%p %d)\n", this, virt_init);
9891 this->base.vbtable = basic_ifstream_wchar_vbtable;
9892 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9893 basic_ios_wchar_ctor(basic_ios);
9895 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9898 basic_filebuf_wchar_ctor(&this->filebuf);
9899 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9900 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9904 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9905 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9906 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
9907 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9909 basic_ifstream_wchar_ctor(this, virt_init);
9910 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9914 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9915 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9916 static basic_ifstream_wchar* basic_ifstream_wchar_ctor_file(
9917 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9919 basic_ios_wchar *basic_ios;
9921 TRACE("(%p %p %d)\n", this, file, virt_init);
9924 this->base.vbtable = basic_ifstream_wchar_vbtable;
9925 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9926 basic_ios_wchar_ctor(basic_ios);
9928 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9931 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9932 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9933 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9937 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9938 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9939 static basic_ifstream_wchar* basic_ifstream_short_ctor_file(
9940 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9942 basic_ifstream_wchar_ctor_file(this, file, virt_init);
9943 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9947 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9948 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9949 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor, 12)
9950 basic_ifstream_wchar* __thiscall basic_ifstream_short_copy_ctor(basic_ifstream_wchar *this,
9951 basic_ifstream_wchar *copy, MSVCP_bool virt_init)
9953 TRACE("(%p %p %d)\n", this, copy, virt_init);
9954 return basic_ifstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9957 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9958 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9959 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 16)
9960 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
9961 const char *name, int mode, MSVCP_bool virt_init)
9963 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9965 basic_ifstream_short_ctor(this, virt_init);
9967 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9968 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9969 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9974 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9975 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9976 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9977 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9978 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
9979 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
9981 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
9983 TRACE("(%p)\n", this);
9985 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
9986 basic_filebuf_wchar_dtor(&this->filebuf);
9989 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9990 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9991 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9992 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9993 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
9994 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
9996 TRACE("(%p)\n", this);
9998 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
9999 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10002 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10003 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10005 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10007 TRACE("(%p %x)\n", this, flags);
10010 /* we have an array, with the number of elements stored before the first object */
10011 INT_PTR i, *ptr = (INT_PTR *)this-1;
10013 for(i=*ptr-1; i>=0; i--)
10014 basic_ifstream_wchar_vbase_dtor(this+i);
10015 MSVCRT_operator_delete(ptr);
10017 basic_ifstream_wchar_vbase_dtor(this);
10019 MSVCRT_operator_delete(this);
10025 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10026 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10027 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10028 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10029 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10030 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10032 TRACE("(%p)\n", this);
10034 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10035 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10036 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10040 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10041 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10042 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10043 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10044 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10045 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10047 TRACE("(%p)\n", this);
10048 return basic_filebuf_wchar_is_open(&this->filebuf);
10051 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
10052 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
10053 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
10054 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10055 const char *name, int mode)
10057 TRACE("(%p %s %d)\n", this, name, mode);
10059 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10060 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10061 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10065 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
10066 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
10067 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10068 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10069 const char *name, short mode)
10071 basic_ifstream_wchar_open(this, name, mode);
10074 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10075 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10076 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10077 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10078 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10079 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10081 TRACE("(%p)\n", this);
10082 return (basic_filebuf_wchar*)&this->filebuf;
10085 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10087 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10090 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10092 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10095 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10096 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10097 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10098 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10100 basic_ios_char *basic_ios;
10102 TRACE("(%p %d)\n", this, virt_init);
10105 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10106 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10107 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10108 basic_ios_char_ctor(basic_ios);
10110 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10113 basic_filebuf_char_ctor(&this->filebuf);
10114 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10115 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10119 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10120 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10121 static basic_fstream_char* basic_fstream_char_ctor_file(basic_fstream_char *this,
10122 FILE *file, MSVCP_bool virt_init)
10124 basic_ios_char *basic_ios;
10126 TRACE("(%p %p %d)\n", this, file, virt_init);
10129 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10130 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10131 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10132 basic_ios_char_ctor(basic_ios);
10134 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10137 basic_filebuf_char_ctor_file(&this->filebuf, file);
10138 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10139 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10143 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
10144 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
10145 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor, 12)
10146 basic_fstream_char* __thiscall basic_fstream_char_copy_ctor(basic_fstream_char *this,
10147 basic_fstream_char *copy, MSVCP_bool virt_init)
10149 TRACE("(%p %p %d)\n", this, copy, virt_init);
10150 return basic_fstream_char_ctor_file(this, copy->filebuf.file, virt_init);
10153 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
10154 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
10155 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 16)
10156 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10157 const char *name, int mode, MSVCP_bool virt_init)
10159 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10161 basic_fstream_char_ctor(this, virt_init);
10163 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10164 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10165 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10170 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10171 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10172 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10173 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10175 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10177 TRACE("(%p)\n", this);
10179 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10180 basic_filebuf_char_dtor(&this->filebuf);
10183 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10184 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10185 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10186 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10188 TRACE("(%p)\n", this);
10190 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10191 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10194 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10195 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10197 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10199 TRACE("(%p %x)\n", this, flags);
10202 /* we have an array, with the number of elements stored before the first object */
10203 INT_PTR i, *ptr = (INT_PTR *)this-1;
10205 for(i=*ptr-1; i>=0; i--)
10206 basic_fstream_char_vbase_dtor(this+i);
10207 MSVCRT_operator_delete(ptr);
10209 basic_fstream_char_vbase_dtor(this);
10211 MSVCRT_operator_delete(this);
10217 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10218 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10219 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10220 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10222 TRACE("(%p)\n", this);
10224 if(!basic_filebuf_char_close(&this->filebuf)) {
10225 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10226 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10230 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10231 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10232 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10233 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10235 TRACE("(%p)\n", this);
10236 return basic_filebuf_char_is_open(&this->filebuf);
10239 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10240 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10241 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10242 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10243 const char *name, int mode)
10245 TRACE("(%p %s %d)\n", this, name, mode);
10247 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10248 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10249 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10253 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10254 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10255 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10256 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10257 const char *name, int mode)
10259 basic_fstream_char_open(this, name, mode);
10262 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10263 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10264 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10265 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10267 TRACE("(%p)\n", this);
10268 return (basic_filebuf_char*)&this->filebuf;
10271 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10273 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10276 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10278 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10281 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10282 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10283 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10285 basic_ios_wchar *basic_ios;
10287 TRACE("(%p %d)\n", this, virt_init);
10290 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10291 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10292 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10293 basic_ios_wchar_ctor(basic_ios);
10295 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10298 basic_filebuf_wchar_ctor(&this->filebuf);
10299 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10300 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10304 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10305 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10306 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10307 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10309 basic_fstream_wchar_ctor(this, virt_init);
10310 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10314 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10315 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10316 static basic_fstream_wchar* basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
10317 FILE *file, MSVCP_bool virt_init)
10319 basic_ios_wchar *basic_ios;
10321 TRACE("(%p %p %d)\n", this, file, virt_init);
10324 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10325 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10326 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10327 basic_ios_wchar_ctor(basic_ios);
10329 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10332 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10333 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10334 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10338 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10339 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10340 static basic_fstream_wchar* basic_fstream_short_ctor_file(basic_fstream_wchar *this,
10341 FILE *file, MSVCP_bool virt_init)
10343 basic_fstream_wchar_ctor_file(this, file, virt_init);
10344 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10348 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10349 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10350 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor, 12)
10351 basic_fstream_wchar* __thiscall basic_fstream_short_copy_ctor(basic_fstream_wchar *this,
10352 basic_fstream_wchar *copy, MSVCP_bool virt_init)
10354 TRACE("(%p %p %d)\n", this, copy, virt_init);
10355 return basic_fstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10358 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10359 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10360 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 16)
10361 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
10362 const char *name, int mode, MSVCP_bool virt_init)
10364 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10366 basic_fstream_short_ctor(this, virt_init);
10368 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10369 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10370 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10375 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10376 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10377 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10378 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10379 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10380 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10382 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10384 TRACE("(%p)\n", this);
10386 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10387 basic_filebuf_wchar_dtor(&this->filebuf);
10390 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10391 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10392 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10393 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10394 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10395 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10397 TRACE("(%p)\n", this);
10399 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10400 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10403 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10404 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10406 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10408 TRACE("(%p %x)\n", this, flags);
10411 /* we have an array, with the number of elements stored before the first object */
10412 INT_PTR i, *ptr = (INT_PTR *)this-1;
10414 for(i=*ptr-1; i>=0; i--)
10415 basic_fstream_wchar_vbase_dtor(this+i);
10416 MSVCRT_operator_delete(ptr);
10418 basic_fstream_wchar_vbase_dtor(this);
10420 MSVCRT_operator_delete(this);
10426 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10427 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10428 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10429 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10430 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10431 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10433 TRACE("(%p)\n", this);
10435 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10436 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10437 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10441 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10442 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10443 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10444 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10445 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10446 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10448 TRACE("(%p)\n", this);
10449 return basic_filebuf_wchar_is_open(&this->filebuf);
10452 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10453 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10454 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10455 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10456 const char *name, int mode)
10458 TRACE("(%p %s %d)\n", this, name, mode);
10460 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10461 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10462 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10466 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10467 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10468 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10469 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10470 const char *name, int mode)
10472 basic_fstream_wchar_open(this, name, mode);
10475 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10476 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10477 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10478 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10479 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10480 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10482 TRACE("(%p)\n", this);
10483 return (basic_filebuf_wchar*)&this->filebuf;
10486 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10488 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10491 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10493 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10496 /* ??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 */
10497 /* ??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 */
10498 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10499 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10500 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10502 basic_ios_char *basic_ios;
10504 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10507 this->base.vbtable = basic_ostringstream_char_vbtable;
10508 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10509 basic_ios_char_ctor(basic_ios);
10511 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10514 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10515 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10516 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10520 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10521 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10522 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10523 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10524 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10526 basic_ios_char *basic_ios;
10528 TRACE("(%p %d %d)\n", this, mode, virt_init);
10531 this->base.vbtable = basic_ostringstream_char_vbtable;
10532 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10533 basic_ios_char_ctor(basic_ios);
10535 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10538 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10539 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10540 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10544 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10545 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10546 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
10547 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10548 basic_ostringstream_char *this, MSVCP_bool virt_init)
10550 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
10553 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10554 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10555 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10556 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10558 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10560 TRACE("(%p)\n", this);
10562 basic_stringbuf_char_dtor(&this->strbuf);
10563 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10566 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10567 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10568 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10569 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10571 TRACE("(%p)\n", this);
10573 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10574 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10577 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10578 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10580 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10582 TRACE("(%p %x)\n", this, flags);
10585 /* we have an array, with the number of elements stored before the first object */
10586 INT_PTR i, *ptr = (INT_PTR *)this-1;
10588 for(i=*ptr-1; i>=0; i--)
10589 basic_ostringstream_char_vbase_dtor(this+i);
10590 MSVCRT_operator_delete(ptr);
10592 basic_ostringstream_char_vbase_dtor(this);
10594 MSVCRT_operator_delete(this);
10600 /* ?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 */
10601 /* ?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 */
10602 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10603 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10605 TRACE("(%p)\n", this);
10606 return (basic_stringbuf_char*)&this->strbuf;
10609 /* ?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 */
10610 /* ?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 */
10611 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10612 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10614 TRACE("(%p %p)\n", this, str);
10615 basic_stringbuf_char_str_set(&this->strbuf, str);
10618 /* ?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 */
10619 /* ?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 */
10620 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10621 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10623 TRACE("(%p %p)\n", this, ret);
10624 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10627 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10629 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10632 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10634 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10637 /* ??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 */
10638 /* ??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 */
10639 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10640 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10642 basic_ios_wchar *basic_ios;
10644 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10647 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10648 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10649 basic_ios_wchar_ctor(basic_ios);
10651 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10654 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10655 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10656 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10660 /* ??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 */
10661 /* ??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 */
10662 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10663 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10664 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10666 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10667 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10671 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10672 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10673 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10674 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10676 basic_ios_wchar *basic_ios;
10678 TRACE("(%p %d %d)\n", this, mode, virt_init);
10681 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10682 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10683 basic_ios_wchar_ctor(basic_ios);
10685 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10688 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10689 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10690 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10694 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10695 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10696 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10697 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10698 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10700 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10701 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10705 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10706 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10707 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
10708 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10709 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
10711 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
10714 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10715 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10716 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10717 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10718 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10719 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10721 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10723 TRACE("(%p)\n", this);
10725 basic_stringbuf_wchar_dtor(&this->strbuf);
10726 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10729 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10730 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10731 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10732 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10733 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10734 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10736 TRACE("(%p)\n", this);
10738 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10739 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10742 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10743 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10745 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10747 TRACE("(%p %x)\n", this, flags);
10750 /* we have an array, with the number of elements stored before the first object */
10751 INT_PTR i, *ptr = (INT_PTR *)this-1;
10753 for(i=*ptr-1; i>=0; i--)
10754 basic_ostringstream_wchar_vbase_dtor(this+i);
10755 MSVCRT_operator_delete(ptr);
10757 basic_ostringstream_wchar_vbase_dtor(this);
10759 MSVCRT_operator_delete(this);
10765 /* ?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 */
10766 /* ?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 */
10767 /* ?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 */
10768 /* ?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 */
10769 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10770 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10772 TRACE("(%p)\n", this);
10773 return (basic_stringbuf_wchar*)&this->strbuf;
10776 /* ?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 */
10777 /* ?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 */
10778 /* ?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 */
10779 /* ?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 */
10780 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10781 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10783 TRACE("(%p %p)\n", this, str);
10784 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10787 /* ?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 */
10788 /* ?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 */
10789 /* ?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 */
10790 /* ?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 */
10791 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10792 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10794 TRACE("(%p %p)\n", this, ret);
10795 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10798 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10800 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10803 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10805 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10808 /* ??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 */
10809 /* ??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 */
10810 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10811 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10812 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10814 basic_ios_char *basic_ios;
10816 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10819 this->base.vbtable = basic_istringstream_char_vbtable;
10820 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10821 basic_ios_char_ctor(basic_ios);
10823 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10826 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10827 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10828 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10832 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10833 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10834 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
10835 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
10836 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
10838 basic_ios_char *basic_ios;
10840 TRACE("(%p %d %d)\n", this, mode, virt_init);
10843 this->base.vbtable = basic_istringstream_char_vbtable;
10844 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10845 basic_ios_char_ctor(basic_ios);
10847 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10850 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
10851 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10852 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10856 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10857 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10858 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
10859 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
10860 basic_istringstream_char *this, MSVCP_bool virt_init)
10862 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
10865 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10866 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10867 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
10868 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
10870 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10872 TRACE("(%p)\n", this);
10874 basic_stringbuf_char_dtor(&this->strbuf);
10875 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10878 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10879 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10880 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
10881 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
10883 TRACE("(%p)\n", this);
10885 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
10886 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10889 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
10890 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10892 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10894 TRACE("(%p %x)\n", this, flags);
10897 /* we have an array, with the number of elements stored before the first object */
10898 INT_PTR i, *ptr = (INT_PTR *)this-1;
10900 for(i=*ptr-1; i>=0; i--)
10901 basic_istringstream_char_vbase_dtor(this+i);
10902 MSVCRT_operator_delete(ptr);
10904 basic_istringstream_char_vbase_dtor(this);
10906 MSVCRT_operator_delete(this);
10912 /* ?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 */
10913 /* ?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 */
10914 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
10915 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
10917 TRACE("(%p)\n", this);
10918 return (basic_stringbuf_char*)&this->strbuf;
10921 /* ?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 */
10922 /* ?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 */
10923 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
10924 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
10926 TRACE("(%p %p)\n", this, str);
10927 basic_stringbuf_char_str_set(&this->strbuf, str);
10930 /* ?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 */
10931 /* ?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 */
10932 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
10933 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
10935 TRACE("(%p %p)\n", this, ret);
10936 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10939 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
10941 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
10944 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10946 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
10949 /* ??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 */
10950 /* ??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 */
10951 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
10952 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10954 basic_ios_wchar *basic_ios;
10956 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10959 this->base.vbtable = basic_istringstream_wchar_vbtable;
10960 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10961 basic_ios_wchar_ctor(basic_ios);
10963 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10966 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10967 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10968 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
10972 /* ??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 */
10973 /* ??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 */
10974 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
10975 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
10976 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10978 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
10979 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
10983 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10984 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10985 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
10986 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
10988 basic_ios_wchar *basic_ios;
10990 TRACE("(%p %d %d)\n", this, mode, virt_init);
10993 this->base.vbtable = basic_istringstream_wchar_vbtable;
10994 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10995 basic_ios_wchar_ctor(basic_ios);
10997 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11000 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11001 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11002 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11006 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11007 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11008 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11009 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11010 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11012 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11013 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11017 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11018 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11019 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11020 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11021 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11023 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
11026 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11027 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11028 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11029 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11030 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11031 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11033 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11035 TRACE("(%p)\n", this);
11037 basic_stringbuf_wchar_dtor(&this->strbuf);
11038 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11041 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11042 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11043 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11044 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11045 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11046 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11048 TRACE("(%p)\n", this);
11050 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11051 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11054 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11055 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11057 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11059 TRACE("(%p %x)\n", this, flags);
11062 /* we have an array, with the number of elements stored before the first object */
11063 INT_PTR i, *ptr = (INT_PTR *)this-1;
11065 for(i=*ptr-1; i>=0; i--)
11066 basic_istringstream_wchar_vbase_dtor(this+i);
11067 MSVCRT_operator_delete(ptr);
11069 basic_istringstream_wchar_vbase_dtor(this);
11071 MSVCRT_operator_delete(this);
11077 /* ?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 */
11078 /* ?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 */
11079 /* ?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 */
11080 /* ?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 */
11081 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11082 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11084 TRACE("(%p)\n", this);
11085 return (basic_stringbuf_wchar*)&this->strbuf;
11088 /* ?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 */
11089 /* ?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 */
11090 /* ?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 */
11091 /* ?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 */
11092 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11093 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11095 TRACE("(%p %p)\n", this, str);
11096 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11099 /* ?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 */
11100 /* ?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 */
11101 /* ?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 */
11102 /* ?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 */
11103 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11104 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11106 TRACE("(%p %p)\n", this, ret);
11107 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11110 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11112 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11115 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11117 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11120 /* ??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 */
11121 /* ??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 */
11122 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11123 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11124 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11126 basic_ios_char *basic_ios;
11128 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11131 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11132 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11133 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11134 basic_ios_char_ctor(basic_ios);
11136 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11139 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11140 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11141 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11145 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11146 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11147 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11148 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11149 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11151 basic_ios_char *basic_ios;
11153 TRACE("(%p %d %d)\n", this, mode, virt_init);
11156 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11157 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11158 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11159 basic_ios_char_ctor(basic_ios);
11161 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11164 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11165 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11166 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11170 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11171 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11172 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
11173 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11174 basic_stringstream_char *this, MSVCP_bool virt_init)
11176 return basic_stringstream_char_ctor_mode(
11177 this, OPENMODE_out|OPENMODE_in, virt_init);
11180 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11181 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11182 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11183 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11185 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11187 TRACE("(%p)\n", this);
11189 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11190 basic_stringbuf_char_dtor(&this->strbuf);
11193 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11194 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11195 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11196 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11198 TRACE("(%p)\n", this);
11200 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11201 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11204 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11205 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11207 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11209 TRACE("(%p %x)\n", this, flags);
11212 /* we have an array, with the number of elements stored before the first object */
11213 INT_PTR i, *ptr = (INT_PTR *)this-1;
11215 for(i=*ptr-1; i>=0; i--)
11216 basic_stringstream_char_vbase_dtor(this+i);
11217 MSVCRT_operator_delete(ptr);
11219 basic_stringstream_char_vbase_dtor(this);
11221 MSVCRT_operator_delete(this);
11227 /* ?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 */
11228 /* ?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 */
11229 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11230 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11232 TRACE("(%p)\n", this);
11233 return (basic_stringbuf_char*)&this->strbuf;
11236 /* ?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 */
11237 /* ?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 */
11238 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11239 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11241 TRACE("(%p %p)\n", this, str);
11242 basic_stringbuf_char_str_set(&this->strbuf, str);
11245 /* ?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 */
11246 /* ?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 */
11247 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11248 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11250 TRACE("(%p %p)\n", this, ret);
11251 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11254 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11256 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11259 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11261 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11264 /* ??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 */
11265 /* ??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 */
11266 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11267 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11269 basic_ios_wchar *basic_ios;
11271 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11274 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11275 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11276 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11277 basic_ios_wchar_ctor(basic_ios);
11279 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11282 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11283 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11284 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11288 /* ??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 */
11289 /* ??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 */
11290 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11291 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11292 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11294 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11295 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11299 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11300 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11301 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11302 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11304 basic_ios_wchar *basic_ios;
11306 TRACE("(%p %d %d)\n", this, mode, virt_init);
11309 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11310 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11311 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11312 basic_ios_wchar_ctor(basic_ios);
11314 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11317 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11318 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11319 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11323 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11324 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11325 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11326 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11327 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11329 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11330 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11334 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11335 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11336 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
11337 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11338 basic_stringstream_wchar *this, MSVCP_bool virt_init)
11340 return basic_stringstream_short_ctor_mode(
11341 this, OPENMODE_out|OPENMODE_in, virt_init);
11344 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11345 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11346 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11347 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11348 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11349 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11351 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11353 TRACE("(%p)\n", this);
11355 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11356 basic_stringbuf_wchar_dtor(&this->strbuf);
11359 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11360 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11361 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11362 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11363 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11364 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11366 TRACE("(%p)\n", this);
11368 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11369 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11372 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11373 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11375 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11377 TRACE("(%p %x)\n", this, flags);
11380 /* we have an array, with the number of elements stored before the first object */
11381 INT_PTR i, *ptr = (INT_PTR *)this-1;
11383 for(i=*ptr-1; i>=0; i--)
11384 basic_stringstream_wchar_vbase_dtor(this+i);
11385 MSVCRT_operator_delete(ptr);
11387 basic_stringstream_wchar_vbase_dtor(this);
11389 MSVCRT_operator_delete(this);
11395 /* ?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 */
11396 /* ?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 */
11397 /* ?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 */
11398 /* ?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 */
11399 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11400 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11402 TRACE("(%p)\n", this);
11403 return (basic_stringbuf_wchar*)&this->strbuf;
11406 /* ?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 */
11407 /* ?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 */
11408 /* ?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 */
11409 /* ?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 */
11410 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11411 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11413 TRACE("(%p %p)\n", this, str);
11414 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11417 /* ?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 */
11418 /* ?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 */
11419 /* ?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 */
11420 /* ?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 */
11421 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11422 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11424 TRACE("(%p %p)\n", this, ret);
11425 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11428 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11429 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11430 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11431 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11433 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11435 this->minsize = 32;
11436 this->endsave = NULL;
11437 this->strmode = mode;
11438 this->palloc = NULL;
11439 this->pfree = NULL;
11442 this->strmode |= STRSTATE_Dynamic;
11443 if(len > this->minsize)
11444 this->minsize = len;
11445 this->seekhigh = NULL;
11454 this->seekhigh = g+len;
11455 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11457 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11460 /* ??0strstreambuf@std@@QAE@PACH0@Z */
11461 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
11462 /* ??0strstreambuf@std@@QAE@PADH0@Z */
11463 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
11464 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
11465 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
11466 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
11468 TRACE("(%p %p %ld %p)\n", this, g, len, p);
11470 basic_streambuf_char_ctor(&this->base);
11471 this->base.vtable = &MSVCP_strstreambuf_vtable;
11473 strstreambuf__Init(this, len, g, p, 0);
11477 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11478 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11479 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11480 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11482 TRACE("(%p)\n", this);
11484 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11486 this->pfree(basic_streambuf_char_eback(&this->base));
11488 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11491 this->endsave = NULL;
11492 this->seekhigh = NULL;
11493 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11494 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11495 basic_streambuf_char_setp(&this->base, NULL, NULL);
11498 /* ??1strstreambuf@std@@UAE@XZ */
11499 /* ??1strstreambuf@std@@UEAA@XZ */
11500 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11501 void __thiscall strstreambuf_dtor(strstreambuf *this)
11503 TRACE("(%p)\n", this);
11505 strstreambuf__Tidy(this);
11506 basic_streambuf_char_dtor(&this->base);
11509 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11510 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11512 TRACE("(%p %x)\n", this, flags);
11514 /* we have an array, with the number of elements stored before the first object */
11515 INT_PTR i, *ptr = (INT_PTR *)this-1;
11517 for(i=*ptr-1; i>=0; i--)
11518 strstreambuf_dtor(this+i);
11519 MSVCRT_operator_delete(ptr);
11521 strstreambuf_dtor(this);
11523 MSVCRT_operator_delete(this);
11529 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11530 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11531 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11532 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11534 TRACE("(%p %d)\n", this, freeze);
11536 if(!freeze == !(this->strmode *STRSTATE_Frozen))
11540 this->strmode |= STRSTATE_Frozen;
11541 this->endsave = basic_streambuf_char_epptr(&this->base);
11542 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11543 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11545 this->strmode &= ~STRSTATE_Frozen;
11546 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11547 basic_streambuf_char_pptr(&this->base), this->endsave);
11551 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11552 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11553 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11554 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11556 MSVCP_size_t old_size, size;
11559 TRACE("(%p %d)\n", this, c);
11564 if(this->strmode & STRSTATE_Frozen)
11567 ptr = basic_streambuf_char_pptr(&this->base);
11568 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11569 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11571 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11574 ptr = basic_streambuf_char_eback(&this->base);
11575 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11577 size = old_size + old_size/2;
11578 if(size < this->minsize)
11579 size = this->minsize;
11582 buf = this->palloc(size);
11584 buf = MSVCRT_operator_new(size);
11588 memcpy(buf, ptr, old_size);
11589 if(this->strmode & STRSTATE_Allocated) {
11593 MSVCRT_operator_delete(ptr);
11596 this->strmode |= STRSTATE_Allocated;
11598 this->seekhigh = buf;
11599 basic_streambuf_char_setp(&this->base, buf, buf+size);
11600 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11602 this->seekhigh = this->seekhigh-ptr+buf;
11603 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11604 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11605 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11606 basic_streambuf_char_pptr(&this->base));
11609 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11612 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11613 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11614 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11615 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11617 char *ptr = basic_streambuf_char_gptr(&this->base);
11619 TRACE("(%p %d)\n", this, c);
11621 if(ptr<=basic_streambuf_char_eback(&this->base)
11622 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11625 basic_streambuf_char_gbump(&this->base, -1);
11628 if(this->strmode & STRSTATE_Constant)
11629 return (unsigned char)c;
11631 return (unsigned char)(ptr[0] = c);
11634 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
11635 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
11636 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11637 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11639 char *eback = basic_streambuf_char_eback(&this->base);
11640 char *pptr = basic_streambuf_char_pptr(&this->base);
11641 char *gptr = basic_streambuf_char_gptr(&this->base);
11643 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11648 if(pptr > this->seekhigh)
11649 this->seekhigh = pptr;
11651 if((mode & OPENMODE_in) && gptr) {
11652 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11654 else if(way == SEEKDIR_end)
11655 off += this->seekhigh-eback;
11656 else if(way != SEEKDIR_beg)
11659 if(off<0 || off>this->seekhigh-eback) {
11662 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11663 if((mode & OPENMODE_out) && pptr) {
11664 basic_streambuf_char_setp_next(&this->base, eback,
11665 gptr, basic_streambuf_char_epptr(&this->base));
11668 }else if((mode & OPENMODE_out) && pptr) {
11669 if(way == SEEKDIR_cur)
11671 else if(way == SEEKDIR_end)
11672 off += this->seekhigh-eback;
11673 else if(way != SEEKDIR_beg)
11676 if(off<0 || off>this->seekhigh-eback)
11679 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11688 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11689 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11690 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11691 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11693 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11695 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
11700 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11703 /* ?underflow@strstreambuf@std@@MAEHXZ */
11704 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11705 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11706 int __thiscall strstreambuf_underflow(strstreambuf *this)
11708 char *gptr = basic_streambuf_char_gptr(&this->base);
11711 TRACE("(%p)\n", this);
11716 if(gptr < basic_streambuf_char_egptr(&this->base))
11717 return (unsigned char)(*gptr);
11719 pptr = basic_streambuf_char_gptr(&this->base);
11720 if(pptr > this->seekhigh)
11721 this->seekhigh = pptr;
11723 if(this->seekhigh <= gptr)
11726 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11727 gptr, this->seekhigh);
11728 return (unsigned char)(*gptr);
11731 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
11733 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
11736 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
11738 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
11741 /* ??0ostrstream@std@@QAE@PADHH@Z */
11742 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
11743 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11745 basic_ios_char *basic_ios;
11747 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11750 this->base.vbtable = ostrstream_vbtable;
11751 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11752 basic_ios_char_ctor(basic_ios);
11754 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11757 strstreambuf_ctor_get_put(&this->buf, buf, size,
11758 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11759 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, FALSE);
11760 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
11764 /* ??1ostrstream@std@@UAE@XZ */
11765 /* ??1ostrstream@std@@UEAA@XZ */
11766 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
11767 void __thiscall ostrstream_dtor(basic_ios_char *base)
11769 ostrstream *this = ostrstream_from_basic_ios(base);
11771 TRACE("(%p)\n", this);
11773 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11774 strstreambuf_dtor(&this->buf);
11777 static void ostrstream_vbase_dtor(ostrstream *this)
11779 TRACE("(%p)\n", this);
11781 ostrstream_dtor(ostrstream_to_basic_ios(this));
11782 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11785 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
11786 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11788 ostrstream *this = ostrstream_from_basic_ios(base);
11790 TRACE("(%p %x)\n", this, flags);
11793 /* we have an array, with the number of elements stored before the first object */
11794 INT_PTR i, *ptr = (INT_PTR *)this-1;
11796 for(i=*ptr-1; i>=0; i--)
11797 ostrstream_vbase_dtor(this+i);
11798 MSVCRT_operator_delete(ptr);
11800 ostrstream_vbase_dtor(this);
11802 MSVCRT_operator_delete(this);
11808 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
11810 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
11813 /* ??1istrstream@std@@UAE@XZ */
11814 /* ??1istrstream@std@@UEAA@XZ */
11815 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
11816 void __thiscall istrstream_dtor(basic_ios_char *base)
11818 istrstream *this = istrstream_from_basic_ios(base);
11820 TRACE("(%p)\n", this);
11822 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11823 strstreambuf_dtor(&this->buf);
11826 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
11828 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
11831 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
11833 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
11836 /* ??0strstream@std@@QAE@PADHH@Z */
11837 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
11838 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
11839 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11841 basic_ios_char *basic_ios;
11843 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11846 this->base.base1.vbtable = strstream_vbtable1;
11847 this->base.base2.vbtable = strstream_vbtable2;
11848 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11849 basic_ios_char_ctor(basic_ios);
11851 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11854 strstreambuf_ctor_get_put(&this->buf, buf, size,
11855 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11856 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
11857 basic_ios->base.vtable = &MSVCP_strstream_vtable;
11861 /* ??1strstream@std@@UAE@XZ */
11862 /* ??1strstream@std@@UEAA@XZ */
11863 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
11864 void __thiscall strstream_dtor(basic_ios_char *base)
11866 strstream *this = strstream_from_basic_ios(base);
11868 TRACE("(%p)\n", this);
11870 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11871 strstreambuf_dtor(&this->buf);
11874 static void strstream_vbase_dtor(strstream *this)
11876 TRACE("(%p)\n", this);
11878 strstream_dtor(strstream_to_basic_ios(this));
11879 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11882 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
11883 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11885 strstream *this = strstream_from_basic_ios(base);
11887 TRACE("(%p %x)\n", this, flags);
11890 /* we have an array, with the number of elements stored before the first object */
11891 INT_PTR i, *ptr = (INT_PTR *)this-1;
11893 for(i=*ptr-1; i>=0; i--)
11894 strstream_vbase_dtor(this+i);
11895 MSVCRT_operator_delete(ptr);
11897 strstream_vbase_dtor(this);
11899 MSVCRT_operator_delete(this);
11905 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
11907 ios_base_precision_set(base, prec);
11910 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
11911 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11912 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
11914 TRACE("(%p %ld)\n", ret, prec);
11916 ret->pfunc = setprecision_func;
11921 static void __cdecl setw_func(ios_base *base, streamsize width)
11923 ios_base_width_set(base, width);
11926 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
11927 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11928 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
11930 TRACE("(%p %ld)\n", ret, width);
11932 ret->pfunc = setw_func;
11937 static void __cdecl resetioflags_func(ios_base *base, int mask)
11939 ios_base_setf_mask(base, 0, mask);
11942 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11943 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
11945 TRACE("(%p %d)\n", ret, mask);
11947 ret->pfunc = resetioflags_func;
11952 static void __cdecl setiosflags_func(ios_base *base, int mask)
11954 ios_base_setf_mask(base, FMTFLAG_mask, mask);
11957 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11958 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
11960 TRACE("(%p %d)\n", ret, mask);
11962 ret->pfunc = setiosflags_func;
11967 static void __cdecl setbase_func(ios_base *base, int set_base)
11970 set_base = FMTFLAG_dec;
11971 else if(set_base == 8)
11972 set_base = FMTFLAG_oct;
11973 else if(set_base == 16)
11974 set_base = FMTFLAG_hex;
11978 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
11981 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
11982 manip_int* __cdecl setbase(manip_int *ret, int base)
11984 TRACE("(%p %d)\n", ret, base);
11986 ret->pfunc = setbase_func;
11991 static basic_filebuf_char filebuf_char_stdin;
11992 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
11994 basic_istream_char obj;
11995 basic_ios_char vbase;
11997 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
11998 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
11999 basic_istream_char *_Ptr_cin = &cin.obj;
12001 static basic_filebuf_wchar filebuf_short_stdin;
12002 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12004 basic_istream_wchar obj;
12005 basic_ios_wchar vbase;
12006 } ucin = { { 0 } };
12007 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12008 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12009 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12011 static basic_filebuf_wchar filebuf_wchar_stdin;
12012 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12014 basic_istream_wchar obj;
12015 basic_ios_wchar vbase;
12016 } wcin = { { 0 } };
12017 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12018 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12019 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12021 static basic_filebuf_char filebuf_char_stdout;
12022 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12024 basic_ostream_char obj;
12025 basic_ios_char vbase;
12026 } cout = { { 0 } };
12027 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12028 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12029 basic_ostream_char *_Ptr_cout = &cout.obj;
12031 static basic_filebuf_wchar filebuf_short_stdout;
12032 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12034 basic_ostream_wchar obj;
12035 basic_ios_wchar vbase;
12036 } ucout = { { 0 } };
12037 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12038 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12039 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12041 static basic_filebuf_wchar filebuf_wchar_stdout;
12042 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12044 basic_ostream_wchar obj;
12045 basic_ios_wchar vbase;
12046 } wcout = { { 0 } };
12047 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12048 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12049 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12051 static basic_filebuf_char filebuf_char_stderr;
12052 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12054 basic_ostream_char obj;
12055 basic_ios_char vbase;
12056 } cerr = { { 0 } };
12057 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12058 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12059 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12061 static basic_filebuf_wchar filebuf_short_stderr;
12062 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12064 basic_ostream_wchar obj;
12065 basic_ios_wchar vbase;
12066 } ucerr = { { 0 } };
12067 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12068 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12069 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12071 static basic_filebuf_wchar filebuf_wchar_stderr;
12072 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12074 basic_ostream_wchar obj;
12075 basic_ios_wchar vbase;
12076 } wcerr = { { 0 } };
12077 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12078 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12079 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12081 static basic_filebuf_char filebuf_char_log;
12082 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12084 basic_ostream_char obj;
12085 basic_ios_char vbase;
12086 } clog = { { 0 } };
12087 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12088 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12089 basic_ostream_char *_Ptr_clog = &clog.obj;
12091 static basic_filebuf_wchar filebuf_short_log;
12092 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12094 basic_ostream_wchar obj;
12095 basic_ios_wchar vbase;
12096 } uclog = { { 0 } };
12097 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12098 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12099 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12101 static basic_filebuf_wchar filebuf_wchar_log;
12102 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12104 basic_ostream_wchar obj;
12105 basic_ios_wchar vbase;
12106 } wclog = { { 0 } };
12107 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12108 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12109 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12111 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12112 int ios_base_Init__Init_cnt = -1;
12114 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12115 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12116 static void ios_base_Init__Init_ctor(void *this)
12118 TRACE("(%p)\n", this);
12120 if(ios_base_Init__Init_cnt < 0)
12121 ios_base_Init__Init_cnt = 1;
12123 ios_base_Init__Init_cnt++;
12126 /* ??0Init@ios_base@std@@QAE@XZ */
12127 /* ??0Init@ios_base@std@@QEAA@XZ */
12128 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12129 void* __thiscall ios_base_Init_ctor(void *this)
12131 ios_base_Init__Init_ctor(this);
12135 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12136 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12137 static void ios_base_Init__Init_dtor(void *this)
12139 TRACE("(%p)\n", this);
12141 ios_base_Init__Init_cnt--;
12142 if(!ios_base_Init__Init_cnt) {
12143 basic_ostream_char_flush(&cout.obj);
12144 basic_ostream_char_flush(&cerr.obj);
12145 basic_ostream_char_flush(&clog.obj);
12149 /* ??1Init@ios_base@std@@QAE@XZ */
12150 /* ??1Init@ios_base@std@@QEAA@XZ */
12151 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12152 void __thiscall ios_base_Init_dtor(void *this)
12154 ios_base_Init__Init_dtor(this);
12157 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12158 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12159 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12160 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12162 TRACE("(%p %p)\n", this, rhs);
12166 /* ?_Init_cnt@_Winit@std@@0HA */
12167 int _Winit__Init_cnt = -1;
12169 /* ??0_Winit@std@@QAE@XZ */
12170 /* ??0_Winit@std@@QEAA@XZ */
12171 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12172 void* __thiscall _Winit_ctor(void *this)
12174 TRACE("(%p)\n", this);
12176 if(_Winit__Init_cnt < 0)
12177 _Winit__Init_cnt = 1;
12179 _Winit__Init_cnt++;
12184 /* ??1_Winit@std@@QAE@XZ */
12185 /* ??1_Winit@std@@QAE@XZ */
12186 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12187 void __thiscall _Winit_dtor(void *this)
12189 TRACE("(%p)\n", this);
12191 _Winit__Init_cnt--;
12192 if(!_Winit__Init_cnt) {
12193 basic_ostream_wchar_flush(&wcout.obj);
12194 basic_ostream_wchar_flush(&wcerr.obj);
12195 basic_ostream_wchar_flush(&wclog.obj);
12199 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12200 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12201 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12202 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12204 TRACE("(%p %p)\n", this, rhs);
12208 void init_io(void *base)
12211 init_iosb_rtti(base);
12212 init_ios_base_rtti(base);
12213 init_basic_ios_char_rtti(base);
12214 init_basic_ios_wchar_rtti(base);
12215 init_basic_ios_short_rtti(base);
12216 init_basic_streambuf_char_rtti(base);
12217 init_basic_streambuf_wchar_rtti(base);
12218 init_basic_streambuf_short_rtti(base);
12219 init_basic_filebuf_char_rtti(base);
12220 init_basic_filebuf_wchar_rtti(base);
12221 init_basic_filebuf_short_rtti(base);
12222 init_basic_stringbuf_char_rtti(base);
12223 init_basic_stringbuf_wchar_rtti(base);
12224 init_basic_stringbuf_short_rtti(base);
12225 init_basic_ostream_char_rtti(base);
12226 init_basic_ostream_wchar_rtti(base);
12227 init_basic_ostream_short_rtti(base);
12228 init_basic_istream_char_rtti(base);
12229 init_basic_istream_wchar_rtti(base);
12230 init_basic_istream_short_rtti(base);
12231 init_basic_iostream_char_rtti(base);
12232 init_basic_iostream_wchar_rtti(base);
12233 init_basic_iostream_short_rtti(base);
12234 init_basic_ofstream_char_rtti(base);
12235 init_basic_ofstream_wchar_rtti(base);
12236 init_basic_ofstream_short_rtti(base);
12237 init_basic_ifstream_char_rtti(base);
12238 init_basic_ifstream_wchar_rtti(base);
12239 init_basic_ifstream_short_rtti(base);
12240 init_basic_fstream_char_rtti(base);
12241 init_basic_fstream_wchar_rtti(base);
12242 init_basic_fstream_short_rtti(base);
12243 init_basic_ostringstream_char_rtti(base);
12244 init_basic_ostringstream_wchar_rtti(base);
12245 init_basic_ostringstream_short_rtti(base);
12246 init_basic_istringstream_char_rtti(base);
12247 init_basic_istringstream_wchar_rtti(base);
12248 init_basic_istringstream_short_rtti(base);
12249 init_basic_stringstream_char_rtti(base);
12250 init_basic_stringstream_wchar_rtti(base);
12251 init_basic_stringstream_short_rtti(base);
12252 init_strstreambuf_rtti(base);
12253 init_strstream_rtti(base);
12254 init_ostrstream_rtti(base);
12257 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12258 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12260 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12261 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12263 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12264 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12266 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12267 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
12269 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12270 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
12272 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12273 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
12275 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12276 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
12278 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12279 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
12281 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12282 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
12284 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12285 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
12287 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12288 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
12290 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12291 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
12296 basic_istream_char_vbase_dtor(&cin.obj);
12297 basic_filebuf_char_dtor(&filebuf_char_stdin);
12299 basic_istream_wchar_vbase_dtor(&ucin.obj);
12300 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12302 basic_istream_wchar_vbase_dtor(&wcin.obj);
12303 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12305 basic_ostream_char_vbase_dtor(&cout.obj);
12306 basic_filebuf_char_dtor(&filebuf_char_stdout);
12308 basic_ostream_wchar_vbase_dtor(&ucout.obj);
12309 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12311 basic_ostream_wchar_vbase_dtor(&wcout.obj);
12312 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12314 basic_ostream_char_vbase_dtor(&cerr.obj);
12315 basic_filebuf_char_dtor(&filebuf_char_stderr);
12317 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
12318 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
12320 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
12321 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
12323 basic_ostream_char_vbase_dtor(&clog.obj);
12324 basic_filebuf_char_dtor(&filebuf_char_log);
12326 basic_ostream_wchar_vbase_dtor(&uclog.obj);
12327 basic_filebuf_wchar_dtor(&filebuf_short_log);
12329 basic_ostream_wchar_vbase_dtor(&wclog.obj);
12330 basic_filebuf_wchar_dtor(&filebuf_wchar_log);