2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index = 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 MSVCP_bool ios_base_Sync = FALSE;
39 __int64 DECLSPEC_ALIGN(8) pos;
43 static inline const char* debugstr_fpos_int(fpos_int *fpos)
45 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
49 void (__cdecl *pfunc)(ios_base*, streamsize);
54 void (__cdecl *pfunc)(ios_base*, int);
62 } basic_filebuf__Initfl;
65 basic_streambuf_char base;
75 basic_streambuf_wchar base;
82 } basic_filebuf_wchar;
85 STRINGBUF_allocated = 1,
86 STRINGBUF_no_write = 2,
87 STRINGBUF_no_read = 4,
90 } basic_stringbuf_state;
93 basic_streambuf_char base;
96 char allocator; /* empty struct */
97 } basic_stringbuf_char;
100 basic_streambuf_wchar base;
103 char allocator; /* empty struct */
104 } basic_stringbuf_wchar;
108 basic_streambuf_char *strbuf;
109 struct _basic_ostream_char *stream;
115 basic_streambuf_wchar *strbuf;
116 struct _basic_ostream_wchar *stream;
120 typedef struct _basic_ostream_char {
122 /* virtual inheritance
123 * basic_ios_char basic_ios;
125 } basic_ostream_char;
127 typedef struct _basic_ostream_wchar {
129 /* virtual inheritance
130 * basic_ios_wchar basic_ios;
132 } basic_ostream_wchar;
137 /* virtual inheritance
138 * basic_ios_char basic_ios;
140 } basic_istream_char;
145 /* virtual inheritance
146 * basic_ios_wchar basic_ios;
148 } basic_istream_wchar;
151 basic_istream_char base1;
152 basic_ostream_char base2;
153 /* virtual inheritance
154 * basic_ios_char basic_ios;
156 } basic_iostream_char;
159 basic_istream_wchar base1;
160 basic_ostream_wchar base2;
161 /* virtual inheritance
162 * basic_ios_wchar basic_ios;
164 } basic_iostream_wchar;
167 basic_ostream_char base;
168 basic_filebuf_char filebuf;
169 /* virtual inheritance
170 * basic_ios_char basic_ios;
172 } basic_ofstream_char;
175 basic_ostream_wchar base;
176 basic_filebuf_wchar filebuf;
177 /* virtual inheritance
178 * basic_ios_wchar basic_ios;
180 } basic_ofstream_wchar;
183 basic_istream_char base;
184 basic_filebuf_char filebuf;
185 /* virtual inheritance
186 * basic_ios_char basic_ios;
188 } basic_ifstream_char;
191 basic_istream_wchar base;
192 basic_filebuf_wchar filebuf;
193 /* virtual inheritance
194 * basic_ios_wchar basic_ios;
196 } basic_ifstream_wchar;
199 basic_iostream_char base;
200 basic_filebuf_char filebuf;
201 /* virtual inheritance
202 * basic_ios_char basic_ios;
204 } basic_fstream_char;
207 basic_iostream_wchar base;
208 basic_filebuf_wchar filebuf;
209 /* virtual inheritance
210 * basic_ios_char basic_ios;
212 } basic_fstream_wchar;
215 basic_ostream_char base;
216 basic_stringbuf_char strbuf;
217 /* virtual inheritance
218 * basic_ios_char basic_ios;
220 } basic_ostringstream_char;
223 basic_ostream_wchar base;
224 basic_stringbuf_wchar strbuf;
225 /* virtual inheritance
226 * basic_ios_wchar basic_ios;
228 } basic_ostringstream_wchar;
231 basic_istream_char base;
232 basic_stringbuf_char strbuf;
233 /* virtual inheritance
234 * basic_ios_char basic_ios;
236 } basic_istringstream_char;
239 basic_istream_wchar base;
240 basic_stringbuf_wchar strbuf;
241 /* virtual inheritance
242 * basic_ios_wchar basic_ios;
244 } basic_istringstream_wchar;
247 basic_iostream_char base;
248 basic_stringbuf_char strbuf;
249 /* virtual inheritance
250 * basic_ios_char basic_ios;
252 } basic_stringstream_char;
255 basic_iostream_wchar base;
256 basic_stringbuf_wchar strbuf;
257 /* virtual inheritance
258 * basic_ios_wchar basic_ios;
260 } basic_stringstream_wchar;
263 STRSTATE_Allocated = 1,
264 STRSTATE_Constant = 2,
265 STRSTATE_Dynamic = 4,
267 } strstreambuf__Strstate;
270 basic_streambuf_char base;
275 void* (__cdecl *palloc)(MSVCP_size_t);
276 void (__cdecl *pfree)(void*);
279 extern const vtable_ptr MSVCP_iosb_vtable;
281 /* ??_7ios_base@std@@6B@ */
282 extern const vtable_ptr MSVCP_ios_base_vtable;
284 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
285 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
287 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
288 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
290 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
291 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
293 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
294 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
296 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
297 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
299 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
300 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
302 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
303 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
305 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
306 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
308 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
309 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
311 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
312 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
314 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
315 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
317 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
318 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
320 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
321 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
322 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
323 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
325 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
326 const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)};
327 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
328 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
330 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
331 const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)};
332 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
333 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
335 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
336 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
337 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
338 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
340 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
341 const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)};
342 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
343 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
345 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
346 const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)};
347 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
348 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
350 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
351 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
352 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
353 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
354 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
355 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
357 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
358 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
359 const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)};
360 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
361 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
362 const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)};
363 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
364 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
365 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
366 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
368 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
369 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
370 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
371 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
373 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
374 const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
375 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
376 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
378 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
379 const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
380 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
381 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
383 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
384 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
385 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
386 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
388 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
389 const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
390 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
391 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
393 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
394 const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
395 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
396 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
398 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
399 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
400 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
401 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
402 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
403 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
405 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
406 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
407 const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)};
408 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
409 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
410 const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
411 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
412 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
413 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
414 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
416 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
417 const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)};
418 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
419 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
421 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
422 const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
423 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
424 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
426 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
427 const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
428 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
429 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
431 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
432 const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)};
433 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
434 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
436 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
437 const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
438 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
439 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
441 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
442 const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
443 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
444 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
446 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
447 const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)};
448 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
449 const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
450 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
451 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
453 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
454 const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
455 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
456 const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
457 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
458 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
460 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
461 const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
462 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
463 const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
464 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
465 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
467 /* ??_7strstreambuf@std@@6B */
468 extern const vtable_ptr MSVCP_strstreambuf_vtable;
470 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@");
471 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@");
472 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
473 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
474 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
475 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
476 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
477 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
478 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
479 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
480 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
481 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
482 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
483 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
484 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
485 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@");
486 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
487 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@");
488 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
489 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
490 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
491 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
492 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
493 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
494 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
495 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
496 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
497 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
498 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
499 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
500 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
501 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@");
502 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
503 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
504 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@");
505 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
506 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
507 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
508 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
509 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
510 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@");
511 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
512 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
513 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@");
514 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
515 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
516 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
517 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
518 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
519 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
520 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
521 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
522 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
523 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
524 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
525 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@");
526 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
527 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
528 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
529 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
530 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
531 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@");
532 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
533 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
534 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
535 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
536 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
537 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
538 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
539 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@");
540 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
541 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
542 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
543 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@");
544 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
545 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
546 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
547 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
548 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
549 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
550 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
551 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@");
552 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
553 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
554 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
555 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@");
556 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
557 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
558 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
559 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
560 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
561 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
562 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
563 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
564 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
565 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
566 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
567 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@");
568 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
569 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
570 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
571 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
572 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
573 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@");
574 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
575 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
576 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
577 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
578 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
579 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
580 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
581 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
582 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
583 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
584 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
585 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
586 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
587 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
588 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
589 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
590 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
591 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
592 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
593 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
594 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
595 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
596 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
597 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
598 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
599 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
600 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
601 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
602 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
603 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
604 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
605 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
606 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
607 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
608 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
609 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
610 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
611 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
612 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
613 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
614 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
615 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
616 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
617 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@");
620 void __asm_dummy_vtables(void) {
623 VTABLE_ADD_FUNC(iosb_vector_dtor));
624 __ASM_VTABLE(ios_base,
625 VTABLE_ADD_FUNC(ios_base_vector_dtor));
626 __ASM_VTABLE(basic_ios_char,
627 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
628 __ASM_VTABLE(basic_ios_wchar,
629 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
630 __ASM_VTABLE(basic_ios_short,
631 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
632 __ASM_VTABLE(basic_streambuf_char,
633 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
634 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
635 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
636 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
637 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
638 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
639 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
640 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
641 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
642 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
643 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
644 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
645 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
646 __ASM_VTABLE(basic_streambuf_wchar,
647 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
648 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
649 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
650 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
651 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
652 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
653 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
654 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
655 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
656 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
657 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
658 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
659 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
660 __ASM_VTABLE(basic_streambuf_short,
661 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
662 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
663 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
664 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
665 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
666 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
667 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
668 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
669 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
670 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
671 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
672 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
673 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
674 __ASM_VTABLE(basic_filebuf_char,
675 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
676 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
677 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
678 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
679 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
680 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
681 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
682 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
683 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
684 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
685 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
686 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
687 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
688 __ASM_VTABLE(basic_filebuf_wchar,
689 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
690 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
691 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
692 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
693 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
694 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
695 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
696 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
697 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
698 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
699 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
700 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
701 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue));
702 __ASM_VTABLE(basic_filebuf_short,
703 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
704 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
705 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
706 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
707 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
708 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
710 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
711 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
712 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
713 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
714 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
715 VTABLE_ADD_FUNC(basic_filebuf_short_imbue));
716 __ASM_VTABLE(basic_stringbuf_char,
717 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
718 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
719 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
720 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
721 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
722 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
723 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
724 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
725 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
726 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
727 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
728 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
729 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
730 __ASM_VTABLE(basic_stringbuf_wchar,
731 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
732 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
733 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
734 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
735 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
736 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
737 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
738 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
739 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
740 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
741 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
742 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
743 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
744 __ASM_VTABLE(basic_stringbuf_short,
745 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
746 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
747 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
748 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
749 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
750 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
751 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
752 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
753 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
754 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
755 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
756 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
757 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
758 __ASM_VTABLE(basic_ostream_char,
759 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
760 __ASM_VTABLE(basic_ostream_wchar,
761 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
762 __ASM_VTABLE(basic_ostream_short,
763 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
764 __ASM_VTABLE(basic_istream_char,
765 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
766 __ASM_VTABLE(basic_istream_wchar,
767 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
768 __ASM_VTABLE(basic_istream_short,
769 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
770 __ASM_VTABLE(basic_iostream_char,
771 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
772 __ASM_VTABLE(basic_iostream_wchar,
773 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
774 __ASM_VTABLE(basic_iostream_short,
775 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
776 __ASM_VTABLE(basic_ofstream_char,
777 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
778 __ASM_VTABLE(basic_ofstream_wchar,
779 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
780 __ASM_VTABLE(basic_ofstream_short,
781 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
782 __ASM_VTABLE(basic_ifstream_char,
783 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
784 __ASM_VTABLE(basic_ifstream_wchar,
785 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
786 __ASM_VTABLE(basic_ifstream_short,
787 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
788 __ASM_VTABLE(basic_fstream_char,
789 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
790 __ASM_VTABLE(basic_fstream_wchar,
791 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
792 __ASM_VTABLE(basic_fstream_short,
793 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
794 __ASM_VTABLE(basic_ostringstream_char,
795 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
796 __ASM_VTABLE(basic_ostringstream_wchar,
797 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
798 __ASM_VTABLE(basic_ostringstream_short,
799 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
800 __ASM_VTABLE(basic_istringstream_char,
801 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
802 __ASM_VTABLE(basic_istringstream_wchar,
803 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
804 __ASM_VTABLE(basic_istringstream_short,
805 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
806 __ASM_VTABLE(basic_stringstream_char,
807 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
808 __ASM_VTABLE(basic_stringstream_wchar,
809 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
810 __ASM_VTABLE(basic_stringstream_short,
811 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
812 __ASM_VTABLE(strstreambuf,
813 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
814 VTABLE_ADD_FUNC(strstreambuf_overflow)
815 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
816 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
817 VTABLE_ADD_FUNC(strstreambuf_underflow)
818 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
819 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
820 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
821 VTABLE_ADD_FUNC(strstreambuf_seekoff)
822 VTABLE_ADD_FUNC(strstreambuf_seekpos)
823 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
824 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
825 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
830 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
831 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
832 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
833 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
835 TRACE("(%p %p %p %p)\n", this, first, next, last);
839 this->wsize = last-next;
842 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
843 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
844 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
845 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
847 basic_streambuf_char_setp_next(this, first, first, last);
850 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
851 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
852 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
853 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
855 TRACE("(%p %p %p %p)\n", this, first, next, last);
859 this->rsize = last-next;
862 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
863 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
864 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
865 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
867 TRACE("(%p)\n", this);
869 this->prbuf = &this->rbuf;
870 this->pwbuf = &this->wbuf;
871 this->prpos = &this->rpos;
872 this->pwpos = &this->wpos;
873 this->prsize = &this->rsize;
874 this->pwsize = &this->wsize;
876 basic_streambuf_char_setp(this, NULL, NULL);
877 basic_streambuf_char_setg(this, NULL, NULL, NULL);
880 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
881 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
882 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
883 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
885 TRACE("(%p %d)\n", this, uninitialized);
886 this->vtable = &MSVCP_basic_streambuf_char_vtable;
887 mutex_ctor(&this->lock);
891 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
892 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
893 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
894 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
896 TRACE("(%p)\n", this);
898 this->vtable = &MSVCP_basic_streambuf_char_vtable;
899 mutex_ctor(&this->lock);
900 this->loc = MSVCRT_operator_new(sizeof(locale));
901 locale_ctor(this->loc);
902 basic_streambuf_char__Init_empty(this);
907 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
908 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
909 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
910 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
912 TRACE("(%p)\n", this);
914 mutex_dtor(&this->lock);
915 locale_dtor(this->loc);
916 MSVCRT_operator_delete(this->loc);
919 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
920 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
922 TRACE("(%p %x)\n", this, flags);
924 /* we have an array, with the number of elements stored before the first object */
925 INT_PTR i, *ptr = (INT_PTR *)this-1;
927 for(i=*ptr-1; i>=0; i--)
928 basic_streambuf_char_dtor(this+i);
929 MSVCRT_operator_delete(ptr);
931 basic_streambuf_char_dtor(this);
933 MSVCRT_operator_delete(this);
939 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
940 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
941 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
943 TRACE("(%p)\n", this);
944 return *this->prpos ? *this->prsize : 0;
947 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
948 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
949 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
950 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
952 TRACE("(%p)\n", this);
958 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
959 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
960 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
961 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
963 TRACE("(%p)\n", this);
965 return (*this->prpos)++;
968 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
969 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
970 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
972 TRACE("(%p)\n", this);
978 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
979 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
980 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
981 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
983 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
993 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
994 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
995 static void basic_streambuf_char__Lock(basic_streambuf_char *this)
997 TRACE("(%p)\n", this);
998 mutex_lock(&this->lock);
1001 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1002 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1003 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1005 TRACE("(%p)\n", this);
1006 return *this->pwpos ? *this->pwsize : 0;
1009 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1010 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1011 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1012 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1014 TRACE("(%p)\n", this);
1016 return (*this->pwpos)++;
1019 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1020 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1021 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1022 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1023 int, (basic_streambuf_char*), (this))
1024 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1026 TRACE("(%p)\n", this);
1030 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1031 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1032 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1033 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1034 int, (basic_streambuf_char*), (this))
1035 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1039 TRACE("(%p)\n", this);
1041 if(call_basic_streambuf_char_underflow(this)==EOF)
1044 ret = **this->prpos;
1050 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1051 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1052 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1054 streamsize copied, chunk;
1057 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1059 for(copied=0; copied<count && size;) {
1060 chunk = basic_streambuf_char__Gnavail(this);
1061 if(chunk > count-copied)
1062 chunk = count-copied;
1065 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1066 *this->prpos += chunk;
1067 *this->prsize -= chunk;
1070 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1082 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1083 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1084 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1086 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1087 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1090 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1091 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1092 static void basic_streambuf_char__Unlock(basic_streambuf_char *this)
1094 TRACE("(%p)\n", this);
1095 mutex_unlock(&this->lock);
1098 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1099 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1100 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1101 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1103 TRACE("(%p)\n", this);
1104 return *this->prbuf;
1107 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1108 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1109 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1110 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1112 TRACE("(%p)\n", this);
1113 return *this->prpos;
1116 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1117 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1118 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1119 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1121 TRACE("(%p)\n", this);
1122 return *this->prpos+*this->prsize;
1125 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1126 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1127 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1128 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1130 TRACE("(%p)\n", this);
1131 return *this->pwpos+*this->pwsize;
1134 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1135 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1136 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1137 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1139 TRACE("(%p %d)\n", this, off);
1140 *this->prpos += off;
1141 *this->prsize -= off;
1144 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1145 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1146 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1147 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1148 void, (basic_streambuf_char*, const locale*), (this, loc))
1149 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1151 TRACE("(%p %p)\n", this, loc);
1154 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1155 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1156 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1157 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1158 int, (basic_streambuf_char*, int), (this, ch))
1159 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1161 TRACE("(%p %d)\n", this, ch);
1165 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1166 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1167 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1168 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1169 int, (basic_streambuf_char*, int), (this, ch))
1170 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1172 TRACE("(%p %d)\n", this, ch);
1176 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1177 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1178 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1179 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1181 TRACE("(%p)\n", this);
1182 return *this->pwbuf;
1185 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1186 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1187 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1188 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1190 TRACE("(%p %d)\n", this, off);
1191 *this->pwpos += off;
1192 *this->pwsize -= off;
1195 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1196 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1197 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1198 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1200 TRACE("(%p)\n", this);
1201 return *this->pwpos;
1204 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1205 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1206 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1207 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1209 TRACE("(%p %p)\n", this, loc);
1210 memcpy(ret, this->loc, sizeof(locale));
1211 call_basic_streambuf_char_imbue(this, loc);
1212 locale_copy_ctor(this->loc, loc);
1216 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1217 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1218 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1219 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1220 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1221 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1222 fpos_int *ret, streamoff off, int way, int mode)
1224 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1231 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1232 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1233 static fpos_int* basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1234 fpos_int *ret, streamoff off, int way, int mode)
1236 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1237 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1240 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1241 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1242 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1243 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1244 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1245 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1246 fpos_int *ret, fpos_int pos, int mode)
1248 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1255 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1256 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1257 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1258 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1259 fpos_int *ret, fpos_int pos, int mode)
1261 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1262 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1265 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1266 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1267 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1268 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1269 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1270 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1272 TRACE("(%p %p %ld)\n", this, buf, count);
1276 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1277 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1278 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1279 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1281 TRACE("(%p %p %ld)\n", this, buf, count);
1282 return call_basic_streambuf_char_setbuf(this, buf, count);
1285 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1286 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1287 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1288 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1289 int, (basic_streambuf_char*), (this))
1290 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1292 TRACE("(%p)\n", this);
1296 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1297 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1298 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1299 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1301 TRACE("(%p)\n", this);
1302 return call_basic_streambuf_char_sync(this);
1305 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1306 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1307 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1308 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1310 TRACE("(%p %p %ld)\n", this, ptr, count);
1311 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1314 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1315 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1316 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1317 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1318 streamsize, (basic_streambuf_char*), (this))
1319 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1321 TRACE("(%p)\n", this);
1325 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1326 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1327 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1328 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1332 TRACE("(%p)\n", this);
1334 ret = basic_streambuf_char__Gnavail(this);
1335 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1338 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1339 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1340 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1341 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1343 TRACE("(%p %d)\n", this, ch);
1344 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1350 return call_basic_streambuf_char_pbackfail(this, ch);
1353 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1354 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1355 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1356 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1358 TRACE("(%p %d)\n", this, ch);
1359 return basic_streambuf_char__Pnavail(this) ?
1360 (*basic_streambuf_char__Pninc(this) = ch) :
1361 call_basic_streambuf_char_overflow(this, ch);
1364 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1365 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1366 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1367 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1369 TRACE("(%p)\n", this);
1370 if(*this->prpos && *this->prpos>*this->prbuf) {
1373 return **this->prpos;
1376 return call_basic_streambuf_char_pbackfail(this, EOF);
1379 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1380 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1381 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1382 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1384 TRACE("(%p)\n", this);
1385 if(basic_streambuf_char__Gnavail(this))
1386 basic_streambuf_char__Gninc(this);
1388 call_basic_streambuf_char_uflow(this);
1391 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1392 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1393 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1394 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1396 TRACE("(%p)\n", this);
1397 return basic_streambuf_char__Gnavail(this) ?
1398 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1401 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1402 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1403 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1404 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1406 TRACE("(%p)\n", this);
1407 return basic_streambuf_char__Gnavail(this) ?
1408 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1411 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1412 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1413 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1414 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1416 TRACE("(%p)\n", this);
1418 if(basic_streambuf_char__Gnavail(this) > 1)
1419 return *basic_streambuf_char__Gnpreinc(this);
1420 return basic_streambuf_char_sbumpc(this)==EOF ?
1421 EOF : basic_streambuf_char_sgetc(this);
1424 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1425 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1426 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1427 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1428 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1429 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1431 TRACE("(%p %p %ld)\n", this, ptr, count);
1432 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1435 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1436 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1437 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1438 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1439 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1440 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1442 streamsize copied, chunk;
1444 TRACE("(%p %p %ld)\n", this, ptr, count);
1446 for(copied=0; copied<count;) {
1447 chunk = basic_streambuf_char__Pnavail(this);
1448 if(chunk > count-copied)
1449 chunk = count-copied;
1452 memcpy(*this->pwpos, ptr+copied, chunk);
1453 *this->pwpos += chunk;
1454 *this->pwsize -= chunk;
1456 }else if(call_basic_streambuf_char_overflow(this, ptr[copied]) != EOF) {
1466 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1467 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1468 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1469 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1471 TRACE("(%p %p %ld)\n", this, ptr, count);
1472 return call_basic_streambuf_char_xsputn(this, ptr, count);
1475 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1476 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1477 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1478 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1479 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1480 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1482 TRACE("(%p %p %p %p)\n", this, first, next, last);
1486 this->wsize = last-next;
1489 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1490 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1491 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1492 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1493 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1494 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1496 basic_streambuf_wchar_setp_next(this, first, first, last);
1499 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1500 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1501 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1502 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1503 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1504 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1506 TRACE("(%p %p %p %p)\n", this, first, next, last);
1510 this->rsize = last-next;
1513 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1514 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1515 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1516 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1517 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1518 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1520 TRACE("(%p)\n", this);
1522 this->prbuf = &this->rbuf;
1523 this->pwbuf = &this->wbuf;
1524 this->prpos = &this->rpos;
1525 this->pwpos = &this->wpos;
1526 this->prsize = &this->rsize;
1527 this->pwsize = &this->wsize;
1529 basic_streambuf_wchar_setp(this, NULL, NULL);
1530 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1533 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1534 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1535 static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1537 TRACE("(%p %d)\n", this, uninitialized);
1538 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1539 mutex_ctor(&this->lock);
1543 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1544 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1545 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1546 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1548 TRACE("(%p %d)\n", this, uninitialized);
1549 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1550 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1554 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1555 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1556 static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1558 TRACE("(%p)\n", this);
1560 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1561 mutex_ctor(&this->lock);
1562 this->loc = MSVCRT_operator_new(sizeof(locale));
1563 locale_ctor(this->loc);
1564 basic_streambuf_wchar__Init_empty(this);
1569 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1570 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1571 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1572 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1574 TRACE("(%p)\n", this);
1575 basic_streambuf_wchar_ctor(this);
1576 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1580 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1581 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1582 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1583 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1584 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1585 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1587 TRACE("(%p)\n", this);
1589 mutex_dtor(&this->lock);
1590 locale_dtor(this->loc);
1591 MSVCRT_operator_delete(this->loc);
1594 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1595 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1597 TRACE("(%p %x)\n", this, flags);
1599 /* we have an array, with the number of elements stored before the first object */
1600 INT_PTR i, *ptr = (INT_PTR *)this-1;
1602 for(i=*ptr-1; i>=0; i--)
1603 basic_streambuf_wchar_dtor(this+i);
1604 MSVCRT_operator_delete(ptr);
1606 basic_streambuf_wchar_dtor(this);
1608 MSVCRT_operator_delete(this);
1614 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1615 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1616 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1617 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1618 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1620 TRACE("(%p)\n", this);
1621 return *this->prpos ? *this->prsize : 0;
1624 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1625 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1626 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1627 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1628 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1629 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1631 TRACE("(%p)\n", this);
1634 return *this->prpos;
1637 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1638 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1639 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1640 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1641 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1642 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1644 TRACE("(%p)\n", this);
1646 return (*this->prpos)++;
1649 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1650 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1651 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1652 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1653 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1655 TRACE("(%p)\n", this);
1658 return *this->prpos;
1661 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1662 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1663 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1664 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1665 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1666 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)
1668 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1678 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1679 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1680 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1681 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1682 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1684 TRACE("(%p)\n", this);
1685 mutex_lock(&this->lock);
1688 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1689 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1690 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1691 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1692 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1694 TRACE("(%p)\n", this);
1695 return *this->pwpos ? *this->pwsize : 0;
1698 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1699 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1700 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1701 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1702 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1703 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1705 TRACE("(%p)\n", this);
1707 return (*this->pwpos)++;
1710 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1711 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1712 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1713 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1714 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1715 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1716 unsigned short, (basic_streambuf_wchar*), (this))
1717 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1719 TRACE("(%p)\n", this);
1723 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1724 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1725 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1726 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1727 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1728 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1729 unsigned short, (basic_streambuf_wchar*), (this))
1730 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1734 TRACE("(%p)\n", this);
1736 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1739 ret = **this->prpos;
1745 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1746 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1747 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1748 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1749 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1751 streamsize copied, chunk;
1754 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1756 for(copied=0; copied<count && size;) {
1757 chunk = basic_streambuf_wchar__Gnavail(this);
1758 if(chunk > count-copied)
1759 chunk = count-copied;
1762 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1763 *this->prpos += chunk;
1764 *this->prsize -= chunk;
1766 size -= chunk*sizeof(wchar_t);
1767 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1779 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1780 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1781 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1782 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1783 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1785 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1786 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1789 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1790 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1791 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1792 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1793 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1795 TRACE("(%p)\n", this);
1796 mutex_unlock(&this->lock);
1799 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1800 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1801 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1802 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1803 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1804 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1806 TRACE("(%p)\n", this);
1807 return *this->prbuf;
1810 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1811 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1812 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1813 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1814 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1815 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1817 TRACE("(%p)\n", this);
1818 return *this->prpos;
1821 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1822 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1823 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1824 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1825 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1826 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1828 TRACE("(%p)\n", this);
1829 return *this->prpos+*this->prsize;
1832 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1833 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1834 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1835 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1836 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1837 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1839 TRACE("(%p)\n", this);
1840 return *this->pwpos+*this->pwsize;
1843 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1844 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1845 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1846 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1847 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1848 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1850 TRACE("(%p %d)\n", this, off);
1851 *this->prpos += off;
1852 *this->prsize -= off;
1855 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1856 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1857 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1858 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1859 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1860 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1861 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1862 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1864 TRACE("(%p %p)\n", this, loc);
1867 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1868 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1869 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1870 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1871 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1872 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1873 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1874 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1876 TRACE("(%p %d)\n", this, ch);
1880 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1881 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1882 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1883 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1884 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1885 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1886 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1887 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1889 TRACE("(%p %d)\n", this, ch);
1893 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1894 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1895 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1896 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1897 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1898 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1900 TRACE("(%p)\n", this);
1901 return *this->pwbuf;
1904 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1905 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1906 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1907 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1908 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1909 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1911 TRACE("(%p %d)\n", this, off);
1912 *this->pwpos += off;
1913 *this->pwsize -= off;
1916 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1917 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1918 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1919 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1920 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1921 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1923 TRACE("(%p)\n", this);
1924 return *this->pwpos;
1927 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1928 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1929 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1930 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1931 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1932 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1934 TRACE("(%p %p)\n", this, loc);
1935 memcpy(ret, this->loc, sizeof(locale));
1936 call_basic_streambuf_wchar_imbue(this, loc);
1937 locale_copy_ctor(this->loc, loc);
1941 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1942 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1943 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1944 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1945 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1946 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1947 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1948 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
1949 fpos_int *ret, streamoff off, int way, int mode)
1951 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1958 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1959 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1960 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1961 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1962 static fpos_int* basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
1963 fpos_int *ret, streamoff off, int way, int mode)
1965 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1966 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
1969 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1970 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1971 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1972 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1973 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
1974 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1975 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1976 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
1977 fpos_int *ret, fpos_int pos, int mode)
1979 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1986 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1987 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1988 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1989 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1990 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
1991 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
1992 fpos_int *ret, fpos_int pos, int mode)
1994 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1995 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
1998 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1999 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2000 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2001 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2002 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2003 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2004 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2005 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2007 TRACE("(%p %p %ld)\n", this, buf, count);
2011 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2012 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2013 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2014 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2015 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2016 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2018 TRACE("(%p %p %ld)\n", this, buf, count);
2019 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2022 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2023 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2024 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2025 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2026 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2027 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2028 int, (basic_streambuf_wchar*), (this))
2029 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2031 TRACE("(%p)\n", this);
2035 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2036 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2037 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2038 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2039 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2040 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2042 TRACE("(%p)\n", this);
2043 return call_basic_streambuf_wchar_sync(this);
2046 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2047 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2048 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2049 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2050 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2051 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2053 TRACE("(%p %p %ld)\n", this, ptr, count);
2054 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2057 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2058 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2059 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2060 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2061 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2062 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2063 streamsize, (basic_streambuf_wchar*), (this))
2064 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2066 TRACE("(%p)\n", this);
2070 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2071 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2072 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2073 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2074 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2075 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2079 TRACE("(%p)\n", this);
2081 ret = basic_streambuf_wchar__Gnavail(this);
2082 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2085 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2086 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2087 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2088 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2089 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2090 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2092 TRACE("(%p %d)\n", this, ch);
2093 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2099 return call_basic_streambuf_wchar_pbackfail(this, ch);
2102 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2103 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2104 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2105 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2106 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2107 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2109 TRACE("(%p %d)\n", this, ch);
2110 return basic_streambuf_wchar__Pnavail(this) ?
2111 (*basic_streambuf_wchar__Pninc(this) = ch) :
2112 call_basic_streambuf_wchar_overflow(this, ch);
2115 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2116 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2117 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2118 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2119 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2120 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2122 TRACE("(%p)\n", this);
2123 if(*this->prpos && *this->prpos>*this->prbuf) {
2126 return **this->prpos;
2129 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2132 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2133 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2134 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2135 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2136 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2137 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2139 TRACE("(%p)\n", this);
2140 if(basic_streambuf_wchar__Gnavail(this))
2141 basic_streambuf_wchar__Gninc(this);
2143 call_basic_streambuf_wchar_uflow(this);
2146 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2147 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2148 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2149 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2150 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2151 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2153 TRACE("(%p)\n", this);
2154 return basic_streambuf_wchar__Gnavail(this) ?
2155 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2158 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2159 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2160 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2161 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2162 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2163 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2165 TRACE("(%p)\n", this);
2166 return basic_streambuf_wchar__Gnavail(this) ?
2167 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2170 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2171 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2172 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2173 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2174 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2175 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2177 TRACE("(%p)\n", this);
2179 if(basic_streambuf_wchar__Gnavail(this) > 1)
2180 return *basic_streambuf_wchar__Gnpreinc(this);
2181 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2182 WEOF : basic_streambuf_wchar_sgetc(this);
2185 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2186 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2187 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2188 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2189 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2190 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2191 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2192 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2194 TRACE("(%p %p %ld)\n", this, ptr, count);
2195 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2198 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2199 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2200 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2201 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2202 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2203 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2204 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2205 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2207 streamsize copied, chunk;
2209 TRACE("(%p %p %ld)\n", this, ptr, count);
2211 for(copied=0; copied<count;) {
2212 chunk = basic_streambuf_wchar__Pnavail(this);
2213 if(chunk > count-copied)
2214 chunk = count-copied;
2217 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2218 *this->pwpos += chunk;
2219 *this->pwsize -= chunk;
2221 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2231 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2232 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2233 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2234 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2235 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2236 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2238 TRACE("(%p %p %ld)\n", this, ptr, count);
2239 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2242 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2243 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2244 int basic_filebuf_char__Init__Stinit = 0;
2246 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2247 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2248 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2249 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2251 TRACE("(%p %p %d)\n", this, file, which);
2254 this->wrotesome = FALSE;
2255 this->state = basic_filebuf_char__Init__Stinit;
2256 this->close = (which == INITFL_open);
2259 basic_streambuf_char__Init_empty(&this->base);
2261 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2262 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2265 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2266 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2267 static void basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
2269 TRACE("(%p %p)\n", this, cvt);
2271 if(codecvt_base_always_noconv(&cvt->base)) {
2274 basic_streambuf_char__Init_empty(&this->base);
2279 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2280 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2281 static MSVCP_bool basic_filebuf_char__Endwrite(basic_filebuf_char *this)
2283 TRACE("(%p)\n", this);
2285 if(!this->wrotesome || !this->cvt)
2289 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2293 /* TODO: check if we need a dynamic buffer here */
2298 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2301 this->wrotesome = FALSE;
2303 case CODECVT_partial:
2304 if(!fwrite(buf, next-buf, 1, this->file))
2309 case CODECVT_noconv:
2310 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2319 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2320 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2321 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2322 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2324 basic_filebuf_char *ret = this;
2326 TRACE("(%p)\n", this);
2331 /* TODO: handle exceptions */
2332 if(!basic_filebuf_char__Endwrite(this))
2334 if(!fclose(this->file))
2337 basic_filebuf_char__Init(this, NULL, INITFL_close);
2341 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2342 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2343 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2344 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2346 TRACE("(%p %p)\n", this, file);
2348 basic_streambuf_char_ctor(&this->base);
2349 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2351 basic_filebuf_char__Init(this, file, INITFL_new);
2355 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2356 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2357 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2358 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2360 return basic_filebuf_char_ctor_file(this, NULL);
2363 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2364 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2365 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2366 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2368 TRACE("(%p %d)\n", this, uninitialized);
2370 basic_streambuf_char_ctor(&this->base);
2371 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2375 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2376 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2377 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2378 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2380 TRACE("(%p)\n", this);
2383 basic_filebuf_char_close(this);
2384 basic_streambuf_char_dtor(&this->base);
2387 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2388 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2390 TRACE("(%p %x)\n", this, flags);
2392 /* we have an array, with the number of elements stored before the first object */
2393 INT_PTR i, *ptr = (INT_PTR *)this-1;
2395 for(i=*ptr-1; i>=0; i--)
2396 basic_filebuf_char_dtor(this+i);
2397 MSVCRT_operator_delete(ptr);
2399 basic_filebuf_char_dtor(this);
2401 MSVCRT_operator_delete(this);
2407 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2408 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2409 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2410 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2412 TRACE("(%p)\n", this);
2413 return this->file != NULL;
2416 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2417 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2418 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2420 static const wchar_t rW[] = {'r',0};
2421 static const struct {
2423 const wchar_t str[4];
2424 const wchar_t str_bin[4];
2426 {OPENMODE_out, {'w',0}, {'w','b',0}},
2427 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2428 {OPENMODE_app, {'a',0}, {'a','b',0}},
2429 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2430 {OPENMODE_in, {'r',0}, {'r','b',0}},
2431 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2432 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2433 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2434 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2437 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2441 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2443 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2444 if(str_mode[mode_idx].mode == real_mode)
2446 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2449 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2454 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2455 && (f = _wfopen(name, rW))) {
2460 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2461 : str_mode[mode_idx].str, prot);
2465 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2473 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2474 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2475 static FILE* _Fiopen(const char *name, int mode, int prot)
2477 wchar_t nameW[FILENAME_MAX];
2479 TRACE("(%s %d %d)\n", name, mode, prot);
2481 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2483 return _Fiopen_wchar(nameW, mode, prot);
2486 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2487 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2488 FILE* __cdecl ___Fiopen(const char *name, int mode)
2490 TRACE("(%p %d)\n", name, mode);
2491 return _Fiopen(name, mode, _SH_DENYNO);
2494 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2495 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2496 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2497 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2498 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2502 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2504 if(basic_filebuf_char_is_open(this))
2507 if(!(f = _Fiopen_wchar(name, mode, prot)))
2510 basic_filebuf_char__Init(this, f, INITFL_open);
2511 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2515 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2516 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2517 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2519 wchar_t nameW[FILENAME_MAX];
2521 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2523 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2525 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2528 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2529 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2530 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2531 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2533 TRACE("(%p %p %d)\n", this, name, mode);
2534 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2537 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2538 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2539 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2540 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2542 TRACE("(%p %p %d)\n", this, name, mode);
2543 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2546 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2547 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2548 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2549 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2551 char buf[8], *dyn_buf;
2552 char ch = c, *to_next;
2553 const char *from_next;
2557 TRACE("(%p %d)\n", this, c);
2559 if(!basic_filebuf_char_is_open(this))
2565 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2569 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2570 &from_next, buf, buf+sizeof(buf), &to_next);
2573 case CODECVT_partial:
2578 if(!fwrite(buf, to_next-buf, 1, this->file))
2580 if(ret == CODECVT_partial)
2583 case CODECVT_noconv:
2584 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2592 max_size = codecvt_base_max_length(&this->cvt->base);
2593 dyn_buf = malloc(max_size);
2597 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2598 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2602 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2604 return ret ? c : EOF;
2605 case CODECVT_partial:
2606 ERR("buffer should be big enough to store all output\n");
2614 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2615 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2616 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2617 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2619 TRACE("(%p %d)\n", this, c);
2621 if(!basic_filebuf_char_is_open(this))
2624 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2625 && (c==EOF || basic_streambuf_char_gptr(&this->base)[-1]==(char)c)) {
2626 basic_streambuf_char__Gndec(&this->base);
2627 return c==EOF ? !c : c;
2628 }else if(c!=EOF && !this->cvt) {
2629 return ungetc(c, this->file);
2635 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2636 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2637 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2638 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2640 char ch, buf[128], *to_next;
2641 const char *buf_next;
2644 TRACE("(%p)\n", this);
2646 if(!basic_filebuf_char_is_open(this))
2649 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2650 return *basic_streambuf_char__Gninc(&this->base);
2652 c = fgetc(this->file);
2653 if(!this->cvt || c==EOF)
2657 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
2660 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2661 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2662 case CODECVT_partial:
2664 if(to_next == &ch) {
2665 c = fgetc(this->file);
2671 for(i--; i>=buf_next-buf; i--)
2672 ungetc(buf[i], this->file);
2674 case CODECVT_noconv:
2681 FIXME("buffer is too small\n");
2685 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2686 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2687 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2688 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2692 TRACE("(%p)\n", this);
2694 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2695 return *basic_streambuf_char_gptr(&this->base);
2697 ret = call_basic_streambuf_char_uflow(&this->base);
2699 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2703 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2704 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2705 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2706 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2707 fpos_int *ret, streamoff off, int way, int mode)
2711 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2713 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2714 || fseek(this->file, off, way)) {
2721 fgetpos(this->file, &pos);
2724 ret->state = this->state;
2728 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2729 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2730 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2731 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2732 fpos_int *ret, fpos_int pos, int mode)
2736 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2738 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2739 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2740 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2747 fgetpos(this->file, &fpos);
2750 ret->state = this->state;
2754 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2755 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2756 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2757 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2759 TRACE("(%p %p %ld)\n", this, buf, count);
2761 if(!basic_filebuf_char_is_open(this))
2764 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2767 basic_filebuf_char__Init(this, this->file, INITFL_open);
2771 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2772 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2773 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2774 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2776 TRACE("(%p)\n", this);
2778 if(!basic_filebuf_char_is_open(this))
2781 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2783 return fflush(this->file);
2786 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2787 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2788 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2789 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2791 TRACE("(%p %p)\n", this, loc);
2792 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2795 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2796 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2797 int basic_filebuf_short__Init__Stinit = 0;
2799 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2800 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2801 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2803 TRACE("(%p %p %d)\n", this, file, which);
2806 this->wrotesome = FALSE;
2808 this->close = (which == INITFL_open);
2811 basic_streambuf_wchar__Init_empty(&this->base);
2814 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2815 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2816 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2817 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2819 TRACE("(%p %p %d)\n", this, file, which);
2822 this->wrotesome = FALSE;
2823 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@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2831 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2832 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2833 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2834 static void basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt)
2836 TRACE("(%p %p)\n", this, cvt);
2838 if(codecvt_base_always_noconv(&cvt->base)) {
2841 basic_streambuf_wchar__Init_empty(&this->base);
2846 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2847 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2848 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2849 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2850 static MSVCP_bool basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this)
2852 TRACE("(%p)\n", this);
2854 if(!this->wrotesome || !this->cvt)
2857 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2861 /* TODO: check if we need a dynamic buffer here */
2866 ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2869 this->wrotesome = FALSE;
2871 case CODECVT_partial:
2872 if(!fwrite(buf, next-buf, 1, this->file))
2877 case CODECVT_noconv:
2878 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2887 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2888 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2889 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2890 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2891 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2892 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2894 basic_filebuf_wchar *ret = this;
2896 TRACE("(%p)\n", this);
2901 /* TODO: handle exceptions */
2902 if(!basic_filebuf_wchar__Endwrite(this))
2904 if(!fclose(this->file))
2907 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2911 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2912 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2913 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2915 TRACE("(%p %p)\n", this, file);
2917 basic_streambuf_wchar_ctor(&this->base);
2918 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2920 basic_filebuf_wchar__Init(this, file, INITFL_new);
2924 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2925 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2926 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2927 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2929 TRACE("(%p %p)\n", this, file);
2931 basic_streambuf_short_ctor(&this->base);
2932 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2934 basic_filebuf_short__Init(this, file, INITFL_new);
2938 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2939 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2940 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2942 return basic_filebuf_wchar_ctor_file(this, NULL);
2945 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2946 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2947 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2948 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2950 return basic_filebuf_short_ctor_file(this, NULL);
2953 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2954 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2955 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
2956 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
2958 TRACE("(%p %d)\n", this, uninitialized);
2960 basic_streambuf_short_ctor(&this->base);
2961 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2965 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2966 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2967 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2968 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2969 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
2970 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
2972 TRACE("(%p)\n", this);
2975 basic_filebuf_wchar_close(this);
2976 basic_streambuf_wchar_dtor(&this->base);
2979 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
2980 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
2982 TRACE("(%p %x)\n", this, flags);
2984 /* we have an array, with the number of elements stored before the first object */
2985 INT_PTR i, *ptr = (INT_PTR *)this-1;
2987 for(i=*ptr-1; i>=0; i--)
2988 basic_filebuf_wchar_dtor(this+i);
2989 MSVCRT_operator_delete(ptr);
2991 basic_filebuf_wchar_dtor(this);
2993 MSVCRT_operator_delete(this);
2999 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3000 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3001 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3002 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3003 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
3004 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
3006 TRACE("(%p)\n", this);
3007 return this->file != NULL;
3010 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3011 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3012 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3013 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3014 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3018 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3020 if(basic_filebuf_wchar_is_open(this))
3023 if(!(f = _Fiopen_wchar(name, mode, prot)))
3026 basic_filebuf_wchar__Init(this, f, INITFL_open);
3027 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc));
3031 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3032 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3033 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3035 wchar_t nameW[FILENAME_MAX];
3037 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3039 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3041 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3044 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3045 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3046 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3047 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3049 TRACE("(%p %p %d)\n", this, name, mode);
3050 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3053 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3054 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3055 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3056 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3058 TRACE("(%p %p %d)\n", this, name, mode);
3059 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3062 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3063 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3064 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3065 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3066 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3067 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3069 char buf[8], *dyn_buf, *to_next;
3071 const wchar_t *from_next;
3076 TRACE("(%p %d)\n", this, c);
3078 if(!basic_filebuf_wchar_is_open(this))
3084 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3088 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3089 &from_next, buf, buf+sizeof(buf), &to_next);
3092 case CODECVT_partial:
3097 if(!fwrite(buf, to_next-buf, 1, this->file))
3099 if(ret == CODECVT_partial)
3102 case CODECVT_noconv:
3103 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3111 max_size = codecvt_base_max_length(&this->cvt->base);
3112 dyn_buf = malloc(max_size);
3116 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3117 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
3121 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
3123 return ret ? c : WEOF;
3124 case CODECVT_partial:
3125 ERR("buffer should be big enough to store all output\n");
3133 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3134 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3135 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3136 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3137 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3138 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3140 TRACE("(%p %d)\n", this, c);
3142 if(!basic_filebuf_wchar_is_open(this))
3145 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3146 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==(wchar_t)c)) {
3147 basic_streambuf_wchar__Gndec(&this->base);
3148 return c==WEOF ? !c : c;
3149 }else if(c!=WEOF && !this->cvt) {
3150 return ungetwc(c, this->file);
3151 }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) {
3153 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1);
3160 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3161 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3162 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3163 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3164 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3165 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3167 wchar_t ch, *to_next;
3169 const char *buf_next;
3172 TRACE("(%p)\n", this);
3174 if(!basic_filebuf_wchar_is_open(this))
3177 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3178 return *basic_streambuf_wchar__Gninc(&this->base);
3181 return fgetwc(this->file);
3184 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
3185 if((c = fgetc(this->file)) == EOF)
3189 switch(codecvt_wchar_in(this->cvt, &this->state, buf_next,
3190 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
3191 case CODECVT_partial:
3196 for(i--; i>=buf_next-buf; i--)
3197 ungetc(buf[i], this->file);
3199 case CODECVT_noconv:
3200 if(i+1 < sizeof(wchar_t))
3203 memcpy(&ch, buf, sizeof(wchar_t));
3210 FIXME("buffer is too small\n");
3214 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3215 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3216 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3217 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3218 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3219 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3223 TRACE("(%p)\n", this);
3225 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3226 return *basic_streambuf_wchar_gptr(&this->base);
3228 ret = call_basic_streambuf_wchar_uflow(&this->base);
3230 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3234 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3235 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3236 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3237 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3238 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3239 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3240 fpos_int *ret, streamoff off, int way, int mode)
3244 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3246 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) {
3247 if(way == SEEKDIR_cur)
3248 off -= sizeof(wchar_t);
3250 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3253 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3254 || fseek(this->file, off, way)) {
3261 fgetpos(this->file, &pos);
3264 ret->state = this->state;
3268 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3269 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3270 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3271 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3272 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3273 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3274 fpos_int *ret, fpos_int pos, int mode)
3278 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3280 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3281 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3282 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3289 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback)
3290 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3292 fgetpos(this->file, &fpos);
3295 ret->state = this->state;
3299 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3300 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3301 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3302 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3304 TRACE("(%p %p %ld)\n", this, buf, count);
3306 if(!basic_filebuf_wchar_is_open(this))
3309 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3312 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3316 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3317 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3318 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3319 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3321 TRACE("(%p %p %ld)\n", this, buf, count);
3323 if(!basic_filebuf_wchar_is_open(this))
3326 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3329 basic_filebuf_short__Init(this, this->file, INITFL_open);
3333 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3334 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3335 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3336 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3337 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3338 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3340 TRACE("(%p)\n", this);
3342 if(!basic_filebuf_wchar_is_open(this))
3345 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3347 return fflush(this->file);
3350 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
3351 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
3352 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8)
3353 void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc)
3355 TRACE("(%p %p)\n", this, loc);
3356 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc));
3359 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
3360 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
3361 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8)
3362 void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc)
3364 TRACE("(%p %p)\n", this, loc);
3365 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc));
3368 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3369 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3370 static int basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3374 if(!(mode & OPENMODE_in))
3375 state |= STRINGBUF_no_read;
3377 if(!(mode & OPENMODE_out))
3378 state |= STRINGBUF_no_write;
3380 if(mode & OPENMODE_ate)
3381 state |= STRINGBUF_at_end;
3383 if(mode & OPENMODE_app)
3384 state |= STRINGBUF_append;
3389 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3390 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3391 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3392 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3394 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3396 basic_streambuf_char__Init_empty(&this->base);
3398 this->state = state;
3399 this->seekhigh = NULL;
3402 char *buf = MSVCRT_operator_new(count);
3404 ERR("Out of memory\n");
3405 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3408 memcpy(buf, str, count);
3409 this->seekhigh = buf + count;
3411 this->state |= STRINGBUF_allocated;
3413 if(!(state & STRINGBUF_no_read))
3414 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3416 if(!(state & STRINGBUF_no_write)) {
3417 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3419 if(!basic_streambuf_char_gptr(&this->base))
3420 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3425 /* ??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 */
3426 /* ??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 */
3427 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3428 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3429 const basic_string_char *str, IOSB_openmode mode)
3431 TRACE("(%p %p %d)\n", this, str, mode);
3433 basic_streambuf_char_ctor(&this->base);
3434 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3436 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3437 str->size, basic_stringbuf_char__Getstate(this, mode));
3441 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3442 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3443 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3444 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3445 basic_stringbuf_char *this, IOSB_openmode mode)
3447 TRACE("(%p %d)\n", this, mode);
3449 basic_streambuf_char_ctor(&this->base);
3450 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3452 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3456 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3457 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3458 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3459 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3461 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3464 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3465 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3466 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3467 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3469 TRACE("(%p)\n", this);
3471 if(this->state & STRINGBUF_allocated) {
3472 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3473 this->seekhigh = NULL;
3474 this->state &= ~STRINGBUF_allocated;
3477 basic_streambuf_char__Init_empty(&this->base);
3480 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3481 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3482 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3483 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3485 TRACE("(%p)\n", this);
3487 basic_stringbuf_char__Tidy(this);
3488 basic_streambuf_char_dtor(&this->base);
3491 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3492 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3494 TRACE("(%p %x)\n", this, flags);
3497 /* we have an array, with the number of elements stored before the first object */
3498 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3500 for (i = *ptr - 1; i >= 0; i--)
3501 basic_stringbuf_char_dtor(this+i);
3503 MSVCRT_operator_delete(ptr);
3505 basic_stringbuf_char_dtor(this);
3508 MSVCRT_operator_delete(this);
3514 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3515 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3516 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3517 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3519 MSVCP_size_t oldsize, size;
3522 TRACE("(%p %x)\n", this, meta);
3526 if(this->state & STRINGBUF_no_write)
3529 ptr = basic_streambuf_char_pptr(&this->base);
3530 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3531 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3532 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3534 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3535 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3537 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3540 buf = MSVCRT_operator_new(size);
3542 ERR("Out of memory\n");
3543 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3547 this->seekhigh = buf;
3548 basic_streambuf_char_setp(&this->base, buf, buf+size);
3549 if(this->state & STRINGBUF_no_read)
3550 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3552 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3554 this->state |= STRINGBUF_allocated;
3556 ptr = basic_streambuf_char_eback(&this->base);
3557 memcpy(buf, ptr, oldsize);
3559 this->seekhigh = buf+(this->seekhigh-ptr);
3560 basic_streambuf_char_setp_next(&this->base, buf,
3561 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3562 if(this->state & STRINGBUF_no_read)
3563 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3565 basic_streambuf_char_setg(&this->base, buf,
3566 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3567 basic_streambuf_char_pptr(&this->base)+1);
3569 MSVCRT_operator_delete(ptr);
3572 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3575 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3576 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3577 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3578 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3582 TRACE("(%p %x)\n", this, c);
3584 cur = basic_streambuf_char_gptr(&this->base);
3585 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3586 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3591 basic_streambuf_char_gbump(&this->base, -1);
3592 return c==EOF ? !EOF : c;
3595 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3596 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3597 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3598 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3602 TRACE("(%p)\n", this);
3604 cur = basic_streambuf_char_gptr(&this->base);
3605 if(!cur || this->state&STRINGBUF_no_read)
3608 ptr = basic_streambuf_char_pptr(&this->base);
3609 if(this->seekhigh < ptr)
3610 this->seekhigh = ptr;
3612 ptr = basic_streambuf_char_egptr(&this->base);
3613 if(this->seekhigh > ptr)
3614 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3616 if(cur < this->seekhigh)
3621 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3622 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3623 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3624 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3625 fpos_int *ret, streamoff off, int way, int mode)
3627 char *beg, *cur_r, *cur_w;
3629 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3631 cur_w = basic_streambuf_char_pptr(&this->base);
3632 if(cur_w > this->seekhigh)
3633 this->seekhigh = cur_w;
3638 beg = basic_streambuf_char_eback(&this->base);
3639 cur_r = basic_streambuf_char_gptr(&this->base);
3640 if((mode & OPENMODE_in) && cur_r) {
3641 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3643 else if(way == SEEKDIR_end)
3644 off += this->seekhigh-beg;
3645 else if(way != SEEKDIR_beg)
3648 if(off<0 || off>this->seekhigh-beg) {
3651 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3652 if((mode & OPENMODE_out) && cur_w) {
3653 basic_streambuf_char_setp_next(&this->base, beg,
3654 basic_streambuf_char_gptr(&this->base),
3655 basic_streambuf_char_epptr(&this->base));
3658 }else if((mode & OPENMODE_out) && cur_w) {
3659 if(way == SEEKDIR_cur)
3661 else if(way == SEEKDIR_end)
3662 off += this->seekhigh-beg;
3663 else if(way != SEEKDIR_beg)
3666 if(off<0 || off>this->seekhigh-beg)
3669 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3678 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3679 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3680 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3681 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3682 fpos_int *ret, fpos_int pos, int mode)
3684 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3686 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
3691 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3694 /* ?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 */
3695 /* ?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 */
3696 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3697 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3699 TRACE("(%p %p)\n", this, str);
3701 basic_stringbuf_char__Tidy(this);
3702 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3705 /* ?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 */
3706 /* ?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 */
3707 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3708 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3712 TRACE("(%p)\n", this);
3714 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3717 ptr = basic_streambuf_char_pbase(&this->base);
3718 pptr = basic_streambuf_char_pptr(&this->base);
3720 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3723 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3724 ptr = basic_streambuf_char_eback(&this->base);
3725 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3728 return basic_string_char_ctor(ret);
3731 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3732 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3733 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3734 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3735 static int basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3739 if(!(mode & OPENMODE_in))
3740 state |= STRINGBUF_no_read;
3742 if(!(mode & OPENMODE_out))
3743 state |= STRINGBUF_no_write;
3745 if(mode & OPENMODE_ate)
3746 state |= STRINGBUF_at_end;
3748 if(mode & OPENMODE_app)
3749 state |= STRINGBUF_append;
3754 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3755 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3756 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3757 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3758 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3759 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3761 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3763 basic_streambuf_wchar__Init_empty(&this->base);
3765 this->state = state;
3766 this->seekhigh = NULL;
3769 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3771 ERR("Out of memory\n");
3772 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3775 memcpy(buf, str, count*sizeof(wchar_t));
3776 this->seekhigh = buf + count;
3778 this->state |= STRINGBUF_allocated;
3780 if(!(state & STRINGBUF_no_read))
3781 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3783 if(!(state & STRINGBUF_no_write)) {
3784 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3786 if(!basic_streambuf_wchar_gptr(&this->base))
3787 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3792 /* ??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 */
3793 /* ??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 */
3794 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3795 const basic_string_wchar *str, IOSB_openmode mode)
3797 TRACE("(%p %p %d)\n", this, str, mode);
3799 basic_streambuf_wchar_ctor(&this->base);
3800 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3802 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3803 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3807 /* ??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 */
3808 /* ??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 */
3809 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3810 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3811 const basic_string_wchar *str, IOSB_openmode mode)
3813 basic_stringbuf_wchar_ctor_str(this, str, mode);
3814 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3818 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3819 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3820 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3821 basic_stringbuf_wchar *this, IOSB_openmode mode)
3823 TRACE("(%p %d)\n", this, mode);
3825 basic_streambuf_wchar_ctor(&this->base);
3826 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3828 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3832 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3833 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3834 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3835 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3836 basic_stringbuf_wchar *this, IOSB_openmode mode)
3838 basic_stringbuf_wchar_ctor_mode(this, mode);
3839 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3843 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3844 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3845 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3846 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3848 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3851 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3852 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3853 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3854 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3855 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3856 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3858 TRACE("(%p)\n", this);
3860 if(this->state & STRINGBUF_allocated) {
3861 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3862 this->seekhigh = NULL;
3863 this->state &= ~STRINGBUF_allocated;
3866 basic_streambuf_wchar__Init_empty(&this->base);
3869 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3870 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3871 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3872 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3873 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3874 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3876 TRACE("(%p)\n", this);
3878 basic_stringbuf_wchar__Tidy(this);
3879 basic_streambuf_wchar_dtor(&this->base);
3882 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3883 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3885 TRACE("(%p %x)\n", this, flags);
3888 /* we have an array, with the number of elements stored before the first object */
3889 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3891 for (i = *ptr - 1; i >= 0; i--)
3892 basic_stringbuf_wchar_dtor(this+i);
3894 MSVCRT_operator_delete(ptr);
3896 basic_stringbuf_wchar_dtor(this);
3899 MSVCRT_operator_delete(this);
3905 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3906 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3907 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3908 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3909 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3910 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3912 MSVCP_size_t oldsize, size;
3915 TRACE("(%p %x)\n", this, meta);
3919 if(this->state & STRINGBUF_no_write)
3922 ptr = basic_streambuf_wchar_pptr(&this->base);
3923 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3924 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3925 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3927 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3928 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3930 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3933 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3935 ERR("Out of memory\n");
3936 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3940 this->seekhigh = buf;
3941 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3942 if(this->state & STRINGBUF_no_read)
3943 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3945 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3947 this->state |= STRINGBUF_allocated;
3949 ptr = basic_streambuf_wchar_eback(&this->base);
3950 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3952 this->seekhigh = buf+(this->seekhigh-ptr);
3953 basic_streambuf_wchar_setp_next(&this->base, buf,
3954 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
3955 if(this->state & STRINGBUF_no_read)
3956 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3958 basic_streambuf_wchar_setg(&this->base, buf,
3959 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
3960 basic_streambuf_wchar_pptr(&this->base)+1);
3962 MSVCRT_operator_delete(ptr);
3965 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3968 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3969 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3970 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3971 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3972 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
3973 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
3977 TRACE("(%p %x)\n", this, c);
3979 cur = basic_streambuf_wchar_gptr(&this->base);
3980 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
3981 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3986 basic_streambuf_wchar_gbump(&this->base, -1);
3987 return c==WEOF ? !WEOF : c;
3990 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3991 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3992 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3993 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3994 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
3995 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
3999 TRACE("(%p)\n", this);
4001 cur = basic_streambuf_wchar_gptr(&this->base);
4002 if(!cur || this->state&STRINGBUF_no_read)
4005 ptr = basic_streambuf_wchar_pptr(&this->base);
4006 if(this->seekhigh < ptr)
4007 this->seekhigh = ptr;
4009 ptr = basic_streambuf_wchar_egptr(&this->base);
4010 if(this->seekhigh > ptr)
4011 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
4013 if(cur < this->seekhigh)
4018 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4019 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4020 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4021 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4022 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
4023 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
4024 fpos_int *ret, streamoff off, int way, int mode)
4026 wchar_t *beg, *cur_r, *cur_w;
4028 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
4030 cur_w = basic_streambuf_wchar_pptr(&this->base);
4031 if(cur_w > this->seekhigh)
4032 this->seekhigh = cur_w;
4037 beg = basic_streambuf_wchar_eback(&this->base);
4038 cur_r = basic_streambuf_wchar_gptr(&this->base);
4039 if((mode & OPENMODE_in) && cur_r) {
4040 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
4042 else if(way == SEEKDIR_end)
4043 off += this->seekhigh-beg;
4044 else if(way != SEEKDIR_beg)
4047 if(off<0 || off>this->seekhigh-beg) {
4050 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
4051 if((mode & OPENMODE_out) && cur_w) {
4052 basic_streambuf_wchar_setp_next(&this->base, beg,
4053 basic_streambuf_wchar_gptr(&this->base),
4054 basic_streambuf_wchar_epptr(&this->base));
4057 }else if((mode & OPENMODE_out) && cur_w) {
4058 if(way == SEEKDIR_cur)
4060 else if(way == SEEKDIR_end)
4061 off += this->seekhigh-beg;
4062 else if(way != SEEKDIR_beg)
4065 if(off<0 || off>this->seekhigh-beg)
4068 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
4077 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4078 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4079 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4080 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4081 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4082 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4083 fpos_int *ret, fpos_int pos, int mode)
4085 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4087 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
4092 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4095 /* ?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 */
4096 /* ?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 */
4097 /* ?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 */
4098 /* ?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 */
4099 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4100 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4102 TRACE("(%p %p)\n", this, str);
4104 basic_stringbuf_wchar__Tidy(this);
4105 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str), str->size, this->state);
4108 /* ?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 */
4109 /* ?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 */
4110 /* ?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 */
4111 /* ?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 */
4112 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4113 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4117 TRACE("(%p)\n", this);
4119 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4122 ptr = basic_streambuf_wchar_pbase(&this->base);
4123 pptr = basic_streambuf_wchar_pptr(&this->base);
4125 return basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4128 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4129 ptr = basic_streambuf_wchar_eback(&this->base);
4130 return basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4133 return basic_string_wchar_ctor(ret);
4136 /* ??0ios_base@std@@IAE@XZ */
4137 /* ??0ios_base@std@@IEAA@XZ */
4138 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4139 ios_base* __thiscall ios_base_ctor(ios_base *this)
4141 TRACE("(%p)\n", this);
4142 this->vtable = &MSVCP_ios_base_vtable;
4146 /* ??0ios_base@std@@QAE@ABV01@@Z */
4147 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4148 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4149 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4151 TRACE("(%p %p)\n", this, copy);
4153 this->vtable = &MSVCP_ios_base_vtable;
4157 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4158 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4159 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4160 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4162 IOS_BASE_fnarray *cur;
4164 TRACE("(%p %x)\n", this, event);
4166 for(cur=this->calls; cur; cur=cur->next)
4167 cur->event_handler(event, this, cur->index);
4170 /* ?_Tidy@ios_base@std@@AAAXXZ */
4171 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4172 void CDECL ios_base_Tidy(ios_base *this)
4174 IOS_BASE_iosarray *arr_cur, *arr_next;
4175 IOS_BASE_fnarray *event_cur, *event_next;
4177 TRACE("(%p)\n", this);
4179 ios_base_Callfns(this, EVENT_erase_event);
4181 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4182 arr_next = arr_cur->next;
4183 MSVCRT_operator_delete(arr_cur);
4187 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4188 event_next = event_cur->next;
4189 MSVCRT_operator_delete(event_cur);
4194 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4195 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4196 static void ios_base_Ios_base_dtor(ios_base *obj)
4198 TRACE("(%p)\n", obj);
4200 locale_dtor(obj->loc);
4201 MSVCRT_operator_delete(obj->loc);
4206 /* ??1ios_base@std@@UAE@XZ */
4207 /* ??1ios_base@std@@UEAA@XZ */
4208 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4209 void __thiscall ios_base_dtor(ios_base *this)
4211 ios_base_Ios_base_dtor(this);
4214 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4215 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4217 TRACE("(%p %x)\n", this, flags);
4219 /* we have an array, with the number of elements stored before the first object */
4220 INT_PTR i, *ptr = (INT_PTR *)this-1;
4222 for(i=*ptr-1; i>=0; i--)
4223 ios_base_dtor(this+i);
4224 MSVCRT_operator_delete(ptr);
4226 ios_base_dtor(this);
4228 MSVCRT_operator_delete(this);
4234 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4235 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4237 TRACE("(%p %x)\n", this, flags);
4239 INT_PTR *ptr = (INT_PTR *)this-1;
4240 MSVCRT_operator_delete(ptr);
4243 MSVCRT_operator_delete(this);
4249 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4250 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4251 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4252 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4254 IOS_BASE_iosarray *p;
4256 TRACE("(%p %d)\n", this, index);
4258 for(p=this->arr; p; p=p->next) {
4259 if(p->index == index)
4263 for(p=this->arr; p; p=p->next) {
4264 if(!p->long_val && !p->ptr_val) {
4270 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4271 p->next = this->arr;
4279 /* ?iword@ios_base@std@@QAEAAJH@Z */
4280 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4281 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4282 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4284 TRACE("(%p %d)\n", this, index);
4285 return &ios_base_Findarr(this, index)->long_val;
4288 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4289 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4290 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4291 void** __thiscall ios_base_pword(ios_base *this, int index)
4293 TRACE("(%p %d)\n", this, index);
4294 return &ios_base_Findarr(this, index)->ptr_val;
4297 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4298 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4299 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4300 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4302 IOS_BASE_fnarray *event;
4304 TRACE("(%p %p %d)\n", this, callback, index);
4306 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4307 event->next = this->calls;
4308 event->index = index;
4309 event->event_handler = callback;
4310 this->calls = event;
4313 /* ?clear@ios_base@std@@QAEXH_N@Z */
4314 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4315 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4316 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4318 TRACE("(%p %x %x)\n", this, state, reraise);
4320 this->state = state & IOSTATE_mask;
4321 if(!(this->state & this->except))
4325 throw_exception(EXCEPTION_RERAISE, NULL);
4326 else if(this->state & this->except & IOSTATE_eofbit)
4327 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4328 else if(this->state & this->except & IOSTATE_failbit)
4329 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4330 else if(this->state & this->except & IOSTATE_badbit)
4331 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4332 else if(this->state & this->except & IOSTATE__Hardfail)
4333 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4336 /* ?clear@ios_base@std@@QAEXH@Z */
4337 /* ?clear@ios_base@std@@QEAAXH@Z */
4338 static void ios_base_clear(ios_base *this, IOSB_iostate state)
4340 ios_base_clear_reraise(this, state, FALSE);
4343 /* ?exceptions@ios_base@std@@QAEXH@Z */
4344 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4345 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4346 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4348 TRACE("(%p %x)\n", this, state);
4349 this->except = state & IOSTATE_mask;
4350 ios_base_clear(this, this->state);
4353 /* ?exceptions@ios_base@std@@QBEHXZ */
4354 /* ?exceptions@ios_base@std@@QEBAHXZ */
4355 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4356 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4358 TRACE("(%p)\n", this);
4359 return this->except;
4362 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4363 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4364 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4365 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4367 TRACE("(%p %p)\n", this, rhs);
4370 IOS_BASE_iosarray *arr_cur;
4371 IOS_BASE_fnarray *event_cur;
4373 ios_base_Tidy(this);
4375 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4376 if(arr_cur->long_val)
4377 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4378 if(arr_cur->ptr_val)
4379 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4381 this->stdstr = rhs->stdstr;
4382 this->fmtfl = rhs->fmtfl;
4383 this->prec = rhs->prec;
4384 this->wide = rhs->wide;
4385 locale_operator_assign(this->loc, rhs->loc);
4387 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4388 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4390 ios_base_Callfns(this, EVENT_copyfmt_event);
4391 ios_base_exceptions_set(this, rhs->except);
4397 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4398 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4399 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4400 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4402 TRACE("(%p %p)\n", this, right);
4405 this->state = right->state;
4406 ios_base_copyfmt(this, right);
4412 /* ?fail@ios_base@std@@QBE_NXZ */
4413 /* ?fail@ios_base@std@@QEBA_NXZ */
4414 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4415 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4417 TRACE("(%p)\n", this);
4418 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4421 /* ??7ios_base@std@@QBE_NXZ */
4422 /* ??7ios_base@std@@QEBA_NXZ */
4423 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4424 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4426 TRACE("(%p)\n", this);
4427 return ios_base_fail(this);
4430 /* ??Bios_base@std@@QBEPAXXZ */
4431 /* ??Bios_base@std@@QEBAPEAXXZ */
4432 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4433 void* __thiscall ios_base_op_fail(const ios_base *this)
4435 TRACE("(%p)\n", this);
4436 return ios_base_fail(this) ? NULL : (void*)this;
4439 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4440 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4441 static void ios_base_Addstd(ios_base *add)
4443 FIXME("(%p) stub\n", add);
4446 /* ?_Init@ios_base@std@@IAEXXZ */
4447 /* ?_Init@ios_base@std@@IEAAXXZ */
4448 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4449 void __thiscall ios_base__Init(ios_base *this)
4451 TRACE("(%p)\n", this);
4454 this->state = this->except = IOSTATE_goodbit;
4455 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4460 this->loc = MSVCRT_operator_new(sizeof(locale));
4461 locale_ctor(this->loc);
4464 /* ?bad@ios_base@std@@QBE_NXZ */
4465 /* ?bad@ios_base@std@@QEBA_NXZ */
4466 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4467 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4469 TRACE("(%p)\n", this);
4470 return (this->state & IOSTATE_badbit) != 0;
4473 /* ?eof@ios_base@std@@QBE_NXZ */
4474 /* ?eof@ios_base@std@@QEBA_NXZ */
4475 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4476 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4478 TRACE("(%p)\n", this);
4479 return (this->state & IOSTATE_eofbit) != 0;
4482 /* ?flags@ios_base@std@@QAEHH@Z */
4483 /* ?flags@ios_base@std@@QEAAHH@Z */
4484 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4485 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4487 IOSB_fmtflags ret = this->fmtfl;
4489 TRACE("(%p %x)\n", this, flags);
4491 this->fmtfl = flags & FMTFLAG_mask;
4495 /* ?flags@ios_base@std@@QBEHXZ */
4496 /* ?flags@ios_base@std@@QEBAHXZ */
4497 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4498 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4500 TRACE("(%p)\n", this);
4504 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4505 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4506 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4507 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4509 TRACE("(%p)\n", this);
4510 return locale_copy_ctor(ret, this->loc);
4513 /* ?good@ios_base@std@@QBE_NXZ */
4514 /* ?good@ios_base@std@@QEBA_NXZ */
4515 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4516 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4518 TRACE("(%p)\n", this);
4519 return this->state == IOSTATE_goodbit;
4522 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4523 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4524 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4525 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4527 TRACE("(%p %p)\n", this, loc);
4529 locale_copy_ctor(this->loc, loc);
4533 /* ?precision@ios_base@std@@QAEHH@Z */
4534 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4535 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4536 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4538 streamsize ret = this->prec;
4540 TRACE("(%p %ld)\n", this, precision);
4542 this->prec = precision;
4546 /* ?precision@ios_base@std@@QBEHXZ */
4547 /* ?precision@ios_base@std@@QEBA_JXZ */
4548 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4549 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4551 TRACE("(%p)\n", this);
4555 /* ?rdstate@ios_base@std@@QBEHXZ */
4556 /* ?rdstate@ios_base@std@@QEBAHXZ */
4557 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4558 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4560 TRACE("(%p)\n", this);
4564 /* ?setf@ios_base@std@@QAEHHH@Z */
4565 /* ?setf@ios_base@std@@QEAAHHH@Z */
4566 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4567 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4569 IOSB_fmtflags ret = this->fmtfl;
4571 TRACE("(%p %x %x)\n", this, flags, mask);
4573 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4577 /* ?setf@ios_base@std@@QAEHH@Z */
4578 /* ?setf@ios_base@std@@QEAAHH@Z */
4579 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4580 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4582 return ios_base_setf_mask(this, flags, ~0);
4585 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4586 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4587 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4588 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4590 TRACE("(%p %x %x)\n", this, state, reraise);
4592 if(state != IOSTATE_goodbit)
4593 ios_base_clear_reraise(this, this->state | state, reraise);
4596 /* ?setstate@ios_base@std@@QAEXH@Z */
4597 /* ?setstate@ios_base@std@@QEAAXH@Z */
4598 static void ios_base_setstate(ios_base *this, IOSB_iostate state)
4600 ios_base_setstate_reraise(this, state, FALSE);
4603 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4604 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4609 TRACE("(%x)\n", sync);
4611 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4612 ret = ios_base_Sync;
4613 ios_base_Sync = sync;
4614 _Lockit_dtor(&lock);
4618 /* ?unsetf@ios_base@std@@QAEXH@Z */
4619 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4620 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4621 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4623 TRACE("(%p %x)\n", this, flags);
4624 this->fmtfl &= ~flags;
4627 /* ?width@ios_base@std@@QAEHH@Z */
4628 /* ?width@ios_base@std@@QEAA_J_J@Z */
4629 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4630 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4632 streamsize ret = this->wide;
4634 TRACE("(%p %ld)\n", this, width);
4640 /* ?width@ios_base@std@@QBEHXZ */
4641 /* ?width@ios_base@std@@QEBA_JXZ */
4642 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4643 streamsize __thiscall ios_base_width_get(ios_base *this)
4645 TRACE("(%p)\n", this);
4649 /* ?xalloc@ios_base@std@@SAHXZ */
4650 int CDECL ios_base_xalloc(void)
4657 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4658 ret = ios_base_Index++;
4659 _Lockit_dtor(&lock);
4663 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4664 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4665 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4666 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4668 TRACE("(%p)\n", this);
4670 ios_base_ctor(&this->base);
4671 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4675 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4676 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4677 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4678 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4680 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4681 ios_base__Init(&this->base);
4682 this->strbuf = streambuf;
4683 this->stream = NULL;
4687 ios_base_setstate(&this->base, IOSTATE_badbit);
4690 FIXME("standard streams not handled yet\n");
4693 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4694 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4695 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4696 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4698 TRACE("(%p %p)\n", this, strbuf);
4700 basic_ios_char_ctor(this);
4701 basic_ios_char_init(this, strbuf, FALSE);
4705 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4706 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4707 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4708 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4710 TRACE("(%p)\n", this);
4711 ios_base_dtor(&this->base);
4714 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4715 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4717 TRACE("(%p %x)\n", this, flags);
4719 /* we have an array, with the number of elements stored before the first object */
4720 INT_PTR i, *ptr = (INT_PTR *)this-1;
4722 for(i=*ptr-1; i>=0; i--)
4723 basic_ios_char_dtor(this+i);
4724 MSVCRT_operator_delete(ptr);
4726 basic_ios_char_dtor(this);
4728 MSVCRT_operator_delete(this);
4734 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4735 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4736 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4737 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4739 TRACE("(%p %x %x)\n", this, state, reraise);
4740 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4743 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4744 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4745 static void basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4747 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4750 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4751 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4752 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4753 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4755 TRACE("(%p %p)\n", this, copy);
4759 this->stream = copy->stream;
4760 this->fillch = copy->fillch;
4761 ios_base_copyfmt(&this->base, ©->base);
4765 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4766 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4767 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4768 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4770 char ret = this->fillch;
4772 TRACE("(%p %c)\n", this, fill);
4774 this->fillch = fill;
4778 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4779 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4780 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4781 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4783 TRACE("(%p)\n", this);
4784 return this->fillch;
4787 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4788 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4789 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4790 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4792 TRACE("(%p %p %p)\n", this, ret, loc);
4795 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
4799 return ios_base_imbue(&this->base, ret, loc);
4802 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4803 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4804 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
4805 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
4807 TRACE("(%p %c %c)\n", this, ch, def);
4808 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def);
4811 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4812 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4813 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
4814 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
4816 basic_streambuf_char *ret = this->strbuf;
4818 TRACE("(%p %p)\n", this, streambuf);
4820 this->strbuf = streambuf;
4821 basic_ios_char_clear(this, IOSTATE_goodbit);
4825 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4826 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4827 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
4828 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
4830 TRACE("(%p)\n", this);
4831 return this->strbuf;
4834 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4835 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4836 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
4837 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4839 TRACE("(%p %x %x)\n", this, state, reraise);
4841 if(state != IOSTATE_goodbit)
4842 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
4845 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4846 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4847 static void basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
4849 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4852 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4853 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4854 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
4855 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
4857 basic_ostream_char *ret = this->stream;
4859 TRACE("(%p %p)\n", this, ostream);
4861 this->stream = ostream;
4865 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4866 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4867 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
4868 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
4870 TRACE("(%p)\n", this);
4871 return this->stream;
4874 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4875 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4876 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
4877 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
4879 TRACE("(%p %c)\n", this, ch);
4880 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch);
4884 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4885 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4886 static basic_ios_wchar* basic_ios_wchar_ctor(basic_ios_wchar *this)
4888 TRACE("(%p)\n", this);
4890 ios_base_ctor(&this->base);
4891 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
4895 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4896 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4897 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
4898 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
4900 basic_ios_wchar_ctor(this);
4901 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4905 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4906 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4907 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4908 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4909 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
4910 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
4912 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4913 ios_base__Init(&this->base);
4914 this->strbuf = streambuf;
4915 this->stream = NULL;
4919 ios_base_setstate(&this->base, IOSTATE_badbit);
4922 FIXME("standard streams not handled yet\n");
4925 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4926 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4927 static basic_ios_wchar* basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4929 TRACE("(%p %p)\n", this, strbuf);
4931 basic_ios_wchar_ctor(this);
4932 basic_ios_wchar_init(this, strbuf, FALSE);
4936 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4937 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4938 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
4939 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4941 basic_ios_wchar_ctor_streambuf(this, strbuf);
4942 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4946 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4947 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4948 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4949 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4950 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
4951 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
4953 TRACE("(%p)\n", this);
4954 ios_base_dtor(&this->base);
4957 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
4958 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
4960 TRACE("(%p %x)\n", this, flags);
4962 /* we have an array, with the number of elements stored before the first object */
4963 INT_PTR i, *ptr = (INT_PTR *)this-1;
4965 for(i=*ptr-1; i>=0; i--)
4966 basic_ios_wchar_dtor(this+i);
4967 MSVCRT_operator_delete(ptr);
4969 basic_ios_wchar_dtor(this);
4971 MSVCRT_operator_delete(this);
4977 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4978 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4979 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4980 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4981 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
4982 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
4984 TRACE("(%p %x %x)\n", this, state, reraise);
4985 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4988 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4989 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4990 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4991 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4992 static void basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
4994 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
4997 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
4998 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4999 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
5000 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5001 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
5002 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
5004 TRACE("(%p %p)\n", this, copy);
5008 this->stream = copy->stream;
5009 this->fillch = copy->fillch;
5010 ios_base_copyfmt(&this->base, ©->base);
5014 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
5015 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
5016 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
5017 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
5018 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
5019 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
5021 wchar_t ret = this->fillch;
5023 TRACE("(%p %c)\n", this, fill);
5025 this->fillch = fill;
5029 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
5030 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
5031 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
5032 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
5033 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
5034 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
5036 TRACE("(%p)\n", this);
5037 return this->fillch;
5040 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5041 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5042 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5043 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5044 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
5045 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
5047 TRACE("(%p %p %p)\n", this, ret, loc);
5050 return basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
5052 locale_copy_ctor(ret, loc);
5056 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
5057 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
5058 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
5059 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
5060 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
5061 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
5063 TRACE("(%p %c %c)\n", this, ch, def);
5064 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def);
5067 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5068 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5069 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
5070 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5071 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
5072 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
5074 basic_streambuf_wchar *ret = this->strbuf;
5076 TRACE("(%p %p)\n", this, streambuf);
5078 this->strbuf = streambuf;
5079 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5083 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5084 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5085 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5086 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5087 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5088 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5090 TRACE("(%p)\n", this);
5091 return this->strbuf;
5094 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5095 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5096 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5097 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5098 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5099 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5101 TRACE("(%p %x %x)\n", this, state, reraise);
5103 if(state != IOSTATE_goodbit)
5104 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5107 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5108 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5109 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5110 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5111 static void basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5113 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5116 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5117 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5118 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5119 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5120 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5121 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5123 basic_ostream_wchar *ret = this->stream;
5125 TRACE("(%p %p)\n", this, ostream);
5127 this->stream = ostream;
5131 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5132 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5133 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5134 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5135 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5136 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5138 TRACE("(%p)\n", this);
5139 return this->stream;
5142 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5143 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5144 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5145 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5146 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5147 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5149 TRACE("(%p %c)\n", this, ch);
5150 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch);
5153 /* Caution: basic_ostream uses virtual inheritance.
5154 * All constructors have additional parameter that says if base class should be initialized.
5155 * Base class needs to be accessed using vbtable.
5157 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5159 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5162 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5164 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5167 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5169 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5172 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5173 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5174 static basic_ostream_char* basic_ostream_char_ctor(basic_ostream_char *this,
5175 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5177 basic_ios_char *base;
5179 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5182 this->vbtable = basic_ostream_char_vbtable;
5183 base = basic_ostream_char_get_basic_ios(this);
5184 basic_ios_char_ctor(base);
5186 base = basic_ostream_char_get_basic_ios(this);
5189 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5190 basic_ios_char_init(base, strbuf, isstd);
5194 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5195 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5196 static basic_ostream_char* basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5197 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5199 basic_ios_char *base;
5201 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5204 this->vbtable = basic_ostream_char_vbtable;
5205 base = basic_ostream_char_get_basic_ios(this);
5206 basic_ios_char_ctor(base);
5208 base = basic_ostream_char_get_basic_ios(this);
5211 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5213 ios_base_Addstd(&base->base);
5217 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5218 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5219 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5220 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5222 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5224 /* don't destroy virtual base here */
5225 TRACE("(%p)\n", this);
5228 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5229 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5230 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5231 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5233 TRACE("(%p)\n", this);
5234 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5235 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5238 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5239 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5241 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5243 TRACE("(%p %x)\n", this, flags);
5246 /* we have an array, with the number of elements stored before the first object */
5247 INT_PTR i, *ptr = (INT_PTR *)this-1;
5249 for(i=*ptr-1; i>=0; i--)
5250 basic_ostream_char_vbase_dtor(this+i);
5251 MSVCRT_operator_delete(ptr);
5253 basic_ostream_char_vbase_dtor(this);
5255 MSVCRT_operator_delete(this);
5261 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5262 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5263 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5264 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5266 /* this function is not matching C++ specification */
5267 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5269 TRACE("(%p)\n", this);
5271 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5272 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5273 basic_ios_char_setstate(base, IOSTATE_badbit);
5277 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5278 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5279 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5281 return basic_ostream_char_flush(ostream);
5284 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5285 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5286 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5288 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5290 TRACE("(%p)\n", this);
5292 if(base->base.fmtfl & FMTFLAG_unitbuf)
5293 basic_ostream_char_flush(this);
5296 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5297 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5298 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5299 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5301 TRACE("(%p)\n", this);
5302 basic_ostream_char__Osfx(this);
5305 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5307 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5309 if(basic_ios_char_rdbuf_get(base))
5310 basic_streambuf_char__Lock(base->strbuf);
5312 if(ios_base_good(&base->base) && base->stream)
5313 basic_ostream_char_flush(base->stream);
5315 return ios_base_good(&base->base);
5318 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5320 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5322 if(ios_base_good(&base->base) && !__uncaught_exception())
5323 basic_ostream_char_osfx(ostr);
5325 if(basic_ios_char_rdbuf_get(base))
5326 basic_streambuf_char__Unlock(base->strbuf);
5329 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5330 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5331 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5332 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5334 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5336 TRACE("(%p)\n", this);
5338 if(ios_base_good(&base->base) && base->stream)
5339 basic_ostream_char_flush(base->stream);
5340 return ios_base_good(&base->base);
5343 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5344 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5345 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5346 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5348 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5350 TRACE("(%p %c)\n", this, ch);
5352 if(!basic_ostream_char_sentry_create(this)
5353 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5354 basic_ostream_char_sentry_destroy(this);
5355 basic_ios_char_setstate(base, IOSTATE_badbit);
5359 basic_ostream_char_sentry_destroy(this);
5363 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5364 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5365 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5366 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5368 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5370 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5372 if(!ios_base_fail(&base->base)) {
5375 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5376 &seek, pos, OPENMODE_out);
5377 if(seek.off==0 && seek.pos==-1 && seek.state==0)
5378 basic_ios_char_setstate(base, IOSTATE_failbit);
5383 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5384 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5385 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5386 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5388 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5390 TRACE("(%p)\n", this);
5392 if(!ios_base_fail(&base->base)) {
5393 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5394 ret, 0, SEEKDIR_cur, OPENMODE_out);
5403 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5404 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5405 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5406 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5408 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5410 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5412 if(!basic_ostream_char_sentry_create(this)
5413 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5414 basic_ostream_char_sentry_destroy(this);
5415 basic_ios_char_setstate(base, IOSTATE_badbit);
5419 basic_ostream_char_sentry_destroy(this);
5423 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5424 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5425 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5426 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5428 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5429 int state = IOSTATE_goodbit;
5431 TRACE("(%p %d)\n", this, val);
5433 if(basic_ostream_char_sentry_create(this)) {
5434 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5435 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5436 ostreambuf_iterator_char dest = {0, strbuf};
5438 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5439 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5440 ? (LONG)((unsigned short)val) : (LONG)val);
5442 basic_ostream_char_sentry_destroy(this);
5444 basic_ios_char_setstate(base, state);
5448 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5449 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5450 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5451 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5453 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5454 int state = IOSTATE_goodbit;
5456 TRACE("(%p %u)\n", this, val);
5458 if(basic_ostream_char_sentry_create(this)) {
5459 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5460 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5461 ostreambuf_iterator_char dest = {0, strbuf};
5463 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5465 basic_ostream_char_sentry_destroy(this);
5467 basic_ios_char_setstate(base, state);
5471 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5472 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5473 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5474 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5475 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5476 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5478 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5479 int state = IOSTATE_goodbit;
5481 TRACE("(%p %d)\n", this, val);
5483 if(basic_ostream_char_sentry_create(this)) {
5484 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5485 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5486 ostreambuf_iterator_char dest = {0, strbuf};
5488 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5490 basic_ostream_char_sentry_destroy(this);
5492 basic_ios_char_setstate(base, state);
5496 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5497 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5498 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5499 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5500 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5501 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5503 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5504 int state = IOSTATE_goodbit;
5506 TRACE("(%p %u)\n", this, val);
5508 if(basic_ostream_char_sentry_create(this)) {
5509 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5510 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5511 ostreambuf_iterator_char dest = {0, strbuf};
5513 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5515 basic_ostream_char_sentry_destroy(this);
5517 basic_ios_char_setstate(base, state);
5521 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5522 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5523 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5524 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5526 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5527 int state = IOSTATE_goodbit;
5529 TRACE("(%p %f)\n", this, val);
5531 if(basic_ostream_char_sentry_create(this)) {
5532 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5533 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5534 ostreambuf_iterator_char dest = {0, strbuf};
5536 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5538 basic_ostream_char_sentry_destroy(this);
5540 basic_ios_char_setstate(base, state);
5544 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5545 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5546 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5547 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5549 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5550 int state = IOSTATE_goodbit;
5552 TRACE("(%p %lf)\n", this, val);
5554 if(basic_ostream_char_sentry_create(this)) {
5555 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5556 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5557 ostreambuf_iterator_char dest = {0, strbuf};
5559 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5561 basic_ostream_char_sentry_destroy(this);
5563 basic_ios_char_setstate(base, state);
5567 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5568 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5569 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5570 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5572 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5573 int state = IOSTATE_goodbit;
5575 TRACE("(%p %lf)\n", this, val);
5577 if(basic_ostream_char_sentry_create(this)) {
5578 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5579 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5580 ostreambuf_iterator_char dest = {0, strbuf};
5582 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5584 basic_ostream_char_sentry_destroy(this);
5586 basic_ios_char_setstate(base, state);
5590 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5591 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5592 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5593 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5595 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5596 IOSB_iostate state = IOSTATE_badbit;
5599 TRACE("(%p %p)\n", this, val);
5601 if(basic_ostream_char_sentry_create(this)) {
5602 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5603 c = basic_streambuf_char_snextc(val)) {
5604 state = IOSTATE_goodbit;
5606 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5607 state = IOSTATE_badbit;
5612 state = IOSTATE_badbit;
5614 basic_ostream_char_sentry_destroy(this);
5616 ios_base_width_set(&base->base, 0);
5617 basic_ios_char_setstate(base, state);
5621 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5622 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5623 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5624 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5626 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5627 int state = IOSTATE_goodbit;
5629 TRACE("(%p %p)\n", this, val);
5631 if(basic_ostream_char_sentry_create(this)) {
5632 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5633 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5634 ostreambuf_iterator_char dest = {0, strbuf};
5636 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5638 basic_ostream_char_sentry_destroy(this);
5640 basic_ios_char_setstate(base, state);
5644 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5645 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5646 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5647 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5649 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5650 int state = IOSTATE_goodbit;
5652 TRACE("(%p)\n", this);
5654 if(basic_ostream_char_sentry_create(this)) {
5655 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5656 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5657 ostreambuf_iterator_char dest = {0, strbuf};
5659 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5661 basic_ostream_char_sentry_destroy(this);
5663 basic_ios_char_setstate(base, state);
5667 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5668 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5669 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5670 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5672 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5673 int state = IOSTATE_goodbit;
5675 TRACE("(%p)\n", this);
5677 if(basic_ostream_char_sentry_create(this)) {
5678 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5679 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5680 ostreambuf_iterator_char dest = {0, strbuf};
5682 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5684 basic_ostream_char_sentry_destroy(this);
5686 basic_ios_char_setstate(base, state);
5690 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5691 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5692 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5693 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5695 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5696 int state = IOSTATE_goodbit;
5698 TRACE("(%p %x)\n", this, val);
5700 if(basic_ostream_char_sentry_create(this)) {
5701 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5702 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5703 ostreambuf_iterator_char dest = {0, strbuf};
5705 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5707 basic_ostream_char_sentry_destroy(this);
5709 basic_ios_char_setstate(base, state);
5713 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5714 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5715 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5717 TRACE("(%p)\n", ostr);
5719 basic_ostream_char_put(ostr, '\n');
5720 basic_ostream_char_flush(ostr);
5724 /* $?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 */
5725 /* ??$?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 */
5726 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5728 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5729 IOSB_iostate state = IOSTATE_goodbit;
5731 TRACE("(%p %p)\n", ostr, str);
5733 if(basic_ostream_char_sentry_create(ostr)) {
5734 MSVCP_size_t len = basic_string_char_length(str);
5735 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5737 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5738 for(; pad!=0; pad--) {
5739 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5740 state = IOSTATE_badbit;
5746 if(state == IOSTATE_goodbit) {
5747 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5748 state = IOSTATE_badbit;
5751 if(state == IOSTATE_goodbit) {
5752 for(; pad!=0; pad--) {
5753 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5754 state = IOSTATE_badbit;
5760 base->base.wide = 0;
5762 state = IOSTATE_badbit;
5764 basic_ostream_char_sentry_destroy(ostr);
5766 basic_ios_char_setstate(base, state);
5770 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5771 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5772 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5773 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5774 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5775 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5776 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5778 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5779 IOSB_iostate state = IOSTATE_goodbit;
5781 TRACE("(%p %d)\n", ostr, ch);
5783 if(basic_ostream_char_sentry_create(ostr)) {
5784 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5786 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5787 for(; pad!=0; pad--) {
5788 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5789 state = IOSTATE_badbit;
5795 if(state == IOSTATE_goodbit) {
5796 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5797 state = IOSTATE_badbit;
5800 if(state == IOSTATE_goodbit) {
5801 for(; pad!=0; pad--) {
5802 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5803 state = IOSTATE_badbit;
5809 base->base.wide = 0;
5811 state = IOSTATE_badbit;
5813 basic_ostream_char_sentry_destroy(ostr);
5815 basic_ios_char_setstate(base, state);
5819 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5820 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5821 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5822 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5823 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5824 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5825 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5827 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5828 IOSB_iostate state = IOSTATE_goodbit;
5830 TRACE("(%p %s)\n", ostr, str);
5832 if(basic_ostream_char_sentry_create(ostr)) {
5833 MSVCP_size_t len = strlen(str);
5834 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5836 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5837 for(; pad!=0; pad--) {
5838 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5839 state = IOSTATE_badbit;
5845 if(state == IOSTATE_goodbit) {
5846 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5847 state = IOSTATE_badbit;
5850 if(state == IOSTATE_goodbit) {
5851 for(; pad!=0; pad--) {
5852 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5853 state = IOSTATE_badbit;
5859 base->base.wide = 0;
5861 state = IOSTATE_badbit;
5863 basic_ostream_char_sentry_destroy(ostr);
5865 basic_ios_char_setstate(base, state);
5869 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5870 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5871 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5872 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5873 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5875 TRACE("(%p %p)\n", this, pfunc);
5880 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5881 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5882 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5883 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5884 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5886 TRACE("(%p %p)\n", this, pfunc);
5887 pfunc(basic_ostream_char_get_basic_ios(this));
5891 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5892 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5893 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5894 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5895 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5897 TRACE("(%p %p)\n", this, pfunc);
5898 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5902 /* Caution: basic_ostream uses virtual inheritance. */
5903 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5905 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5908 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5910 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5913 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5915 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5918 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5919 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5920 static basic_ostream_wchar* basic_ostream_wchar_ctor(basic_ostream_wchar *this,
5921 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5923 basic_ios_wchar *base;
5925 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5928 this->vbtable = basic_ostream_wchar_vbtable;
5929 base = basic_ostream_wchar_get_basic_ios(this);
5930 basic_ios_wchar_ctor(base);
5932 base = basic_ostream_wchar_get_basic_ios(this);
5935 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5936 basic_ios_wchar_init(base, strbuf, isstd);
5940 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5941 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
5942 static basic_ostream_wchar* basic_ostream_short_ctor(basic_ostream_wchar *this,
5943 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5945 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
5946 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
5950 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5951 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5952 static basic_ostream_wchar* basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
5953 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5955 basic_ios_wchar *base;
5957 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5960 this->vbtable = basic_ostream_wchar_vbtable;
5961 base = basic_ostream_wchar_get_basic_ios(this);
5962 basic_ios_wchar_ctor(base);
5964 base = basic_ostream_wchar_get_basic_ios(this);
5967 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
5969 ios_base_Addstd(&base->base);
5973 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5974 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5975 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5976 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5977 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
5978 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
5980 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5982 /* don't destroy virtual base here */
5983 TRACE("(%p)\n", this);
5986 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5987 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5988 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5989 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5990 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
5991 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
5993 TRACE("(%p)\n", this);
5994 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5995 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5998 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
5999 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
6001 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6003 TRACE("(%p %x)\n", this, flags);
6006 /* we have an array, with the number of elements stored before the first object */
6007 INT_PTR i, *ptr = (INT_PTR *)this-1;
6009 for(i=*ptr-1; i>=0; i--)
6010 basic_ostream_wchar_vbase_dtor(this+i);
6011 MSVCRT_operator_delete(ptr);
6013 basic_ostream_wchar_vbase_dtor(this);
6015 MSVCRT_operator_delete(this);
6021 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
6022 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
6023 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
6024 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
6025 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
6026 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
6028 /* this function is not matching C++ specification */
6029 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6031 TRACE("(%p)\n", this);
6033 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
6034 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
6035 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6039 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6040 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6041 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6042 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6043 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
6045 return basic_ostream_wchar_flush(ostream);
6048 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6049 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6050 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6051 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6052 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
6054 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6056 TRACE("(%p)\n", this);
6058 if(base->base.fmtfl & FMTFLAG_unitbuf)
6059 basic_ostream_wchar_flush(this);
6062 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6063 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6064 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6065 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6066 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
6067 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
6069 TRACE("(%p)\n", this);
6070 basic_ostream_wchar__Osfx(this);
6073 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6075 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6077 if(basic_ios_wchar_rdbuf_get(base))
6078 basic_streambuf_wchar__Lock(base->strbuf);
6080 if(ios_base_good(&base->base) && base->stream)
6081 basic_ostream_wchar_flush(base->stream);
6083 return ios_base_good(&base->base);
6086 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6088 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6090 if(ios_base_good(&base->base) && !__uncaught_exception())
6091 basic_ostream_wchar_osfx(ostr);
6093 if(basic_ios_wchar_rdbuf_get(base))
6094 basic_streambuf_wchar__Unlock(base->strbuf);
6097 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6098 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6099 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6100 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6101 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6102 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6104 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6106 TRACE("(%p)\n", this);
6108 if(ios_base_good(&base->base) && base->stream)
6109 basic_ostream_wchar_flush(base->stream);
6110 return ios_base_good(&base->base);
6113 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6114 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6115 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6116 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6117 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6118 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6120 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6122 TRACE("(%p %c)\n", this, ch);
6124 if(!basic_ostream_wchar_sentry_create(this)
6125 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6126 basic_ostream_wchar_sentry_destroy(this);
6127 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6131 basic_ostream_wchar_sentry_destroy(this);
6135 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6136 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6137 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6138 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6139 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6140 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6142 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6144 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6146 if(!ios_base_fail(&base->base)) {
6149 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6150 &seek, pos, OPENMODE_out);
6151 if(seek.off==0 && seek.pos==-1 && seek.state==0)
6152 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6157 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6158 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6159 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6160 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6161 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6162 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6164 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6166 TRACE("(%p)\n", this);
6168 if(!ios_base_fail(&base->base)) {
6169 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6170 ret, 0, SEEKDIR_cur, OPENMODE_out);
6179 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6180 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6181 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6182 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6183 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6184 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6186 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6188 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6190 if(!basic_ostream_wchar_sentry_create(this)
6191 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6192 basic_ostream_wchar_sentry_destroy(this);
6193 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6197 basic_ostream_wchar_sentry_destroy(this);
6201 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6203 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6204 int state = IOSTATE_goodbit;
6206 TRACE("(%p %d)\n", this, val);
6208 if(basic_ostream_wchar_sentry_create(this)) {
6209 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6210 ostreambuf_iterator_wchar dest = {0, strbuf};
6212 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6213 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6214 ? (LONG)((unsigned short)val) : (LONG)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@F@Z */
6223 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6224 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6225 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6227 return basic_ostream_print_short(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_int(basic_ostream_wchar *this, int 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 %d)\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_long(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@H@Z */
6251 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6252 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6253 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6254 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6255 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6257 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6258 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6261 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6263 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6264 int state = IOSTATE_goodbit;
6266 TRACE("(%p %u)\n", this, val);
6268 if(basic_ostream_wchar_sentry_create(this)) {
6269 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6270 ostreambuf_iterator_wchar dest = {0, strbuf};
6272 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6274 basic_ostream_wchar_sentry_destroy(this);
6276 basic_ios_wchar_setstate(base, state);
6280 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6281 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6282 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6283 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6284 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6285 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6287 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6288 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6291 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6293 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6294 int state = IOSTATE_goodbit;
6296 TRACE("(%p %f)\n", this, val);
6298 if(basic_ostream_wchar_sentry_create(this)) {
6299 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6300 ostreambuf_iterator_wchar dest = {0, strbuf};
6302 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6304 basic_ostream_wchar_sentry_destroy(this);
6306 basic_ios_wchar_setstate(base, state);
6310 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6311 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6312 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6313 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6315 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6316 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6319 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6321 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6322 int state = IOSTATE_goodbit;
6324 TRACE("(%p %lf)\n", this, val);
6326 if(basic_ostream_wchar_sentry_create(this)) {
6327 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6328 ostreambuf_iterator_wchar dest = {0, strbuf};
6330 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6332 basic_ostream_wchar_sentry_destroy(this);
6334 basic_ios_wchar_setstate(base, state);
6338 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6339 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6340 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6341 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6343 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6344 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6347 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6349 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6350 int state = IOSTATE_goodbit;
6352 TRACE("(%p %lf)\n", this, val);
6354 if(basic_ostream_wchar_sentry_create(this)) {
6355 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6356 ostreambuf_iterator_wchar dest = {0, strbuf};
6358 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6360 basic_ostream_wchar_sentry_destroy(this);
6362 basic_ios_wchar_setstate(base, state);
6366 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6367 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6368 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6369 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6371 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6372 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6375 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6376 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6377 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6378 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6379 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6380 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6382 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6383 IOSB_iostate state = IOSTATE_badbit;
6384 unsigned short c = '\n';
6386 TRACE("(%p %p)\n", this, val);
6388 if(basic_ostream_wchar_sentry_create(this)) {
6389 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6390 c = basic_streambuf_wchar_snextc(val)) {
6391 state = IOSTATE_goodbit;
6393 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6394 state = IOSTATE_badbit;
6399 state = IOSTATE_badbit;
6401 basic_ostream_wchar_sentry_destroy(this);
6403 ios_base_width_set(&base->base, 0);
6404 basic_ios_wchar_setstate(base, state);
6408 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6410 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6411 int state = IOSTATE_goodbit;
6413 TRACE("(%p %p)\n", this, val);
6415 if(basic_ostream_wchar_sentry_create(this)) {
6416 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6417 ostreambuf_iterator_wchar dest = {0, strbuf};
6419 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6421 basic_ostream_wchar_sentry_destroy(this);
6423 basic_ios_wchar_setstate(base, state);
6427 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6428 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6429 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6430 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6432 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6433 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6436 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6438 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6439 int state = IOSTATE_goodbit;
6441 TRACE("(%p)\n", this);
6443 if(basic_ostream_wchar_sentry_create(this)) {
6444 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6445 ostreambuf_iterator_wchar dest = {0, strbuf};
6447 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6449 basic_ostream_wchar_sentry_destroy(this);
6451 basic_ios_wchar_setstate(base, state);
6455 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6456 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6457 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6458 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6460 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6461 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6464 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6466 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6467 int state = IOSTATE_goodbit;
6469 TRACE("(%p)\n", this);
6471 if(basic_ostream_wchar_sentry_create(this)) {
6472 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6473 ostreambuf_iterator_wchar dest = {0, strbuf};
6475 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6477 basic_ostream_wchar_sentry_destroy(this);
6479 basic_ios_wchar_setstate(base, state);
6483 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6484 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6485 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6486 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6488 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6489 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6492 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6494 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6495 int state = IOSTATE_goodbit;
6497 TRACE("(%p %x)\n", this, val);
6499 if(basic_ostream_wchar_sentry_create(this)) {
6500 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6501 ostreambuf_iterator_wchar dest = {0, strbuf};
6503 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6505 basic_ostream_wchar_sentry_destroy(this);
6507 basic_ios_wchar_setstate(base, state);
6511 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6512 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6513 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6514 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6516 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6517 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6520 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6521 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6522 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6523 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6524 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6526 TRACE("(%p)\n", ostr);
6528 basic_ostream_wchar_put(ostr, '\n');
6529 basic_ostream_wchar_flush(ostr);
6533 /* ??$?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 */
6534 /* ??$?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 */
6535 /* ??$?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 */
6536 /* ??$?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 */
6537 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6539 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6540 IOSB_iostate state = IOSTATE_goodbit;
6542 TRACE("(%p %p)\n", ostr, str);
6544 if(basic_ostream_wchar_sentry_create(ostr)) {
6545 MSVCP_size_t len = basic_string_wchar_length(str);
6546 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6548 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6549 for(; pad!=0; pad--) {
6550 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6551 state = IOSTATE_badbit;
6557 if(state == IOSTATE_goodbit) {
6558 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6559 state = IOSTATE_badbit;
6562 if(state == IOSTATE_goodbit) {
6563 for(; pad!=0; pad--) {
6564 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6565 state = IOSTATE_badbit;
6571 base->base.wide = 0;
6573 state = IOSTATE_badbit;
6575 basic_ostream_wchar_sentry_destroy(ostr);
6577 basic_ios_wchar_setstate(base, state);
6581 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6582 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6583 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6584 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6585 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6587 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6588 IOSB_iostate state = IOSTATE_goodbit;
6590 TRACE("(%p %d)\n", ostr, ch);
6592 if(basic_ostream_wchar_sentry_create(ostr)) {
6593 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6595 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6596 for(; pad!=0; pad--) {
6597 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6598 state = IOSTATE_badbit;
6604 if(state == IOSTATE_goodbit) {
6605 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6606 state = IOSTATE_badbit;
6609 if(state == IOSTATE_goodbit) {
6610 for(; pad!=0; pad--) {
6611 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6612 state = IOSTATE_badbit;
6618 base->base.wide = 0;
6620 state = IOSTATE_badbit;
6622 basic_ostream_wchar_sentry_destroy(ostr);
6624 basic_ios_wchar_setstate(base, state);
6628 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6629 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6630 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6631 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6632 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6634 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6635 IOSB_iostate state = IOSTATE_goodbit;
6637 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6639 if(basic_ostream_wchar_sentry_create(ostr)) {
6640 MSVCP_size_t len = wcslen(str);
6641 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6643 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6644 for(; pad!=0; pad--) {
6645 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6646 state = IOSTATE_badbit;
6652 if(state == IOSTATE_goodbit) {
6653 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6654 state = IOSTATE_badbit;
6657 if(state == IOSTATE_goodbit) {
6658 for(; pad!=0; pad--) {
6659 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6660 state = IOSTATE_badbit;
6666 base->base.wide = 0;
6668 state = IOSTATE_badbit;
6670 basic_ostream_wchar_sentry_destroy(ostr);
6672 basic_ios_wchar_setstate(base, state);
6676 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6677 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6678 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6679 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6680 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6681 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6682 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6684 TRACE("(%p %p)\n", this, pfunc);
6689 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6690 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6691 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6692 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6693 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6694 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6695 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6697 TRACE("(%p %p)\n", this, pfunc);
6698 pfunc(basic_ostream_wchar_get_basic_ios(this));
6702 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6703 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6704 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6705 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6706 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6707 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6708 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6710 TRACE("(%p %p)\n", this, pfunc);
6711 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6715 /* Caution: basic_istream uses virtual inheritance. */
6716 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6718 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6721 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6723 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6726 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6728 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6731 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6732 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6733 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)
6735 basic_ios_char *base;
6737 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6740 this->vbtable = basic_istream_char_vbtable;
6741 base = basic_istream_char_get_basic_ios(this);
6742 basic_ios_char_ctor(base);
6744 base = basic_istream_char_get_basic_ios(this);
6747 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6750 basic_ios_char_init(base, strbuf, isstd);
6754 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6755 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6756 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6757 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6759 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6762 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6763 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6764 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6765 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6767 basic_ios_char *base;
6769 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6772 this->vbtable = basic_istream_char_vbtable;
6773 base = basic_istream_char_get_basic_ios(this);
6774 basic_ios_char_ctor(base);
6776 base = basic_istream_char_get_basic_ios(this);
6779 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6780 ios_base_Addstd(&base->base);
6784 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6785 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6786 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6787 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6789 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6791 /* don't destroy virtual base here */
6792 TRACE("(%p)\n", this);
6795 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6796 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6797 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6798 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6800 TRACE("(%p)\n", this);
6801 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6802 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6805 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6806 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6808 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6810 TRACE("(%p %x)\n", this, flags);
6813 /* we have an array, with the number of elements stored before the first object */
6814 INT_PTR i, *ptr = (INT_PTR *)this-1;
6816 for(i=*ptr-1; i>=0; i--)
6817 basic_istream_char_vbase_dtor(this+i);
6818 MSVCRT_operator_delete(ptr);
6820 basic_istream_char_vbase_dtor(this);
6822 MSVCRT_operator_delete(this);
6828 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6829 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6830 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6832 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6834 TRACE("(%p %d)\n", this, noskip);
6836 if(!ios_base_good(&base->base)) {
6837 basic_ios_char_setstate(base, IOSTATE_failbit);
6841 if(basic_ios_char_tie_get(base))
6842 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6844 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6845 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6846 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
6849 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6850 ch = basic_streambuf_char_snextc(strbuf)) {
6852 basic_ios_char_setstate(base, IOSTATE_eofbit);
6856 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6864 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6865 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6866 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6867 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6869 return basic_istream_char__Ipfx(this, noskip);
6872 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6873 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6874 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6875 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6877 TRACE("(%p)\n", this);
6880 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6882 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6884 if(basic_ios_char_rdbuf_get(base))
6885 basic_streambuf_char__Lock(base->strbuf);
6887 return basic_istream_char_ipfx(istr, noskip);
6890 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6892 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6894 if(basic_ios_char_rdbuf_get(base))
6895 basic_streambuf_char__Unlock(base->strbuf);
6898 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6899 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6900 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6901 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6903 TRACE("(%p)\n", this);
6907 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6908 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6909 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6910 int __thiscall basic_istream_char_get(basic_istream_char *this)
6912 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6915 TRACE("(%p)\n", this);
6919 if(!basic_istream_char_sentry_create(this, TRUE)) {
6920 basic_istream_char_sentry_destroy(this);
6924 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6925 basic_istream_char_sentry_destroy(this);
6927 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6934 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6935 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6936 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6937 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6941 TRACE("(%p %p)\n", this, ch);
6943 ret = basic_istream_char_get(this);
6949 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6950 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6951 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
6952 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6954 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6957 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6961 if(basic_istream_char_sentry_create(this, TRUE)) {
6962 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6964 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
6965 ch = basic_streambuf_char_snextc(strbuf)) {
6966 if(ch==EOF || ch==delim)
6974 basic_istream_char_sentry_destroy(this);
6976 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6977 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6983 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6984 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6985 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
6986 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
6988 return basic_istream_char_get_str_delim(this, str, count, '\n');
6991 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6992 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6993 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
6994 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
6996 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6999 TRACE("(%p %p %c)\n", this, strbuf, delim);
7003 if(basic_istream_char_sentry_create(this, TRUE)) {
7004 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
7006 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
7007 ch = basic_streambuf_char_snextc(strbuf_read)) {
7008 if(ch==EOF || ch==delim)
7011 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
7016 basic_istream_char_sentry_destroy(this);
7018 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7019 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7023 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7024 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7025 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
7026 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
7028 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
7031 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7032 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7033 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
7034 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7036 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7039 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7043 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7044 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7047 ch = basic_streambuf_char_sbumpc(strbuf);
7049 if(ch==EOF || ch==delim)
7059 else if(ch != EOF) {
7060 ch = basic_streambuf_char_sgetc(strbuf);
7063 basic_streambuf_char__Gninc(strbuf);
7068 basic_istream_char_sentry_destroy(this);
7070 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7071 (!this->count || (ch!=delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7077 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7078 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7079 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7080 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7082 return basic_istream_char_getline_delim(this, str, count, '\n');
7085 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7086 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7087 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7088 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7090 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7093 TRACE("(%p %ld %d)\n", this, count, delim);
7097 if(basic_istream_char_sentry_create(this, TRUE)) {
7098 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7101 ch = basic_streambuf_char_sbumpc(strbuf);
7103 if(ch==EOF || ch==delim)
7107 if(count != INT_MAX)
7111 basic_istream_char_sentry_destroy(this);
7114 basic_ios_char_setstate(base, IOSTATE_eofbit);
7118 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7119 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7120 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7122 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7125 TRACE("(%p)\n", istream);
7127 if(basic_istream_char_sentry_create(istream, TRUE)) {
7128 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7129 const ctype_char *ctype = ctype_char_use_facet(strbuf->loc);
7131 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7132 ch = basic_streambuf_char_snextc(strbuf)) {
7137 basic_istream_char_sentry_destroy(istream);
7140 basic_ios_char_setstate(base, IOSTATE_eofbit);
7144 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7145 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7146 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7147 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7149 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7152 TRACE("(%p)\n", this);
7156 if(basic_istream_char_sentry_create(this, TRUE))
7157 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7158 basic_istream_char_sentry_destroy(this);
7162 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7163 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7164 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7166 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7167 IOSB_iostate state = IOSTATE_goodbit;
7169 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7171 if(basic_istream_char_sentry_create(this, TRUE)) {
7172 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7174 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7175 if(this->count != count)
7176 state |= IOSTATE_failbit | IOSTATE_eofbit;
7180 basic_istream_char_sentry_destroy(this);
7182 basic_ios_char_setstate(base, state);
7186 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7187 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7188 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7189 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7191 return basic_istream_char__Read_s(this, str, count, count);
7194 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7195 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7196 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7198 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7199 IOSB_iostate state = IOSTATE_goodbit;
7201 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7205 if(basic_istream_char_sentry_create(this, TRUE)) {
7206 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7211 state |= IOSTATE_eofbit;
7213 basic_istream_char__Read_s(this, str, size, avail);
7215 state |= IOSTATE_failbit;
7217 basic_istream_char_sentry_destroy(this);
7219 basic_ios_char_setstate(base, state);
7223 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7224 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7225 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7226 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7228 return basic_istream_char__Readsome_s(this, str, count, count);
7231 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7232 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7233 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7234 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7236 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7237 IOSB_iostate state = IOSTATE_goodbit;
7239 TRACE("(%p %c)\n", this, ch);
7243 if(basic_istream_char_sentry_create(this, TRUE)) {
7244 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7246 if(!ios_base_good(&base->base))
7247 state |= IOSTATE_failbit;
7248 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7249 state |= IOSTATE_badbit;
7251 basic_istream_char_sentry_destroy(this);
7253 basic_ios_char_setstate(base, state);
7257 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7258 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7259 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7260 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7262 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7263 IOSB_iostate state = IOSTATE_goodbit;
7265 TRACE("(%p)\n", this);
7269 if(basic_istream_char_sentry_create(this, TRUE)) {
7270 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7272 if(!ios_base_good(&base->base))
7273 state |= IOSTATE_failbit;
7274 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7275 state |= IOSTATE_badbit;
7277 basic_istream_char_sentry_destroy(this);
7279 basic_ios_char_setstate(base, state);
7283 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7284 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7285 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7286 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7288 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7289 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7291 TRACE("(%p)\n", this);
7296 if(basic_istream_char_sentry_create(this, TRUE)) {
7297 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7298 basic_istream_char_sentry_destroy(this);
7302 basic_istream_char_sentry_destroy(this);
7304 basic_ios_char_setstate(base, IOSTATE_badbit);
7308 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7309 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7310 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7311 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7313 TRACE("(%p %p)\n", this, ret);
7315 if(basic_istream_char_sentry_create(this, TRUE)) {
7316 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7317 if(!ios_base_fail(&base->base)) {
7318 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7319 ret, 0, SEEKDIR_cur, OPENMODE_in);
7320 basic_istream_char_sentry_destroy(this);
7322 if(ret->off==0 && ret->pos==-1 && ret->state==0)
7323 basic_ios_char_setstate(base, IOSTATE_failbit);
7327 basic_istream_char_sentry_destroy(this);
7335 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7336 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7337 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7338 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7340 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7342 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7344 if(basic_istream_char_sentry_create(this, TRUE)) {
7345 if(!ios_base_fail(&base->base)) {
7346 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7349 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7350 basic_istream_char_sentry_destroy(this);
7352 if(ret.off==0 && ret.pos==-1 && ret.state==0)
7353 basic_ios_char_setstate(base, IOSTATE_failbit);
7355 basic_ios_char_clear(base, IOSTATE_goodbit);
7359 basic_istream_char_sentry_destroy(this);
7361 basic_ios_char_setstate(base, IOSTATE_failbit);
7365 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7366 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7367 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7368 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7370 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7371 int state = IOSTATE_goodbit;
7373 TRACE("(%p %p)\n", this, v);
7375 if(basic_istream_char_sentry_create(this, FALSE)) {
7376 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7377 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7378 istreambuf_iterator_char first={0}, last={0};
7381 first.strbuf = strbuf;
7382 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7384 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7387 state |= IOSTATE_failbit;
7389 basic_istream_char_sentry_destroy(this);
7391 basic_ios_char_setstate(base, state);
7395 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7396 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7397 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7398 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7400 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7401 int state = IOSTATE_goodbit;
7403 TRACE("(%p %p)\n", this, v);
7405 if(basic_istream_char_sentry_create(this, FALSE)) {
7406 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7407 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7408 istreambuf_iterator_char first={0}, last={0};
7410 first.strbuf = strbuf;
7411 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7413 basic_istream_char_sentry_destroy(this);
7415 basic_ios_char_setstate(base, state);
7419 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7420 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7421 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7422 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7424 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7425 int state = IOSTATE_goodbit;
7427 TRACE("(%p %p)\n", this, v);
7429 if(basic_istream_char_sentry_create(this, FALSE)) {
7430 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7431 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7432 istreambuf_iterator_char first={0}, last={0};
7434 first.strbuf = strbuf;
7435 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7437 basic_istream_char_sentry_destroy(this);
7439 basic_ios_char_setstate(base, state);
7443 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7444 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7445 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7446 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7448 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7449 int state = IOSTATE_goodbit;
7451 TRACE("(%p %p)\n", this, v);
7453 if(basic_istream_char_sentry_create(this, FALSE)) {
7454 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7455 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7456 istreambuf_iterator_char first={0}, last={0};
7458 first.strbuf = strbuf;
7459 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7461 basic_istream_char_sentry_destroy(this);
7463 basic_ios_char_setstate(base, state);
7467 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7468 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7469 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7470 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7472 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7473 int state = IOSTATE_goodbit;
7475 TRACE("(%p %p)\n", this, v);
7477 if(basic_istream_char_sentry_create(this, FALSE)) {
7478 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7479 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7480 istreambuf_iterator_char first={0}, last={0};
7482 first.strbuf = strbuf;
7483 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7485 basic_istream_char_sentry_destroy(this);
7487 basic_ios_char_setstate(base, state);
7491 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7492 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7493 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7494 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7496 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7497 int state = IOSTATE_goodbit;
7499 TRACE("(%p %p)\n", this, v);
7501 if(basic_istream_char_sentry_create(this, FALSE)) {
7502 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7503 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7504 istreambuf_iterator_char first={0}, last={0};
7506 first.strbuf = strbuf;
7507 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7509 basic_istream_char_sentry_destroy(this);
7511 basic_ios_char_setstate(base, state);
7515 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7516 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7517 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7518 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7520 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7521 int state = IOSTATE_goodbit;
7523 TRACE("(%p %p)\n", this, v);
7525 if(basic_istream_char_sentry_create(this, FALSE)) {
7526 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7527 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7528 istreambuf_iterator_char first={0}, last={0};
7530 first.strbuf = strbuf;
7531 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7533 basic_istream_char_sentry_destroy(this);
7535 basic_ios_char_setstate(base, state);
7539 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7540 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7541 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7542 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7544 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7545 int state = IOSTATE_goodbit;
7547 TRACE("(%p %p)\n", this, v);
7549 if(basic_istream_char_sentry_create(this, FALSE)) {
7550 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7551 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7552 istreambuf_iterator_char first={0}, last={0};
7554 first.strbuf = strbuf;
7555 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7557 basic_istream_char_sentry_destroy(this);
7559 basic_ios_char_setstate(base, state);
7563 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7564 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7565 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7566 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7568 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7569 int state = IOSTATE_goodbit;
7571 TRACE("(%p %p)\n", this, v);
7573 if(basic_istream_char_sentry_create(this, FALSE)) {
7574 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7575 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7576 istreambuf_iterator_char first={0}, last={0};
7578 first.strbuf = strbuf;
7579 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7581 basic_istream_char_sentry_destroy(this);
7583 basic_ios_char_setstate(base, state);
7587 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7588 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7589 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7590 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7592 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7593 int state = IOSTATE_goodbit;
7595 TRACE("(%p %p)\n", this, v);
7597 if(basic_istream_char_sentry_create(this, FALSE)) {
7598 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7599 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7600 istreambuf_iterator_char first={0}, last={0};
7602 first.strbuf = strbuf;
7603 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7605 basic_istream_char_sentry_destroy(this);
7607 basic_ios_char_setstate(base, state);
7611 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7612 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7613 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7614 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7616 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7617 int state = IOSTATE_goodbit;
7619 TRACE("(%p %p)\n", this, v);
7621 if(basic_istream_char_sentry_create(this, FALSE)) {
7622 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7623 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7624 istreambuf_iterator_char first={0}, last={0};
7626 first.strbuf = strbuf;
7627 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7629 basic_istream_char_sentry_destroy(this);
7631 basic_ios_char_setstate(base, state);
7635 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7636 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7637 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7638 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7640 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7641 int state = IOSTATE_goodbit;
7643 TRACE("(%p %p)\n", this, v);
7645 if(basic_istream_char_sentry_create(this, FALSE)) {
7646 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7647 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7648 istreambuf_iterator_char first={0}, last={0};
7650 first.strbuf = strbuf;
7651 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7653 basic_istream_char_sentry_destroy(this);
7655 basic_ios_char_setstate(base, state);
7659 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7660 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7661 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7662 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7664 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7665 int state = IOSTATE_goodbit;
7667 TRACE("(%p %p)\n", this, v);
7669 if(basic_istream_char_sentry_create(this, FALSE)) {
7670 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7671 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7672 istreambuf_iterator_char first={0}, last={0};
7674 first.strbuf = strbuf;
7675 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7677 basic_istream_char_sentry_destroy(this);
7679 basic_ios_char_setstate(base, state);
7683 /* ??$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 */
7684 /* ??$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 */
7685 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7686 basic_istream_char *istream, basic_string_char *str, char delim)
7688 IOSB_iostate state = IOSTATE_failbit;
7691 TRACE("(%p %p %c)\n", istream, str, delim);
7693 if(basic_istream_char_sentry_create(istream, TRUE)) {
7694 basic_string_char_clear(str);
7696 c = basic_istream_char_get(istream);
7698 state = IOSTATE_goodbit;
7700 for(; c!=delim && c!=EOF; c = basic_istream_char_get(istream)) {
7701 state = IOSTATE_goodbit;
7702 basic_string_char_append_ch(str, c);
7705 basic_istream_char_sentry_destroy(istream);
7707 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7708 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7712 /* ??$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 */
7713 /* ??$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 */
7714 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7715 basic_istream_char *istream, basic_string_char *str)
7717 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7720 /* ??$?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 */
7721 /* ??$?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 */
7722 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7723 basic_istream_char *istream, basic_string_char *str)
7725 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7726 IOSB_iostate state = IOSTATE_failbit;
7729 TRACE("(%p %p)\n", istream, str);
7731 if(basic_istream_char_sentry_create(istream, FALSE)) {
7732 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7733 MSVCP_size_t count = ios_base_width_get(&base->base);
7738 basic_string_char_clear(str);
7740 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7741 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7742 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7743 state = IOSTATE_goodbit;
7744 basic_string_char_append_ch(str, c);
7747 basic_istream_char_sentry_destroy(istream);
7749 ios_base_width_set(&base->base, 0);
7750 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7754 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7755 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7756 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7757 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7758 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7759 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7760 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7762 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7763 IOSB_iostate state = IOSTATE_failbit;
7766 TRACE("(%p %p)\n", istream, str);
7768 if(basic_istream_char_sentry_create(istream, FALSE)) {
7769 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7770 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7772 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7773 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7774 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7775 state = IOSTATE_goodbit;
7779 basic_istream_char_sentry_destroy(istream);
7782 ios_base_width_set(&base->base, 0);
7783 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7787 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7788 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7789 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7790 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7791 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7792 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7793 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7795 IOSB_iostate state = IOSTATE_failbit;
7798 TRACE("(%p %p)\n", istream, ch);
7800 if(basic_istream_char_sentry_create(istream, FALSE)) {
7801 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7802 basic_istream_char_get_basic_ios(istream)));
7804 state = IOSTATE_goodbit;
7808 basic_istream_char_sentry_destroy(istream);
7810 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7811 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7815 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7816 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7817 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7818 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7819 basic_istream_char *this, basic_streambuf_char *streambuf)
7821 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7822 IOSB_iostate state = IOSTATE_failbit;
7825 TRACE("(%p %p)\n", this, streambuf);
7827 if(basic_istream_char_sentry_create(this, FALSE)) {
7828 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7829 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7830 state = IOSTATE_goodbit;
7831 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7835 basic_istream_char_sentry_destroy(this);
7837 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7841 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7842 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7843 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7844 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7845 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7847 TRACE("(%p %p)\n", this, pfunc);
7852 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7853 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7854 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7855 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7856 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7858 TRACE("(%p %p)\n", this, pfunc);
7859 pfunc(basic_istream_char_get_basic_ios(this));
7863 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7864 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7865 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7866 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7867 ios_base* (__cdecl *pfunc)(ios_base*))
7869 TRACE("(%p %p)\n", this, pfunc);
7870 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7874 /* Caution: basic_istream uses virtual inheritance. */
7875 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7877 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7880 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7882 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7885 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7887 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7890 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7891 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7892 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7893 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7895 basic_ios_wchar *base;
7897 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7900 this->vbtable = basic_istream_wchar_vbtable;
7901 base = basic_istream_wchar_get_basic_ios(this);
7902 basic_ios_wchar_ctor(base);
7904 base = basic_istream_wchar_get_basic_ios(this);
7907 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7910 basic_ios_wchar_init(base, strbuf, isstd);
7914 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7915 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7916 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7917 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7919 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
7920 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7924 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7925 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7926 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
7927 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7929 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7932 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7933 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7934 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
7935 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
7936 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7938 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7941 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7942 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7943 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
7944 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7946 basic_ios_wchar *base;
7948 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7951 this->vbtable = basic_istream_wchar_vbtable;
7952 base = basic_istream_wchar_get_basic_ios(this);
7953 basic_ios_wchar_ctor(base);
7955 base = basic_istream_wchar_get_basic_ios(this);
7958 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7959 ios_base_Addstd(&base->base);
7963 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7964 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7965 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
7966 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
7967 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7969 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
7970 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7974 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7975 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7976 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7977 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7978 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
7979 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
7981 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7983 /* don't destroy virtual base here */
7984 TRACE("(%p)\n", this);
7987 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7988 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7989 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7990 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7991 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
7992 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
7994 TRACE("(%p)\n", this);
7995 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7996 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7999 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
8000 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
8002 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8004 TRACE("(%p %x)\n", this, flags);
8007 /* we have an array, with the number of elements stored before the first object */
8008 INT_PTR i, *ptr = (INT_PTR *)this-1;
8010 for(i=*ptr-1; i>=0; i--)
8011 basic_istream_wchar_vbase_dtor(this+i);
8012 MSVCRT_operator_delete(ptr);
8014 basic_istream_wchar_vbase_dtor(this);
8016 MSVCRT_operator_delete(this);
8022 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8023 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8024 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8025 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8026 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8028 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8030 TRACE("(%p %d)\n", this, noskip);
8032 if(!ios_base_good(&base->base)) {
8033 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8037 if(basic_ios_wchar_tie_get(base))
8038 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8040 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8041 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8042 const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc);
8045 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8046 ch = basic_streambuf_wchar_snextc(strbuf)) {
8048 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8052 if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8060 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8061 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8062 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8063 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8064 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8065 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8067 return basic_istream_wchar__Ipfx(this, noskip);
8070 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8071 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8072 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8073 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8074 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8075 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8077 TRACE("(%p)\n", this);
8080 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8082 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8084 if(basic_ios_wchar_rdbuf_get(base))
8085 basic_streambuf_wchar__Lock(base->strbuf);
8087 return basic_istream_wchar_ipfx(istr, noskip);
8090 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8092 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8094 if(basic_ios_wchar_rdbuf_get(base))
8095 basic_streambuf_wchar__Unlock(base->strbuf);
8098 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8099 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8100 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8101 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8102 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8103 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8105 TRACE("(%p)\n", this);
8109 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8110 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8111 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8112 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8113 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8114 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8116 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8119 TRACE("(%p)\n", this);
8123 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8124 basic_istream_wchar_sentry_destroy(this);
8128 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8129 basic_istream_wchar_sentry_destroy(this);
8131 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8138 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8139 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8140 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8141 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8142 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8143 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8147 TRACE("(%p %p)\n", this, ch);
8149 ret = basic_istream_wchar_get(this);
8155 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8156 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8157 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8158 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8159 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8160 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8162 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8163 unsigned short ch = delim;
8165 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8169 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8170 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8172 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8173 ch = basic_streambuf_wchar_snextc(strbuf)) {
8174 if(ch==WEOF || ch==delim)
8182 basic_istream_wchar_sentry_destroy(this);
8184 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8185 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8191 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8192 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8193 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8194 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8195 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8196 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8198 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8201 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8202 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8203 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8204 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8205 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8206 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8208 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8209 unsigned short ch = delim;
8211 TRACE("(%p %p %c)\n", this, strbuf, delim);
8215 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8216 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8218 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8219 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8220 if(ch==WEOF || ch==delim)
8223 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8228 basic_istream_wchar_sentry_destroy(this);
8230 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8231 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8235 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8236 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8237 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8238 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8239 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8240 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8242 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8245 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8246 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8247 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8248 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8249 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8250 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8252 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8253 unsigned short ch = delim;
8255 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8259 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8260 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8263 ch = basic_streambuf_wchar_sbumpc(strbuf);
8265 if(ch==WEOF || ch==delim)
8275 else if(ch != WEOF) {
8276 ch = basic_streambuf_wchar_sgetc(strbuf);
8279 basic_streambuf_wchar__Gninc(strbuf);
8284 basic_istream_wchar_sentry_destroy(this);
8286 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8287 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8293 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8294 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8295 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8296 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8297 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8298 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8300 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8303 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8304 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8305 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8306 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8307 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8308 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8310 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8311 unsigned short ch = delim;
8313 TRACE("(%p %ld %d)\n", this, count, delim);
8317 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8318 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8321 ch = basic_streambuf_wchar_sbumpc(strbuf);
8323 if(ch==WEOF || ch==delim)
8327 if(count != INT_MAX)
8331 basic_istream_wchar_sentry_destroy(this);
8334 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8338 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8339 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8340 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8341 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8342 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8344 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8345 unsigned short ch = '\n';
8347 TRACE("(%p)\n", istream);
8349 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8350 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8351 const ctype_wchar *ctype = ctype_wchar_use_facet(strbuf->loc);
8353 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8354 ch = basic_streambuf_wchar_snextc(strbuf)) {
8359 basic_istream_wchar_sentry_destroy(istream);
8362 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8366 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8367 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8368 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8369 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8370 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8371 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8373 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8374 unsigned short ret = WEOF;
8376 TRACE("(%p)\n", this);
8380 if(basic_istream_wchar_sentry_create(this, TRUE))
8381 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8382 basic_istream_wchar_sentry_destroy(this);
8386 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8387 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8388 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8389 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8390 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8392 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8393 IOSB_iostate state = IOSTATE_goodbit;
8395 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8397 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8398 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8400 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8401 if(this->count != count)
8402 state |= IOSTATE_failbit | IOSTATE_eofbit;
8406 basic_istream_wchar_sentry_destroy(this);
8408 basic_ios_wchar_setstate(base, state);
8412 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8413 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8414 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8415 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8416 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8417 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8419 return basic_istream_wchar__Read_s(this, str, count, count);
8422 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8423 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8424 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8425 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8426 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8428 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8429 IOSB_iostate state = IOSTATE_goodbit;
8431 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8435 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8436 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8441 state |= IOSTATE_eofbit;
8443 basic_istream_wchar__Read_s(this, str, size, avail);
8445 state |= IOSTATE_failbit;
8447 basic_istream_wchar_sentry_destroy(this);
8449 basic_ios_wchar_setstate(base, state);
8453 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8454 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8455 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8456 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8457 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8458 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8460 return basic_istream_wchar__Readsome_s(this, str, count, count);
8463 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8464 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8465 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8466 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8467 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8468 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8470 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8471 IOSB_iostate state = IOSTATE_goodbit;
8473 TRACE("(%p %c)\n", this, ch);
8477 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8478 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8480 if(!ios_base_good(&base->base))
8481 state |= IOSTATE_failbit;
8482 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8483 state |= IOSTATE_badbit;
8485 basic_istream_wchar_sentry_destroy(this);
8487 basic_ios_wchar_setstate(base, state);
8491 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8492 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8493 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8494 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8495 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8496 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8498 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8499 IOSB_iostate state = IOSTATE_goodbit;
8501 TRACE("(%p)\n", this);
8505 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8506 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8508 if(!ios_base_good(&base->base))
8509 state |= IOSTATE_failbit;
8510 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8511 state |= IOSTATE_badbit;
8513 basic_istream_wchar_sentry_destroy(this);
8515 basic_ios_wchar_setstate(base, state);
8519 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8520 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8521 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8522 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8523 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8524 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8526 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8527 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8529 TRACE("(%p)\n", this);
8534 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8535 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8536 basic_istream_wchar_sentry_destroy(this);
8540 basic_istream_wchar_sentry_destroy(this);
8542 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8546 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8547 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8548 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8549 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8550 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8551 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8553 TRACE("(%p %p)\n", this, ret);
8555 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8556 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8557 if(!ios_base_fail(&base->base)) {
8558 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8559 ret, 0, SEEKDIR_cur, OPENMODE_in);
8560 basic_istream_wchar_sentry_destroy(this);
8562 if(ret->off==0 && ret->pos==-1 && ret->state==0)
8563 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8567 basic_istream_wchar_sentry_destroy(this);
8575 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8576 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8577 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8578 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8579 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8580 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8582 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8584 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8586 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8587 if(!ios_base_fail(&base->base)) {
8588 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8591 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8592 basic_istream_wchar_sentry_destroy(this);
8594 if(ret.off==0 && ret.pos==-1 && ret.state==0)
8595 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8597 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8601 basic_istream_wchar_sentry_destroy(this);
8603 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8607 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8609 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8610 int state = IOSTATE_goodbit;
8612 TRACE("(%p %p)\n", this, v);
8614 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8615 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8616 istreambuf_iterator_wchar first={0}, last={0};
8619 first.strbuf = strbuf;
8620 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8622 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8625 state |= IOSTATE_failbit;
8627 basic_istream_wchar_sentry_destroy(this);
8629 basic_ios_wchar_setstate(base, state);
8633 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8634 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8635 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8636 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8638 return basic_istream_read_short(this, v, num_get_short_use_facet(
8639 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8642 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8644 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8645 int state = IOSTATE_goodbit;
8647 TRACE("(%p %p)\n", this, v);
8649 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8650 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8651 istreambuf_iterator_wchar first={0}, last={0};
8653 first.strbuf = strbuf;
8654 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8656 basic_istream_wchar_sentry_destroy(this);
8658 basic_ios_wchar_setstate(base, state);
8662 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8663 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8664 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8665 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8667 return basic_istream_read_int(this, v, num_get_short_use_facet(
8668 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8671 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8673 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8674 int state = IOSTATE_goodbit;
8676 TRACE("(%p %p)\n", this, v);
8678 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8679 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8680 istreambuf_iterator_wchar first={0}, last={0};
8682 first.strbuf = strbuf;
8683 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8685 basic_istream_wchar_sentry_destroy(this);
8687 basic_ios_wchar_setstate(base, state);
8691 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8692 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8693 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8694 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8696 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8697 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8700 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8702 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8703 int state = IOSTATE_goodbit;
8705 TRACE("(%p %p)\n", this, v);
8707 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8708 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8709 istreambuf_iterator_wchar first={0}, last={0};
8711 first.strbuf = strbuf;
8712 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8714 basic_istream_wchar_sentry_destroy(this);
8716 basic_ios_wchar_setstate(base, state);
8720 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8721 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8722 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8723 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8725 return basic_istream_read_long(this, v, num_get_short_use_facet(
8726 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8729 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8731 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8732 int state = IOSTATE_goodbit;
8734 TRACE("(%p %p)\n", this, v);
8736 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8737 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8738 istreambuf_iterator_wchar first={0}, last={0};
8740 first.strbuf = strbuf;
8741 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8743 basic_istream_wchar_sentry_destroy(this);
8745 basic_ios_wchar_setstate(base, state);
8749 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8750 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8751 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8752 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8754 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8755 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8758 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8760 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8761 int state = IOSTATE_goodbit;
8763 TRACE("(%p %p)\n", this, v);
8765 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8766 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8767 istreambuf_iterator_wchar first={0}, last={0};
8769 first.strbuf = strbuf;
8770 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8772 basic_istream_wchar_sentry_destroy(this);
8774 basic_ios_wchar_setstate(base, state);
8778 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8779 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8780 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8781 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8783 return basic_istream_read_float(this, v, num_get_short_use_facet(
8784 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8787 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8789 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8790 int state = IOSTATE_goodbit;
8792 TRACE("(%p %p)\n", this, v);
8794 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8795 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8796 istreambuf_iterator_wchar first={0}, last={0};
8798 first.strbuf = strbuf;
8799 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8801 basic_istream_wchar_sentry_destroy(this);
8803 basic_ios_wchar_setstate(base, state);
8807 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8808 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8809 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8810 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8812 return basic_istream_read_double(this, v, num_get_short_use_facet(
8813 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8816 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8818 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8819 int state = IOSTATE_goodbit;
8821 TRACE("(%p %p)\n", this, v);
8823 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8824 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8825 istreambuf_iterator_wchar first={0}, last={0};
8827 first.strbuf = strbuf;
8828 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8830 basic_istream_wchar_sentry_destroy(this);
8832 basic_ios_wchar_setstate(base, state);
8836 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8837 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8838 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8839 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8841 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8842 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8845 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8847 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8848 int state = IOSTATE_goodbit;
8850 TRACE("(%p %p)\n", this, v);
8852 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8853 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8854 istreambuf_iterator_wchar first={0}, last={0};
8856 first.strbuf = strbuf;
8857 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8859 basic_istream_wchar_sentry_destroy(this);
8861 basic_ios_wchar_setstate(base, state);
8865 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8866 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8867 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8868 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8870 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8871 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8874 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8876 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8877 int state = IOSTATE_goodbit;
8879 TRACE("(%p %p)\n", this, v);
8881 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8882 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8883 istreambuf_iterator_wchar first={0}, last={0};
8885 first.strbuf = strbuf;
8886 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
8888 basic_istream_wchar_sentry_destroy(this);
8890 basic_ios_wchar_setstate(base, state);
8894 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8895 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8896 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
8897 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
8899 return basic_istream_read_int64(this, v, num_get_short_use_facet(
8900 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8903 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
8905 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8906 int state = IOSTATE_goodbit;
8908 TRACE("(%p %p)\n", this, v);
8910 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8911 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8912 istreambuf_iterator_wchar first={0}, last={0};
8914 first.strbuf = strbuf;
8915 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
8917 basic_istream_wchar_sentry_destroy(this);
8919 basic_ios_wchar_setstate(base, state);
8923 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8924 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8925 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
8926 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
8928 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
8929 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8932 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
8934 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8935 int state = IOSTATE_goodbit;
8937 TRACE("(%p %p)\n", this, v);
8939 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8940 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8941 istreambuf_iterator_wchar first={0}, last={0};
8943 first.strbuf = strbuf;
8944 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
8946 basic_istream_wchar_sentry_destroy(this);
8948 basic_ios_wchar_setstate(base, state);
8952 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8953 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8954 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
8955 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
8957 return basic_istream_read_bool(this, v, num_get_short_use_facet(
8958 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8961 /* ??$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 */
8962 /* ??$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 */
8963 /* ??$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 */
8964 /* ??$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 */
8965 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
8966 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
8968 IOSB_iostate state = IOSTATE_failbit;
8971 TRACE("(%p %p %c)\n", istream, str, delim);
8973 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8974 basic_string_wchar_clear(str);
8976 c = basic_istream_wchar_get(istream);
8978 state = IOSTATE_goodbit;
8980 for(; c!=delim && c!=WEOF; c = basic_istream_wchar_get(istream)) {
8981 state = IOSTATE_goodbit;
8982 basic_string_wchar_append_ch(str, c);
8985 basic_istream_wchar_sentry_destroy(istream);
8987 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
8988 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8992 /* ??$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 */
8993 /* ??$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 */
8994 /* ??$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 */
8995 /* ??$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 */
8996 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
8997 basic_istream_wchar *istream, basic_string_wchar *str)
8999 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
9002 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
9003 basic_string_wchar *str, const ctype_wchar *ctype)
9005 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9006 IOSB_iostate state = IOSTATE_failbit;
9009 TRACE("(%p %p)\n", istream, str);
9011 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9012 MSVCP_size_t count = ios_base_width_get(&base->base);
9017 basic_string_wchar_clear(str);
9019 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9020 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9021 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9022 state = IOSTATE_goodbit;
9023 basic_string_wchar_append_ch(str, c);
9026 basic_istream_wchar_sentry_destroy(istream);
9028 ios_base_width_set(&base->base, 0);
9029 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9033 /* ??$?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 */
9034 /* ??$?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 */
9035 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9036 basic_istream_wchar *istream, basic_string_wchar *str)
9038 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9039 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9042 /* ??$?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 */
9043 /* ??$?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 */
9044 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9045 basic_istream_wchar *istream, basic_string_wchar *str)
9047 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9048 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9051 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9053 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9054 IOSB_iostate state = IOSTATE_failbit;
9055 unsigned short c = '\n';
9057 TRACE("(%p %p)\n", istream, str);
9059 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9060 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9062 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9063 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9064 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9065 state = IOSTATE_goodbit;
9069 basic_istream_wchar_sentry_destroy(istream);
9072 ios_base_width_set(&base->base, 0);
9073 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9077 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9078 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9079 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9081 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9082 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9085 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9086 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9087 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9088 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9089 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9091 IOSB_iostate state = IOSTATE_failbit;
9092 unsigned short c = 0;
9094 TRACE("(%p %p)\n", istream, ch);
9096 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9097 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9098 basic_istream_wchar_get_basic_ios(istream)));
9100 state = IOSTATE_goodbit;
9104 basic_istream_wchar_sentry_destroy(istream);
9106 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9107 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9111 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9112 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9113 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9114 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9115 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9116 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9117 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9119 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9120 IOSB_iostate state = IOSTATE_failbit;
9121 unsigned short c = '\n';
9123 TRACE("(%p %p)\n", this, streambuf);
9125 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9126 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9127 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9128 state = IOSTATE_goodbit;
9129 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9133 basic_istream_wchar_sentry_destroy(this);
9135 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9139 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9140 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9141 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9142 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9143 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9144 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9145 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9147 TRACE("(%p %p)\n", this, pfunc);
9152 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9153 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9154 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9155 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9156 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9157 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9158 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9160 TRACE("(%p %p)\n", this, pfunc);
9161 pfunc(basic_istream_wchar_get_basic_ios(this));
9165 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9166 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9167 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9168 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9169 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9170 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9171 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9173 TRACE("(%p %p)\n", this, pfunc);
9174 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9178 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9180 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9183 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9185 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9188 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9189 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9190 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9191 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9193 basic_ios_char *basic_ios;
9195 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9198 this->base1.vbtable = basic_iostream_char_vbtable1;
9199 this->base2.vbtable = basic_iostream_char_vbtable2;
9200 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9201 basic_ios_char_ctor(basic_ios);
9203 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9206 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9208 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9209 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9213 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9214 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9215 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9216 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9218 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9220 TRACE("(%p)\n", this);
9221 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9222 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9225 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9226 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9227 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9228 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9230 TRACE("(%p)\n", this);
9231 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9232 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9235 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9236 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9238 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9240 TRACE("(%p %x)\n", this, flags);
9243 /* we have an array, with the number of elements stored before the first object */
9244 INT_PTR i, *ptr = (INT_PTR *)this-1;
9246 for(i=*ptr-1; i>=0; i--)
9247 basic_iostream_char_vbase_dtor(this+i);
9248 MSVCRT_operator_delete(ptr);
9250 basic_iostream_char_vbase_dtor(this);
9252 MSVCRT_operator_delete(this);
9258 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9260 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9263 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9265 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9268 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9269 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9270 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9271 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9273 basic_ios_wchar *basic_ios;
9275 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9278 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9279 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9280 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9281 basic_ios_wchar_ctor(basic_ios);
9283 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9286 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9287 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9289 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9293 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9294 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9295 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9296 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9297 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9299 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9300 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9304 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9305 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9306 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9307 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9308 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9309 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9311 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9313 TRACE("(%p)\n", this);
9314 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9315 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9318 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9319 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9320 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9321 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9322 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9323 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9325 TRACE("(%p)\n", this);
9326 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9327 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9330 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9331 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9333 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9335 TRACE("(%p %x)\n", this, flags);
9338 /* we have an array, with the number of elements stored before the first object */
9339 INT_PTR i, *ptr = (INT_PTR *)this-1;
9341 for(i=*ptr-1; i>=0; i--)
9342 basic_iostream_wchar_vbase_dtor(this+i);
9343 MSVCRT_operator_delete(ptr);
9345 basic_iostream_wchar_vbase_dtor(this);
9347 MSVCRT_operator_delete(this);
9353 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9355 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9358 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9360 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9363 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9364 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9365 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9366 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9368 basic_ios_char *basic_ios;
9370 TRACE("(%p %d)\n", this, virt_init);
9373 this->base.vbtable = basic_ofstream_char_vbtable;
9374 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9375 basic_ios_char_ctor(basic_ios);
9377 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9380 basic_filebuf_char_ctor(&this->filebuf);
9381 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9382 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9386 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9387 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9388 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9389 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9391 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9393 TRACE("(%p)\n", this);
9395 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9396 basic_filebuf_char_dtor(&this->filebuf);
9399 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9400 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9401 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9402 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9404 TRACE("(%p)\n", this);
9406 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9407 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9410 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9411 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9413 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9415 TRACE("(%p %x)\n", this, flags);
9418 /* we have an array, with the number of elements stored before the first object */
9419 INT_PTR i, *ptr = (INT_PTR *)this-1;
9421 for(i=*ptr-1; i>=0; i--)
9422 basic_ofstream_char_vbase_dtor(this+i);
9423 MSVCRT_operator_delete(ptr);
9425 basic_ofstream_char_vbase_dtor(this);
9427 MSVCRT_operator_delete(this);
9433 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9434 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9435 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9436 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9438 TRACE("(%p)\n", this);
9440 if(!basic_filebuf_char_close(&this->filebuf)) {
9441 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9442 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9446 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9447 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9448 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9449 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9451 TRACE("(%p)\n", this);
9452 return basic_filebuf_char_is_open(&this->filebuf);
9455 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9456 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9457 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9458 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9459 const char *name, int mode)
9461 TRACE("(%p %s %d)\n", this, name, mode);
9463 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9464 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9465 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9469 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9470 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9471 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9472 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9473 const char *name, short mode)
9475 basic_ofstream_char_open(this, name, mode);
9478 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9479 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9480 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9481 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9483 TRACE("(%p)\n", this);
9484 return (basic_filebuf_char*)&this->filebuf;
9487 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9489 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9492 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9494 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9497 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9498 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9499 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9501 basic_ios_wchar *basic_ios;
9503 TRACE("(%p %d)\n", this, virt_init);
9506 this->base.vbtable = basic_ofstream_wchar_vbtable;
9507 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9508 basic_ios_wchar_ctor(basic_ios);
9510 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9513 basic_filebuf_wchar_ctor(&this->filebuf);
9514 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9515 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9519 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9520 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9521 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9522 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9524 basic_ofstream_wchar_ctor(this, virt_init);
9525 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9529 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9530 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9531 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9532 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9533 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9534 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9536 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9538 TRACE("(%p)\n", this);
9540 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9541 basic_filebuf_wchar_dtor(&this->filebuf);
9544 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9545 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9546 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9547 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9548 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9549 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9551 TRACE("(%p)\n", this);
9553 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9554 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9557 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9558 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9560 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9562 TRACE("(%p %x)\n", this, flags);
9565 /* we have an array, with the number of elements stored before the first object */
9566 INT_PTR i, *ptr = (INT_PTR *)this-1;
9568 for(i=*ptr-1; i>=0; i--)
9569 basic_ofstream_wchar_vbase_dtor(this+i);
9570 MSVCRT_operator_delete(ptr);
9572 basic_ofstream_wchar_vbase_dtor(this);
9574 MSVCRT_operator_delete(this);
9580 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9581 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9582 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9583 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9584 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9585 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9587 TRACE("(%p)\n", this);
9589 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9590 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9591 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9595 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9596 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9597 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9598 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9599 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9600 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9602 TRACE("(%p)\n", this);
9603 return basic_filebuf_wchar_is_open(&this->filebuf);
9606 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9607 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9608 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9609 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9610 const char *name, int mode)
9612 TRACE("(%p %s %d)\n", this, name, mode);
9614 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9615 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9616 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9620 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9621 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9622 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9623 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9624 const char *name, int mode)
9626 basic_ofstream_wchar_open(this, name, mode);
9629 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9630 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9631 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9632 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9633 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9634 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9636 TRACE("(%p)\n", this);
9637 return (basic_filebuf_wchar*)&this->filebuf;
9640 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9642 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9645 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9647 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9650 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9651 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9652 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9653 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9655 basic_ios_char *basic_ios;
9657 TRACE("(%p %d)\n", this, virt_init);
9660 this->base.vbtable = basic_ifstream_char_vbtable;
9661 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9662 basic_ios_char_ctor(basic_ios);
9664 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9667 basic_filebuf_char_ctor(&this->filebuf);
9668 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9669 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9673 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9674 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9675 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9676 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9678 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9680 TRACE("(%p)\n", this);
9682 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9683 basic_filebuf_char_dtor(&this->filebuf);
9686 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9687 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9688 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9689 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9691 TRACE("(%p)\n", this);
9693 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9694 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9697 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9698 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9700 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9702 TRACE("(%p %x)\n", this, flags);
9705 /* we have an array, with the number of elements stored before the first object */
9706 INT_PTR i, *ptr = (INT_PTR *)this-1;
9708 for(i=*ptr-1; i>=0; i--)
9709 basic_ifstream_char_vbase_dtor(this+i);
9710 MSVCRT_operator_delete(ptr);
9712 basic_ifstream_char_vbase_dtor(this);
9714 MSVCRT_operator_delete(this);
9720 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9721 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9722 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9723 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9725 TRACE("(%p)\n", this);
9727 if(!basic_filebuf_char_close(&this->filebuf)) {
9728 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9729 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9733 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9734 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9735 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
9736 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
9738 TRACE("(%p)\n", this);
9739 return basic_filebuf_char_is_open(&this->filebuf);
9742 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9743 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9744 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
9745 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
9746 const char *name, int mode)
9748 TRACE("(%p %s %d)\n", this, name, mode);
9750 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9751 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9752 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9756 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9757 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9758 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
9759 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
9760 const char *name, short mode)
9762 basic_ifstream_char_open(this, name, mode);
9765 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9766 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9767 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
9768 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
9770 TRACE("(%p)\n", this);
9771 return (basic_filebuf_char*)&this->filebuf;
9774 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
9776 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
9779 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9781 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
9784 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9785 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9786 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9788 basic_ios_wchar *basic_ios;
9790 TRACE("(%p %d)\n", this, virt_init);
9793 this->base.vbtable = basic_ifstream_wchar_vbtable;
9794 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9795 basic_ios_wchar_ctor(basic_ios);
9797 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9800 basic_filebuf_wchar_ctor(&this->filebuf);
9801 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9802 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9806 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9807 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9808 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
9809 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9811 basic_ifstream_wchar_ctor(this, virt_init);
9812 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9816 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9817 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9818 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9819 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9820 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
9821 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
9823 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
9825 TRACE("(%p)\n", this);
9827 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
9828 basic_filebuf_wchar_dtor(&this->filebuf);
9831 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9832 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9833 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9834 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9835 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
9836 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
9838 TRACE("(%p)\n", this);
9840 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
9841 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
9844 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
9845 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9847 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
9849 TRACE("(%p %x)\n", this, flags);
9852 /* we have an array, with the number of elements stored before the first object */
9853 INT_PTR i, *ptr = (INT_PTR *)this-1;
9855 for(i=*ptr-1; i>=0; i--)
9856 basic_ifstream_wchar_vbase_dtor(this+i);
9857 MSVCRT_operator_delete(ptr);
9859 basic_ifstream_wchar_vbase_dtor(this);
9861 MSVCRT_operator_delete(this);
9867 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9868 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9869 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9870 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9871 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
9872 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
9874 TRACE("(%p)\n", this);
9876 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9877 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9878 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9882 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9883 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9884 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9885 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9886 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
9887 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
9889 TRACE("(%p)\n", this);
9890 return basic_filebuf_wchar_is_open(&this->filebuf);
9893 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9894 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9895 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
9896 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
9897 const char *name, int mode)
9899 TRACE("(%p %s %d)\n", this, name, mode);
9901 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9902 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9903 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9907 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9908 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9909 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
9910 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
9911 const char *name, short mode)
9913 basic_ifstream_wchar_open(this, name, mode);
9916 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9917 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9918 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9919 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9920 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
9921 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
9923 TRACE("(%p)\n", this);
9924 return (basic_filebuf_wchar*)&this->filebuf;
9927 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
9929 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
9932 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
9934 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
9937 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9938 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9939 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
9940 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
9942 basic_ios_char *basic_ios;
9944 TRACE("(%p %d)\n", this, virt_init);
9947 this->base.base1.vbtable = basic_fstream_char_vbtable1;
9948 this->base.base2.vbtable = basic_fstream_char_vbtable2;
9949 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
9950 basic_ios_char_ctor(basic_ios);
9952 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
9955 basic_filebuf_char_ctor(&this->filebuf);
9956 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
9957 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
9961 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9962 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9963 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
9964 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
9966 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
9968 TRACE("(%p)\n", this);
9970 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
9971 basic_filebuf_char_dtor(&this->filebuf);
9974 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9975 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9976 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
9977 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
9979 TRACE("(%p)\n", this);
9981 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
9982 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
9985 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
9986 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9988 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
9990 TRACE("(%p %x)\n", this, flags);
9993 /* we have an array, with the number of elements stored before the first object */
9994 INT_PTR i, *ptr = (INT_PTR *)this-1;
9996 for(i=*ptr-1; i>=0; i--)
9997 basic_fstream_char_vbase_dtor(this+i);
9998 MSVCRT_operator_delete(ptr);
10000 basic_fstream_char_vbase_dtor(this);
10002 MSVCRT_operator_delete(this);
10008 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10009 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10010 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10011 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10013 TRACE("(%p)\n", this);
10015 if(!basic_filebuf_char_close(&this->filebuf)) {
10016 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10017 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10021 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10022 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10023 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10024 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10026 TRACE("(%p)\n", this);
10027 return basic_filebuf_char_is_open(&this->filebuf);
10030 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10031 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10032 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10033 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10034 const char *name, int mode)
10036 TRACE("(%p %s %d)\n", this, name, mode);
10038 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10039 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10040 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10044 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10045 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10046 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10047 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10048 const char *name, int mode)
10050 basic_fstream_char_open(this, name, mode);
10053 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10054 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10055 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10056 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10058 TRACE("(%p)\n", this);
10059 return (basic_filebuf_char*)&this->filebuf;
10062 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10064 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10067 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10069 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10072 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10073 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10074 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10076 basic_ios_wchar *basic_ios;
10078 TRACE("(%p %d)\n", this, virt_init);
10081 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10082 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10083 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10084 basic_ios_wchar_ctor(basic_ios);
10086 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10089 basic_filebuf_wchar_ctor(&this->filebuf);
10090 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10091 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10095 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10096 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10097 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10098 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10100 basic_fstream_wchar_ctor(this, virt_init);
10101 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10105 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10106 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10107 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10108 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10109 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10110 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10112 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10114 TRACE("(%p)\n", this);
10116 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10117 basic_filebuf_wchar_dtor(&this->filebuf);
10120 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10121 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10122 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10123 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10124 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10125 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10127 TRACE("(%p)\n", this);
10129 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10130 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10133 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10134 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10136 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10138 TRACE("(%p %x)\n", this, flags);
10141 /* we have an array, with the number of elements stored before the first object */
10142 INT_PTR i, *ptr = (INT_PTR *)this-1;
10144 for(i=*ptr-1; i>=0; i--)
10145 basic_fstream_wchar_vbase_dtor(this+i);
10146 MSVCRT_operator_delete(ptr);
10148 basic_fstream_wchar_vbase_dtor(this);
10150 MSVCRT_operator_delete(this);
10156 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10157 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10158 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10159 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10160 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10161 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10163 TRACE("(%p)\n", this);
10165 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10166 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10167 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10171 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10172 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10173 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10174 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10175 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10176 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10178 TRACE("(%p)\n", this);
10179 return basic_filebuf_wchar_is_open(&this->filebuf);
10182 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10183 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10184 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10185 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10186 const char *name, int mode)
10188 TRACE("(%p %s %d)\n", this, name, mode);
10190 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10191 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10192 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10196 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10197 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10198 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10199 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10200 const char *name, int mode)
10202 basic_fstream_wchar_open(this, name, mode);
10205 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10206 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10207 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10208 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10209 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10210 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10212 TRACE("(%p)\n", this);
10213 return (basic_filebuf_wchar*)&this->filebuf;
10216 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10218 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10221 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10223 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10226 /* ??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 */
10227 /* ??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 */
10228 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10229 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10230 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10232 basic_ios_char *basic_ios;
10234 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10237 this->base.vbtable = basic_ostringstream_char_vbtable;
10238 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10239 basic_ios_char_ctor(basic_ios);
10241 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10244 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10245 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10246 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10250 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10251 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10252 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10253 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10254 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10256 basic_ios_char *basic_ios;
10258 TRACE("(%p %d %d)\n", this, mode, virt_init);
10261 this->base.vbtable = basic_ostringstream_char_vbtable;
10262 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10263 basic_ios_char_ctor(basic_ios);
10265 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10268 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10269 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10270 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10274 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10275 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10276 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
10277 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10278 basic_ostringstream_char *this, MSVCP_bool virt_init)
10280 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
10283 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10284 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10285 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10286 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10288 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10290 TRACE("(%p)\n", this);
10292 basic_stringbuf_char_dtor(&this->strbuf);
10293 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10296 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10297 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10298 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10299 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10301 TRACE("(%p)\n", this);
10303 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10304 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10307 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10308 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10310 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10312 TRACE("(%p %x)\n", this, flags);
10315 /* we have an array, with the number of elements stored before the first object */
10316 INT_PTR i, *ptr = (INT_PTR *)this-1;
10318 for(i=*ptr-1; i>=0; i--)
10319 basic_ostringstream_char_vbase_dtor(this+i);
10320 MSVCRT_operator_delete(ptr);
10322 basic_ostringstream_char_vbase_dtor(this);
10324 MSVCRT_operator_delete(this);
10330 /* ?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 */
10331 /* ?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 */
10332 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10333 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10335 TRACE("(%p)\n", this);
10336 return (basic_stringbuf_char*)&this->strbuf;
10339 /* ?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 */
10340 /* ?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 */
10341 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10342 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10344 TRACE("(%p %p)\n", this, str);
10345 basic_stringbuf_char_str_set(&this->strbuf, str);
10348 /* ?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 */
10349 /* ?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 */
10350 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10351 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10353 TRACE("(%p %p)\n", this, ret);
10354 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10357 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10359 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10362 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10364 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10367 /* ??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 */
10368 /* ??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 */
10369 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10370 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10372 basic_ios_wchar *basic_ios;
10374 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10377 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10378 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10379 basic_ios_wchar_ctor(basic_ios);
10381 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10384 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10385 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10386 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10390 /* ??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 */
10391 /* ??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 */
10392 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10393 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10394 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10396 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10397 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10401 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10402 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10403 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10404 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10406 basic_ios_wchar *basic_ios;
10408 TRACE("(%p %d %d)\n", this, mode, virt_init);
10411 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10412 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10413 basic_ios_wchar_ctor(basic_ios);
10415 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10418 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10419 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10420 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10424 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10425 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10426 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10427 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10428 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10430 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10431 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10435 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10436 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10437 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
10438 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10439 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
10441 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
10444 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10445 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10446 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10447 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10448 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10449 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10451 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10453 TRACE("(%p)\n", this);
10455 basic_stringbuf_wchar_dtor(&this->strbuf);
10456 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10459 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10460 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10461 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10462 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10463 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10464 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10466 TRACE("(%p)\n", this);
10468 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10469 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10472 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10473 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10475 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10477 TRACE("(%p %x)\n", this, flags);
10480 /* we have an array, with the number of elements stored before the first object */
10481 INT_PTR i, *ptr = (INT_PTR *)this-1;
10483 for(i=*ptr-1; i>=0; i--)
10484 basic_ostringstream_wchar_vbase_dtor(this+i);
10485 MSVCRT_operator_delete(ptr);
10487 basic_ostringstream_wchar_vbase_dtor(this);
10489 MSVCRT_operator_delete(this);
10495 /* ?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 */
10496 /* ?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 */
10497 /* ?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 */
10498 /* ?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 */
10499 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10500 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10502 TRACE("(%p)\n", this);
10503 return (basic_stringbuf_wchar*)&this->strbuf;
10506 /* ?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 */
10507 /* ?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 */
10508 /* ?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 */
10509 /* ?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 */
10510 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10511 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10513 TRACE("(%p %p)\n", this, str);
10514 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10517 /* ?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 */
10518 /* ?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 */
10519 /* ?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 */
10520 /* ?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 */
10521 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10522 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10524 TRACE("(%p %p)\n", this, ret);
10525 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10528 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10530 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10533 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10535 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10538 /* ??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 */
10539 /* ??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 */
10540 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10541 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10542 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10544 basic_ios_char *basic_ios;
10546 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10549 this->base.vbtable = basic_istringstream_char_vbtable;
10550 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10551 basic_ios_char_ctor(basic_ios);
10553 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10556 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10557 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10558 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10562 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10563 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10564 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
10565 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
10566 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
10568 basic_ios_char *basic_ios;
10570 TRACE("(%p %d %d)\n", this, mode, virt_init);
10573 this->base.vbtable = basic_istringstream_char_vbtable;
10574 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10575 basic_ios_char_ctor(basic_ios);
10577 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10580 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
10581 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10582 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10586 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10587 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10588 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
10589 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
10590 basic_istringstream_char *this, MSVCP_bool virt_init)
10592 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
10595 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10596 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10597 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
10598 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
10600 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10602 TRACE("(%p)\n", this);
10604 basic_stringbuf_char_dtor(&this->strbuf);
10605 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10608 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10609 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10610 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
10611 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
10613 TRACE("(%p)\n", this);
10615 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
10616 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10619 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
10620 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10622 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10624 TRACE("(%p %x)\n", this, flags);
10627 /* we have an array, with the number of elements stored before the first object */
10628 INT_PTR i, *ptr = (INT_PTR *)this-1;
10630 for(i=*ptr-1; i>=0; i--)
10631 basic_istringstream_char_vbase_dtor(this+i);
10632 MSVCRT_operator_delete(ptr);
10634 basic_istringstream_char_vbase_dtor(this);
10636 MSVCRT_operator_delete(this);
10642 /* ?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 */
10643 /* ?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 */
10644 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
10645 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
10647 TRACE("(%p)\n", this);
10648 return (basic_stringbuf_char*)&this->strbuf;
10651 /* ?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 */
10652 /* ?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 */
10653 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
10654 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
10656 TRACE("(%p %p)\n", this, str);
10657 basic_stringbuf_char_str_set(&this->strbuf, str);
10660 /* ?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 */
10661 /* ?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 */
10662 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
10663 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
10665 TRACE("(%p %p)\n", this, ret);
10666 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10669 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
10671 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
10674 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10676 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
10679 /* ??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 */
10680 /* ??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 */
10681 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
10682 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10684 basic_ios_wchar *basic_ios;
10686 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10689 this->base.vbtable = basic_istringstream_wchar_vbtable;
10690 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10691 basic_ios_wchar_ctor(basic_ios);
10693 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10696 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10697 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10698 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
10702 /* ??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 */
10703 /* ??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 */
10704 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
10705 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
10706 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10708 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
10709 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
10713 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10714 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10715 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
10716 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
10718 basic_ios_wchar *basic_ios;
10720 TRACE("(%p %d %d)\n", this, mode, virt_init);
10723 this->base.vbtable = basic_istringstream_wchar_vbtable;
10724 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10725 basic_ios_wchar_ctor(basic_ios);
10727 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10730 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
10731 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10732 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
10736 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10737 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10738 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
10739 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
10740 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
10742 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
10743 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
10747 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10748 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10749 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
10750 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
10751 basic_istringstream_wchar *this, MSVCP_bool virt_init)
10753 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
10756 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10757 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10758 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10759 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10760 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
10761 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
10763 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
10765 TRACE("(%p)\n", this);
10767 basic_stringbuf_wchar_dtor(&this->strbuf);
10768 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10771 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10772 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10773 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10774 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10775 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
10776 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
10778 TRACE("(%p)\n", this);
10780 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
10781 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10784 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
10785 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10787 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
10789 TRACE("(%p %x)\n", this, flags);
10792 /* we have an array, with the number of elements stored before the first object */
10793 INT_PTR i, *ptr = (INT_PTR *)this-1;
10795 for(i=*ptr-1; i>=0; i--)
10796 basic_istringstream_wchar_vbase_dtor(this+i);
10797 MSVCRT_operator_delete(ptr);
10799 basic_istringstream_wchar_vbase_dtor(this);
10801 MSVCRT_operator_delete(this);
10807 /* ?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 */
10808 /* ?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 */
10809 /* ?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 */
10810 /* ?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 */
10811 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
10812 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
10814 TRACE("(%p)\n", this);
10815 return (basic_stringbuf_wchar*)&this->strbuf;
10818 /* ?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 */
10819 /* ?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 */
10820 /* ?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 */
10821 /* ?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 */
10822 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
10823 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
10825 TRACE("(%p %p)\n", this, str);
10826 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10829 /* ?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 */
10830 /* ?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 */
10831 /* ?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 */
10832 /* ?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 */
10833 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
10834 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
10836 TRACE("(%p %p)\n", this, ret);
10837 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10840 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
10842 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
10845 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
10847 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
10850 /* ??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 */
10851 /* ??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 */
10852 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
10853 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
10854 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10856 basic_ios_char *basic_ios;
10858 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10861 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
10862 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
10863 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10864 basic_ios_char_ctor(basic_ios);
10866 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10869 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
10870 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
10871 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
10875 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10876 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10877 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
10878 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
10879 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
10881 basic_ios_char *basic_ios;
10883 TRACE("(%p %d %d)\n", this, mode, virt_init);
10886 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
10887 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
10888 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10889 basic_ios_char_ctor(basic_ios);
10891 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10894 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
10895 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
10896 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
10900 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10901 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10902 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
10903 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
10904 basic_stringstream_char *this, MSVCP_bool virt_init)
10906 return basic_stringstream_char_ctor_mode(
10907 this, OPENMODE_out|OPENMODE_in, virt_init);
10910 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10911 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10912 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
10913 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
10915 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
10917 TRACE("(%p)\n", this);
10919 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10920 basic_stringbuf_char_dtor(&this->strbuf);
10923 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10924 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10925 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
10926 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
10928 TRACE("(%p)\n", this);
10930 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
10931 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10934 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
10935 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10937 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
10939 TRACE("(%p %x)\n", this, flags);
10942 /* we have an array, with the number of elements stored before the first object */
10943 INT_PTR i, *ptr = (INT_PTR *)this-1;
10945 for(i=*ptr-1; i>=0; i--)
10946 basic_stringstream_char_vbase_dtor(this+i);
10947 MSVCRT_operator_delete(ptr);
10949 basic_stringstream_char_vbase_dtor(this);
10951 MSVCRT_operator_delete(this);
10957 /* ?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 */
10958 /* ?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 */
10959 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
10960 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
10962 TRACE("(%p)\n", this);
10963 return (basic_stringbuf_char*)&this->strbuf;
10966 /* ?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 */
10967 /* ?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 */
10968 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
10969 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
10971 TRACE("(%p %p)\n", this, str);
10972 basic_stringbuf_char_str_set(&this->strbuf, str);
10975 /* ?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 */
10976 /* ?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 */
10977 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
10978 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
10980 TRACE("(%p %p)\n", this, ret);
10981 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10984 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
10986 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
10989 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10991 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
10994 /* ??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 */
10995 /* ??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 */
10996 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
10997 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10999 basic_ios_wchar *basic_ios;
11001 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11004 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11005 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11006 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11007 basic_ios_wchar_ctor(basic_ios);
11009 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11012 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11013 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11014 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11018 /* ??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 */
11019 /* ??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 */
11020 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11021 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11022 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11024 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11025 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11029 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11030 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11031 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11032 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11034 basic_ios_wchar *basic_ios;
11036 TRACE("(%p %d %d)\n", this, mode, virt_init);
11039 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11040 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11041 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11042 basic_ios_wchar_ctor(basic_ios);
11044 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11047 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11048 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11049 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11053 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11054 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11055 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11056 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11057 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11059 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11060 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11064 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11065 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11066 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
11067 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11068 basic_stringstream_wchar *this, MSVCP_bool virt_init)
11070 return basic_stringstream_short_ctor_mode(
11071 this, OPENMODE_out|OPENMODE_in, virt_init);
11074 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11075 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11076 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11077 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11078 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11079 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11081 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11083 TRACE("(%p)\n", this);
11085 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11086 basic_stringbuf_wchar_dtor(&this->strbuf);
11089 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11090 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11091 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11092 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11093 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11094 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11096 TRACE("(%p)\n", this);
11098 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11099 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11102 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11103 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11105 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11107 TRACE("(%p %x)\n", this, flags);
11110 /* we have an array, with the number of elements stored before the first object */
11111 INT_PTR i, *ptr = (INT_PTR *)this-1;
11113 for(i=*ptr-1; i>=0; i--)
11114 basic_stringstream_wchar_vbase_dtor(this+i);
11115 MSVCRT_operator_delete(ptr);
11117 basic_stringstream_wchar_vbase_dtor(this);
11119 MSVCRT_operator_delete(this);
11125 /* ?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 */
11126 /* ?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 */
11127 /* ?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 */
11128 /* ?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 */
11129 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11130 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11132 TRACE("(%p)\n", this);
11133 return (basic_stringbuf_wchar*)&this->strbuf;
11136 /* ?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 */
11137 /* ?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 */
11138 /* ?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 */
11139 /* ?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 */
11140 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11141 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11143 TRACE("(%p %p)\n", this, str);
11144 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11147 /* ?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 */
11148 /* ?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 */
11149 /* ?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 */
11150 /* ?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 */
11151 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11152 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11154 TRACE("(%p %p)\n", this, ret);
11155 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11158 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11159 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11160 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11161 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11163 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11165 this->minsize = 32;
11166 this->endsave = NULL;
11167 this->strmode = mode;
11168 this->palloc = NULL;
11169 this->pfree = NULL;
11172 this->strmode |= STRSTATE_Dynamic;
11173 if(len > this->minsize)
11174 this->minsize = len;
11175 this->seekhigh = NULL;
11184 this->seekhigh = g+len;
11185 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11187 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11190 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11191 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11192 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11193 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11195 TRACE("(%p)\n", this);
11197 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11199 this->pfree(basic_streambuf_char_eback(&this->base));
11201 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11204 this->endsave = NULL;
11205 this->seekhigh = NULL;
11206 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11207 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11208 basic_streambuf_char_setp(&this->base, NULL, NULL);
11211 /* ??1strstreambuf@std@@UAE@XZ */
11212 /* ??1strstreambuf@std@@UEAA@XZ */
11213 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11214 void __thiscall strstreambuf_dtor(strstreambuf *this)
11216 TRACE("(%p)\n", this);
11218 strstreambuf__Tidy(this);
11219 basic_streambuf_char_dtor(&this->base);
11222 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11223 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11225 TRACE("(%p %x)\n", this, flags);
11227 /* we have an array, with the number of elements stored before the first object */
11228 INT_PTR i, *ptr = (INT_PTR *)this-1;
11230 for(i=*ptr-1; i>=0; i--)
11231 strstreambuf_dtor(this+i);
11232 MSVCRT_operator_delete(ptr);
11234 strstreambuf_dtor(this);
11236 MSVCRT_operator_delete(this);
11242 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11243 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11244 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11245 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11247 TRACE("(%p %d)\n", this, freeze);
11249 if(!freeze == !(this->strmode *STRSTATE_Frozen))
11253 this->strmode |= STRSTATE_Frozen;
11254 this->endsave = basic_streambuf_char_epptr(&this->base);
11255 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11256 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11258 this->strmode &= ~STRSTATE_Frozen;
11259 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11260 basic_streambuf_char_pptr(&this->base), this->endsave);
11264 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11265 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11266 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11267 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11269 MSVCP_size_t old_size, size;
11272 TRACE("(%p %d)\n", this, c);
11277 if(this->strmode & STRSTATE_Frozen)
11280 ptr = basic_streambuf_char_pptr(&this->base);
11281 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11282 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11284 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11287 ptr = basic_streambuf_char_eback(&this->base);
11288 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11290 size = old_size + old_size/2;
11291 if(size < this->minsize)
11292 size = this->minsize;
11295 buf = this->palloc(size);
11297 buf = MSVCRT_operator_new(size);
11301 memcpy(buf, ptr, old_size);
11302 if(this->strmode & STRSTATE_Allocated) {
11306 MSVCRT_operator_delete(ptr);
11309 this->strmode |= STRSTATE_Allocated;
11311 this->seekhigh = buf;
11312 basic_streambuf_char_setp(&this->base, buf, buf+size);
11313 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11315 this->seekhigh = this->seekhigh-ptr+buf;
11316 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11317 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11318 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11319 basic_streambuf_char_pptr(&this->base));
11322 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11325 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11326 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11327 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11328 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11330 char *ptr = basic_streambuf_char_gptr(&this->base);
11332 TRACE("(%p %d)\n", this, c);
11334 if(ptr<=basic_streambuf_char_eback(&this->base)
11335 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11338 basic_streambuf_char_gbump(&this->base, -1);
11341 if(this->strmode & STRSTATE_Constant)
11342 return (unsigned char)c;
11344 return (unsigned char)(ptr[0] = c);
11347 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
11348 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
11349 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11350 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11352 char *eback = basic_streambuf_char_eback(&this->base);
11353 char *pptr = basic_streambuf_char_pptr(&this->base);
11354 char *gptr = basic_streambuf_char_gptr(&this->base);
11356 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11361 if(pptr > this->seekhigh)
11362 this->seekhigh = pptr;
11364 if((mode & OPENMODE_in) && gptr) {
11365 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11367 else if(way == SEEKDIR_end)
11368 off += this->seekhigh-eback;
11369 else if(way != SEEKDIR_beg)
11372 if(off<0 || off>this->seekhigh-eback) {
11375 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11376 if((mode & OPENMODE_out) && pptr) {
11377 basic_streambuf_char_setp_next(&this->base, eback,
11378 gptr, basic_streambuf_char_epptr(&this->base));
11381 }else if((mode & OPENMODE_out) && pptr) {
11382 if(way == SEEKDIR_cur)
11384 else if(way == SEEKDIR_end)
11385 off += this->seekhigh-eback;
11386 else if(way != SEEKDIR_beg)
11389 if(off<0 || off>this->seekhigh-eback)
11392 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11401 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11402 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11403 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11404 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11406 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11408 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
11413 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11416 /* ?underflow@strstreambuf@std@@MAEHXZ */
11417 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11418 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11419 int __thiscall strstreambuf_underflow(strstreambuf *this)
11421 char *gptr = basic_streambuf_char_gptr(&this->base);
11424 TRACE("(%p)\n", this);
11429 if(gptr < basic_streambuf_char_egptr(&this->base))
11430 return (unsigned char)(*gptr);
11432 pptr = basic_streambuf_char_gptr(&this->base);
11433 if(pptr > this->seekhigh)
11434 this->seekhigh = pptr;
11436 if(this->seekhigh <= gptr)
11439 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11440 gptr, this->seekhigh);
11441 return (unsigned char)(*gptr);
11444 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
11446 ios_base_precision_set(base, prec);
11449 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
11450 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11451 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
11453 TRACE("(%p %ld)\n", ret, prec);
11455 ret->pfunc = setprecision_func;
11460 static void __cdecl setw_func(ios_base *base, streamsize width)
11462 ios_base_width_set(base, width);
11465 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
11466 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11467 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
11469 TRACE("(%p %ld)\n", ret, width);
11471 ret->pfunc = setw_func;
11476 static void __cdecl resetioflags_func(ios_base *base, int mask)
11478 ios_base_setf_mask(base, 0, mask);
11481 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11482 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
11484 TRACE("(%p %d)\n", ret, mask);
11486 ret->pfunc = resetioflags_func;
11491 static void __cdecl setiosflags_func(ios_base *base, int mask)
11493 ios_base_setf_mask(base, FMTFLAG_mask, mask);
11496 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11497 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
11499 TRACE("(%p %d)\n", ret, mask);
11501 ret->pfunc = setiosflags_func;
11506 static void __cdecl setbase_func(ios_base *base, int set_base)
11509 set_base = FMTFLAG_dec;
11510 else if(set_base == 8)
11511 set_base = FMTFLAG_oct;
11512 else if(set_base == 16)
11513 set_base = FMTFLAG_hex;
11517 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
11520 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
11521 manip_int* __cdecl setbase(manip_int *ret, int base)
11523 TRACE("(%p %d)\n", ret, base);
11525 ret->pfunc = setbase_func;
11530 static basic_filebuf_char filebuf_char_stdin;
11531 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
11533 basic_istream_char obj;
11534 basic_ios_char vbase;
11536 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
11537 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
11538 basic_istream_char *_Ptr_cin = &cin.obj;
11540 static basic_filebuf_wchar filebuf_short_stdin;
11541 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
11543 basic_istream_wchar obj;
11544 basic_ios_wchar vbase;
11545 } ucin = { { 0 } };
11546 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
11547 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
11548 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
11550 static basic_filebuf_wchar filebuf_wchar_stdin;
11551 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
11553 basic_istream_wchar obj;
11554 basic_ios_wchar vbase;
11555 } wcin = { { 0 } };
11556 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
11557 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
11558 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
11560 static basic_filebuf_char filebuf_char_stdout;
11561 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11563 basic_ostream_char obj;
11564 basic_ios_char vbase;
11565 } cout = { { 0 } };
11566 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11567 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
11568 basic_ostream_char *_Ptr_cout = &cout.obj;
11570 static basic_filebuf_wchar filebuf_short_stdout;
11571 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11573 basic_ostream_wchar obj;
11574 basic_ios_wchar vbase;
11575 } ucout = { { 0 } };
11576 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11577 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
11578 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
11580 static basic_filebuf_wchar filebuf_wchar_stdout;
11581 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11583 basic_ostream_wchar obj;
11584 basic_ios_wchar vbase;
11585 } wcout = { { 0 } };
11586 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11587 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
11588 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
11590 static basic_filebuf_char filebuf_char_stderr;
11591 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11593 basic_ostream_char obj;
11594 basic_ios_char vbase;
11595 } cerr = { { 0 } };
11596 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11597 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
11598 basic_ostream_char *_Ptr_cerr = &cerr.obj;
11600 static basic_filebuf_wchar filebuf_short_stderr;
11601 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11603 basic_ostream_wchar obj;
11604 basic_ios_wchar vbase;
11605 } ucerr = { { 0 } };
11606 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11607 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
11608 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
11610 static basic_filebuf_wchar filebuf_wchar_stderr;
11611 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11613 basic_ostream_wchar obj;
11614 basic_ios_wchar vbase;
11615 } wcerr = { { 0 } };
11616 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11617 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
11618 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
11620 static basic_filebuf_char filebuf_char_log;
11621 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11623 basic_ostream_char obj;
11624 basic_ios_char vbase;
11625 } clog = { { 0 } };
11626 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
11627 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
11628 basic_ostream_char *_Ptr_clog = &clog.obj;
11630 static basic_filebuf_wchar filebuf_short_log;
11631 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11633 basic_ostream_wchar obj;
11634 basic_ios_wchar vbase;
11635 } uclog = { { 0 } };
11636 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
11637 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
11638 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
11640 static basic_filebuf_wchar filebuf_wchar_log;
11641 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11643 basic_ostream_wchar obj;
11644 basic_ios_wchar vbase;
11645 } wclog = { { 0 } };
11646 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
11647 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
11648 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
11650 /* ?_Init_cnt@Init@ios_base@std@@0HA */
11651 int ios_base_Init__Init_cnt = -1;
11653 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
11654 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
11655 static void ios_base_Init__Init_ctor(void *this)
11657 TRACE("(%p)\n", this);
11659 if(ios_base_Init__Init_cnt < 0)
11660 ios_base_Init__Init_cnt = 1;
11662 ios_base_Init__Init_cnt++;
11665 /* ??0Init@ios_base@std@@QAE@XZ */
11666 /* ??0Init@ios_base@std@@QEAA@XZ */
11667 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
11668 void* __thiscall ios_base_Init_ctor(void *this)
11670 ios_base_Init__Init_ctor(this);
11674 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
11675 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
11676 static void ios_base_Init__Init_dtor(void *this)
11678 TRACE("(%p)\n", this);
11680 ios_base_Init__Init_cnt--;
11681 if(!ios_base_Init__Init_cnt) {
11682 basic_ostream_char_flush(&cout.obj);
11683 basic_ostream_char_flush(&cerr.obj);
11684 basic_ostream_char_flush(&clog.obj);
11688 /* ??1Init@ios_base@std@@QAE@XZ */
11689 /* ??1Init@ios_base@std@@QEAA@XZ */
11690 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
11691 void __thiscall ios_base_Init_dtor(void *this)
11693 ios_base_Init__Init_dtor(this);
11696 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
11697 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
11698 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
11699 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
11701 TRACE("(%p %p)\n", this, rhs);
11705 /* ?_Init_cnt@_Winit@std@@0HA */
11706 int _Winit__Init_cnt = -1;
11708 /* ??0_Winit@std@@QAE@XZ */
11709 /* ??0_Winit@std@@QEAA@XZ */
11710 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
11711 void* __thiscall _Winit_ctor(void *this)
11713 TRACE("(%p)\n", this);
11715 if(_Winit__Init_cnt < 0)
11716 _Winit__Init_cnt = 1;
11718 _Winit__Init_cnt++;
11723 /* ??1_Winit@std@@QAE@XZ */
11724 /* ??1_Winit@std@@QAE@XZ */
11725 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
11726 void __thiscall _Winit_dtor(void *this)
11728 TRACE("(%p)\n", this);
11730 _Winit__Init_cnt--;
11731 if(!_Winit__Init_cnt) {
11732 basic_ostream_wchar_flush(&wcout.obj);
11733 basic_ostream_wchar_flush(&wcerr.obj);
11734 basic_ostream_wchar_flush(&wclog.obj);
11738 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
11739 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
11740 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
11741 void* __thiscall _Winit_op_assign(void *this, void *rhs)
11743 TRACE("(%p %p)\n", this, rhs);
11747 void init_io(void *base)
11750 init_iosb_rtti(base);
11751 init_ios_base_rtti(base);
11752 init_basic_ios_char_rtti(base);
11753 init_basic_ios_wchar_rtti(base);
11754 init_basic_ios_short_rtti(base);
11755 init_basic_streambuf_char_rtti(base);
11756 init_basic_streambuf_wchar_rtti(base);
11757 init_basic_streambuf_short_rtti(base);
11758 init_basic_filebuf_char_rtti(base);
11759 init_basic_filebuf_wchar_rtti(base);
11760 init_basic_filebuf_short_rtti(base);
11761 init_basic_stringbuf_char_rtti(base);
11762 init_basic_stringbuf_wchar_rtti(base);
11763 init_basic_stringbuf_short_rtti(base);
11764 init_basic_ostream_char_rtti(base);
11765 init_basic_ostream_wchar_rtti(base);
11766 init_basic_ostream_short_rtti(base);
11767 init_basic_istream_char_rtti(base);
11768 init_basic_istream_wchar_rtti(base);
11769 init_basic_istream_short_rtti(base);
11770 init_basic_iostream_char_rtti(base);
11771 init_basic_iostream_wchar_rtti(base);
11772 init_basic_iostream_short_rtti(base);
11773 init_basic_ofstream_char_rtti(base);
11774 init_basic_ofstream_wchar_rtti(base);
11775 init_basic_ofstream_short_rtti(base);
11776 init_basic_ifstream_char_rtti(base);
11777 init_basic_ifstream_wchar_rtti(base);
11778 init_basic_ifstream_short_rtti(base);
11779 init_basic_fstream_char_rtti(base);
11780 init_basic_fstream_wchar_rtti(base);
11781 init_basic_fstream_short_rtti(base);
11782 init_basic_ostringstream_char_rtti(base);
11783 init_basic_ostringstream_wchar_rtti(base);
11784 init_basic_ostringstream_short_rtti(base);
11785 init_basic_istringstream_char_rtti(base);
11786 init_basic_istringstream_wchar_rtti(base);
11787 init_basic_istringstream_short_rtti(base);
11788 init_basic_stringstream_char_rtti(base);
11789 init_basic_stringstream_wchar_rtti(base);
11790 init_basic_stringstream_short_rtti(base);
11791 init_strstreambuf_rtti(base);
11794 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
11795 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
11797 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
11798 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
11800 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
11801 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
11803 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
11804 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
11806 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
11807 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
11809 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
11810 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
11812 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
11813 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
11815 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
11816 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
11818 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
11819 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
11821 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
11822 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
11824 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
11825 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
11827 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
11828 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
11833 basic_istream_char_vbase_dtor(&cin.obj);
11834 basic_filebuf_char_dtor(&filebuf_char_stdin);
11836 basic_istream_wchar_vbase_dtor(&ucin.obj);
11837 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
11839 basic_istream_wchar_vbase_dtor(&wcin.obj);
11840 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
11842 basic_ostream_char_vbase_dtor(&cout.obj);
11843 basic_filebuf_char_dtor(&filebuf_char_stdout);
11845 basic_ostream_wchar_vbase_dtor(&ucout.obj);
11846 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
11848 basic_ostream_wchar_vbase_dtor(&wcout.obj);
11849 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
11851 basic_ostream_char_vbase_dtor(&cerr.obj);
11852 basic_filebuf_char_dtor(&filebuf_char_stderr);
11854 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
11855 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
11857 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
11858 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
11860 basic_ostream_char_vbase_dtor(&clog.obj);
11861 basic_filebuf_char_dtor(&filebuf_char_log);
11863 basic_ostream_wchar_vbase_dtor(&uclog.obj);
11864 basic_filebuf_wchar_dtor(&filebuf_short_log);
11866 basic_ostream_wchar_vbase_dtor(&wclog.obj);
11867 basic_filebuf_wchar_dtor(&filebuf_wchar_log);