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(%s %s %d)", wine_dbgstr_longlong(fpos->off), wine_dbgstr_longlong(fpos->pos), fpos->state);
49 void (__cdecl *pfunc)(ios_base*, streamsize);
57 } basic_filebuf__Initfl;
60 basic_streambuf_char base;
70 basic_streambuf_wchar base;
77 } basic_filebuf_wchar;
80 STRINGBUF_allocated = 1,
81 STRINGBUF_no_write = 2,
82 STRINGBUF_no_read = 4,
85 } basic_stringbuf_state;
88 basic_streambuf_char base;
91 char allocator; /* empty struct */
92 } basic_stringbuf_char;
95 basic_streambuf_wchar base;
98 char allocator; /* empty struct */
99 } basic_stringbuf_wchar;
103 basic_streambuf_char *strbuf;
104 struct _basic_ostream_char *stream;
110 basic_streambuf_wchar *strbuf;
111 struct _basic_ostream_wchar *stream;
115 typedef struct _basic_ostream_char {
117 /* virtual inheritance
118 * basic_ios_char basic_ios;
120 } basic_ostream_char;
122 typedef struct _basic_ostream_wchar {
124 /* virtual inheritance
125 * basic_ios_wchar basic_ios;
127 } basic_ostream_wchar;
132 /* virtual inheritance
133 * basic_ios_char basic_ios;
135 } basic_istream_char;
140 /* virtual inheritance
141 * basic_ios_wchar basic_ios;
143 } basic_istream_wchar;
146 basic_istream_char base1;
147 basic_ostream_char base2;
148 /* virtual inheritance
149 * basic_ios_char basic_ios;
151 } basic_iostream_char;
154 basic_istream_wchar base1;
155 basic_ostream_wchar base2;
156 /* virtual inheritance
157 * basic_ios_wchar basic_ios;
159 } basic_iostream_wchar;
162 basic_ostream_char base;
163 basic_filebuf_char filebuf;
164 /* virtual inheritance
165 * basic_ios_char basic_ios;
167 } basic_ofstream_char;
170 basic_ostream_wchar base;
171 basic_filebuf_wchar filebuf;
172 /* virtual inheritance
173 * basic_ios_wchar basic_ios;
175 } basic_ofstream_wchar;
178 basic_istream_char base;
179 basic_filebuf_char filebuf;
180 /* virtual inheritance
181 * basic_ios_char basic_ios;
183 } basic_ifstream_char;
186 basic_istream_wchar base;
187 basic_filebuf_wchar filebuf;
188 /* virtual inheritance
189 * basic_ios_wchar basic_ios;
191 } basic_ifstream_wchar;
194 basic_iostream_char base;
195 basic_filebuf_char filebuf;
196 /* virtual inheritance
197 * basic_ios_char basic_ios;
199 } basic_fstream_char;
202 basic_iostream_wchar base;
203 basic_filebuf_wchar filebuf;
204 /* virtual inheritance
205 * basic_ios_char basic_ios;
207 } basic_fstream_wchar;
210 basic_ostream_char base;
211 basic_stringbuf_char strbuf;
212 /* virtual inheritance
213 * basic_ios_char basic_ios;
215 } basic_ostringstream_char;
218 basic_ostream_wchar base;
219 basic_stringbuf_wchar strbuf;
220 /* virtual inheritance
221 * basic_ios_wchar basic_ios;
223 } basic_ostringstream_wchar;
226 basic_istream_char base;
227 basic_stringbuf_char strbuf;
228 /* virtual inheritance
229 * basic_ios_char basic_ios;
231 } basic_istringstream_char;
234 basic_istream_wchar base;
235 basic_stringbuf_wchar strbuf;
236 /* virtual inheritance
237 * basic_ios_wchar basic_ios;
239 } basic_istringstream_wchar;
242 basic_iostream_char base;
243 basic_stringbuf_char strbuf;
244 /* virtual inheritance
245 * basic_ios_char basic_ios;
247 } basic_stringstream_char;
250 basic_iostream_wchar base;
251 basic_stringbuf_wchar strbuf;
252 /* virtual inheritance
253 * basic_ios_wchar basic_ios;
255 } basic_stringstream_wchar;
258 STRSTATE_Allocated = 1,
259 STRSTATE_Constant = 2,
260 STRSTATE_Dynamic = 4,
262 } strstreambuf__Strstate;
265 basic_streambuf_char base;
270 void* (__cdecl *palloc)(MSVCP_size_t);
271 void (__cdecl *pfree)(void*);
274 extern const vtable_ptr MSVCP_iosb_vtable;
276 /* ??_7ios_base@std@@6B@ */
277 extern const vtable_ptr MSVCP_ios_base_vtable;
279 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
280 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
282 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
283 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
285 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
286 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
288 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
289 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
291 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
292 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
294 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
295 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
297 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
298 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
300 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
301 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
303 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
304 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
306 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
307 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
309 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
310 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
312 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
313 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
315 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
316 const int basic_ostream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_char), 8)};
317 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
318 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
320 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
321 const int basic_ostream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar), 8)};
322 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
323 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
325 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
326 const int basic_ostream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar), 8)};
327 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
328 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
330 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
331 const int basic_istream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istream_char), 8)};
332 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
333 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
335 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
336 const int basic_istream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar), 8)};
337 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
338 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
340 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
341 const int basic_istream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar), 8)};
342 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
343 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
345 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
346 const int basic_iostream_char_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char), 8)};
347 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
348 const int basic_iostream_char_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char), 8)-FIELD_OFFSET(basic_iostream_char, base2)};
349 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
350 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
352 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
353 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
354 const int basic_iostream_wchar_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar), 8)};
355 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
356 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
357 const int basic_iostream_wchar_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar), 8)-FIELD_OFFSET(basic_iostream_wchar, base2)};
358 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
359 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
360 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
361 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
363 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
364 const int basic_ofstream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ofstream_char), 8)};
365 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
366 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
368 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
369 const int basic_ofstream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ofstream_wchar), 8)};
370 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
371 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
373 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
374 const int basic_ofstream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ofstream_wchar), 8)};
375 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
376 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
378 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
379 const int basic_ifstream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ifstream_char), 8)};
380 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
381 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
383 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
384 const int basic_ifstream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ifstream_wchar), 8)};
385 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
386 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
388 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
389 const int basic_ifstream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ifstream_wchar), 8)};
390 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
391 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
393 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
394 const int basic_fstream_char_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_fstream_char), 8)};
395 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
396 const int basic_fstream_char_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_fstream_char), 8)-FIELD_OFFSET(basic_fstream_char, base.base2)};
397 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
398 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
400 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
401 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
402 const int basic_fstream_wchar_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_fstream_wchar), 8)};
403 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
404 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
405 const int basic_fstream_wchar_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_fstream_wchar), 8)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
406 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
407 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
408 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
409 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
411 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
412 const int basic_ostringstream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostringstream_char), 8)};
413 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
414 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
416 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
417 const int basic_ostringstream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostringstream_wchar), 8)};
418 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
419 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
421 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
422 const int basic_ostringstream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_ostringstream_wchar), 8)};
423 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
424 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
426 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
427 const int basic_istringstream_char_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istringstream_char), 8)};
428 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
429 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
431 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
432 const int basic_istringstream_wchar_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istringstream_wchar), 8)};
433 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
434 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
436 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
437 const int basic_istringstream_short_vbtable[] = {0, ALIGNED_SIZE(sizeof(basic_istringstream_wchar), 8)};
438 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
439 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
441 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
442 const int basic_stringstream_char_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_char), 8)};
443 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
444 const int basic_stringstream_char_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_char), 8)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
445 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
446 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
448 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
449 const int basic_stringstream_wchar_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_wchar), 8)};
450 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
451 const int basic_stringstream_wchar_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_wchar), 8)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
452 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
453 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
455 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
456 const int basic_stringstream_short_vbtable1[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_wchar), 8)};
457 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
458 const int basic_stringstream_short_vbtable2[] = {0, ALIGNED_SIZE(sizeof(basic_stringstream_wchar), 8)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
459 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
460 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
462 /* ??_7strstreambuf@std@@6B */
463 extern const vtable_ptr MSVCP_strstreambuf_vtable;
465 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@");
466 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@");
467 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
468 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
469 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
470 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
471 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
472 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
473 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
474 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
475 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
476 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
477 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
478 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
479 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
480 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@");
481 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
482 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@");
483 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
484 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
485 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
486 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
487 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
488 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
489 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
490 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
491 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
492 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
493 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
494 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
495 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
496 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@");
497 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
498 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
499 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@");
500 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
501 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
502 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
503 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
504 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
505 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@");
506 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
507 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
508 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@");
509 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
510 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
511 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
512 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
513 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
514 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
515 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
516 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
517 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
518 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
519 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
520 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@");
521 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
522 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
523 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
524 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
525 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
526 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@");
527 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
528 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
529 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
530 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
531 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
532 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
533 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
534 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@");
535 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
536 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
537 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
538 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@");
539 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
540 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
541 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
542 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
543 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
544 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
545 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
546 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@");
547 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
548 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
549 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
550 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@");
551 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
552 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
553 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
554 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
555 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
556 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
557 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
558 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
559 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
560 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
561 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
562 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@");
563 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
564 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
565 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
566 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
567 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
568 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@");
569 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
570 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
571 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
572 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
573 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
574 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
575 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
576 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
577 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
578 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
579 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
580 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
581 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
582 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
583 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
584 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
585 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
586 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
587 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
588 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
589 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
590 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
591 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
592 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
593 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
594 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
595 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
596 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
597 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
598 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
599 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
600 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
601 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
602 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
603 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
604 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
605 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
606 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
607 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
608 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
609 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
610 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
611 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
612 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@");
615 void __asm_dummy_vtables(void) {
618 VTABLE_ADD_FUNC(iosb_vector_dtor));
619 __ASM_VTABLE(ios_base,
620 VTABLE_ADD_FUNC(ios_base_vector_dtor));
621 __ASM_VTABLE(basic_ios_char,
622 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
623 __ASM_VTABLE(basic_ios_wchar,
624 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
625 __ASM_VTABLE(basic_ios_short,
626 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
627 __ASM_VTABLE(basic_streambuf_char,
628 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
629 VTABLE_ADD_FUNC(basic_streambuf_char__Lock)
630 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock)
631 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
632 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
633 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
634 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
635 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
636 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
637 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
638 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
639 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
640 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
641 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
642 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
643 __ASM_VTABLE(basic_streambuf_wchar,
644 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
645 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
646 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
647 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
648 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
649 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
650 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
651 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
652 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
653 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
654 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
655 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
656 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
657 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
658 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
659 __ASM_VTABLE(basic_streambuf_short,
660 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
661 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
662 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
663 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
664 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
665 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
666 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
667 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
668 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
669 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
670 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
671 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
672 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
673 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
674 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
675 __ASM_VTABLE(basic_filebuf_char,
676 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
677 VTABLE_ADD_FUNC(basic_streambuf_char__Lock)
678 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock)
679 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
680 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
681 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
682 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
683 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
684 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
685 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
686 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
687 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
688 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
689 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
690 VTABLE_ADD_FUNC(basic_filebuf_char_imbue));
691 __ASM_VTABLE(basic_filebuf_wchar,
692 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
693 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
694 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
695 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
696 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
697 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
698 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
699 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
700 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
701 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
702 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
703 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
704 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
705 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
706 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue));
707 __ASM_VTABLE(basic_filebuf_short,
708 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
710 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
711 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
712 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
713 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
714 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
715 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
716 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
717 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
718 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
719 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
720 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
721 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
722 VTABLE_ADD_FUNC(basic_filebuf_short_imbue));
723 __ASM_VTABLE(basic_stringbuf_char,
724 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
725 VTABLE_ADD_FUNC(basic_streambuf_char__Lock)
726 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock)
727 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
728 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
729 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
730 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
731 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
732 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
733 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
734 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
735 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
736 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
737 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
738 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
739 __ASM_VTABLE(basic_stringbuf_wchar,
740 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
741 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
742 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
743 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
744 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
745 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
746 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
747 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
748 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
749 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
750 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
751 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
752 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
753 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
754 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
755 __ASM_VTABLE(basic_stringbuf_short,
756 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
757 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock)
758 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock)
759 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
760 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
761 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
762 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
763 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
764 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
765 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
766 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
767 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
768 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
769 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
770 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
771 __ASM_VTABLE(basic_ostream_char,
772 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
773 __ASM_VTABLE(basic_ostream_wchar,
774 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
775 __ASM_VTABLE(basic_ostream_short,
776 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
777 __ASM_VTABLE(basic_istream_char,
778 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
779 __ASM_VTABLE(basic_istream_wchar,
780 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
781 __ASM_VTABLE(basic_istream_short,
782 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
783 __ASM_VTABLE(basic_iostream_char,
784 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
785 __ASM_VTABLE(basic_iostream_wchar,
786 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
787 __ASM_VTABLE(basic_iostream_short,
788 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
789 __ASM_VTABLE(basic_ofstream_char,
790 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
791 __ASM_VTABLE(basic_ofstream_wchar,
792 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
793 __ASM_VTABLE(basic_ofstream_short,
794 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
795 __ASM_VTABLE(basic_ifstream_char,
796 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
797 __ASM_VTABLE(basic_ifstream_wchar,
798 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
799 __ASM_VTABLE(basic_ifstream_short,
800 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
801 __ASM_VTABLE(basic_fstream_char,
802 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
803 __ASM_VTABLE(basic_fstream_wchar,
804 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
805 __ASM_VTABLE(basic_fstream_short,
806 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
807 __ASM_VTABLE(basic_ostringstream_char,
808 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
809 __ASM_VTABLE(basic_ostringstream_wchar,
810 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
811 __ASM_VTABLE(basic_ostringstream_short,
812 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
813 __ASM_VTABLE(basic_istringstream_char,
814 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
815 __ASM_VTABLE(basic_istringstream_wchar,
816 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
817 __ASM_VTABLE(basic_istringstream_short,
818 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
819 __ASM_VTABLE(basic_stringstream_char,
820 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
821 __ASM_VTABLE(basic_stringstream_wchar,
822 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
823 __ASM_VTABLE(basic_stringstream_short,
824 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
825 __ASM_VTABLE(strstreambuf,
826 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
827 VTABLE_ADD_FUNC(basic_streambuf_char__Lock)
828 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock)
829 VTABLE_ADD_FUNC(strstreambuf_overflow)
830 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
831 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
832 VTABLE_ADD_FUNC(strstreambuf_underflow)
833 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
834 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
835 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
836 VTABLE_ADD_FUNC(strstreambuf_seekoff)
837 VTABLE_ADD_FUNC(strstreambuf_seekpos)
838 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
839 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
840 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
845 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
846 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
847 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
848 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
850 TRACE("(%p %p %p %p)\n", this, first, next, last);
854 this->wsize = last-next;
857 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
858 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
859 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
860 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
862 basic_streambuf_char_setp_next(this, first, first, last);
865 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
866 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
867 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
868 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
870 TRACE("(%p %p %p %p)\n", this, first, next, last);
874 this->rsize = last-next;
877 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
878 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
879 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
880 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
882 TRACE("(%p)\n", this);
884 this->prbuf = &this->rbuf;
885 this->pwbuf = &this->wbuf;
886 this->prpos = &this->rpos;
887 this->pwpos = &this->wpos;
888 this->prsize = &this->rsize;
889 this->pwsize = &this->wsize;
891 basic_streambuf_char_setp(this, NULL, NULL);
892 basic_streambuf_char_setg(this, NULL, NULL, NULL);
895 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
896 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
897 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
898 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
900 TRACE("(%p %d)\n", this, uninitialized);
901 this->vtable = &MSVCP_basic_streambuf_char_vtable;
902 mutex_ctor(&this->lock);
906 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
907 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
908 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
909 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
911 TRACE("(%p)\n", this);
913 this->vtable = &MSVCP_basic_streambuf_char_vtable;
914 mutex_ctor(&this->lock);
915 this->loc = MSVCRT_operator_new(sizeof(locale));
916 locale_ctor(this->loc);
917 basic_streambuf_char__Init_empty(this);
922 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
923 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
924 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
925 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
927 TRACE("(%p)\n", this);
929 mutex_dtor(&this->lock);
930 locale_dtor(this->loc);
931 MSVCRT_operator_delete(this->loc);
934 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
935 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
937 TRACE("(%p %x)\n", this, flags);
939 /* we have an array, with the number of elements stored before the first object */
940 int i, *ptr = (int *)this-1;
942 for(i=*ptr-1; i>=0; i--)
943 basic_streambuf_char_dtor(this+i);
944 MSVCRT_operator_delete(ptr);
946 basic_streambuf_char_dtor(this);
948 MSVCRT_operator_delete(this);
954 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
955 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
956 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4)
957 streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
959 TRACE("(%p)\n", this);
960 return *this->prpos ? *this->prsize : 0;
963 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
964 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
965 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
966 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
968 TRACE("(%p)\n", this);
974 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
975 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
976 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
977 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
979 TRACE("(%p)\n", this);
981 return (*this->prpos)++;
984 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
985 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
986 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4)
987 char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
989 TRACE("(%p)\n", this);
995 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
996 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
997 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
998 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1000 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1010 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1011 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1012 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
1013 #define call_basic_streambuf_char__Lock(this) CALL_VTBL_FUNC(this, 4, \
1014 void, (basic_streambuf_char*), (this))
1015 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
1017 TRACE("(%p)\n", this);
1018 mutex_lock(&this->lock);
1021 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1022 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1023 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4)
1024 streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1026 TRACE("(%p)\n", this);
1027 return *this->pwpos ? *this->pwsize : 0;
1030 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1031 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1032 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1033 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1035 TRACE("(%p)\n", this);
1037 return (*this->pwpos)++;
1040 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1041 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1042 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1043 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 24, \
1044 int, (basic_streambuf_char*), (this))
1045 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1047 TRACE("(%p)\n", this);
1051 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1052 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1053 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1054 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 28, \
1055 int, (basic_streambuf_char*), (this))
1056 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1060 TRACE("(%p)\n", this);
1062 if(call_basic_streambuf_char_underflow(this)==EOF)
1065 ret = **this->prpos;
1071 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1072 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1073 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s, 20)
1074 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1075 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1076 streamsize __thiscall basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1078 streamsize copied, chunk;
1081 TRACE("(%p %p %lu %s)\n", this, ptr, size, wine_dbgstr_longlong(count));
1083 for(copied=0; copied<count && size;) {
1084 chunk = basic_streambuf_char__Gnavail(this);
1085 if(chunk > count-copied)
1086 chunk = count-copied;
1089 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1090 *this->prpos += chunk;
1091 *this->prsize -= chunk;
1094 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1106 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1107 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1108 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s, 20)
1109 streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1111 TRACE("(%p %p %lu %s)\n", this, ptr, size, wine_dbgstr_longlong(count));
1112 return call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1115 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1116 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1117 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
1118 #define call_basic_streambuf_char__Unlock(this) CALL_VTBL_FUNC(this, 8, \
1119 void, (basic_streambuf_char*), (this))
1120 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
1122 TRACE("(%p)\n", this);
1123 mutex_unlock(&this->lock);
1126 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1127 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1128 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1129 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1131 TRACE("(%p)\n", this);
1132 return *this->prbuf;
1135 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1136 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1137 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1138 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1140 TRACE("(%p)\n", this);
1141 return *this->prpos;
1144 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1145 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1146 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1147 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1149 TRACE("(%p)\n", this);
1150 return *this->prpos+*this->prsize;
1153 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1154 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1155 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1156 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1158 TRACE("(%p)\n", this);
1159 return *this->pwpos+*this->pwsize;
1162 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1163 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1164 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1165 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1167 TRACE("(%p %d)\n", this, off);
1168 *this->prpos += off;
1169 *this->prsize -= off;
1172 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
1173 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
1174 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
1175 locale* __thiscall basic_streambuf_char_getloc(const basic_streambuf_char *this, locale *ret)
1177 TRACE("(%p)\n", this);
1178 return locale_copy_ctor(ret, this->loc);
1181 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1182 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1183 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1184 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 56, \
1185 void, (basic_streambuf_char*, const locale*), (this, loc))
1186 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1188 TRACE("(%p %p)\n", this, loc);
1191 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1192 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1193 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1194 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 12, \
1195 int, (basic_streambuf_char*, int), (this, ch))
1196 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1198 TRACE("(%p %d)\n", this, ch);
1202 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1203 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1204 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1205 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, \
1206 int, (basic_streambuf_char*, int), (this, ch))
1207 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1209 TRACE("(%p %d)\n", this, ch);
1213 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1214 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1215 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1216 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1218 TRACE("(%p)\n", this);
1219 return *this->pwbuf;
1222 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1223 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1224 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1225 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1227 TRACE("(%p %d)\n", this, off);
1228 *this->pwpos += off;
1229 *this->pwsize -= off;
1232 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1233 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1235 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1237 TRACE("(%p)\n", this);
1238 return *this->pwpos;
1241 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1242 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1243 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1244 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1246 TRACE("(%p %p)\n", this, loc);
1247 memcpy(ret, this->loc, sizeof(locale));
1248 call_basic_streambuf_char_imbue(this, loc);
1249 locale_copy_ctor(this->loc, loc);
1253 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1254 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1255 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 24)
1256 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, \
1257 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1258 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1259 fpos_int *ret, streamoff off, int way, int mode)
1261 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
1268 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1269 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1270 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 24)
1271 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1272 fpos_int *ret, streamoff off, int way, int mode)
1274 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
1275 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1278 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1279 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1280 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old, 24)
1281 fpos_int* __thiscall basic_streambuf_char_pubseekoff_old(basic_streambuf_char *this,
1282 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
1284 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
1285 return basic_streambuf_char_pubseekoff(this, ret, off, way, mode);
1288 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1289 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1290 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1291 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, \
1292 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1293 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1294 fpos_int *ret, fpos_int pos, int mode)
1296 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1303 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1304 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1305 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1306 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1307 fpos_int *ret, fpos_int pos, int mode)
1309 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1310 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1313 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1314 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1315 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old, 36)
1316 fpos_int* __thiscall basic_streambuf_char_pubseekpos_old(basic_streambuf_char *this,
1317 fpos_int *ret, fpos_int pos, unsigned int mode)
1319 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1320 return basic_streambuf_char_pubseekpos(this, ret, pos, mode);
1323 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1324 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1325 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 16)
1326 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, \
1327 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1328 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1330 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
1334 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1335 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1336 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 16)
1337 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1339 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
1340 return call_basic_streambuf_char_setbuf(this, buf, count);
1343 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1344 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1345 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1346 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 52, \
1347 int, (basic_streambuf_char*), (this))
1348 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1350 TRACE("(%p)\n", this);
1354 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1355 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1356 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1357 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1359 TRACE("(%p)\n", this);
1360 return call_basic_streambuf_char_sync(this);
1363 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1364 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1365 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 16)
1366 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1368 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
1369 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1372 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1373 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1374 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1375 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 20, \
1376 streamsize, (basic_streambuf_char*), (this))
1377 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1379 TRACE("(%p)\n", this);
1383 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1384 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1385 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1386 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1390 TRACE("(%p)\n", this);
1392 ret = basic_streambuf_char__Gnavail(this);
1393 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1396 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1397 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1398 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1399 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1401 TRACE("(%p %d)\n", this, ch);
1402 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1408 return call_basic_streambuf_char_pbackfail(this, ch);
1411 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1412 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1413 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1414 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1416 TRACE("(%p %d)\n", this, ch);
1417 return basic_streambuf_char__Pnavail(this) ?
1418 (*basic_streambuf_char__Pninc(this) = ch) :
1419 call_basic_streambuf_char_overflow(this, ch);
1422 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1423 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1424 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1425 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1427 TRACE("(%p)\n", this);
1428 if(*this->prpos && *this->prpos>*this->prbuf) {
1431 return **this->prpos;
1434 return call_basic_streambuf_char_pbackfail(this, EOF);
1437 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1438 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1439 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1440 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1442 TRACE("(%p)\n", this);
1443 if(basic_streambuf_char__Gnavail(this))
1444 basic_streambuf_char__Gninc(this);
1446 call_basic_streambuf_char_uflow(this);
1449 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1450 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1451 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1452 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1454 TRACE("(%p)\n", this);
1455 return basic_streambuf_char__Gnavail(this) ?
1456 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1459 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1460 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1461 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1462 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1464 TRACE("(%p)\n", this);
1465 return basic_streambuf_char__Gnavail(this) ?
1466 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1469 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1470 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1471 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1472 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1474 TRACE("(%p)\n", this);
1476 if(basic_streambuf_char__Gnavail(this) > 1)
1477 return *basic_streambuf_char__Gnpreinc(this);
1478 return basic_streambuf_char_sbumpc(this)==EOF ?
1479 EOF : basic_streambuf_char_sgetc(this);
1482 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1483 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1484 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 16)
1485 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1486 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1487 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1489 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
1490 return call_basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1493 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1494 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1495 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 16)
1496 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, \
1497 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1498 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1500 streamsize copied, chunk;
1502 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
1504 for(copied=0; copied<count;) {
1505 chunk = basic_streambuf_char__Pnavail(this);
1506 if(chunk > count-copied)
1507 chunk = count-copied;
1510 memcpy(*this->pwpos, ptr+copied, chunk);
1511 *this->pwpos += chunk;
1512 *this->pwsize -= chunk;
1514 }else if(call_basic_streambuf_char_overflow(this, ptr[copied]) != EOF) {
1524 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1525 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1526 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 16)
1527 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1529 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
1530 return call_basic_streambuf_char_xsputn(this, ptr, count);
1533 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1534 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1535 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1536 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1537 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1538 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1540 TRACE("(%p %p %p %p)\n", this, first, next, last);
1544 this->wsize = last-next;
1547 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1548 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1549 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1550 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1551 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1552 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1554 basic_streambuf_wchar_setp_next(this, first, first, last);
1557 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1558 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1559 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1560 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1561 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1562 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1564 TRACE("(%p %p %p %p)\n", this, first, next, last);
1568 this->rsize = last-next;
1571 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1572 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1573 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1574 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1575 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1576 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1578 TRACE("(%p)\n", this);
1580 this->prbuf = &this->rbuf;
1581 this->pwbuf = &this->wbuf;
1582 this->prpos = &this->rpos;
1583 this->pwpos = &this->wpos;
1584 this->prsize = &this->rsize;
1585 this->pwsize = &this->wsize;
1587 basic_streambuf_wchar_setp(this, NULL, NULL);
1588 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1591 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1592 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1593 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized, 8)
1594 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1596 TRACE("(%p %d)\n", this, uninitialized);
1597 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1598 mutex_ctor(&this->lock);
1602 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1603 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1604 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1605 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1607 TRACE("(%p %d)\n", this, uninitialized);
1608 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1609 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1613 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1614 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1615 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor, 4)
1616 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1618 TRACE("(%p)\n", this);
1620 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1621 mutex_ctor(&this->lock);
1622 this->loc = MSVCRT_operator_new(sizeof(locale));
1623 locale_ctor(this->loc);
1624 basic_streambuf_wchar__Init_empty(this);
1629 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1630 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1631 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1632 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1634 TRACE("(%p)\n", this);
1635 basic_streambuf_wchar_ctor(this);
1636 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1640 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1641 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1642 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1643 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1644 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1645 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1647 TRACE("(%p)\n", this);
1649 mutex_dtor(&this->lock);
1650 locale_dtor(this->loc);
1651 MSVCRT_operator_delete(this->loc);
1654 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1655 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1657 TRACE("(%p %x)\n", this, flags);
1659 /* we have an array, with the number of elements stored before the first object */
1660 int i, *ptr = (int *)this-1;
1662 for(i=*ptr-1; i>=0; i--)
1663 basic_streambuf_wchar_dtor(this+i);
1664 MSVCRT_operator_delete(ptr);
1666 basic_streambuf_wchar_dtor(this);
1668 MSVCRT_operator_delete(this);
1674 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1675 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1676 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1677 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1678 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail, 4)
1679 streamsize __thiscall basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1681 TRACE("(%p)\n", this);
1682 return *this->prpos ? *this->prsize : 0;
1685 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1686 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1687 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1688 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1689 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1690 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1692 TRACE("(%p)\n", this);
1695 return *this->prpos;
1698 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1699 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1700 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1701 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1702 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1703 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1705 TRACE("(%p)\n", this);
1707 return (*this->prpos)++;
1710 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1711 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1712 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1713 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1714 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc, 4)
1715 wchar_t* __thiscall basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1717 TRACE("(%p)\n", this);
1720 return *this->prpos;
1723 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1724 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1725 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1726 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1727 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1728 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)
1730 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1740 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1741 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1742 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1743 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1744 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
1745 void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1747 TRACE("(%p)\n", this);
1748 mutex_lock(&this->lock);
1751 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1752 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1753 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1754 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1755 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail, 4)
1756 streamsize __thiscall basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1758 TRACE("(%p)\n", this);
1759 return *this->pwpos ? *this->pwsize : 0;
1762 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1763 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1764 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1765 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1766 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1767 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1769 TRACE("(%p)\n", this);
1771 return (*this->pwpos)++;
1774 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1775 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1776 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1777 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1778 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1779 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 24, \
1780 unsigned short, (basic_streambuf_wchar*), (this))
1781 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1783 TRACE("(%p)\n", this);
1787 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1788 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1789 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1790 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1791 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1792 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 28, \
1793 unsigned short, (basic_streambuf_wchar*), (this))
1794 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1798 TRACE("(%p)\n", this);
1800 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1803 ret = **this->prpos;
1809 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1810 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1811 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1812 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1813 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s, 20)
1814 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1815 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1816 streamsize __thiscall basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1818 streamsize copied, chunk;
1821 TRACE("(%p %p %lu %s)\n", this, ptr, size, wine_dbgstr_longlong(count));
1823 for(copied=0; copied<count && size;) {
1824 chunk = basic_streambuf_wchar__Gnavail(this);
1825 if(chunk > count-copied)
1826 chunk = count-copied;
1829 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1830 *this->prpos += chunk;
1831 *this->prsize -= chunk;
1834 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1846 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1847 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1848 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1849 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1850 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s, 20)
1851 streamsize __thiscall basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1853 TRACE("(%p %p %lu %s)\n", this, ptr, size, wine_dbgstr_longlong(count));
1854 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1857 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1858 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1859 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1860 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1861 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
1862 void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1864 TRACE("(%p)\n", this);
1865 mutex_unlock(&this->lock);
1868 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1869 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1870 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1871 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1872 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1873 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1875 TRACE("(%p)\n", this);
1876 return *this->prbuf;
1879 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1880 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1881 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1882 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1883 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1884 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1886 TRACE("(%p)\n", this);
1887 return *this->prpos;
1890 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1891 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1892 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1893 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1894 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1895 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1897 TRACE("(%p)\n", this);
1898 return *this->prpos+*this->prsize;
1901 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1902 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1903 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1904 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1905 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1906 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1908 TRACE("(%p)\n", this);
1909 return *this->pwpos+*this->pwsize;
1912 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1913 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1914 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1915 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1916 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1917 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1919 TRACE("(%p %d)\n", this, off);
1920 *this->prpos += off;
1921 *this->prsize -= off;
1924 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1925 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1926 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1927 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1928 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc, 8)
1929 locale* __thiscall basic_streambuf_wchar_getloc(const basic_streambuf_wchar *this, locale *ret)
1931 TRACE("(%p)\n", this);
1932 return locale_copy_ctor(ret, this->loc);
1935 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1936 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1937 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1938 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1939 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1940 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 56, \
1941 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1942 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1944 TRACE("(%p %p)\n", this, loc);
1947 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1948 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1949 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1950 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1951 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1952 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 12, \
1953 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1954 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1956 TRACE("(%p %d)\n", this, ch);
1960 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1961 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1962 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1963 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1964 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1965 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, \
1966 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1967 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1969 TRACE("(%p %d)\n", this, ch);
1973 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1974 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1975 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1976 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1977 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1978 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1980 TRACE("(%p)\n", this);
1981 return *this->pwbuf;
1984 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1985 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1986 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1987 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1988 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1989 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1991 TRACE("(%p %d)\n", this, off);
1992 *this->pwpos += off;
1993 *this->pwsize -= off;
1996 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1997 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1998 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1999 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
2000 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
2001 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
2003 TRACE("(%p)\n", this);
2004 return *this->pwpos;
2007 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2008 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2009 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
2010 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
2011 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
2012 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
2014 TRACE("(%p %p)\n", this, loc);
2015 memcpy(ret, this->loc, sizeof(locale));
2016 call_basic_streambuf_wchar_imbue(this, loc);
2017 locale_copy_ctor(this->loc, loc);
2021 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2022 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2023 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2024 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2025 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 24)
2026 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, \
2027 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2028 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
2029 fpos_int *ret, streamoff off, int way, int mode)
2031 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
2038 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2039 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2040 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2041 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2042 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 24)
2043 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2044 fpos_int *ret, streamoff off, int way, int mode)
2046 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
2047 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2050 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2051 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2052 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
2053 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
2054 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old, 24)
2055 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar *this,
2056 fpos_int *ret, streamoff off, unsigned int way, unsigned int mode)
2058 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off), way, mode);
2059 return basic_streambuf_wchar_pubseekoff(this, ret, off, way, mode);
2062 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2063 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2064 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2065 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2066 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2067 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, \
2068 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2069 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2070 fpos_int *ret, fpos_int pos, int mode)
2072 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2079 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2080 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2081 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2082 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2083 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2084 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2085 fpos_int *ret, fpos_int pos, int mode)
2087 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2088 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2091 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2092 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2093 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
2094 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
2095 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old, 36)
2096 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar *this,
2097 fpos_int *ret, fpos_int pos, unsigned int mode)
2099 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2100 return basic_streambuf_wchar_pubseekpos(this, ret, pos, mode);
2103 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2104 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2105 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2106 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2107 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 16)
2108 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, \
2109 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2110 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2112 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
2116 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2117 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2118 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2119 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2120 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 16)
2121 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2123 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
2124 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2127 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2128 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2129 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2130 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2131 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2132 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 52, \
2133 int, (basic_streambuf_wchar*), (this))
2134 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2136 TRACE("(%p)\n", this);
2140 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2141 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2142 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2143 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2144 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2145 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2147 TRACE("(%p)\n", this);
2148 return call_basic_streambuf_wchar_sync(this);
2151 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2152 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2153 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2154 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2155 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 16)
2156 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2158 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
2159 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2162 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2163 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2164 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2165 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2166 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2167 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 20, \
2168 streamsize, (basic_streambuf_wchar*), (this))
2169 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2171 TRACE("(%p)\n", this);
2175 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2176 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2177 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2178 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2179 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2180 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2184 TRACE("(%p)\n", this);
2186 ret = basic_streambuf_wchar__Gnavail(this);
2187 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2190 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2191 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2192 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2193 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2194 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2195 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2197 TRACE("(%p %d)\n", this, ch);
2198 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2204 return call_basic_streambuf_wchar_pbackfail(this, ch);
2207 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2208 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2209 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2210 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2211 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2212 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2214 TRACE("(%p %d)\n", this, ch);
2215 return basic_streambuf_wchar__Pnavail(this) ?
2216 (*basic_streambuf_wchar__Pninc(this) = ch) :
2217 call_basic_streambuf_wchar_overflow(this, ch);
2220 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2221 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2222 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2223 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2224 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2225 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2227 TRACE("(%p)\n", this);
2228 if(*this->prpos && *this->prpos>*this->prbuf) {
2231 return **this->prpos;
2234 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2237 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2238 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2239 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2240 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2241 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2242 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2244 TRACE("(%p)\n", this);
2245 if(basic_streambuf_wchar__Gnavail(this))
2246 basic_streambuf_wchar__Gninc(this);
2248 call_basic_streambuf_wchar_uflow(this);
2251 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2252 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2253 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2254 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2255 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2256 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2258 TRACE("(%p)\n", this);
2259 return basic_streambuf_wchar__Gnavail(this) ?
2260 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2263 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2264 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2265 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2266 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2267 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2268 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2270 TRACE("(%p)\n", this);
2271 return basic_streambuf_wchar__Gnavail(this) ?
2272 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2275 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2276 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2277 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2278 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2279 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2280 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2282 TRACE("(%p)\n", this);
2284 if(basic_streambuf_wchar__Gnavail(this) > 1)
2285 return *basic_streambuf_wchar__Gnpreinc(this);
2286 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2287 WEOF : basic_streambuf_wchar_sgetc(this);
2290 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2291 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2292 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2293 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2294 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 16)
2295 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
2296 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2297 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2299 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
2300 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2303 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2304 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2305 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2306 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2307 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 16)
2308 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, \
2309 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2310 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2312 streamsize copied, chunk;
2314 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
2316 for(copied=0; copied<count;) {
2317 chunk = basic_streambuf_wchar__Pnavail(this);
2318 if(chunk > count-copied)
2319 chunk = count-copied;
2322 memcpy(*this->pwpos, ptr+copied, chunk);
2323 *this->pwpos += chunk;
2324 *this->pwsize -= chunk;
2326 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2336 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2337 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2338 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2339 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2340 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 16)
2341 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2343 TRACE("(%p %p %s)\n", this, ptr, wine_dbgstr_longlong(count));
2344 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2347 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2348 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2349 int basic_filebuf_char__Init__Stinit = 0;
2351 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2352 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2353 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2354 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2356 TRACE("(%p %p %d)\n", this, file, which);
2359 this->wrotesome = FALSE;
2360 this->state = basic_filebuf_char__Init__Stinit;
2361 this->close = (which == INITFL_open);
2364 basic_streambuf_char__Init_empty(&this->base);
2366 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2367 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2370 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2371 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2372 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 8)
2373 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this, codecvt_char *cvt)
2375 TRACE("(%p %p)\n", this, cvt);
2377 if(codecvt_base_always_noconv(&cvt->base)) {
2380 basic_streambuf_char__Init_empty(&this->base);
2385 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2386 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2387 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite, 4)
2388 MSVCP_bool __thiscall basic_filebuf_char__Endwrite(basic_filebuf_char *this)
2390 TRACE("(%p)\n", this);
2392 if(!this->wrotesome || !this->cvt)
2396 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2400 /* TODO: check if we need a dynamic buffer here */
2405 ret = codecvt_char_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2408 this->wrotesome = FALSE;
2410 case CODECVT_partial:
2411 if(!fwrite(buf, next-buf, 1, this->file))
2416 case CODECVT_noconv:
2417 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2426 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2427 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2428 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2429 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2431 basic_filebuf_char *ret = this;
2433 TRACE("(%p)\n", this);
2438 /* TODO: handle exceptions */
2439 if(!basic_filebuf_char__Endwrite(this))
2441 if(!fclose(this->file))
2444 basic_filebuf_char__Init(this, NULL, INITFL_close);
2448 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2449 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2450 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2451 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2453 TRACE("(%p %p)\n", this, file);
2455 basic_streambuf_char_ctor(&this->base);
2456 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2458 basic_filebuf_char__Init(this, file, INITFL_new);
2462 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2463 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2464 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2465 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2467 return basic_filebuf_char_ctor_file(this, NULL);
2470 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2471 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2472 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2473 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2475 TRACE("(%p %d)\n", this, uninitialized);
2477 basic_streambuf_char_ctor(&this->base);
2478 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2482 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2483 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2484 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2485 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2487 TRACE("(%p)\n", this);
2490 basic_filebuf_char_close(this);
2491 basic_streambuf_char_dtor(&this->base);
2494 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2495 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2497 TRACE("(%p %x)\n", this, flags);
2499 /* we have an array, with the number of elements stored before the first object */
2500 int i, *ptr = (int *)this-1;
2502 for(i=*ptr-1; i>=0; i--)
2503 basic_filebuf_char_dtor(this+i);
2504 MSVCRT_operator_delete(ptr);
2506 basic_filebuf_char_dtor(this);
2508 MSVCRT_operator_delete(this);
2514 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2515 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2516 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2517 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2519 TRACE("(%p)\n", this);
2520 return this->file != NULL;
2523 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2524 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2525 FILE* __cdecl _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2527 static const wchar_t rW[] = {'r',0};
2528 static const struct {
2530 const wchar_t str[4];
2531 const wchar_t str_bin[4];
2533 {OPENMODE_out, {'w',0}, {'w','b',0}},
2534 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2535 {OPENMODE_app, {'a',0}, {'a','b',0}},
2536 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2537 {OPENMODE_in, {'r',0}, {'r','b',0}},
2538 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2539 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2540 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2541 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2544 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2548 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2550 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2551 if(str_mode[mode_idx].mode == real_mode)
2553 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2556 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2561 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2562 && (f = _wfopen(name, rW))) {
2567 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2568 : str_mode[mode_idx].str, prot);
2572 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2580 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2581 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2582 FILE* __cdecl _Fiopen(const char *name, int mode, int prot)
2584 wchar_t nameW[FILENAME_MAX];
2586 TRACE("(%s %d %d)\n", name, mode, prot);
2588 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2590 return _Fiopen_wchar(nameW, mode, prot);
2593 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2594 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2595 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2596 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2597 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar, 16)
2598 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2602 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2604 if(basic_filebuf_char_is_open(this))
2607 if(!(f = _Fiopen_wchar(name, mode, prot)))
2610 basic_filebuf_char__Init(this, f, INITFL_open);
2611 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base.loc));
2615 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2616 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2617 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2618 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2619 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode, 12)
2620 basic_filebuf_char* __thiscall basic_filebuf_char_open_wchar_mode(basic_filebuf_char *this, const wchar_t *name, unsigned int mode)
2622 return basic_filebuf_char_open_wchar(this, name, mode, SH_DENYNO);
2625 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2626 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2627 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open, 16)
2628 basic_filebuf_char* __thiscall basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2630 wchar_t nameW[FILENAME_MAX];
2632 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2634 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2636 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2639 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2640 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2641 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2642 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, unsigned int mode)
2644 return basic_filebuf_char_open(this, name, mode, SH_DENYNO);
2647 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2648 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2649 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2650 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2652 char buf[8], *dyn_buf;
2653 char ch = c, *to_next;
2654 const char *from_next;
2658 TRACE("(%p %d)\n", this, c);
2660 if(!basic_filebuf_char_is_open(this))
2666 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2670 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2671 &from_next, buf, buf+sizeof(buf), &to_next);
2674 case CODECVT_partial:
2679 if(!fwrite(buf, to_next-buf, 1, this->file))
2681 if(ret == CODECVT_partial)
2684 case CODECVT_noconv:
2685 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2693 max_size = codecvt_base_max_length(&this->cvt->base);
2694 dyn_buf = malloc(max_size);
2698 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1,
2699 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
2703 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
2705 return ret ? c : EOF;
2706 case CODECVT_partial:
2707 ERR("buffer should be big enough to store all output\n");
2715 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2716 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2717 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2718 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2720 TRACE("(%p %d)\n", this, c);
2722 if(!basic_filebuf_char_is_open(this))
2725 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2726 && (c==EOF || basic_streambuf_char_gptr(&this->base)[-1]==(char)c)) {
2727 basic_streambuf_char__Gndec(&this->base);
2728 return c==EOF ? !c : c;
2729 }else if(c!=EOF && !this->cvt) {
2730 return ungetc(c, this->file);
2736 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2737 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2738 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2739 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2741 char ch, buf[128], *to_next;
2742 const char *buf_next;
2745 TRACE("(%p)\n", this);
2747 if(!basic_filebuf_char_is_open(this))
2750 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2751 return *basic_streambuf_char__Gninc(&this->base);
2753 c = fgetc(this->file);
2754 if(!this->cvt || c==EOF)
2758 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
2761 switch(codecvt_char_in(this->cvt, &this->state, buf_next,
2762 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
2763 case CODECVT_partial:
2765 if(to_next == &ch) {
2766 c = fgetc(this->file);
2772 for(i--; i>=buf_next-buf; i--)
2773 ungetc(buf[i], this->file);
2775 case CODECVT_noconv:
2782 FIXME("buffer is too small\n");
2786 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2787 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2788 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2789 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2793 TRACE("(%p)\n", this);
2795 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2796 return *basic_streambuf_char_gptr(&this->base);
2798 ret = call_basic_streambuf_char_uflow(&this->base);
2800 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2804 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2805 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2806 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 24)
2807 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2808 fpos_int *ret, streamoff off, int way, int mode)
2812 TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
2814 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2815 || fseek(this->file, off, way)) {
2822 fgetpos(this->file, &pos);
2825 ret->state = this->state;
2829 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2830 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2831 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2832 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2833 fpos_int *ret, fpos_int pos, int mode)
2837 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2839 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2840 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2841 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2848 fgetpos(this->file, &fpos);
2851 ret->state = this->state;
2855 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2856 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2857 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 16)
2858 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2860 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
2862 if(!basic_filebuf_char_is_open(this))
2865 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2868 basic_filebuf_char__Init(this, this->file, INITFL_open);
2872 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2873 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2874 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2875 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2877 TRACE("(%p)\n", this);
2879 if(!basic_filebuf_char_is_open(this))
2882 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2884 return fflush(this->file);
2887 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2888 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2889 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue, 8)
2890 void __thiscall basic_filebuf_char_imbue(basic_filebuf_char *this, const locale *loc)
2892 TRACE("(%p %p)\n", this, loc);
2893 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc));
2896 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2897 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2898 int basic_filebuf_wchar__Init__Stinit = 0;
2900 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2901 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2902 int basic_filebuf_short__Init__Stinit = 0;
2904 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2905 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2906 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Init, 12)
2907 void __thiscall basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2909 TRACE("(%p %p %d)\n", this, file, which);
2912 this->wrotesome = FALSE;
2913 this->state = basic_filebuf_wchar__Init__Stinit;
2914 this->close = (which == INITFL_open);
2917 basic_streambuf_wchar__Init_empty(&this->base);
2920 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2921 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2922 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2923 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2925 TRACE("(%p %p %d)\n", this, file, which);
2928 this->wrotesome = FALSE;
2929 this->state = basic_filebuf_short__Init__Stinit;
2930 this->close = (which == INITFL_open);
2933 basic_streambuf_wchar__Init_empty(&this->base);
2936 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2937 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2938 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2939 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2940 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 8)
2941 void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this, codecvt_wchar *cvt)
2943 TRACE("(%p %p)\n", this, cvt);
2945 if(codecvt_base_always_noconv(&cvt->base)) {
2948 basic_streambuf_wchar__Init_empty(&this->base);
2953 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2954 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2955 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2956 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2957 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Endwrite, 4)
2958 MSVCP_bool __thiscall basic_filebuf_wchar__Endwrite(basic_filebuf_wchar *this)
2960 TRACE("(%p)\n", this);
2962 if(!this->wrotesome || !this->cvt)
2965 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2969 /* TODO: check if we need a dynamic buffer here */
2974 ret = codecvt_wchar_unshift(this->cvt, &this->state, buf, buf+sizeof(buf), &next);
2977 this->wrotesome = FALSE;
2979 case CODECVT_partial:
2980 if(!fwrite(buf, next-buf, 1, this->file))
2985 case CODECVT_noconv:
2986 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
2995 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2996 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2997 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2998 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2999 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
3000 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
3002 basic_filebuf_wchar *ret = this;
3004 TRACE("(%p)\n", this);
3009 /* TODO: handle exceptions */
3010 if(!basic_filebuf_wchar__Endwrite(this))
3012 if(!fclose(this->file))
3015 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
3019 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
3020 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3021 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_file, 8)
3022 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
3024 TRACE("(%p %p)\n", this, file);
3026 basic_streambuf_wchar_ctor(&this->base);
3027 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
3029 basic_filebuf_wchar__Init(this, file, INITFL_new);
3033 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
3034 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
3035 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
3036 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
3038 TRACE("(%p %p)\n", this, file);
3040 basic_streambuf_short_ctor(&this->base);
3041 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3043 basic_filebuf_short__Init(this, file, INITFL_new);
3047 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
3048 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
3049 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor, 4)
3050 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
3052 return basic_filebuf_wchar_ctor_file(this, NULL);
3055 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
3056 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
3057 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
3058 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
3060 return basic_filebuf_short_ctor_file(this, NULL);
3063 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3064 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3065 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_ctor_uninitialized, 8)
3066 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3068 TRACE("(%p %d)\n", this, uninitialized);
3070 basic_streambuf_wchar_ctor(&this->base);
3071 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
3075 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
3076 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
3077 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
3078 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
3080 TRACE("(%p %d)\n", this, uninitialized);
3082 basic_streambuf_short_ctor(&this->base);
3083 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
3087 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3088 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3089 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
3090 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3091 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
3092 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
3094 TRACE("(%p)\n", this);
3097 basic_filebuf_wchar_close(this);
3098 basic_streambuf_wchar_dtor(&this->base);
3101 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
3102 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
3104 TRACE("(%p %x)\n", this, flags);
3106 /* we have an array, with the number of elements stored before the first object */
3107 int i, *ptr = (int *)this-1;
3109 for(i=*ptr-1; i>=0; i--)
3110 basic_filebuf_wchar_dtor(this+i);
3111 MSVCRT_operator_delete(ptr);
3113 basic_filebuf_wchar_dtor(this);
3115 MSVCRT_operator_delete(this);
3121 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
3122 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
3123 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
3124 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
3125 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
3126 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
3128 TRACE("(%p)\n", this);
3129 return this->file != NULL;
3132 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
3133 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3134 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
3135 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3136 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar, 16)
3137 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3141 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3143 if(basic_filebuf_wchar_is_open(this))
3146 if(!(f = _Fiopen_wchar(name, mode, prot)))
3149 basic_filebuf_wchar__Init(this, f, INITFL_open);
3150 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(this->base.loc));
3154 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WHH@Z */
3155 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
3156 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGHH@Z */
3157 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGHH@Z */
3158 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar, 16)
3159 basic_filebuf_wchar* __thiscall basic_filebuf_short_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
3163 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
3165 if(basic_filebuf_wchar_is_open(this))
3168 if(!(f = _Fiopen_wchar(name, mode, prot)))
3171 basic_filebuf_short__Init(this, f, INITFL_open);
3172 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(this->base.loc));
3176 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WI@Z */
3177 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WI@Z */
3178 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGI@Z */
3179 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGI@Z */
3180 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_wchar_mode, 12)
3181 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_wchar_mode(basic_filebuf_wchar *this, const wchar_t *name, unsigned int mode)
3183 return basic_filebuf_wchar_open_wchar(this, name, mode, SH_DENYNO);
3186 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PB_WI@Z */
3187 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEB_WI@Z */
3188 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBGI@Z */
3189 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBGI@Z */
3190 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_wchar_mode, 12)
3191 basic_filebuf_wchar* __thiscall basic_filebuf_short_open_wchar_mode(basic_filebuf_wchar *this, const wchar_t *name, unsigned int mode)
3193 return basic_filebuf_short_open_wchar(this, name, mode, SH_DENYNO);
3196 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
3197 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3198 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open, 16)
3199 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3201 wchar_t nameW[FILENAME_MAX];
3203 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3205 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3207 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3210 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDHH@Z */
3211 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDHH@Z */
3212 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open, 16)
3213 basic_filebuf_wchar* __thiscall basic_filebuf_short_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
3215 wchar_t nameW[FILENAME_MAX];
3217 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3219 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3221 return basic_filebuf_short_open_wchar(this, nameW, mode, prot);
3224 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDI@Z */
3225 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDI@Z */
3226 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3227 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode)
3229 return basic_filebuf_wchar_open(this, name, mode, SH_DENYNO);
3232 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDI@Z */
3233 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDI@Z */
3234 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_open_mode, 12)
3235 basic_filebuf_wchar* __thiscall basic_filebuf_short_open_mode(basic_filebuf_wchar *this, const char *name, unsigned int mode)
3237 return basic_filebuf_short_open(this, name, mode, SH_DENYNO);
3240 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3241 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3242 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3243 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3244 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3245 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3247 char buf[8], *dyn_buf, *to_next;
3249 const wchar_t *from_next;
3254 TRACE("(%p %d)\n", this, c);
3256 if(!basic_filebuf_wchar_is_open(this))
3262 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3266 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3267 &from_next, buf, buf+sizeof(buf), &to_next);
3270 case CODECVT_partial:
3275 if(!fwrite(buf, to_next-buf, 1, this->file))
3277 if(ret == CODECVT_partial)
3280 case CODECVT_noconv:
3281 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3289 max_size = codecvt_base_max_length(&this->cvt->base);
3290 dyn_buf = malloc(max_size);
3294 ret = codecvt_wchar_out(this->cvt, &this->state, from_next, &ch+1,
3295 &from_next, dyn_buf, dyn_buf+max_size, &to_next);
3299 ret = fwrite(dyn_buf, to_next-dyn_buf, 1, this->file);
3301 return ret ? c : WEOF;
3302 case CODECVT_partial:
3303 ERR("buffer should be big enough to store all output\n");
3311 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3312 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3313 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3314 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3315 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3316 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3318 TRACE("(%p %d)\n", this, c);
3320 if(!basic_filebuf_wchar_is_open(this))
3323 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3324 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==(wchar_t)c)) {
3325 basic_streambuf_wchar__Gndec(&this->base);
3326 return c==WEOF ? !c : c;
3327 }else if(c!=WEOF && !this->cvt) {
3328 return ungetwc(c, this->file);
3329 }else if(c!=WEOF && basic_streambuf_wchar_gptr(&this->base)!=&this->putback) {
3331 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback, &this->putback+1);
3338 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3339 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3340 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3341 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3342 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3343 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3345 wchar_t ch, *to_next;
3347 const char *buf_next;
3350 TRACE("(%p)\n", this);
3352 if(!basic_filebuf_wchar_is_open(this))
3355 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3356 return *basic_streambuf_wchar__Gninc(&this->base);
3359 return fgetwc(this->file);
3362 for(i=0; i < sizeof(buf)/sizeof(buf[0]); i++) {
3363 if((c = fgetc(this->file)) == EOF)
3367 switch(codecvt_wchar_in(this->cvt, &this->state, buf_next,
3368 buf+i+1, &buf_next, &ch, &ch+1, &to_next)) {
3369 case CODECVT_partial:
3374 for(i--; i>=buf_next-buf; i--)
3375 ungetc(buf[i], this->file);
3377 case CODECVT_noconv:
3378 if(i+1 < sizeof(wchar_t))
3381 memcpy(&ch, buf, sizeof(wchar_t));
3388 FIXME("buffer is too small\n");
3392 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3393 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3394 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3395 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3396 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3397 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3401 TRACE("(%p)\n", this);
3403 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3404 return *basic_streambuf_wchar_gptr(&this->base);
3406 ret = call_basic_streambuf_wchar_uflow(&this->base);
3408 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3412 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3413 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3414 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3415 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3416 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 24)
3417 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3418 fpos_int *ret, streamoff off, int way, int mode)
3422 TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
3424 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback) {
3425 if(way == SEEKDIR_cur)
3426 off -= sizeof(wchar_t);
3428 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3431 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3432 || fseek(this->file, off, way)) {
3439 fgetpos(this->file, &pos);
3442 ret->state = this->state;
3446 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3447 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3448 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3449 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3450 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3451 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3452 fpos_int *ret, fpos_int pos, int mode)
3456 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3458 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
3459 || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3460 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3467 if(basic_streambuf_wchar_gptr(&this->base) == &this->putback)
3468 basic_streambuf_wchar_setg(&this->base, &this->putback, &this->putback+1, &this->putback+1);
3470 fgetpos(this->file, &fpos);
3473 ret->state = this->state;
3477 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3478 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3479 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 16)
3480 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3482 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
3484 if(!basic_filebuf_wchar_is_open(this))
3487 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3490 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3494 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3495 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3496 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 16)
3497 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3499 TRACE("(%p %p %s)\n", this, buf, wine_dbgstr_longlong(count));
3501 if(!basic_filebuf_wchar_is_open(this))
3504 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3507 basic_filebuf_short__Init(this, this->file, INITFL_open);
3511 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3512 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3513 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3514 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3515 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3516 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3518 TRACE("(%p)\n", this);
3520 if(!basic_filebuf_wchar_is_open(this))
3523 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3525 return fflush(this->file);
3528 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
3529 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
3530 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue, 8)
3531 void __thiscall basic_filebuf_wchar_imbue(basic_filebuf_wchar *this, const locale *loc)
3533 TRACE("(%p %p)\n", this, loc);
3534 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc));
3537 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
3538 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
3539 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue, 8)
3540 void __thiscall basic_filebuf_short_imbue(basic_filebuf_wchar *this, const locale *loc)
3542 TRACE("(%p %p)\n", this, loc);
3543 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc));
3546 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3547 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3548 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate, 8)
3549 int __thiscall basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3553 if(!(mode & OPENMODE_in))
3554 state |= STRINGBUF_no_read;
3556 if(!(mode & OPENMODE_out))
3557 state |= STRINGBUF_no_write;
3559 if(mode & OPENMODE_ate)
3560 state |= STRINGBUF_at_end;
3562 if(mode & OPENMODE_app)
3563 state |= STRINGBUF_append;
3568 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3569 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3570 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3571 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3573 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3575 basic_streambuf_char__Init_empty(&this->base);
3577 this->state = state;
3578 this->seekhigh = NULL;
3581 char *buf = MSVCRT_operator_new(count);
3583 ERR("Out of memory\n");
3584 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3587 memcpy(buf, str, count);
3588 this->seekhigh = buf + count;
3590 this->state |= STRINGBUF_allocated;
3592 if(!(state & STRINGBUF_no_read))
3593 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3595 if(!(state & STRINGBUF_no_write)) {
3596 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3598 if(!basic_streambuf_char_gptr(&this->base))
3599 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3604 /* ??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 */
3605 /* ??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 */
3606 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3607 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3608 const basic_string_char *str, IOSB_openmode mode)
3610 TRACE("(%p %p %d)\n", this, str, mode);
3612 basic_streambuf_char_ctor(&this->base);
3613 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3615 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str),
3616 str->size, basic_stringbuf_char__Getstate(this, mode));
3620 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3621 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3622 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3623 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3624 basic_stringbuf_char *this, IOSB_openmode mode)
3626 TRACE("(%p %d)\n", this, mode);
3628 basic_streambuf_char_ctor(&this->base);
3629 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3631 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3635 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3636 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3637 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3638 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3640 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3643 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3644 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3645 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3646 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3648 TRACE("(%p)\n", this);
3650 if(this->state & STRINGBUF_allocated) {
3651 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3652 this->seekhigh = NULL;
3653 this->state &= ~STRINGBUF_allocated;
3656 basic_streambuf_char__Init_empty(&this->base);
3659 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3660 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3661 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3662 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3664 TRACE("(%p)\n", this);
3666 basic_stringbuf_char__Tidy(this);
3667 basic_streambuf_char_dtor(&this->base);
3670 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3671 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3673 TRACE("(%p %x)\n", this, flags);
3676 /* we have an array, with the number of elements stored before the first object */
3677 int i, *ptr = (int *) this - 1;
3679 for (i = *ptr - 1; i >= 0; i--)
3680 basic_stringbuf_char_dtor(this+i);
3682 MSVCRT_operator_delete(ptr);
3684 basic_stringbuf_char_dtor(this);
3687 MSVCRT_operator_delete(this);
3693 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3694 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3695 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3696 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3698 MSVCP_size_t oldsize, size;
3701 TRACE("(%p %x)\n", this, meta);
3705 if(this->state & STRINGBUF_no_write)
3708 ptr = basic_streambuf_char_pptr(&this->base);
3709 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3710 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3711 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3713 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3714 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3716 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3719 buf = MSVCRT_operator_new(size);
3721 ERR("Out of memory\n");
3722 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3726 this->seekhigh = buf;
3727 basic_streambuf_char_setp(&this->base, buf, buf+size);
3728 if(this->state & STRINGBUF_no_read)
3729 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3731 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3733 this->state |= STRINGBUF_allocated;
3735 ptr = basic_streambuf_char_eback(&this->base);
3736 memcpy(buf, ptr, oldsize);
3738 this->seekhigh = buf+(this->seekhigh-ptr);
3739 basic_streambuf_char_setp_next(&this->base, buf,
3740 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3741 if(this->state & STRINGBUF_no_read)
3742 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3744 basic_streambuf_char_setg(&this->base, buf,
3745 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3746 basic_streambuf_char_pptr(&this->base)+1);
3748 MSVCRT_operator_delete(ptr);
3751 return (*basic_streambuf_char__Pninc(&this->base) = meta);
3754 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3755 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3756 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3757 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3761 TRACE("(%p %x)\n", this, c);
3763 cur = basic_streambuf_char_gptr(&this->base);
3764 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3765 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3770 basic_streambuf_char_gbump(&this->base, -1);
3771 return c==EOF ? !EOF : c;
3774 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3775 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3776 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3777 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3781 TRACE("(%p)\n", this);
3783 cur = basic_streambuf_char_gptr(&this->base);
3784 if(!cur || this->state&STRINGBUF_no_read)
3787 ptr = basic_streambuf_char_pptr(&this->base);
3788 if(this->seekhigh < ptr)
3789 this->seekhigh = ptr;
3791 ptr = basic_streambuf_char_egptr(&this->base);
3792 if(this->seekhigh > ptr)
3793 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3795 if(cur < this->seekhigh)
3800 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3801 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3802 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 24)
3803 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3804 fpos_int *ret, streamoff off, int way, int mode)
3806 char *beg, *cur_r, *cur_w;
3808 TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
3810 cur_w = basic_streambuf_char_pptr(&this->base);
3811 if(cur_w > this->seekhigh)
3812 this->seekhigh = cur_w;
3817 beg = basic_streambuf_char_eback(&this->base);
3818 cur_r = basic_streambuf_char_gptr(&this->base);
3819 if((mode & OPENMODE_in) && cur_r) {
3820 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3822 else if(way == SEEKDIR_end)
3823 off += this->seekhigh-beg;
3824 else if(way != SEEKDIR_beg)
3827 if(off<0 || off>this->seekhigh-beg) {
3830 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3831 if((mode & OPENMODE_out) && cur_w) {
3832 basic_streambuf_char_setp_next(&this->base, beg,
3833 basic_streambuf_char_gptr(&this->base),
3834 basic_streambuf_char_epptr(&this->base));
3837 }else if((mode & OPENMODE_out) && cur_w) {
3838 if(way == SEEKDIR_cur)
3840 else if(way == SEEKDIR_end)
3841 off += this->seekhigh-beg;
3842 else if(way != SEEKDIR_beg)
3845 if(off<0 || off>this->seekhigh-beg)
3848 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3857 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3858 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3859 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3860 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3861 fpos_int *ret, fpos_int pos, int mode)
3863 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3865 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
3870 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3873 /* ?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 */
3874 /* ?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 */
3875 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3876 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3878 TRACE("(%p %p)\n", this, str);
3880 basic_stringbuf_char__Tidy(this);
3881 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str), str->size, this->state);
3884 /* ?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 */
3885 /* ?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 */
3886 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3887 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3891 TRACE("(%p)\n", this);
3893 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3896 ptr = basic_streambuf_char_pbase(&this->base);
3897 pptr = basic_streambuf_char_pptr(&this->base);
3899 return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3902 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3903 ptr = basic_streambuf_char_eback(&this->base);
3904 return MSVCP_basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3907 return MSVCP_basic_string_char_ctor(ret);
3910 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3911 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3912 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3913 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3914 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate, 8)
3915 int __thiscall basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3919 if(!(mode & OPENMODE_in))
3920 state |= STRINGBUF_no_read;
3922 if(!(mode & OPENMODE_out))
3923 state |= STRINGBUF_no_write;
3925 if(mode & OPENMODE_ate)
3926 state |= STRINGBUF_at_end;
3928 if(mode & OPENMODE_app)
3929 state |= STRINGBUF_append;
3934 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3935 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3936 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3937 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3938 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3939 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3941 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3943 basic_streambuf_wchar__Init_empty(&this->base);
3945 this->state = state;
3946 this->seekhigh = NULL;
3949 wchar_t *buf = MSVCRT_operator_new(count);
3951 ERR("Out of memory\n");
3952 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3955 memcpy(buf, str, count);
3956 this->seekhigh = buf + count;
3958 this->state |= STRINGBUF_allocated;
3960 if(!(state & STRINGBUF_no_read))
3961 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3963 if(!(state & STRINGBUF_no_write)) {
3964 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3966 if(!basic_streambuf_wchar_gptr(&this->base))
3967 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3972 /* ??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 */
3973 /* ??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 */
3974 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str, 12)
3975 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3976 const basic_string_wchar *str, IOSB_openmode mode)
3978 TRACE("(%p %p %d)\n", this, str, mode);
3980 basic_streambuf_wchar_ctor(&this->base);
3981 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3983 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str),
3984 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3988 /* ??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 */
3989 /* ??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 */
3990 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3991 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3992 const basic_string_wchar *str, IOSB_openmode mode)
3994 basic_stringbuf_wchar_ctor_str(this, str, mode);
3995 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3999 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
4000 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
4001 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode, 8)
4002 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor_mode(
4003 basic_stringbuf_wchar *this, IOSB_openmode mode)
4005 TRACE("(%p %d)\n", this, mode);
4007 basic_streambuf_wchar_ctor(&this->base);
4008 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
4010 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
4014 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
4015 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
4016 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
4017 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
4018 basic_stringbuf_wchar *this, IOSB_openmode mode)
4020 basic_stringbuf_wchar_ctor_mode(this, mode);
4021 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
4025 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
4026 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
4027 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor, 4)
4028 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_ctor(basic_stringbuf_wchar *this)
4030 return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in|OPENMODE_out);
4033 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
4034 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
4035 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
4036 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
4038 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
4041 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
4042 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
4043 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
4044 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
4045 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
4046 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
4048 TRACE("(%p)\n", this);
4050 if(this->state & STRINGBUF_allocated) {
4051 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
4052 this->seekhigh = NULL;
4053 this->state &= ~STRINGBUF_allocated;
4056 basic_streambuf_wchar__Init_empty(&this->base);
4059 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
4060 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
4061 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
4062 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
4063 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
4064 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
4066 TRACE("(%p)\n", this);
4068 basic_stringbuf_wchar__Tidy(this);
4069 basic_streambuf_wchar_dtor(&this->base);
4072 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
4073 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
4075 TRACE("(%p %x)\n", this, flags);
4078 /* we have an array, with the number of elements stored before the first object */
4079 int i, *ptr = (int *) this - 1;
4081 for (i = *ptr - 1; i >= 0; i--)
4082 basic_stringbuf_wchar_dtor(this+i);
4084 MSVCRT_operator_delete(ptr);
4086 basic_stringbuf_wchar_dtor(this);
4089 MSVCRT_operator_delete(this);
4095 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4096 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4097 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4098 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4099 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
4100 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
4102 MSVCP_size_t oldsize, size;
4105 TRACE("(%p %x)\n", this, meta);
4109 if(this->state & STRINGBUF_no_write)
4112 ptr = basic_streambuf_wchar_pptr(&this->base);
4113 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
4114 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
4115 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
4117 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
4118 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4120 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
4123 buf = MSVCRT_operator_new(size);
4125 ERR("Out of memory\n");
4126 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4130 this->seekhigh = buf;
4131 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
4132 if(this->state & STRINGBUF_no_read)
4133 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4135 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
4137 this->state |= STRINGBUF_allocated;
4139 ptr = basic_streambuf_wchar_eback(&this->base);
4140 memcpy(buf, ptr, oldsize);
4142 this->seekhigh = buf+(this->seekhigh-ptr);
4143 basic_streambuf_wchar_setp_next(&this->base, buf,
4144 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
4145 if(this->state & STRINGBUF_no_read)
4146 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
4148 basic_streambuf_wchar_setg(&this->base, buf,
4149 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
4150 basic_streambuf_wchar_pptr(&this->base)+1);
4152 MSVCRT_operator_delete(ptr);
4155 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
4158 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
4159 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
4160 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
4161 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
4162 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
4163 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
4167 TRACE("(%p %x)\n", this, c);
4169 cur = basic_streambuf_wchar_gptr(&this->base);
4170 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
4171 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
4176 basic_streambuf_wchar_gbump(&this->base, -1);
4177 return c==WEOF ? !WEOF : c;
4180 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
4181 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
4182 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
4183 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
4184 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
4185 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
4189 TRACE("(%p)\n", this);
4191 cur = basic_streambuf_wchar_gptr(&this->base);
4192 if(!cur || this->state&STRINGBUF_no_read)
4195 ptr = basic_streambuf_wchar_pptr(&this->base);
4196 if(this->seekhigh < ptr)
4197 this->seekhigh = ptr;
4199 ptr = basic_streambuf_wchar_egptr(&this->base);
4200 if(this->seekhigh > ptr)
4201 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
4203 if(cur < this->seekhigh)
4208 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4209 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4210 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
4211 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
4212 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 24)
4213 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
4214 fpos_int *ret, streamoff off, int way, int mode)
4216 wchar_t *beg, *cur_r, *cur_w;
4218 TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
4220 cur_w = basic_streambuf_wchar_pptr(&this->base);
4221 if(cur_w > this->seekhigh)
4222 this->seekhigh = cur_w;
4227 beg = basic_streambuf_wchar_eback(&this->base);
4228 cur_r = basic_streambuf_wchar_gptr(&this->base);
4229 if((mode & OPENMODE_in) && cur_r) {
4230 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
4232 else if(way == SEEKDIR_end)
4233 off += this->seekhigh-beg;
4234 else if(way != SEEKDIR_beg)
4237 if(off<0 || off>this->seekhigh-beg) {
4240 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
4241 if((mode & OPENMODE_out) && cur_w) {
4242 basic_streambuf_wchar_setp_next(&this->base, beg,
4243 basic_streambuf_wchar_gptr(&this->base),
4244 basic_streambuf_wchar_epptr(&this->base));
4247 }else if((mode & OPENMODE_out) && cur_w) {
4248 if(way == SEEKDIR_cur)
4250 else if(way == SEEKDIR_end)
4251 off += this->seekhigh-beg;
4252 else if(way != SEEKDIR_beg)
4255 if(off<0 || off>this->seekhigh-beg)
4258 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
4267 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4268 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4269 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
4270 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
4271 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4272 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4273 fpos_int *ret, fpos_int pos, int mode)
4275 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4277 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
4282 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4285 /* ?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 */
4286 /* ?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 */
4287 /* ?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 */
4288 /* ?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 */
4289 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4290 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4292 TRACE("(%p %p)\n", this, str);
4294 basic_stringbuf_wchar__Tidy(this);
4295 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str), str->size, this->state);
4298 /* ?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 */
4299 /* ?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 */
4300 /* ?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 */
4301 /* ?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 */
4302 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4303 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4307 TRACE("(%p)\n", this);
4309 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4312 ptr = basic_streambuf_wchar_pbase(&this->base);
4313 pptr = basic_streambuf_wchar_pptr(&this->base);
4315 return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4318 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4319 ptr = basic_streambuf_wchar_eback(&this->base);
4320 return MSVCP_basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4323 return MSVCP_basic_string_wchar_ctor(ret);
4326 /* ??0ios_base@std@@IAE@XZ */
4327 /* ??0ios_base@std@@IEAA@XZ */
4328 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4329 ios_base* __thiscall ios_base_ctor(ios_base *this)
4331 TRACE("(%p)\n", this);
4332 this->vtable = &MSVCP_ios_base_vtable;
4336 /* ??0ios_base@std@@QAE@ABV01@@Z */
4337 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4338 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4339 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4341 TRACE("(%p %p)\n", this, copy);
4343 this->vtable = &MSVCP_ios_base_vtable;
4347 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4348 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4349 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4350 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4352 IOS_BASE_fnarray *cur;
4354 TRACE("(%p %x)\n", this, event);
4356 for(cur=this->calls; cur; cur=cur->next)
4357 cur->event_handler(event, this, cur->index);
4360 /* ?_Tidy@ios_base@std@@AAAXXZ */
4361 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4362 void CDECL ios_base_Tidy(ios_base *this)
4364 IOS_BASE_iosarray *arr_cur, *arr_next;
4365 IOS_BASE_fnarray *event_cur, *event_next;
4367 TRACE("(%p)\n", this);
4369 ios_base_Callfns(this, EVENT_erase_event);
4371 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4372 arr_next = arr_cur->next;
4373 MSVCRT_operator_delete(arr_cur);
4377 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4378 event_next = event_cur->next;
4379 MSVCRT_operator_delete(event_cur);
4384 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4385 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4386 void CDECL ios_base_Ios_base_dtor(ios_base *obj)
4388 TRACE("(%p)\n", obj);
4390 locale_dtor(obj->loc);
4391 MSVCRT_operator_delete(obj->loc);
4396 /* ??1ios_base@std@@UAE@XZ */
4397 /* ??1ios_base@std@@UEAA@XZ */
4398 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4399 void __thiscall ios_base_dtor(ios_base *this)
4401 ios_base_Ios_base_dtor(this);
4404 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4405 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4407 TRACE("(%p %x)\n", this, flags);
4409 /* we have an array, with the number of elements stored before the first object */
4410 int i, *ptr = (int *)this-1;
4412 for(i=*ptr-1; i>=0; i--)
4413 ios_base_dtor(this+i);
4414 MSVCRT_operator_delete(ptr);
4416 ios_base_dtor(this);
4418 MSVCRT_operator_delete(this);
4424 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4425 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4427 TRACE("(%p %x)\n", this, flags);
4429 int *ptr = (int *)this-1;
4430 MSVCRT_operator_delete(ptr);
4433 MSVCRT_operator_delete(this);
4439 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4440 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4441 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4442 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4444 IOS_BASE_iosarray *p;
4446 TRACE("(%p %d)\n", this, index);
4448 for(p=this->arr; p; p=p->next) {
4449 if(p->index == index)
4453 for(p=this->arr; p; p=p->next) {
4454 if(!p->long_val && !p->ptr_val) {
4460 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4461 p->next = this->arr;
4469 /* ?iword@ios_base@std@@QAEAAJH@Z */
4470 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4471 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4472 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4474 TRACE("(%p %d)\n", this, index);
4475 return &ios_base_Findarr(this, index)->long_val;
4478 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4479 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4480 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4481 void** __thiscall ios_base_pword(ios_base *this, int index)
4483 TRACE("(%p %d)\n", this, index);
4484 return &ios_base_Findarr(this, index)->ptr_val;
4487 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4488 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4489 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4490 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4492 IOS_BASE_fnarray *event;
4494 TRACE("(%p %p %d)\n", this, callback, index);
4496 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4497 event->next = this->calls;
4498 event->index = index;
4499 event->event_handler = callback;
4500 this->calls = event;
4503 /* ?clear@ios_base@std@@QAEXH_N@Z */
4504 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4505 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4506 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4508 TRACE("(%p %x %x)\n", this, state, reraise);
4510 this->state = state & IOSTATE_mask;
4511 if(!(this->state & this->except))
4515 throw_exception(EXCEPTION_RERAISE, NULL);
4516 else if(this->state & this->except & IOSTATE_eofbit)
4517 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4518 else if(this->state & this->except & IOSTATE_failbit)
4519 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4520 else if(this->state & this->except & IOSTATE_badbit)
4521 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4522 else if(this->state & this->except & IOSTATE__Hardfail)
4523 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4526 /* ?clear@ios_base@std@@QAEXH@Z */
4527 /* ?clear@ios_base@std@@QEAAXH@Z */
4528 DEFINE_THISCALL_WRAPPER(ios_base_clear, 8)
4529 void __thiscall ios_base_clear(ios_base *this, IOSB_iostate state)
4531 ios_base_clear_reraise(this, state, FALSE);
4534 /* ?clear@ios_base@std@@QAEXI@Z */
4535 /* ?clear@ios_base@std@@QEAAXI@Z */
4536 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned, 8)
4537 void __thiscall ios_base_clear_unsigned(ios_base *this, unsigned int state)
4539 ios_base_clear_reraise(this, (IOSB_iostate)state, FALSE);
4542 /* ?exceptions@ios_base@std@@QAEXH@Z */
4543 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4544 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4545 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4547 TRACE("(%p %x)\n", this, state);
4548 this->except = state & IOSTATE_mask;
4549 ios_base_clear(this, this->state);
4552 /* ?exceptions@ios_base@std@@QAEXI@Z */
4553 /* ?exceptions@ios_base@std@@QEAAXI@Z */
4554 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned, 8)
4555 void __thiscall ios_base_exceptions_set_unsigned(ios_base *this, unsigned int state)
4557 TRACE("(%p %x)\n", this, state);
4558 ios_base_exceptions_set(this, state);
4561 /* ?exceptions@ios_base@std@@QBEHXZ */
4562 /* ?exceptions@ios_base@std@@QEBAHXZ */
4563 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4564 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4566 TRACE("(%p)\n", this);
4567 return this->except;
4570 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4571 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4572 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4573 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4575 TRACE("(%p %p)\n", this, rhs);
4578 IOS_BASE_iosarray *arr_cur;
4579 IOS_BASE_fnarray *event_cur;
4581 ios_base_Tidy(this);
4583 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4584 if(arr_cur->long_val)
4585 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4586 if(arr_cur->ptr_val)
4587 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4589 this->stdstr = rhs->stdstr;
4590 this->fmtfl = rhs->fmtfl;
4591 this->prec = rhs->prec;
4592 this->wide = rhs->wide;
4593 locale_operator_assign(this->loc, rhs->loc);
4595 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4596 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4598 ios_base_Callfns(this, EVENT_copyfmt_event);
4599 ios_base_exceptions_set(this, rhs->except);
4605 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4606 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4607 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4608 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4610 TRACE("(%p %p)\n", this, right);
4613 this->state = right->state;
4614 ios_base_copyfmt(this, right);
4620 /* ?fail@ios_base@std@@QBE_NXZ */
4621 /* ?fail@ios_base@std@@QEBA_NXZ */
4622 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4623 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4625 TRACE("(%p)\n", this);
4626 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4629 /* ??7ios_base@std@@QBE_NXZ */
4630 /* ??7ios_base@std@@QEBA_NXZ */
4631 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4632 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4634 TRACE("(%p)\n", this);
4635 return ios_base_fail(this);
4638 /* ??Bios_base@std@@QBEPAXXZ */
4639 /* ??Bios_base@std@@QEBAPEAXXZ */
4640 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4641 void* __thiscall ios_base_op_fail(const ios_base *this)
4643 TRACE("(%p)\n", this);
4644 return ios_base_fail(this) ? NULL : (void*)this;
4647 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4648 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4649 void CDECL ios_base_Addstd(ios_base *add)
4651 FIXME("(%p) stub\n", add);
4654 /* ?_Index_func@ios_base@std@@CAAAHXZ */
4655 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
4656 int* CDECL ios_base_Index_func(void)
4659 return &ios_base_Index;
4662 /* ?_Init@ios_base@std@@IAEXXZ */
4663 /* ?_Init@ios_base@std@@IEAAXXZ */
4664 DEFINE_THISCALL_WRAPPER(ios_base_Init, 4)
4665 void __thiscall ios_base_Init(ios_base *this)
4667 TRACE("(%p)\n", this);
4670 this->state = this->except = IOSTATE_goodbit;
4671 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4676 this->loc = MSVCRT_operator_new(sizeof(locale));
4677 locale_ctor(this->loc);
4680 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
4681 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
4682 MSVCP_bool* CDECL ios_base_Sync_func(void)
4685 return &ios_base_Sync;
4688 /* ?bad@ios_base@std@@QBE_NXZ */
4689 /* ?bad@ios_base@std@@QEBA_NXZ */
4690 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4691 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4693 TRACE("(%p)\n", this);
4694 return (this->state & IOSTATE_badbit) != 0;
4697 /* ?eof@ios_base@std@@QBE_NXZ */
4698 /* ?eof@ios_base@std@@QEBA_NXZ */
4699 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4700 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4702 TRACE("(%p)\n", this);
4703 return (this->state & IOSTATE_eofbit) != 0;
4706 /* ?flags@ios_base@std@@QAEHH@Z */
4707 /* ?flags@ios_base@std@@QEAAHH@Z */
4708 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4709 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4711 IOSB_fmtflags ret = this->fmtfl;
4713 TRACE("(%p %x)\n", this, flags);
4715 this->fmtfl = flags & FMTFLAG_mask;
4719 /* ?flags@ios_base@std@@QBEHXZ */
4720 /* ?flags@ios_base@std@@QEBAHXZ */
4721 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4722 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4724 TRACE("(%p)\n", this);
4728 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4729 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4730 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4731 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4733 TRACE("(%p)\n", this);
4734 return locale_copy_ctor(ret, this->loc);
4737 /* ?good@ios_base@std@@QBE_NXZ */
4738 /* ?good@ios_base@std@@QEBA_NXZ */
4739 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4740 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4742 TRACE("(%p)\n", this);
4743 return this->state == IOSTATE_goodbit;
4746 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4747 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4748 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4749 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4751 TRACE("(%p %p)\n", this, loc);
4753 locale_copy_ctor(this->loc, loc);
4757 /* ?precision@ios_base@std@@QAEHH@Z */
4758 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4759 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 12)
4760 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4762 streamsize ret = this->prec;
4764 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(precision));
4766 this->prec = precision;
4770 /* ?precision@ios_base@std@@QBEHXZ */
4771 /* ?precision@ios_base@std@@QEBA_JXZ */
4772 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4773 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4775 TRACE("(%p)\n", this);
4779 /* ?rdstate@ios_base@std@@QBEHXZ */
4780 /* ?rdstate@ios_base@std@@QEBAHXZ */
4781 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4782 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4784 TRACE("(%p)\n", this);
4788 /* ?setf@ios_base@std@@QAEHHH@Z */
4789 /* ?setf@ios_base@std@@QEAAHHH@Z */
4790 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4791 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4793 IOSB_fmtflags ret = this->fmtfl;
4795 TRACE("(%p %x %x)\n", this, flags, mask);
4797 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4801 /* ?setf@ios_base@std@@QAEHH@Z */
4802 /* ?setf@ios_base@std@@QEAAHH@Z */
4803 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4804 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4806 return ios_base_setf_mask(this, flags, ~0);
4809 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4810 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4811 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4812 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4814 TRACE("(%p %x %x)\n", this, state, reraise);
4816 if(state != IOSTATE_goodbit)
4817 ios_base_clear_reraise(this, this->state | state, reraise);
4820 /* ?setstate@ios_base@std@@QAEXH@Z */
4821 /* ?setstate@ios_base@std@@QEAAXH@Z */
4822 DEFINE_THISCALL_WRAPPER(ios_base_setstate, 8)
4823 void __thiscall ios_base_setstate(ios_base *this, IOSB_iostate state)
4825 ios_base_setstate_reraise(this, state, FALSE);
4828 /* ?setstate@ios_base@std@@QAEXI@Z */
4829 /* ?setstate@ios_base@std@@QEAAXI@Z */
4830 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned, 8)
4831 void __thiscall ios_base_setstate_unsigned(ios_base *this, unsigned int state)
4833 ios_base_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4836 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4837 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4842 TRACE("(%x)\n", sync);
4844 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4845 ret = ios_base_Sync;
4846 ios_base_Sync = sync;
4847 _Lockit_dtor(&lock);
4851 /* ?unsetf@ios_base@std@@QAEXH@Z */
4852 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4853 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4854 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4856 TRACE("(%p %x)\n", this, flags);
4857 this->fmtfl &= ~flags;
4860 /* ?width@ios_base@std@@QAEHH@Z */
4861 /* ?width@ios_base@std@@QEAA_J_J@Z */
4862 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 12)
4863 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4865 streamsize ret = this->wide;
4867 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(width));
4873 /* ?width@ios_base@std@@QBEHXZ */
4874 /* ?width@ios_base@std@@QEBA_JXZ */
4875 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4876 streamsize __thiscall ios_base_width_get(ios_base *this)
4878 TRACE("(%p)\n", this);
4882 /* ?xalloc@ios_base@std@@SAHXZ */
4883 int CDECL ios_base_xalloc(void)
4890 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4891 ret = ios_base_Index++;
4892 _Lockit_dtor(&lock);
4896 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4897 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4898 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4899 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4901 TRACE("(%p)\n", this);
4903 ios_base_ctor(&this->base);
4904 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4908 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4909 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4910 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4911 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4913 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4914 ios_base_Init(&this->base);
4915 this->strbuf = streambuf;
4916 this->stream = NULL;
4920 ios_base_setstate(&this->base, IOSTATE_badbit);
4923 FIXME("standard streams not handled yet\n");
4926 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4927 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4928 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4929 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4931 TRACE("(%p %p)\n", this, strbuf);
4933 basic_ios_char_ctor(this);
4934 basic_ios_char_init(this, strbuf, FALSE);
4938 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4939 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4940 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4941 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4943 TRACE("(%p)\n", this);
4944 ios_base_dtor(&this->base);
4947 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4948 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4950 TRACE("(%p %x)\n", this, flags);
4952 /* we have an array, with the number of elements stored before the first object */
4953 int i, *ptr = (int *)this-1;
4955 for(i=*ptr-1; i>=0; i--)
4956 basic_ios_char_dtor(this+i);
4957 MSVCRT_operator_delete(ptr);
4959 basic_ios_char_dtor(this);
4961 MSVCRT_operator_delete(this);
4967 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4968 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4969 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4970 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4972 TRACE("(%p %x %x)\n", this, state, reraise);
4973 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4976 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4977 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4978 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear, 8)
4979 void __thiscall basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4981 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4984 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4985 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4986 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4987 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4989 TRACE("(%p %p)\n", this, copy);
4993 this->stream = copy->stream;
4994 this->fillch = copy->fillch;
4995 ios_base_copyfmt(&this->base, ©->base);
4999 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
5000 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
5001 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
5002 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
5004 char ret = this->fillch;
5006 TRACE("(%p %c)\n", this, fill);
5008 this->fillch = fill;
5012 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
5013 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
5014 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
5015 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
5017 TRACE("(%p)\n", this);
5018 return this->fillch;
5021 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5022 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5023 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
5024 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
5026 TRACE("(%p %p %p)\n", this, ret, loc);
5029 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
5033 return ios_base_imbue(&this->base, ret, loc);
5036 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
5037 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
5038 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
5039 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
5041 TRACE("(%p %c %c)\n", this, ch, def);
5042 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf->loc), ch, def);
5045 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
5046 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5047 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
5048 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
5050 basic_streambuf_char *ret = this->strbuf;
5052 TRACE("(%p %p)\n", this, streambuf);
5054 this->strbuf = streambuf;
5055 basic_ios_char_clear(this, IOSTATE_goodbit);
5059 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5060 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
5061 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
5062 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
5064 TRACE("(%p)\n", this);
5065 return this->strbuf;
5068 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
5069 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
5070 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
5071 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
5073 TRACE("(%p %x %x)\n", this, state, reraise);
5075 if(state != IOSTATE_goodbit)
5076 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
5079 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
5080 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
5081 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate, 8)
5082 void __thiscall basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
5084 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
5087 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
5088 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
5089 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
5090 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
5092 basic_ostream_char *ret = this->stream;
5094 TRACE("(%p %p)\n", this, ostream);
5096 this->stream = ostream;
5100 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5101 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
5102 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
5103 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
5105 TRACE("(%p)\n", this);
5106 return this->stream;
5109 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
5110 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
5111 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
5112 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
5114 TRACE("(%p %c)\n", this, ch);
5115 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf->loc), ch);
5119 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
5120 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
5121 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor, 4)
5122 basic_ios_wchar* __thiscall basic_ios_wchar_ctor(basic_ios_wchar *this)
5124 TRACE("(%p)\n", this);
5126 ios_base_ctor(&this->base);
5127 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
5131 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
5132 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
5133 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
5134 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
5136 basic_ios_wchar_ctor(this);
5137 this->base.vtable = &MSVCP_basic_ios_short_vtable;
5141 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5142 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
5143 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5144 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
5145 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
5146 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
5148 TRACE("(%p %p %x)\n", this, streambuf, isstd);
5149 ios_base_Init(&this->base);
5150 this->strbuf = streambuf;
5151 this->stream = NULL;
5155 ios_base_setstate(&this->base, IOSTATE_badbit);
5158 FIXME("standard streams not handled yet\n");
5161 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5162 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5163 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf, 8)
5164 basic_ios_wchar* __thiscall basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
5166 TRACE("(%p %p)\n", this, strbuf);
5168 basic_ios_wchar_ctor(this);
5169 basic_ios_wchar_init(this, strbuf, FALSE);
5173 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5174 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5175 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
5176 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
5178 basic_ios_wchar_ctor_streambuf(this, strbuf);
5179 this->base.vtable = &MSVCP_basic_ios_short_vtable;
5183 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5184 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5185 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
5186 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5187 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
5188 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
5190 TRACE("(%p)\n", this);
5191 ios_base_dtor(&this->base);
5194 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
5195 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
5197 TRACE("(%p %x)\n", this, flags);
5199 /* we have an array, with the number of elements stored before the first object */
5200 int i, *ptr = (int *)this-1;
5202 for(i=*ptr-1; i>=0; i--)
5203 basic_ios_wchar_dtor(this+i);
5204 MSVCRT_operator_delete(ptr);
5206 basic_ios_wchar_dtor(this);
5208 MSVCRT_operator_delete(this);
5214 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5215 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5216 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5217 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5218 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
5219 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5221 TRACE("(%p %x %x)\n", this, state, reraise);
5222 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
5225 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5226 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5227 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5228 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5229 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear, 8)
5230 void __thiscall basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
5232 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
5235 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
5236 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5237 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
5238 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
5239 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
5240 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
5242 TRACE("(%p %p)\n", this, copy);
5246 this->stream = copy->stream;
5247 this->fillch = copy->fillch;
5248 ios_base_copyfmt(&this->base, ©->base);
5252 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
5253 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
5254 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
5255 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
5256 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
5257 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
5259 wchar_t ret = this->fillch;
5261 TRACE("(%p %c)\n", this, fill);
5263 this->fillch = fill;
5267 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
5268 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
5269 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
5270 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
5271 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
5272 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
5274 TRACE("(%p)\n", this);
5275 return this->fillch;
5278 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5279 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5280 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
5281 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
5282 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
5283 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
5285 TRACE("(%p %p %p)\n", this, ret, loc);
5288 return basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
5290 locale_copy_ctor(ret, loc);
5294 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
5295 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
5296 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
5297 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
5298 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
5299 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
5301 TRACE("(%p %c %c)\n", this, ch, def);
5302 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf->loc), ch, def);
5305 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5306 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5307 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
5308 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5309 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
5310 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
5312 basic_streambuf_wchar *ret = this->strbuf;
5314 TRACE("(%p %p)\n", this, streambuf);
5316 this->strbuf = streambuf;
5317 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5321 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5322 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5323 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5324 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5325 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5326 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5328 TRACE("(%p)\n", this);
5329 return this->strbuf;
5332 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5333 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5334 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5335 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5336 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5337 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5339 TRACE("(%p %x %x)\n", this, state, reraise);
5341 if(state != IOSTATE_goodbit)
5342 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5345 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5346 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5347 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5348 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5349 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate, 8)
5350 void __thiscall basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5352 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5355 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5356 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5357 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5358 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5359 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5360 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5362 basic_ostream_wchar *ret = this->stream;
5364 TRACE("(%p %p)\n", this, ostream);
5366 this->stream = ostream;
5370 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5371 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5372 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5373 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5374 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5375 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5377 TRACE("(%p)\n", this);
5378 return this->stream;
5381 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5382 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5383 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5384 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5385 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5386 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5388 TRACE("(%p %c)\n", this, ch);
5389 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf->loc), ch);
5392 /* Caution: basic_ostream uses virtual inheritance.
5393 * All constructors have additional parameter that says if base class should be initialized.
5394 * Base class needs to be accessed using vbtable.
5396 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5398 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5401 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5403 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5406 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5408 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5411 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5412 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5413 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 16)
5414 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
5415 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
5417 basic_ios_char *base;
5419 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
5422 this->vbtable = basic_ostream_char_vbtable;
5423 base = basic_ostream_char_get_basic_ios(this);
5424 basic_ios_char_ctor(base);
5426 base = basic_ostream_char_get_basic_ios(this);
5429 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5430 basic_ios_char_init(base, strbuf, isstd);
5434 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5435 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5436 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 16)
5437 basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5438 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
5440 basic_ios_char *base;
5442 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
5445 this->vbtable = basic_ostream_char_vbtable;
5446 base = basic_ostream_char_get_basic_ios(this);
5447 basic_ios_char_ctor(base);
5449 base = basic_ostream_char_get_basic_ios(this);
5452 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5454 ios_base_Addstd(&base->base);
5458 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5459 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5460 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5461 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5463 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5465 /* don't destroy virtual base here */
5466 TRACE("(%p)\n", this);
5469 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5470 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5471 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5472 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5474 TRACE("(%p)\n", this);
5475 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5476 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5479 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5480 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5482 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5484 TRACE("(%p %x)\n", this, flags);
5487 /* we have an array, with the number of elements stored before the first object */
5488 int i, *ptr = (int *)this-1;
5490 for(i=*ptr-1; i>=0; i--)
5491 basic_ostream_char_vbase_dtor(this+i);
5492 MSVCRT_operator_delete(ptr);
5494 basic_ostream_char_vbase_dtor(this);
5496 MSVCRT_operator_delete(this);
5502 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5503 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5504 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5505 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5507 /* this function is not matching C++ specification */
5508 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5510 TRACE("(%p)\n", this);
5512 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5513 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5514 basic_ios_char_setstate(base, IOSTATE_badbit);
5518 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5519 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5520 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx, 4)
5521 void __thiscall basic_ostream_char__Osfx(basic_ostream_char *this)
5523 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5525 TRACE("(%p)\n", this);
5527 if(base->base.fmtfl & FMTFLAG_unitbuf)
5528 basic_ostream_char_flush(this);
5531 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5532 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5533 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5534 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5536 TRACE("(%p)\n", this);
5537 basic_ostream_char__Osfx(this);
5540 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5542 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5544 if(basic_ios_char_rdbuf_get(base))
5545 call_basic_streambuf_char__Lock(base->strbuf);
5547 if(ios_base_good(&base->base) && base->stream)
5548 basic_ostream_char_flush(base->stream);
5550 return ios_base_good(&base->base);
5553 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5555 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5557 if(ios_base_good(&base->base) && !__uncaught_exception())
5558 basic_ostream_char_osfx(ostr);
5560 if(basic_ios_char_rdbuf_get(base))
5561 call_basic_streambuf_char__Unlock(base->strbuf);
5564 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5565 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5566 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5567 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5569 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5571 TRACE("(%p)\n", this);
5573 if(ios_base_good(&base->base) && base->stream)
5574 basic_ostream_char_flush(base->stream);
5575 return ios_base_good(&base->base);
5578 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5579 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5580 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5581 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5583 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5585 TRACE("(%p %c)\n", this, ch);
5587 if(!basic_ostream_char_sentry_create(this)
5588 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5589 basic_ostream_char_sentry_destroy(this);
5590 basic_ios_char_setstate(base, IOSTATE_badbit);
5594 basic_ostream_char_sentry_destroy(this);
5598 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
5599 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
5600 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp, 16)
5601 basic_ostream_char* __thiscall basic_ostream_char_seekp(basic_ostream_char *this, streamoff off, int way)
5603 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5605 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), way);
5607 if(!ios_base_fail(&base->base)) {
5610 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5611 &seek, off, way, OPENMODE_out);
5612 if(seek.off==0 && seek.pos==-1 && seek.state==0)
5613 basic_ios_char_setstate(base, IOSTATE_failbit);
5618 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5619 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5620 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5621 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5623 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5625 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5627 if(!ios_base_fail(&base->base)) {
5630 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5631 &seek, pos, OPENMODE_out);
5632 if(seek.off==0 && seek.pos==-1 && seek.state==0)
5633 basic_ios_char_setstate(base, IOSTATE_failbit);
5638 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5639 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5640 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5641 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5643 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5645 TRACE("(%p)\n", this);
5647 if(!ios_base_fail(&base->base)) {
5648 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5649 ret, 0, SEEKDIR_cur, OPENMODE_out);
5658 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5659 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5660 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 16)
5661 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5663 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5665 TRACE("(%p %s %s)\n", this, debugstr_a(str), wine_dbgstr_longlong(count));
5667 if(!basic_ostream_char_sentry_create(this)
5668 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5669 basic_ostream_char_sentry_destroy(this);
5670 basic_ios_char_setstate(base, IOSTATE_badbit);
5674 basic_ostream_char_sentry_destroy(this);
5678 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5679 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5680 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5681 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5683 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5684 int state = IOSTATE_goodbit;
5686 TRACE("(%p %d)\n", this, val);
5688 if(basic_ostream_char_sentry_create(this)) {
5689 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5690 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5691 ostreambuf_iterator_char dest = {0, strbuf};
5693 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5694 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5695 ? (LONG)((unsigned short)val) : (LONG)val);
5697 basic_ostream_char_sentry_destroy(this);
5699 basic_ios_char_setstate(base, state);
5703 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5704 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5705 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5706 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5708 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5709 int state = IOSTATE_goodbit;
5711 TRACE("(%p %u)\n", this, val);
5713 if(basic_ostream_char_sentry_create(this)) {
5714 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5715 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5716 ostreambuf_iterator_char dest = {0, strbuf};
5718 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5720 basic_ostream_char_sentry_destroy(this);
5722 basic_ios_char_setstate(base, state);
5726 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5727 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5728 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5729 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5730 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5731 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5733 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5734 int state = IOSTATE_goodbit;
5736 TRACE("(%p %d)\n", this, val);
5738 if(basic_ostream_char_sentry_create(this)) {
5739 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5740 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5741 ostreambuf_iterator_char dest = {0, strbuf};
5743 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5745 basic_ostream_char_sentry_destroy(this);
5747 basic_ios_char_setstate(base, state);
5751 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5752 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5753 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5754 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5755 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5756 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5758 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5759 int state = IOSTATE_goodbit;
5761 TRACE("(%p %u)\n", this, val);
5763 if(basic_ostream_char_sentry_create(this)) {
5764 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5765 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5766 ostreambuf_iterator_char dest = {0, strbuf};
5768 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5770 basic_ostream_char_sentry_destroy(this);
5772 basic_ios_char_setstate(base, state);
5776 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5777 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5778 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5779 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5781 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5782 int state = IOSTATE_goodbit;
5784 TRACE("(%p %f)\n", this, val);
5786 if(basic_ostream_char_sentry_create(this)) {
5787 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5788 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5789 ostreambuf_iterator_char dest = {0, strbuf};
5791 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5793 basic_ostream_char_sentry_destroy(this);
5795 basic_ios_char_setstate(base, state);
5799 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5800 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5801 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5802 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5804 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5805 int state = IOSTATE_goodbit;
5807 TRACE("(%p %lf)\n", this, val);
5809 if(basic_ostream_char_sentry_create(this)) {
5810 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5811 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5812 ostreambuf_iterator_char dest = {0, strbuf};
5814 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5816 basic_ostream_char_sentry_destroy(this);
5818 basic_ios_char_setstate(base, state);
5822 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5823 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5824 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5825 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5827 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5828 int state = IOSTATE_goodbit;
5830 TRACE("(%p %lf)\n", this, val);
5832 if(basic_ostream_char_sentry_create(this)) {
5833 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5834 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5835 ostreambuf_iterator_char dest = {0, strbuf};
5837 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5839 basic_ostream_char_sentry_destroy(this);
5841 basic_ios_char_setstate(base, state);
5845 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5846 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5847 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5848 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5850 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5851 IOSB_iostate state = IOSTATE_badbit;
5854 TRACE("(%p %p)\n", this, val);
5856 if(basic_ostream_char_sentry_create(this)) {
5857 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5858 c = basic_streambuf_char_snextc(val)) {
5859 state = IOSTATE_goodbit;
5861 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5862 state = IOSTATE_badbit;
5867 state = IOSTATE_badbit;
5869 basic_ostream_char_sentry_destroy(this);
5871 ios_base_width_set(&base->base, 0);
5872 basic_ios_char_setstate(base, state);
5876 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5877 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5878 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5879 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5881 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5882 int state = IOSTATE_goodbit;
5884 TRACE("(%p %p)\n", this, val);
5886 if(basic_ostream_char_sentry_create(this)) {
5887 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5888 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5889 ostreambuf_iterator_char dest = {0, strbuf};
5891 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5893 basic_ostream_char_sentry_destroy(this);
5895 basic_ios_char_setstate(base, state);
5899 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5900 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5901 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5902 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5904 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5905 int state = IOSTATE_goodbit;
5907 TRACE("(%p)\n", this);
5909 if(basic_ostream_char_sentry_create(this)) {
5910 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5911 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5912 ostreambuf_iterator_char dest = {0, strbuf};
5914 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5916 basic_ostream_char_sentry_destroy(this);
5918 basic_ios_char_setstate(base, state);
5922 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5923 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5924 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5925 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5927 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5928 int state = IOSTATE_goodbit;
5930 TRACE("(%p)\n", this);
5932 if(basic_ostream_char_sentry_create(this)) {
5933 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5934 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5935 ostreambuf_iterator_char dest = {0, strbuf};
5937 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5939 basic_ostream_char_sentry_destroy(this);
5941 basic_ios_char_setstate(base, state);
5945 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5946 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5947 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5948 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5950 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5951 int state = IOSTATE_goodbit;
5953 TRACE("(%p %x)\n", this, val);
5955 if(basic_ostream_char_sentry_create(this)) {
5956 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5957 const num_put *numput = num_put_char_use_facet(strbuf->loc);
5958 ostreambuf_iterator_char dest = {0, strbuf};
5960 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5962 basic_ostream_char_sentry_destroy(this);
5964 basic_ios_char_setstate(base, state);
5968 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5969 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5970 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5972 TRACE("(%p)\n", ostr);
5974 basic_ostream_char_put(ostr, '\n');
5975 basic_ostream_char_flush(ostr);
5979 /* $?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 */
5980 /* ??$?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 */
5981 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5983 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5984 IOSB_iostate state = IOSTATE_goodbit;
5986 TRACE("(%p %p)\n", ostr, str);
5988 if(basic_ostream_char_sentry_create(ostr)) {
5989 MSVCP_size_t len = MSVCP_basic_string_char_length(str);
5990 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5992 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5993 for(; pad!=0; pad--) {
5994 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5995 state = IOSTATE_badbit;
6001 if(state == IOSTATE_goodbit) {
6002 if(basic_streambuf_char_sputn(base->strbuf, MSVCP_basic_string_char_c_str(str), len) != len)
6003 state = IOSTATE_badbit;
6006 if(state == IOSTATE_goodbit) {
6007 for(; pad!=0; pad--) {
6008 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6009 state = IOSTATE_badbit;
6015 base->base.wide = 0;
6017 state = IOSTATE_badbit;
6019 basic_ostream_char_sentry_destroy(ostr);
6021 basic_ios_char_setstate(base, state);
6025 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
6026 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
6027 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
6028 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
6029 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
6030 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
6031 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
6033 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
6034 IOSB_iostate state = IOSTATE_goodbit;
6036 TRACE("(%p %d)\n", ostr, ch);
6038 if(basic_ostream_char_sentry_create(ostr)) {
6039 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6041 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6042 for(; pad!=0; pad--) {
6043 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6044 state = IOSTATE_badbit;
6050 if(state == IOSTATE_goodbit) {
6051 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
6052 state = IOSTATE_badbit;
6055 if(state == IOSTATE_goodbit) {
6056 for(; pad!=0; pad--) {
6057 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6058 state = IOSTATE_badbit;
6064 base->base.wide = 0;
6066 state = IOSTATE_badbit;
6068 basic_ostream_char_sentry_destroy(ostr);
6070 basic_ios_char_setstate(base, state);
6074 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
6075 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
6076 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
6077 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
6078 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
6079 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
6080 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
6082 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
6083 IOSB_iostate state = IOSTATE_goodbit;
6085 TRACE("(%p %s)\n", ostr, str);
6087 if(basic_ostream_char_sentry_create(ostr)) {
6088 MSVCP_size_t len = strlen(str);
6089 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6091 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6092 for(; pad!=0; pad--) {
6093 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6094 state = IOSTATE_badbit;
6100 if(state == IOSTATE_goodbit) {
6101 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
6102 state = IOSTATE_badbit;
6105 if(state == IOSTATE_goodbit) {
6106 for(; pad!=0; pad--) {
6107 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
6108 state = IOSTATE_badbit;
6114 base->base.wide = 0;
6116 state = IOSTATE_badbit;
6118 basic_ostream_char_sentry_destroy(ostr);
6120 basic_ios_char_setstate(base, state);
6124 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6125 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6126 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
6127 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
6128 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
6130 TRACE("(%p %p)\n", this, pfunc);
6135 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
6136 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
6137 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
6138 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
6139 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
6141 TRACE("(%p %p)\n", this, pfunc);
6142 pfunc(basic_ostream_char_get_basic_ios(this));
6146 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6147 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6148 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
6149 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
6150 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
6152 TRACE("(%p %p)\n", this, pfunc);
6153 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
6157 /* Caution: basic_ostream uses virtual inheritance. */
6158 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
6160 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
6163 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
6165 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
6168 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
6170 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
6173 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6174 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6175 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor, 16)
6176 basic_ostream_wchar* __thiscall basic_ostream_wchar_ctor(basic_ostream_wchar *this,
6177 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6179 basic_ios_wchar *base;
6181 TRACE("(%p %p %d %d)\n", this, strbuf, isstd, virt_init);
6184 this->vbtable = basic_ostream_wchar_vbtable;
6185 base = basic_ostream_wchar_get_basic_ios(this);
6186 basic_ios_wchar_ctor(base);
6188 base = basic_ostream_wchar_get_basic_ios(this);
6191 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6192 basic_ios_wchar_init(base, strbuf, isstd);
6196 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6197 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6198 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor, 16)
6199 basic_ostream_wchar* __thiscall basic_ostream_short_ctor(basic_ostream_wchar *this,
6200 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6202 basic_ostream_wchar_ctor(this, strbuf, isstd, virt_init);
6203 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
6207 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
6208 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
6209 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized, 16)
6210 basic_ostream_wchar* __thiscall basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar *this,
6211 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
6213 basic_ios_wchar *base;
6215 TRACE("(%p %d %x)\n", this, uninitialized, addstd);
6218 this->vbtable = basic_ostream_wchar_vbtable;
6219 base = basic_ostream_wchar_get_basic_ios(this);
6220 basic_ios_wchar_ctor(base);
6222 base = basic_ostream_wchar_get_basic_ios(this);
6225 base->base.vtable = &MSVCP_basic_ostream_wchar_vtable;
6227 ios_base_Addstd(&base->base);
6231 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
6232 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
6233 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized, 16)
6234 basic_ostream_wchar* __thiscall basic_ostream_short_ctor_uninitialized(basic_ostream_wchar *this,
6235 int uninitialized, MSVCP_bool addstd, MSVCP_bool virt_init)
6237 basic_ostream_wchar_ctor_uninitialized(this, uninitialized, addstd, virt_init);
6238 basic_ostream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_ostream_short_vtable;
6242 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6243 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6244 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6245 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6246 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
6247 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
6249 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6251 /* don't destroy virtual base here */
6252 TRACE("(%p)\n", this);
6255 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6256 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6257 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6258 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6259 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
6260 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
6262 TRACE("(%p)\n", this);
6263 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
6264 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
6267 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
6268 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
6270 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
6272 TRACE("(%p %x)\n", this, flags);
6275 /* we have an array, with the number of elements stored before the first object */
6276 int i, *ptr = (int *)this-1;
6278 for(i=*ptr-1; i>=0; i--)
6279 basic_ostream_wchar_vbase_dtor(this+i);
6280 MSVCRT_operator_delete(ptr);
6282 basic_ostream_wchar_vbase_dtor(this);
6284 MSVCRT_operator_delete(this);
6290 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
6291 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
6292 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
6293 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
6294 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
6295 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
6297 /* this function is not matching C++ specification */
6298 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6300 TRACE("(%p)\n", this);
6302 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
6303 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
6304 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6308 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6309 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6310 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6311 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6312 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx, 4)
6313 void __thiscall basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
6315 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6317 TRACE("(%p)\n", this);
6319 if(base->base.fmtfl & FMTFLAG_unitbuf)
6320 basic_ostream_wchar_flush(this);
6323 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6324 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6325 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6326 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6327 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
6328 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
6330 TRACE("(%p)\n", this);
6331 basic_ostream_wchar__Osfx(this);
6334 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6336 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6338 if(basic_ios_wchar_rdbuf_get(base))
6339 basic_streambuf_wchar__Lock(base->strbuf);
6341 if(ios_base_good(&base->base) && base->stream)
6342 basic_ostream_wchar_flush(base->stream);
6344 return ios_base_good(&base->base);
6347 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6349 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6351 if(ios_base_good(&base->base) && !__uncaught_exception())
6352 basic_ostream_wchar_osfx(ostr);
6354 if(basic_ios_wchar_rdbuf_get(base))
6355 basic_streambuf_wchar__Unlock(base->strbuf);
6358 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6359 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6360 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6361 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6362 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6363 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6365 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6367 TRACE("(%p)\n", this);
6369 if(ios_base_good(&base->base) && base->stream)
6370 basic_ostream_wchar_flush(base->stream);
6371 return ios_base_good(&base->base);
6374 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6375 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6376 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6377 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6378 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6379 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6381 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6383 TRACE("(%p %c)\n", this, ch);
6385 if(!basic_ostream_wchar_sentry_create(this)
6386 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6387 basic_ostream_wchar_sentry_destroy(this);
6388 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6392 basic_ostream_wchar_sentry_destroy(this);
6396 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
6397 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
6398 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
6399 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
6400 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp, 16)
6401 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp(basic_ostream_wchar *this, streamoff off, int way)
6403 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6405 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), way);
6407 if(!ios_base_fail(&base->base)) {
6410 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6411 &seek, off, way, OPENMODE_out);
6412 if(seek.off==0 && seek.pos==-1 && seek.state==0)
6413 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6418 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6419 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6420 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6421 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6422 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6423 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6425 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6427 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6429 if(!ios_base_fail(&base->base)) {
6432 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6433 &seek, pos, OPENMODE_out);
6434 if(seek.off==0 && seek.pos==-1 && seek.state==0)
6435 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6440 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6441 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6442 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6443 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6444 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6445 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6447 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6449 TRACE("(%p)\n", this);
6451 if(!ios_base_fail(&base->base)) {
6452 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6453 ret, 0, SEEKDIR_cur, OPENMODE_out);
6462 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6463 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6464 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6465 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6466 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 16)
6467 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6469 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6471 TRACE("(%p %s %s)\n", this, debugstr_w(str), wine_dbgstr_longlong(count));
6473 if(!basic_ostream_wchar_sentry_create(this)
6474 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6475 basic_ostream_wchar_sentry_destroy(this);
6476 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6480 basic_ostream_wchar_sentry_destroy(this);
6484 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6486 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6487 int state = IOSTATE_goodbit;
6489 TRACE("(%p %d)\n", this, val);
6491 if(basic_ostream_wchar_sentry_create(this)) {
6492 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6493 ostreambuf_iterator_wchar dest = {0, strbuf};
6495 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6496 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6497 ? (LONG)((unsigned short)val) : (LONG)val);
6499 basic_ostream_wchar_sentry_destroy(this);
6501 basic_ios_wchar_setstate(base, state);
6505 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
6506 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
6507 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short, 8)
6508 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_short(basic_ostream_wchar *this, short val)
6510 return basic_ostream_print_short(this, val, num_put_wchar_use_facet(
6511 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6514 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6515 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6516 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6517 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6519 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6520 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6523 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
6524 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
6525 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort, 8)
6526 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ushort(basic_ostream_wchar *this, unsigned short val)
6528 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6529 int state = IOSTATE_goodbit;
6531 TRACE("(%p %u)\n", this, val);
6533 if(basic_ostream_wchar_sentry_create(this)) {
6534 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6535 const num_put *numput = num_put_wchar_use_facet(strbuf->loc);
6536 ostreambuf_iterator_wchar dest = {0, strbuf};
6538 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6540 basic_ostream_wchar_sentry_destroy(this);
6542 basic_ios_wchar_setstate(base, state);
6546 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6548 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6549 int state = IOSTATE_goodbit;
6551 TRACE("(%p %d)\n", this, val);
6553 if(basic_ostream_wchar_sentry_create(this)) {
6554 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6555 ostreambuf_iterator_wchar dest = {0, strbuf};
6557 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6559 basic_ostream_wchar_sentry_destroy(this);
6561 basic_ios_wchar_setstate(base, state);
6565 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
6566 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
6567 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
6568 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
6569 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int, 8)
6570 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int(basic_ostream_wchar *this, int val)
6572 return basic_ostream_print_int(this, val, num_put_wchar_use_facet(
6573 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6576 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6577 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6578 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6579 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6580 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6581 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6583 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6584 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6587 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6589 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6590 int state = IOSTATE_goodbit;
6592 TRACE("(%p %u)\n", this, val);
6594 if(basic_ostream_wchar_sentry_create(this)) {
6595 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6596 ostreambuf_iterator_wchar dest = {0, strbuf};
6598 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6600 basic_ostream_wchar_sentry_destroy(this);
6602 basic_ios_wchar_setstate(base, state);
6606 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
6607 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
6608 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
6609 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
6610 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint, 8)
6611 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint(basic_ostream_wchar *this, unsigned int val)
6613 return basic_ostream_print_uint(this, val, num_put_wchar_use_facet(
6614 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6617 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6618 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6619 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6620 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6621 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6622 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6624 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6625 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6628 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6630 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6631 int state = IOSTATE_goodbit;
6633 TRACE("(%p %f)\n", this, val);
6635 if(basic_ostream_wchar_sentry_create(this)) {
6636 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6637 ostreambuf_iterator_wchar dest = {0, strbuf};
6639 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6641 basic_ostream_wchar_sentry_destroy(this);
6643 basic_ios_wchar_setstate(base, state);
6647 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
6648 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
6649 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float, 8)
6650 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_float(basic_ostream_wchar *this, float val)
6652 return basic_ostream_print_float(this, val, num_put_wchar_use_facet(
6653 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6656 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6657 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6658 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6659 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6661 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6662 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6665 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6667 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6668 int state = IOSTATE_goodbit;
6670 TRACE("(%p %lf)\n", this, val);
6672 if(basic_ostream_wchar_sentry_create(this)) {
6673 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6674 ostreambuf_iterator_wchar dest = {0, strbuf};
6676 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6678 basic_ostream_wchar_sentry_destroy(this);
6680 basic_ios_wchar_setstate(base, state);
6684 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
6685 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
6686 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double, 12)
6687 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_double(basic_ostream_wchar *this, double val)
6689 return basic_ostream_print_double(this, val, num_put_wchar_use_facet(
6690 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6693 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6694 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6695 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6696 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6698 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6699 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6702 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6704 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6705 int state = IOSTATE_goodbit;
6707 TRACE("(%p %lf)\n", this, val);
6709 if(basic_ostream_wchar_sentry_create(this)) {
6710 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6711 ostreambuf_iterator_wchar dest = {0, strbuf};
6713 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6715 basic_ostream_wchar_sentry_destroy(this);
6717 basic_ios_wchar_setstate(base, state);
6721 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
6722 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
6723 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble, 12)
6724 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ldouble(basic_ostream_wchar *this, double val)
6726 return basic_ostream_print_ldouble(this, val, num_put_wchar_use_facet(
6727 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6730 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6731 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6732 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6733 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6735 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6736 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6739 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6740 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6741 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6742 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6743 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6744 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6746 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6747 IOSB_iostate state = IOSTATE_badbit;
6748 unsigned short c = '\n';
6750 TRACE("(%p %p)\n", this, val);
6752 if(basic_ostream_wchar_sentry_create(this)) {
6753 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6754 c = basic_streambuf_wchar_snextc(val)) {
6755 state = IOSTATE_goodbit;
6757 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6758 state = IOSTATE_badbit;
6763 state = IOSTATE_badbit;
6765 basic_ostream_wchar_sentry_destroy(this);
6767 ios_base_width_set(&base->base, 0);
6768 basic_ios_wchar_setstate(base, state);
6772 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6774 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6775 int state = IOSTATE_goodbit;
6777 TRACE("(%p %p)\n", this, val);
6779 if(basic_ostream_wchar_sentry_create(this)) {
6780 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6781 ostreambuf_iterator_wchar dest = {0, strbuf};
6783 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6785 basic_ostream_wchar_sentry_destroy(this);
6787 basic_ios_wchar_setstate(base, state);
6791 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
6792 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
6793 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr, 8)
6794 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_ptr(basic_ostream_wchar *this, const void *val)
6796 return basic_ostream_print_ptr(this, val, num_put_wchar_use_facet(
6797 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6800 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6801 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6802 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6803 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6805 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6806 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6809 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6811 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6812 int state = IOSTATE_goodbit;
6814 TRACE("(%p)\n", this);
6816 if(basic_ostream_wchar_sentry_create(this)) {
6817 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6818 ostreambuf_iterator_wchar dest = {0, strbuf};
6820 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6822 basic_ostream_wchar_sentry_destroy(this);
6824 basic_ios_wchar_setstate(base, state);
6828 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
6829 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
6830 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64, 12)
6831 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_int64(basic_ostream_wchar *this, __int64 val)
6833 return basic_ostream_print_int64(this, val, num_put_wchar_use_facet(
6834 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6837 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6838 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6839 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6840 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6842 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6843 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6846 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6848 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6849 int state = IOSTATE_goodbit;
6851 TRACE("(%p)\n", this);
6853 if(basic_ostream_wchar_sentry_create(this)) {
6854 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6855 ostreambuf_iterator_wchar dest = {0, strbuf};
6857 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6859 basic_ostream_wchar_sentry_destroy(this);
6861 basic_ios_wchar_setstate(base, state);
6865 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
6866 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
6867 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64, 12)
6868 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6870 return basic_ostream_print_uint64(this, val, num_put_wchar_use_facet(
6871 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6874 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6875 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6876 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6877 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6879 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6880 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6883 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6885 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6886 int state = IOSTATE_goodbit;
6888 TRACE("(%p %x)\n", this, val);
6890 if(basic_ostream_wchar_sentry_create(this)) {
6891 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6892 ostreambuf_iterator_wchar dest = {0, strbuf};
6894 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6896 basic_ostream_wchar_sentry_destroy(this);
6898 basic_ios_wchar_setstate(base, state);
6902 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
6903 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
6904 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool, 8)
6905 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6907 return basic_ostream_print_bool(this, val, num_put_wchar_use_facet(
6908 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6911 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6912 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6913 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6914 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6916 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6917 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6920 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6921 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6922 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6923 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6924 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6926 TRACE("(%p)\n", ostr);
6928 basic_ostream_wchar_put(ostr, '\n');
6929 basic_ostream_wchar_flush(ostr);
6933 /* ??$?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 */
6934 /* ??$?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 */
6935 /* ??$?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 */
6936 /* ??$?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 */
6937 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6939 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6940 IOSB_iostate state = IOSTATE_goodbit;
6942 TRACE("(%p %p)\n", ostr, str);
6944 if(basic_ostream_wchar_sentry_create(ostr)) {
6945 MSVCP_size_t len = MSVCP_basic_string_wchar_length(str);
6946 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6948 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6949 for(; pad!=0; pad--) {
6950 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6951 state = IOSTATE_badbit;
6957 if(state == IOSTATE_goodbit) {
6958 if(basic_streambuf_wchar_sputn(base->strbuf, MSVCP_basic_string_wchar_c_str(str), len) != len)
6959 state = IOSTATE_badbit;
6962 if(state == IOSTATE_goodbit) {
6963 for(; pad!=0; pad--) {
6964 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6965 state = IOSTATE_badbit;
6971 base->base.wide = 0;
6973 state = IOSTATE_badbit;
6975 basic_ostream_wchar_sentry_destroy(ostr);
6977 basic_ios_wchar_setstate(base, state);
6981 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6982 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6983 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6984 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6985 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6987 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6988 IOSB_iostate state = IOSTATE_goodbit;
6990 TRACE("(%p %d)\n", ostr, ch);
6992 if(basic_ostream_wchar_sentry_create(ostr)) {
6993 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6995 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6996 for(; pad!=0; pad--) {
6997 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6998 state = IOSTATE_badbit;
7004 if(state == IOSTATE_goodbit) {
7005 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
7006 state = IOSTATE_badbit;
7009 if(state == IOSTATE_goodbit) {
7010 for(; pad!=0; pad--) {
7011 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7012 state = IOSTATE_badbit;
7018 base->base.wide = 0;
7020 state = IOSTATE_badbit;
7022 basic_ostream_wchar_sentry_destroy(ostr);
7024 basic_ios_wchar_setstate(base, state);
7028 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
7029 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
7030 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
7031 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
7032 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
7034 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
7035 IOSB_iostate state = IOSTATE_goodbit;
7037 TRACE("(%p %s)\n", ostr, debugstr_w(str));
7039 if(basic_ostream_wchar_sentry_create(ostr)) {
7040 MSVCP_size_t len = wcslen(str);
7041 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
7043 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
7044 for(; pad!=0; pad--) {
7045 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7046 state = IOSTATE_badbit;
7052 if(state == IOSTATE_goodbit) {
7053 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
7054 state = IOSTATE_badbit;
7057 if(state == IOSTATE_goodbit) {
7058 for(; pad!=0; pad--) {
7059 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
7060 state = IOSTATE_badbit;
7066 base->base.wide = 0;
7068 state = IOSTATE_badbit;
7070 basic_ostream_wchar_sentry_destroy(ostr);
7072 basic_ios_wchar_setstate(base, state);
7076 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7077 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7078 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7079 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7080 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
7081 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
7082 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
7084 TRACE("(%p %p)\n", this, pfunc);
7089 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
7090 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
7091 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
7092 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
7093 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
7094 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
7095 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
7097 TRACE("(%p %p)\n", this, pfunc);
7098 pfunc(basic_ostream_wchar_get_basic_ios(this));
7102 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7103 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7104 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7105 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7106 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
7107 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
7108 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
7110 TRACE("(%p %p)\n", this, pfunc);
7111 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
7115 /* Caution: basic_istream uses virtual inheritance. */
7116 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
7118 return (basic_ios_char*)((char*)this+this->vbtable[1]);
7121 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
7123 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
7126 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
7128 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
7131 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
7132 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
7133 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init, 20)
7134 basic_istream_char* __thiscall basic_istream_char_ctor_init(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7136 basic_ios_char *base;
7138 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7141 this->vbtable = basic_istream_char_vbtable;
7142 base = basic_istream_char_get_basic_ios(this);
7143 basic_ios_char_ctor(base);
7145 base = basic_istream_char_get_basic_ios(this);
7148 base->base.vtable = &MSVCP_basic_istream_char_vtable;
7151 basic_ios_char_init(base, strbuf, isstd);
7155 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
7156 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
7157 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
7158 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7160 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7163 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7164 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7165 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
7166 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
7168 basic_ios_char *base;
7170 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7173 this->vbtable = basic_istream_char_vbtable;
7174 base = basic_istream_char_get_basic_ios(this);
7175 basic_ios_char_ctor(base);
7177 base = basic_istream_char_get_basic_ios(this);
7180 base->base.vtable = &MSVCP_basic_istream_char_vtable;
7181 ios_base_Addstd(&base->base);
7185 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
7186 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
7187 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
7188 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
7190 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
7192 /* don't destroy virtual base here */
7193 TRACE("(%p)\n", this);
7196 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7197 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7198 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
7199 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
7201 TRACE("(%p)\n", this);
7202 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
7203 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
7206 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
7207 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
7209 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
7211 TRACE("(%p %x)\n", this, flags);
7214 /* we have an array, with the number of elements stored before the first object */
7215 int i, *ptr = (int *)this-1;
7217 for(i=*ptr-1; i>=0; i--)
7218 basic_istream_char_vbase_dtor(this+i);
7219 MSVCRT_operator_delete(ptr);
7221 basic_istream_char_vbase_dtor(this);
7223 MSVCRT_operator_delete(this);
7229 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
7230 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
7231 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx, 8)
7232 MSVCP_bool __thiscall basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
7234 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7236 TRACE("(%p %d)\n", this, noskip);
7238 if(!ios_base_good(&base->base)) {
7239 basic_ios_char_setstate(base, IOSTATE_failbit);
7243 if(basic_ios_char_tie_get(base))
7244 basic_ostream_char_flush(basic_ios_char_tie_get(base));
7246 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
7247 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7248 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
7251 for(ch = basic_streambuf_char_sgetc(strbuf); ;
7252 ch = basic_streambuf_char_snextc(strbuf)) {
7254 basic_ios_char_setstate(base, IOSTATE_eofbit);
7258 if(!ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
7266 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
7267 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
7268 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
7269 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
7271 return basic_istream_char__Ipfx(this, noskip);
7274 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7275 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7276 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
7277 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
7279 TRACE("(%p)\n", this);
7282 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
7284 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
7286 if(basic_ios_char_rdbuf_get(base))
7287 call_basic_streambuf_char__Lock(base->strbuf);
7289 return basic_istream_char_ipfx(istr, noskip);
7292 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
7294 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
7296 if(basic_ios_char_rdbuf_get(base))
7297 call_basic_streambuf_char__Unlock(base->strbuf);
7300 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
7301 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
7302 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
7303 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
7305 TRACE("(%p)\n", this);
7309 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7310 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7311 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
7312 int __thiscall basic_istream_char_get(basic_istream_char *this)
7314 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7317 TRACE("(%p)\n", this);
7321 if(!basic_istream_char_sentry_create(this, TRUE)) {
7322 basic_istream_char_sentry_destroy(this);
7326 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
7327 basic_istream_char_sentry_destroy(this);
7329 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
7336 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
7337 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
7338 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
7339 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
7343 TRACE("(%p %p)\n", this, ch);
7345 ret = basic_istream_char_get(this);
7351 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7352 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7353 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 20)
7354 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7356 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7359 TRACE("(%p %p %s %c)\n", this, str, wine_dbgstr_longlong(count), delim);
7363 if(basic_istream_char_sentry_create(this, TRUE)) {
7364 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7366 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
7367 ch = basic_streambuf_char_snextc(strbuf)) {
7368 if(ch==EOF || ch==delim)
7376 basic_istream_char_sentry_destroy(this);
7378 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7379 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7385 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7386 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7387 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 16)
7388 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
7390 return basic_istream_char_get_str_delim(this, str, count, '\n');
7393 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7394 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
7395 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
7396 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
7398 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7401 TRACE("(%p %p %c)\n", this, strbuf, delim);
7405 if(basic_istream_char_sentry_create(this, TRUE)) {
7406 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
7408 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
7409 ch = basic_streambuf_char_snextc(strbuf_read)) {
7410 if(ch==EOF || ch==delim)
7413 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
7418 basic_istream_char_sentry_destroy(this);
7420 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
7421 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7425 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7426 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
7427 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
7428 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
7430 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
7433 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
7434 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
7435 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 20)
7436 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
7438 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7441 TRACE("(%p %p %s %c)\n", this, str, wine_dbgstr_longlong(count), delim);
7445 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7446 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7449 ch = basic_streambuf_char_sbumpc(strbuf);
7451 if(ch==EOF || ch==delim)
7461 else if(ch != EOF) {
7462 ch = basic_streambuf_char_sgetc(strbuf);
7465 basic_streambuf_char__Gninc(strbuf);
7470 basic_istream_char_sentry_destroy(this);
7472 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7473 (!this->count || (ch!=delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7479 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7480 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7481 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 16)
7482 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7484 return basic_istream_char_getline_delim(this, str, count, '\n');
7487 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7488 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7489 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 16)
7490 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7492 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7495 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count), delim);
7499 if(basic_istream_char_sentry_create(this, TRUE)) {
7500 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7503 ch = basic_streambuf_char_sbumpc(strbuf);
7505 if(ch==EOF || ch==delim)
7509 if(count != INT_MAX)
7513 basic_istream_char_sentry_destroy(this);
7516 basic_ios_char_setstate(base, IOSTATE_eofbit);
7520 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7521 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7522 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7523 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7525 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7528 TRACE("(%p)\n", this);
7532 if(basic_istream_char_sentry_create(this, TRUE))
7533 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7534 basic_istream_char_sentry_destroy(this);
7538 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7539 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7540 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s, 20)
7541 basic_istream_char* __thiscall basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7543 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7544 IOSB_iostate state = IOSTATE_goodbit;
7546 TRACE("(%p %p %lu %s)\n", this, str, size, wine_dbgstr_longlong(count));
7548 if(basic_istream_char_sentry_create(this, TRUE)) {
7549 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7551 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7552 if(this->count != count)
7553 state |= IOSTATE_failbit | IOSTATE_eofbit;
7557 basic_istream_char_sentry_destroy(this);
7559 basic_ios_char_setstate(base, state);
7563 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7564 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7565 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 16)
7566 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7568 return basic_istream_char__Read_s(this, str, count, count);
7571 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7572 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7573 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s, 20)
7574 streamsize __thiscall basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7576 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7577 IOSB_iostate state = IOSTATE_goodbit;
7579 TRACE("(%p %p %lu %s)\n", this, str, size, wine_dbgstr_longlong(count));
7583 if(basic_istream_char_sentry_create(this, TRUE)) {
7584 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7589 state |= IOSTATE_eofbit;
7591 basic_istream_char__Read_s(this, str, size, avail);
7593 state |= IOSTATE_failbit;
7595 basic_istream_char_sentry_destroy(this);
7597 basic_ios_char_setstate(base, state);
7601 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7602 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7603 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 16)
7604 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7606 return basic_istream_char__Readsome_s(this, str, count, count);
7609 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7610 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7611 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7612 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7614 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7615 IOSB_iostate state = IOSTATE_goodbit;
7617 TRACE("(%p %c)\n", this, ch);
7621 if(basic_istream_char_sentry_create(this, TRUE)) {
7622 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7624 if(!ios_base_good(&base->base))
7625 state |= IOSTATE_failbit;
7626 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7627 state |= IOSTATE_badbit;
7629 basic_istream_char_sentry_destroy(this);
7631 basic_ios_char_setstate(base, state);
7635 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7636 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7637 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7638 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7640 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7641 IOSB_iostate state = IOSTATE_goodbit;
7643 TRACE("(%p)\n", this);
7647 if(basic_istream_char_sentry_create(this, TRUE)) {
7648 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7650 if(!ios_base_good(&base->base))
7651 state |= IOSTATE_failbit;
7652 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7653 state |= IOSTATE_badbit;
7655 basic_istream_char_sentry_destroy(this);
7657 basic_ios_char_setstate(base, state);
7661 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7662 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7663 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7664 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7666 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7667 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7669 TRACE("(%p)\n", this);
7674 if(basic_istream_char_sentry_create(this, TRUE)) {
7675 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7676 basic_istream_char_sentry_destroy(this);
7680 basic_istream_char_sentry_destroy(this);
7682 basic_ios_char_setstate(base, IOSTATE_badbit);
7686 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7687 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7688 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7689 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7691 TRACE("(%p %p)\n", this, ret);
7693 if(basic_istream_char_sentry_create(this, TRUE)) {
7694 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7695 if(!ios_base_fail(&base->base)) {
7696 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7697 ret, 0, SEEKDIR_cur, OPENMODE_in);
7698 basic_istream_char_sentry_destroy(this);
7700 if(ret->off==0 && ret->pos==-1 && ret->state==0)
7701 basic_ios_char_setstate(base, IOSTATE_failbit);
7705 basic_istream_char_sentry_destroy(this);
7713 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
7714 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7715 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 16)
7716 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7718 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7720 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), dir);
7722 if(basic_istream_char_sentry_create(this, TRUE)) {
7723 if(!ios_base_fail(&base->base)) {
7724 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7727 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7728 basic_istream_char_sentry_destroy(this);
7730 if(ret.off==0 && ret.pos==-1 && ret.state==0)
7731 basic_ios_char_setstate(base, IOSTATE_failbit);
7733 basic_ios_char_clear(base, IOSTATE_goodbit);
7737 basic_istream_char_sentry_destroy(this);
7739 basic_ios_char_setstate(base, IOSTATE_failbit);
7743 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7744 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7745 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7746 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7748 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7750 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7752 if(basic_istream_char_sentry_create(this, TRUE)) {
7753 if(!ios_base_fail(&base->base)) {
7754 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7757 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7758 basic_istream_char_sentry_destroy(this);
7760 if(ret.off==0 && ret.pos==-1 && ret.state==0)
7761 basic_ios_char_setstate(base, IOSTATE_failbit);
7763 basic_ios_char_clear(base, IOSTATE_goodbit);
7767 basic_istream_char_sentry_destroy(this);
7769 basic_ios_char_setstate(base, IOSTATE_failbit);
7773 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7774 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7775 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7776 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7778 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7779 int state = IOSTATE_goodbit;
7781 TRACE("(%p %p)\n", this, v);
7783 if(basic_istream_char_sentry_create(this, FALSE)) {
7784 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7785 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7786 istreambuf_iterator_char first={0}, last={0};
7789 first.strbuf = strbuf;
7790 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7792 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7795 state |= IOSTATE_failbit;
7797 basic_istream_char_sentry_destroy(this);
7799 basic_ios_char_setstate(base, state);
7803 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7804 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7805 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7806 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7808 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7809 int state = IOSTATE_goodbit;
7811 TRACE("(%p %p)\n", this, v);
7813 if(basic_istream_char_sentry_create(this, FALSE)) {
7814 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7815 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7816 istreambuf_iterator_char first={0}, last={0};
7818 first.strbuf = strbuf;
7819 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7821 basic_istream_char_sentry_destroy(this);
7823 basic_ios_char_setstate(base, state);
7827 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7828 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7829 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7830 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7832 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7833 int state = IOSTATE_goodbit;
7835 TRACE("(%p %p)\n", this, v);
7837 if(basic_istream_char_sentry_create(this, FALSE)) {
7838 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7839 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7840 istreambuf_iterator_char first={0}, last={0};
7842 first.strbuf = strbuf;
7843 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7845 basic_istream_char_sentry_destroy(this);
7847 basic_ios_char_setstate(base, state);
7851 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7852 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7853 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7854 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7856 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7857 int state = IOSTATE_goodbit;
7859 TRACE("(%p %p)\n", this, v);
7861 if(basic_istream_char_sentry_create(this, FALSE)) {
7862 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7863 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7864 istreambuf_iterator_char first={0}, last={0};
7866 first.strbuf = strbuf;
7867 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7869 basic_istream_char_sentry_destroy(this);
7871 basic_ios_char_setstate(base, state);
7875 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7876 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7877 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7878 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7880 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7881 int state = IOSTATE_goodbit;
7883 TRACE("(%p %p)\n", this, v);
7885 if(basic_istream_char_sentry_create(this, FALSE)) {
7886 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7887 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7888 istreambuf_iterator_char first={0}, last={0};
7890 first.strbuf = strbuf;
7891 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7893 basic_istream_char_sentry_destroy(this);
7895 basic_ios_char_setstate(base, state);
7899 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7900 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7901 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7902 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7904 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7905 int state = IOSTATE_goodbit;
7907 TRACE("(%p %p)\n", this, v);
7909 if(basic_istream_char_sentry_create(this, FALSE)) {
7910 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7911 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7912 istreambuf_iterator_char first={0}, last={0};
7914 first.strbuf = strbuf;
7915 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7917 basic_istream_char_sentry_destroy(this);
7919 basic_ios_char_setstate(base, state);
7923 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7924 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7925 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7926 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7928 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7929 int state = IOSTATE_goodbit;
7931 TRACE("(%p %p)\n", this, v);
7933 if(basic_istream_char_sentry_create(this, FALSE)) {
7934 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7935 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7936 istreambuf_iterator_char first={0}, last={0};
7938 first.strbuf = strbuf;
7939 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7941 basic_istream_char_sentry_destroy(this);
7943 basic_ios_char_setstate(base, state);
7947 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7948 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7949 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7950 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7952 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7953 int state = IOSTATE_goodbit;
7955 TRACE("(%p %p)\n", this, v);
7957 if(basic_istream_char_sentry_create(this, FALSE)) {
7958 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7959 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7960 istreambuf_iterator_char first={0}, last={0};
7962 first.strbuf = strbuf;
7963 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7965 basic_istream_char_sentry_destroy(this);
7967 basic_ios_char_setstate(base, state);
7971 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7972 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7973 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7974 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7976 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7977 int state = IOSTATE_goodbit;
7979 TRACE("(%p %p)\n", this, v);
7981 if(basic_istream_char_sentry_create(this, FALSE)) {
7982 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7983 const num_get *numget = num_get_char_use_facet(strbuf->loc);
7984 istreambuf_iterator_char first={0}, last={0};
7986 first.strbuf = strbuf;
7987 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7989 basic_istream_char_sentry_destroy(this);
7991 basic_ios_char_setstate(base, state);
7995 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7996 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7997 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7998 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
8000 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8001 int state = IOSTATE_goodbit;
8003 TRACE("(%p %p)\n", this, v);
8005 if(basic_istream_char_sentry_create(this, FALSE)) {
8006 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8007 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8008 istreambuf_iterator_char first={0}, last={0};
8010 first.strbuf = strbuf;
8011 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
8013 basic_istream_char_sentry_destroy(this);
8015 basic_ios_char_setstate(base, state);
8019 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
8020 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
8021 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
8022 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
8024 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8025 int state = IOSTATE_goodbit;
8027 TRACE("(%p %p)\n", this, v);
8029 if(basic_istream_char_sentry_create(this, FALSE)) {
8030 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8031 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8032 istreambuf_iterator_char first={0}, last={0};
8034 first.strbuf = strbuf;
8035 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
8037 basic_istream_char_sentry_destroy(this);
8039 basic_ios_char_setstate(base, state);
8043 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
8044 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
8045 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
8046 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
8048 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8049 int state = IOSTATE_goodbit;
8051 TRACE("(%p %p)\n", this, v);
8053 if(basic_istream_char_sentry_create(this, FALSE)) {
8054 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8055 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8056 istreambuf_iterator_char first={0}, last={0};
8058 first.strbuf = strbuf;
8059 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
8061 basic_istream_char_sentry_destroy(this);
8063 basic_ios_char_setstate(base, state);
8067 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
8068 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
8069 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
8070 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
8072 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8073 int state = IOSTATE_goodbit;
8075 TRACE("(%p %p)\n", this, v);
8077 if(basic_istream_char_sentry_create(this, FALSE)) {
8078 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
8079 const num_get *numget = num_get_char_use_facet(strbuf->loc);
8080 istreambuf_iterator_char first={0}, last={0};
8082 first.strbuf = strbuf;
8083 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
8085 basic_istream_char_sentry_destroy(this);
8087 basic_ios_char_setstate(base, state);
8091 /* ??$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 */
8092 /* ??$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 */
8093 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
8094 basic_istream_char *istream, basic_string_char *str, char delim)
8096 IOSB_iostate state = IOSTATE_failbit;
8099 TRACE("(%p %p %c)\n", istream, str, delim);
8101 if(basic_istream_char_sentry_create(istream, TRUE)) {
8102 MSVCP_basic_string_char_clear(str);
8104 for(c = basic_istream_char_get(istream); c!=delim && c!=EOF;
8105 c = basic_istream_char_get(istream)) {
8106 state = IOSTATE_goodbit;
8107 MSVCP_basic_string_char_append_ch(str, c);
8110 basic_istream_char_sentry_destroy(istream);
8112 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
8113 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8117 /* ??$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 */
8118 /* ??$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 */
8119 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
8120 basic_istream_char *istream, basic_string_char *str)
8122 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
8125 /* ??$?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 */
8126 /* ??$?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 */
8127 basic_istream_char* __cdecl basic_istream_char_read_bstr(
8128 basic_istream_char *istream, basic_string_char *str)
8130 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
8131 IOSB_iostate state = IOSTATE_failbit;
8134 TRACE("(%p %p)\n", istream, str);
8136 if(basic_istream_char_sentry_create(istream, FALSE)) {
8137 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
8138 MSVCP_size_t count = ios_base_width_get(&base->base);
8143 MSVCP_basic_string_char_clear(str);
8145 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
8146 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8147 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
8148 state = IOSTATE_goodbit;
8149 MSVCP_basic_string_char_append_ch(str, c);
8152 basic_istream_char_sentry_destroy(istream);
8154 ios_base_width_set(&base->base, 0);
8155 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8159 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
8160 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
8161 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
8162 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
8163 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
8164 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
8165 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
8167 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
8168 IOSB_iostate state = IOSTATE_failbit;
8171 TRACE("(%p %p)\n", istream, str);
8173 if(basic_istream_char_sentry_create(istream, FALSE)) {
8174 const ctype_char *ctype = ctype_char_use_facet(base->strbuf->loc);
8175 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
8177 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
8178 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
8179 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
8180 state = IOSTATE_goodbit;
8184 basic_istream_char_sentry_destroy(istream);
8187 ios_base_width_set(&base->base, 0);
8188 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8192 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
8193 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
8194 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
8195 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
8196 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
8197 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
8198 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
8200 IOSB_iostate state = IOSTATE_failbit;
8203 TRACE("(%p %p)\n", istream, ch);
8205 if(basic_istream_char_sentry_create(istream, FALSE)) {
8206 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
8207 basic_istream_char_get_basic_ios(istream)));
8209 state = IOSTATE_goodbit;
8213 basic_istream_char_sentry_destroy(istream);
8215 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
8216 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8220 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8221 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8222 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
8223 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
8224 basic_istream_char *this, basic_streambuf_char *streambuf)
8226 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
8227 IOSB_iostate state = IOSTATE_failbit;
8230 TRACE("(%p %p)\n", this, streambuf);
8232 if(basic_istream_char_sentry_create(this, FALSE)) {
8233 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
8234 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
8235 state = IOSTATE_goodbit;
8236 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
8240 basic_istream_char_sentry_destroy(this);
8242 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8246 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8247 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8248 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
8249 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
8250 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
8252 TRACE("(%p %p)\n", this, pfunc);
8257 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
8258 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
8259 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
8260 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
8261 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
8263 TRACE("(%p %p)\n", this, pfunc);
8264 pfunc(basic_istream_char_get_basic_ios(this));
8268 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8269 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8270 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
8271 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
8272 ios_base* (__cdecl *pfunc)(ios_base*))
8274 TRACE("(%p %p)\n", this, pfunc);
8275 pfunc(&basic_istream_char_get_basic_ios(this)->base);
8279 /* Caution: basic_istream uses virtual inheritance. */
8280 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
8282 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
8285 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
8287 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
8290 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
8292 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
8295 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
8296 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
8297 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init, 20)
8298 basic_istream_wchar* __thiscall basic_istream_wchar_ctor_init(basic_istream_wchar *this,
8299 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
8301 basic_ios_wchar *base;
8303 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
8306 this->vbtable = basic_istream_wchar_vbtable;
8307 base = basic_istream_wchar_get_basic_ios(this);
8308 basic_ios_wchar_ctor(base);
8310 base = basic_istream_wchar_get_basic_ios(this);
8313 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8316 basic_ios_wchar_init(base, strbuf, isstd);
8320 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
8321 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
8322 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init, 20)
8323 basic_istream_wchar* __thiscall basic_istream_short_ctor_init(basic_istream_wchar *this,
8324 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
8326 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
8327 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8331 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8332 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
8333 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor, 16)
8334 basic_istream_wchar* __thiscall basic_istream_wchar_ctor(basic_istream_wchar *this,
8335 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8337 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8340 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8341 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
8342 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
8343 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
8344 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
8346 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
8349 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8350 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8351 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized, 12)
8352 basic_istream_wchar* __thiscall basic_istream_wchar_ctor_uninitialized(
8353 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8355 basic_ios_wchar *base;
8357 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
8360 this->vbtable = basic_istream_wchar_vbtable;
8361 base = basic_istream_wchar_get_basic_ios(this);
8362 basic_ios_wchar_ctor(base);
8364 base = basic_istream_wchar_get_basic_ios(this);
8367 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
8368 ios_base_Addstd(&base->base);
8372 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
8373 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
8374 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
8375 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
8376 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
8378 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
8379 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
8383 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8384 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8385 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
8386 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
8387 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
8388 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
8390 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8392 /* don't destroy virtual base here */
8393 TRACE("(%p)\n", this);
8396 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8397 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8398 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8399 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8400 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
8401 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
8403 TRACE("(%p)\n", this);
8404 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
8405 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
8408 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
8409 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
8411 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
8413 TRACE("(%p %x)\n", this, flags);
8416 /* we have an array, with the number of elements stored before the first object */
8417 int i, *ptr = (int *)this-1;
8419 for(i=*ptr-1; i>=0; i--)
8420 basic_istream_wchar_vbase_dtor(this+i);
8421 MSVCRT_operator_delete(ptr);
8423 basic_istream_wchar_vbase_dtor(this);
8425 MSVCRT_operator_delete(this);
8431 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8432 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8433 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8434 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8435 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx, 8)
8436 MSVCP_bool __thiscall basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8438 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8440 TRACE("(%p %d)\n", this, noskip);
8442 if(!ios_base_good(&base->base)) {
8443 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8447 if(basic_ios_wchar_tie_get(base))
8448 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8450 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8451 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8452 const ctype_wchar *ctype = ctype_wchar_use_facet(base->strbuf->loc);
8455 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8456 ch = basic_streambuf_wchar_snextc(strbuf)) {
8458 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8462 if(!ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8470 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8471 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8472 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8473 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8474 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8475 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8477 return basic_istream_wchar__Ipfx(this, noskip);
8480 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8481 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8482 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8483 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8484 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8485 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8487 TRACE("(%p)\n", this);
8490 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8492 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8494 if(basic_ios_wchar_rdbuf_get(base))
8495 basic_streambuf_wchar__Lock(base->strbuf);
8497 return basic_istream_wchar_ipfx(istr, noskip);
8500 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8502 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8504 if(basic_ios_wchar_rdbuf_get(base))
8505 basic_streambuf_wchar__Unlock(base->strbuf);
8508 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8509 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8510 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8511 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8512 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8513 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8515 TRACE("(%p)\n", this);
8519 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8520 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8521 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8522 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8523 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8524 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8526 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8529 TRACE("(%p)\n", this);
8533 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8534 basic_istream_wchar_sentry_destroy(this);
8538 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8539 basic_istream_wchar_sentry_destroy(this);
8541 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8548 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8549 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8550 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8551 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8552 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8553 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8557 TRACE("(%p %p)\n", this, ch);
8559 ret = basic_istream_wchar_get(this);
8565 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8566 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8567 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8568 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8569 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 20)
8570 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8572 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8573 unsigned short ch = delim;
8575 TRACE("(%p %p %s %c)\n", this, str, wine_dbgstr_longlong(count), delim);
8579 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8580 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8582 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8583 ch = basic_streambuf_wchar_snextc(strbuf)) {
8584 if(ch==WEOF || ch==delim)
8592 basic_istream_wchar_sentry_destroy(this);
8594 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8595 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8601 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8602 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8603 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8604 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8605 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 16)
8606 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8608 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8611 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8612 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8613 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8614 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8615 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8616 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8618 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8619 unsigned short ch = delim;
8621 TRACE("(%p %p %c)\n", this, strbuf, delim);
8625 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8626 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8628 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8629 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8630 if(ch==WEOF || ch==delim)
8633 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8638 basic_istream_wchar_sentry_destroy(this);
8640 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8641 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8645 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8646 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8647 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8648 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8649 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8650 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8652 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8655 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8656 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8657 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8658 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8659 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 20)
8660 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8662 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8663 unsigned short ch = delim;
8665 TRACE("(%p %p %s %c)\n", this, str, wine_dbgstr_longlong(count), delim);
8669 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8670 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8673 ch = basic_streambuf_wchar_sbumpc(strbuf);
8675 if(ch==WEOF || ch==delim)
8685 else if(ch != WEOF) {
8686 ch = basic_streambuf_wchar_sgetc(strbuf);
8689 basic_streambuf_wchar__Gninc(strbuf);
8694 basic_istream_wchar_sentry_destroy(this);
8696 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8697 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8703 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8704 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8705 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8706 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8707 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 16)
8708 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8710 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8713 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8714 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8715 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8716 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8717 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 16)
8718 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8720 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8721 unsigned short ch = delim;
8723 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count), delim);
8727 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8728 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8731 ch = basic_streambuf_wchar_sbumpc(strbuf);
8733 if(ch==WEOF || ch==delim)
8737 if(count != INT_MAX)
8741 basic_istream_wchar_sentry_destroy(this);
8744 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8748 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8749 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8750 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8751 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8752 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8753 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8755 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8756 unsigned short ret = WEOF;
8758 TRACE("(%p)\n", this);
8762 if(basic_istream_wchar_sentry_create(this, TRUE))
8763 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8764 basic_istream_wchar_sentry_destroy(this);
8768 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8769 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8770 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8771 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8772 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s, 20)
8773 basic_istream_wchar* __thiscall basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8775 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8776 IOSB_iostate state = IOSTATE_goodbit;
8778 TRACE("(%p %p %lu %s)\n", this, str, size, wine_dbgstr_longlong(count));
8780 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8781 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8783 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8784 if(this->count != count)
8785 state |= IOSTATE_failbit | IOSTATE_eofbit;
8789 basic_istream_wchar_sentry_destroy(this);
8791 basic_ios_wchar_setstate(base, state);
8795 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8796 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8797 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8798 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8799 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 16)
8800 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8802 return basic_istream_wchar__Read_s(this, str, count, count);
8805 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8806 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8807 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8808 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8809 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s, 20)
8810 streamsize __thiscall basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8812 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8813 IOSB_iostate state = IOSTATE_goodbit;
8815 TRACE("(%p %p %lu %s)\n", this, str, size, wine_dbgstr_longlong(count));
8819 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8820 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8825 state |= IOSTATE_eofbit;
8827 basic_istream_wchar__Read_s(this, str, size, avail);
8829 state |= IOSTATE_failbit;
8831 basic_istream_wchar_sentry_destroy(this);
8833 basic_ios_wchar_setstate(base, state);
8837 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8838 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8839 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8840 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8841 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 16)
8842 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8844 return basic_istream_wchar__Readsome_s(this, str, count, count);
8847 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8848 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8849 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8850 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8851 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8852 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8854 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8855 IOSB_iostate state = IOSTATE_goodbit;
8857 TRACE("(%p %c)\n", this, ch);
8861 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8862 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8864 if(!ios_base_good(&base->base))
8865 state |= IOSTATE_failbit;
8866 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8867 state |= IOSTATE_badbit;
8869 basic_istream_wchar_sentry_destroy(this);
8871 basic_ios_wchar_setstate(base, state);
8875 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8876 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8877 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8878 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8879 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8880 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8882 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8883 IOSB_iostate state = IOSTATE_goodbit;
8885 TRACE("(%p)\n", this);
8889 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8890 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8892 if(!ios_base_good(&base->base))
8893 state |= IOSTATE_failbit;
8894 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8895 state |= IOSTATE_badbit;
8897 basic_istream_wchar_sentry_destroy(this);
8899 basic_ios_wchar_setstate(base, state);
8903 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8904 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8905 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8906 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8907 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8908 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8910 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8911 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8913 TRACE("(%p)\n", this);
8918 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8919 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8920 basic_istream_wchar_sentry_destroy(this);
8924 basic_istream_wchar_sentry_destroy(this);
8926 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8930 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8931 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8932 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8933 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8934 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8935 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8937 TRACE("(%p %p)\n", this, ret);
8939 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8940 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8941 if(!ios_base_fail(&base->base)) {
8942 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8943 ret, 0, SEEKDIR_cur, OPENMODE_in);
8944 basic_istream_wchar_sentry_destroy(this);
8946 if(ret->off==0 && ret->pos==-1 && ret->state==0)
8947 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8951 basic_istream_wchar_sentry_destroy(this);
8959 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
8960 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
8961 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
8962 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
8963 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 16)
8964 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8966 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8968 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off), dir);
8970 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8971 if(!ios_base_fail(&base->base)) {
8972 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8975 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8976 basic_istream_wchar_sentry_destroy(this);
8978 if(ret.off==0 && ret.pos==-1 && ret.state==0)
8979 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8981 basic_ios_wchar_clear(base, IOSTATE_goodbit);
8985 basic_istream_wchar_sentry_destroy(this);
8987 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8991 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8992 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8993 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8994 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8995 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8996 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8998 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9000 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
9002 if(basic_istream_wchar_sentry_create(this, TRUE)) {
9003 if(!ios_base_fail(&base->base)) {
9004 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9007 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
9008 basic_istream_wchar_sentry_destroy(this);
9010 if(ret.off==0 && ret.pos==-1 && ret.state==0)
9011 basic_ios_wchar_setstate(base, IOSTATE_failbit);
9013 basic_ios_wchar_clear(base, IOSTATE_goodbit);
9017 basic_istream_wchar_sentry_destroy(this);
9019 basic_ios_wchar_setstate(base, IOSTATE_failbit);
9023 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
9025 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9026 int state = IOSTATE_goodbit;
9028 TRACE("(%p %p)\n", this, v);
9030 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9031 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9032 istreambuf_iterator_wchar first={0}, last={0};
9035 first.strbuf = strbuf;
9036 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
9038 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
9041 state |= IOSTATE_failbit;
9043 basic_istream_wchar_sentry_destroy(this);
9045 basic_ios_wchar_setstate(base, state);
9049 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
9050 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
9051 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short, 8)
9052 basic_istream_wchar* __thiscall basic_istream_wchar_read_short(basic_istream_wchar *this, short *v)
9054 return basic_istream_read_short(this, v, num_get_wchar_use_facet(
9055 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9058 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
9059 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
9060 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
9061 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
9063 return basic_istream_read_short(this, v, num_get_short_use_facet(
9064 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9067 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
9068 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
9069 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort, 8)
9070 basic_istream_wchar* __thiscall basic_istream_wchar_read_ushort(basic_istream_wchar *this, unsigned short *v)
9072 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9073 int state = IOSTATE_goodbit;
9075 TRACE("(%p %p)\n", this, v);
9077 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9078 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9079 const num_get *numget = num_get_wchar_use_facet(strbuf->loc);
9080 istreambuf_iterator_wchar first={0}, last={0};
9082 first.strbuf = strbuf;
9083 num_get_wchar_get_ushort(numget, &last, first, last, &base->base, &state, v);
9085 basic_istream_wchar_sentry_destroy(this);
9087 basic_ios_wchar_setstate(base, state);
9091 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
9093 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9094 int state = IOSTATE_goodbit;
9096 TRACE("(%p %p)\n", this, v);
9098 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9099 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9100 istreambuf_iterator_wchar first={0}, last={0};
9102 first.strbuf = strbuf;
9103 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
9105 basic_istream_wchar_sentry_destroy(this);
9107 basic_ios_wchar_setstate(base, state);
9111 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
9112 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
9113 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int, 8)
9114 basic_istream_wchar* __thiscall basic_istream_wchar_read_int(basic_istream_wchar *this, int *v)
9116 return basic_istream_read_int(this, v, num_get_wchar_use_facet(
9117 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9120 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
9121 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
9122 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
9123 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
9125 return basic_istream_read_int(this, v, num_get_short_use_facet(
9126 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9129 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
9131 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9132 int state = IOSTATE_goodbit;
9134 TRACE("(%p %p)\n", this, v);
9136 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9137 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9138 istreambuf_iterator_wchar first={0}, last={0};
9140 first.strbuf = strbuf;
9141 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
9143 basic_istream_wchar_sentry_destroy(this);
9145 basic_ios_wchar_setstate(base, state);
9149 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
9150 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
9151 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint, 8)
9152 basic_istream_wchar* __thiscall basic_istream_wchar_read_uint(basic_istream_wchar *this, unsigned int *v)
9154 return basic_istream_read_uint(this, v, num_get_wchar_use_facet(
9155 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9158 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
9159 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
9160 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
9161 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
9163 return basic_istream_read_uint(this, v, num_get_short_use_facet(
9164 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9167 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
9169 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9170 int state = IOSTATE_goodbit;
9172 TRACE("(%p %p)\n", this, v);
9174 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9175 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9176 istreambuf_iterator_wchar first={0}, last={0};
9178 first.strbuf = strbuf;
9179 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
9181 basic_istream_wchar_sentry_destroy(this);
9183 basic_ios_wchar_setstate(base, state);
9187 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
9188 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
9189 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long, 8)
9190 basic_istream_wchar* __thiscall basic_istream_wchar_read_long(basic_istream_wchar *this, LONG *v)
9192 return basic_istream_read_long(this, v, num_get_wchar_use_facet(
9193 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9196 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
9197 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
9198 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
9199 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
9201 return basic_istream_read_long(this, v, num_get_short_use_facet(
9202 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9205 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
9207 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9208 int state = IOSTATE_goodbit;
9210 TRACE("(%p %p)\n", this, v);
9212 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9213 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9214 istreambuf_iterator_wchar first={0}, last={0};
9216 first.strbuf = strbuf;
9217 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
9219 basic_istream_wchar_sentry_destroy(this);
9221 basic_ios_wchar_setstate(base, state);
9225 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
9226 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
9227 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong, 8)
9228 basic_istream_wchar* __thiscall basic_istream_wchar_read_ulong(basic_istream_wchar *this, ULONG *v)
9230 return basic_istream_read_ulong(this, v, num_get_wchar_use_facet(
9231 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9234 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
9235 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
9236 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
9237 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
9239 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
9240 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9243 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
9245 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9246 int state = IOSTATE_goodbit;
9248 TRACE("(%p %p)\n", this, v);
9250 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9251 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9252 istreambuf_iterator_wchar first={0}, last={0};
9254 first.strbuf = strbuf;
9255 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
9257 basic_istream_wchar_sentry_destroy(this);
9259 basic_ios_wchar_setstate(base, state);
9263 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
9264 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
9265 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float, 8)
9266 basic_istream_wchar* __thiscall basic_istream_wchar_read_float(basic_istream_wchar *this, float *v)
9268 return basic_istream_read_float(this, v, num_get_wchar_use_facet(
9269 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9272 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
9273 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
9274 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
9275 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
9277 return basic_istream_read_float(this, v, num_get_short_use_facet(
9278 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9281 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
9283 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9284 int state = IOSTATE_goodbit;
9286 TRACE("(%p %p)\n", this, v);
9288 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9289 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9290 istreambuf_iterator_wchar first={0}, last={0};
9292 first.strbuf = strbuf;
9293 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
9295 basic_istream_wchar_sentry_destroy(this);
9297 basic_ios_wchar_setstate(base, state);
9301 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
9302 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
9303 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double, 8)
9304 basic_istream_wchar* __thiscall basic_istream_wchar_read_double(basic_istream_wchar *this, double *v)
9306 return basic_istream_read_double(this, v, num_get_wchar_use_facet(
9307 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9310 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
9311 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
9312 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
9313 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
9315 return basic_istream_read_double(this, v, num_get_short_use_facet(
9316 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9319 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
9321 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9322 int state = IOSTATE_goodbit;
9324 TRACE("(%p %p)\n", this, v);
9326 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9327 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9328 istreambuf_iterator_wchar first={0}, last={0};
9330 first.strbuf = strbuf;
9331 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
9333 basic_istream_wchar_sentry_destroy(this);
9335 basic_ios_wchar_setstate(base, state);
9339 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
9340 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
9341 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble, 8)
9342 basic_istream_wchar* __thiscall basic_istream_wchar_read_ldouble(basic_istream_wchar *this, double *v)
9344 return basic_istream_read_ldouble(this, v, num_get_wchar_use_facet(
9345 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9348 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
9349 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
9350 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
9351 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
9353 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
9354 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9357 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
9359 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9360 int state = IOSTATE_goodbit;
9362 TRACE("(%p %p)\n", this, v);
9364 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9365 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9366 istreambuf_iterator_wchar first={0}, last={0};
9368 first.strbuf = strbuf;
9369 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
9371 basic_istream_wchar_sentry_destroy(this);
9373 basic_ios_wchar_setstate(base, state);
9377 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
9378 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
9379 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr, 8)
9380 basic_istream_wchar* __thiscall basic_istream_wchar_read_ptr(basic_istream_wchar *this, void **v)
9382 return basic_istream_read_ptr(this, v, num_get_wchar_use_facet(
9383 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9386 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
9387 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
9388 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
9389 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
9391 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
9392 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9395 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
9397 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9398 int state = IOSTATE_goodbit;
9400 TRACE("(%p %p)\n", this, v);
9402 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9403 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9404 istreambuf_iterator_wchar first={0}, last={0};
9406 first.strbuf = strbuf;
9407 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
9409 basic_istream_wchar_sentry_destroy(this);
9411 basic_ios_wchar_setstate(base, state);
9415 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
9416 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
9417 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64, 8)
9418 basic_istream_wchar* __thiscall basic_istream_wchar_read_int64(basic_istream_wchar *this, __int64 *v)
9420 return basic_istream_read_int64(this, v, num_get_wchar_use_facet(
9421 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9424 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
9425 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
9426 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
9427 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
9429 return basic_istream_read_int64(this, v, num_get_short_use_facet(
9430 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9433 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
9435 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9436 int state = IOSTATE_goodbit;
9438 TRACE("(%p %p)\n", this, v);
9440 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9441 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9442 istreambuf_iterator_wchar first={0}, last={0};
9444 first.strbuf = strbuf;
9445 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
9447 basic_istream_wchar_sentry_destroy(this);
9449 basic_ios_wchar_setstate(base, state);
9453 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
9454 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
9455 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64, 8)
9456 basic_istream_wchar* __thiscall basic_istream_wchar_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9458 return basic_istream_read_uint64(this, v, num_get_wchar_use_facet(
9459 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9462 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
9463 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
9464 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
9465 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
9467 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
9468 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9471 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
9473 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9474 int state = IOSTATE_goodbit;
9476 TRACE("(%p %p)\n", this, v);
9478 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9479 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
9480 istreambuf_iterator_wchar first={0}, last={0};
9482 first.strbuf = strbuf;
9483 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
9485 basic_istream_wchar_sentry_destroy(this);
9487 basic_ios_wchar_setstate(base, state);
9491 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
9492 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
9493 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool, 8)
9494 basic_istream_wchar* __thiscall basic_istream_wchar_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9496 return basic_istream_read_bool(this, v, num_get_wchar_use_facet(
9497 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9500 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
9501 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
9502 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
9503 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
9505 return basic_istream_read_bool(this, v, num_get_short_use_facet(
9506 basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
9509 /* ??$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 */
9510 /* ??$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 */
9511 /* ??$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 */
9512 /* ??$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 */
9513 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
9514 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
9516 IOSB_iostate state = IOSTATE_failbit;
9519 TRACE("(%p %p %c)\n", istream, str, delim);
9521 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
9522 MSVCP_basic_string_wchar_clear(str);
9524 for(c = basic_istream_wchar_get(istream); c!=delim && c!=WEOF;
9525 c = basic_istream_wchar_get(istream)) {
9526 state = IOSTATE_goodbit;
9527 MSVCP_basic_string_wchar_append_ch(str, c);
9530 basic_istream_wchar_sentry_destroy(istream);
9532 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9533 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9537 /* ??$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 */
9538 /* ??$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 */
9539 /* ??$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 */
9540 /* ??$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 */
9541 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
9542 basic_istream_wchar *istream, basic_string_wchar *str)
9544 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
9547 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
9548 basic_string_wchar *str, const ctype_wchar *ctype)
9550 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9551 IOSB_iostate state = IOSTATE_failbit;
9554 TRACE("(%p %p)\n", istream, str);
9556 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9557 MSVCP_size_t count = ios_base_width_get(&base->base);
9562 MSVCP_basic_string_wchar_clear(str);
9564 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9565 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9566 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9567 state = IOSTATE_goodbit;
9568 MSVCP_basic_string_wchar_append_ch(str, c);
9571 basic_istream_wchar_sentry_destroy(istream);
9573 ios_base_width_set(&base->base, 0);
9574 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9578 /* ??$?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 */
9579 /* ??$?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 */
9580 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9581 basic_istream_wchar *istream, basic_string_wchar *str)
9583 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9584 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9587 /* ??$?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 */
9588 /* ??$?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 */
9589 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9590 basic_istream_wchar *istream, basic_string_wchar *str)
9592 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9593 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9596 basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9598 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9599 IOSB_iostate state = IOSTATE_failbit;
9600 unsigned short c = '\n';
9602 TRACE("(%p %p)\n", istream, str);
9604 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9605 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9607 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9608 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9609 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9610 state = IOSTATE_goodbit;
9614 basic_istream_wchar_sentry_destroy(istream);
9617 ios_base_width_set(&base->base, 0);
9618 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9622 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */
9623 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */
9624 basic_istream_wchar* __cdecl basic_istream_wchar_read_str(basic_istream_wchar *istream, wchar_t *str)
9626 return basic_istream_read_str(istream, str, ctype_wchar_use_facet(
9627 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9630 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9631 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9632 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9634 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9635 basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9638 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9639 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9640 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9641 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9642 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9644 IOSB_iostate state = IOSTATE_failbit;
9645 unsigned short c = 0;
9647 TRACE("(%p %p)\n", istream, ch);
9649 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9650 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9651 basic_istream_wchar_get_basic_ios(istream)));
9653 state = IOSTATE_goodbit;
9657 basic_istream_wchar_sentry_destroy(istream);
9659 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9660 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9664 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9665 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9666 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9667 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9668 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9669 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9670 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9672 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9673 IOSB_iostate state = IOSTATE_failbit;
9674 unsigned short c = '\n';
9676 TRACE("(%p %p)\n", this, streambuf);
9678 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9679 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9680 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9681 state = IOSTATE_goodbit;
9682 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9686 basic_istream_wchar_sentry_destroy(this);
9688 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9692 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9693 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9694 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9695 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9696 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9697 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9698 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9700 TRACE("(%p %p)\n", this, pfunc);
9705 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9706 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9707 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9708 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9709 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9710 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9711 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9713 TRACE("(%p %p)\n", this, pfunc);
9714 pfunc(basic_istream_wchar_get_basic_ios(this));
9718 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9719 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9720 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9721 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9722 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9723 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9724 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9726 TRACE("(%p %p)\n", this, pfunc);
9727 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9731 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9733 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9736 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9738 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9741 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9742 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9743 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9744 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9746 basic_ios_char *basic_ios;
9748 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9751 this->base1.vbtable = basic_iostream_char_vbtable1;
9752 this->base2.vbtable = basic_iostream_char_vbtable2;
9753 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9754 basic_ios_char_ctor(basic_ios);
9756 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9759 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9761 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9762 basic_ostream_char_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9766 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9767 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9768 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9769 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9771 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9773 TRACE("(%p)\n", this);
9774 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9775 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9778 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9779 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9780 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9781 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9783 TRACE("(%p)\n", this);
9784 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9785 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9788 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9789 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9791 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9793 TRACE("(%p %x)\n", this, flags);
9796 /* we have an array, with the number of elements stored before the first object */
9797 int i, *ptr = (int *)this-1;
9799 for(i=*ptr-1; i>=0; i--)
9800 basic_iostream_char_vbase_dtor(this+i);
9801 MSVCRT_operator_delete(ptr);
9803 basic_iostream_char_vbase_dtor(this);
9805 MSVCRT_operator_delete(this);
9811 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9813 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9816 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9818 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9821 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9822 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9823 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor, 12)
9824 basic_iostream_wchar* __thiscall basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9825 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9827 basic_ios_wchar *basic_ios;
9829 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9832 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9833 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9834 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9835 basic_ios_wchar_ctor(basic_ios);
9837 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9840 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9841 basic_ostream_wchar_ctor_uninitialized(&this->base2, 0, FALSE, FALSE);
9843 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9847 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9848 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9849 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9850 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9851 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9853 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9854 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9858 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9859 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9860 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9861 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9862 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9863 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9865 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9867 TRACE("(%p)\n", this);
9868 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9869 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9872 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9873 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9874 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9875 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9876 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9877 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9879 TRACE("(%p)\n", this);
9880 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9881 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9884 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9885 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9887 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9889 TRACE("(%p %x)\n", this, flags);
9892 /* we have an array, with the number of elements stored before the first object */
9893 int i, *ptr = (int *)this-1;
9895 for(i=*ptr-1; i>=0; i--)
9896 basic_iostream_wchar_vbase_dtor(this+i);
9897 MSVCRT_operator_delete(ptr);
9899 basic_iostream_wchar_vbase_dtor(this);
9901 MSVCRT_operator_delete(this);
9907 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9909 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9912 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9914 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9917 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9918 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9919 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9920 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9922 basic_ios_char *basic_ios;
9924 TRACE("(%p %d)\n", this, virt_init);
9927 this->base.vbtable = basic_ofstream_char_vbtable;
9928 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9929 basic_ios_char_ctor(basic_ios);
9931 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9934 basic_filebuf_char_ctor(&this->filebuf);
9935 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9936 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9940 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9941 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9942 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file, 12)
9943 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_file(
9944 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9946 basic_ios_char *basic_ios;
9948 TRACE("(%p %p %d)\n", this, file, virt_init);
9951 this->base.vbtable = basic_ofstream_char_vbtable;
9952 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9953 basic_ios_char_ctor(basic_ios);
9955 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9958 basic_filebuf_char_ctor_file(&this->filebuf, file);
9959 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9960 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9964 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
9965 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
9966 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 20)
9967 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9968 const char *name, int mode, int prot, MSVCP_bool virt_init)
9970 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
9972 basic_ofstream_char_ctor(this, virt_init);
9974 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
9975 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9976 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9981 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
9982 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
9983 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
9984 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
9985 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar, 20)
9986 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name_wchar(basic_ofstream_char *this,
9987 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
9989 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
9991 basic_ofstream_char_ctor(this, virt_init);
9993 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
9994 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9995 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10000 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10001 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10002 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
10003 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
10005 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
10007 TRACE("(%p)\n", this);
10009 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10010 basic_filebuf_char_dtor(&this->filebuf);
10013 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10014 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10015 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
10016 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
10018 TRACE("(%p)\n", this);
10020 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
10021 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10024 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
10025 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10027 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
10029 TRACE("(%p %x)\n", this, flags);
10032 /* we have an array, with the number of elements stored before the first object */
10033 int i, *ptr = (int *)this-1;
10035 for(i=*ptr-1; i>=0; i--)
10036 basic_ofstream_char_vbase_dtor(this+i);
10037 MSVCRT_operator_delete(ptr);
10039 basic_ofstream_char_vbase_dtor(this);
10041 MSVCRT_operator_delete(this);
10047 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10048 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10049 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
10050 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
10052 TRACE("(%p)\n", this);
10054 if(!basic_filebuf_char_close(&this->filebuf)) {
10055 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10056 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10060 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10061 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10062 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
10063 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
10065 TRACE("(%p)\n", this);
10066 return basic_filebuf_char_is_open(&this->filebuf);
10069 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
10070 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
10071 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 16)
10072 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
10073 const char *name, int mode, int prot)
10075 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10077 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10078 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10079 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10083 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
10084 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
10085 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
10086 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
10087 const char *name, unsigned int mode)
10089 basic_ofstream_char_open(this, name, mode, _SH_DENYNO);
10092 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
10093 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
10094 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
10095 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
10096 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar, 16)
10097 void __thiscall basic_ofstream_char_open_wchar(basic_ofstream_char *this,
10098 const wchar_t *name, int mode, int prot)
10100 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
10102 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10103 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10104 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10108 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
10109 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
10110 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
10111 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
10112 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old, 12)
10113 void __thiscall basic_ofstream_char_open_wchar_old(basic_ofstream_char *this,
10114 const wchar_t *name, unsigned int mode)
10116 basic_ofstream_char_open_wchar(this, name, mode, _SH_DENYNO);
10119 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10120 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10121 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
10122 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
10124 TRACE("(%p)\n", this);
10125 return (basic_filebuf_char*)&this->filebuf;
10128 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
10130 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
10133 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10135 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
10138 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10139 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10140 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor, 8)
10141 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
10143 basic_ios_wchar *basic_ios;
10145 TRACE("(%p %d)\n", this, virt_init);
10148 this->base.vbtable = basic_ofstream_wchar_vbtable;
10149 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10150 basic_ios_wchar_ctor(basic_ios);
10152 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10155 basic_filebuf_wchar_ctor(&this->filebuf);
10156 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10157 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
10161 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10162 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10163 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
10164 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
10166 basic_ofstream_wchar_ctor(this, virt_init);
10167 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10171 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10172 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10173 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_file, 12)
10174 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_file(
10175 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10177 basic_ios_wchar *basic_ios;
10179 TRACE("(%p %p %d)\n", this, file, virt_init);
10182 this->base.vbtable = basic_ofstream_wchar_vbtable;
10183 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10184 basic_ios_wchar_ctor(basic_ios);
10186 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10189 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10190 basic_ostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10191 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
10195 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10196 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10197 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_file, 12)
10198 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_file(
10199 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10201 basic_ofstream_wchar_ctor_file(this, file, virt_init);
10202 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10206 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
10207 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
10208 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name, 20)
10209 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_name(basic_ofstream_wchar *this,
10210 const char *name, int mode, int prot, MSVCP_bool virt_init)
10212 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10214 basic_ofstream_wchar_ctor(this, virt_init);
10216 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10217 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10218 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10223 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
10224 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
10225 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 20)
10226 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
10227 const char *name, int mode, int prot, MSVCP_bool virt_init)
10229 basic_ofstream_wchar_ctor_name(this, name, mode, prot, virt_init);
10230 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10234 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
10235 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
10236 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10237 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10238 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_ctor_name_wchar, 20)
10239 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_ctor_name_wchar(basic_ofstream_wchar *this,
10240 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
10242 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
10244 basic_ofstream_wchar_ctor(this, virt_init);
10246 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10247 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10248 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10253 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
10254 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
10255 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
10256 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
10257 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name_wchar, 20)
10258 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name_wchar(basic_ofstream_wchar *this,
10259 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
10261 basic_ofstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init);
10262 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
10266 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10267 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10268 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10269 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10270 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
10271 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
10273 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
10275 TRACE("(%p)\n", this);
10277 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10278 basic_filebuf_wchar_dtor(&this->filebuf);
10281 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10282 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10283 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10284 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10285 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
10286 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
10288 TRACE("(%p)\n", this);
10290 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
10291 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10294 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
10295 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10297 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
10299 TRACE("(%p %x)\n", this, flags);
10302 /* we have an array, with the number of elements stored before the first object */
10303 int i, *ptr = (int *)this-1;
10305 for(i=*ptr-1; i>=0; i--)
10306 basic_ofstream_wchar_vbase_dtor(this+i);
10307 MSVCRT_operator_delete(ptr);
10309 basic_ofstream_wchar_vbase_dtor(this);
10311 MSVCRT_operator_delete(this);
10317 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10318 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10319 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10320 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10321 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
10322 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
10324 TRACE("(%p)\n", this);
10326 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10327 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10328 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10332 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10333 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10334 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10335 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10336 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
10337 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
10339 TRACE("(%p)\n", this);
10340 return basic_filebuf_wchar_is_open(&this->filebuf);
10343 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
10344 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
10345 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
10346 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
10347 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 16)
10348 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
10349 const char *name, int mode, int prot)
10351 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10353 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10354 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10355 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10359 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
10360 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
10361 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
10362 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
10363 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
10364 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
10365 const char *name, unsigned int mode)
10367 basic_ofstream_wchar_open(this, name, mode, _SH_DENYNO);
10370 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
10371 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
10372 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
10373 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
10374 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
10375 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
10376 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
10377 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
10378 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar, 16)
10379 void __thiscall basic_ofstream_wchar_open_wchar(basic_ofstream_wchar *this,
10380 const wchar_t *name, int mode, int prot)
10382 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
10384 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_out, prot)) {
10385 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10386 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10390 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
10391 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
10392 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
10393 /* ?open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
10394 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
10395 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
10396 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
10397 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
10398 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_wchar_old, 12)
10399 void __thiscall basic_ofstream_wchar_open_wchar_old(basic_ofstream_wchar *this,
10400 const wchar_t *name, unsigned int mode)
10402 basic_ofstream_wchar_open_wchar(this, name, mode, _SH_DENYNO);
10405 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10406 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10407 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10408 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10409 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
10410 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
10412 TRACE("(%p)\n", this);
10413 return (basic_filebuf_wchar*)&this->filebuf;
10416 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
10418 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
10421 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
10423 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
10426 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10427 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10428 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
10429 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
10431 basic_ios_char *basic_ios;
10433 TRACE("(%p %d)\n", this, virt_init);
10436 this->base.vbtable = basic_ifstream_char_vbtable;
10437 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10438 basic_ios_char_ctor(basic_ios);
10440 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10443 basic_filebuf_char_ctor(&this->filebuf);
10444 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10445 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
10449 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10450 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10451 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file, 12)
10452 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_file(
10453 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
10455 basic_ios_char *basic_ios;
10457 TRACE("(%p %p %d)\n", this, file, virt_init);
10460 this->base.vbtable = basic_ifstream_char_vbtable;
10461 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10462 basic_ios_char_ctor(basic_ios);
10464 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10467 basic_filebuf_char_ctor_file(&this->filebuf, file);
10468 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10469 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
10473 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
10474 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
10475 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 20)
10476 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
10477 const char *name, int mode, int prot, MSVCP_bool virt_init)
10479 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10481 basic_ifstream_char_ctor(this, virt_init);
10483 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10484 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10485 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10490 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
10491 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
10492 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
10493 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
10494 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar, 20)
10495 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstream_char *this,
10496 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
10498 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
10500 basic_ifstream_char_ctor(this, virt_init);
10502 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10503 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10504 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10509 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10510 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10511 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
10512 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
10514 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
10516 TRACE("(%p)\n", this);
10518 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10519 basic_filebuf_char_dtor(&this->filebuf);
10522 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10523 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10524 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
10525 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
10527 TRACE("(%p)\n", this);
10529 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
10530 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10533 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
10534 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10536 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
10538 TRACE("(%p %x)\n", this, flags);
10541 /* we have an array, with the number of elements stored before the first object */
10542 int i, *ptr = (int *)this-1;
10544 for(i=*ptr-1; i>=0; i--)
10545 basic_ifstream_char_vbase_dtor(this+i);
10546 MSVCRT_operator_delete(ptr);
10548 basic_ifstream_char_vbase_dtor(this);
10550 MSVCRT_operator_delete(this);
10556 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10557 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10558 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
10559 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
10561 TRACE("(%p)\n", this);
10563 if(!basic_filebuf_char_close(&this->filebuf)) {
10564 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10565 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10569 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10570 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10571 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
10572 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
10574 TRACE("(%p)\n", this);
10575 return basic_filebuf_char_is_open(&this->filebuf);
10578 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
10579 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
10580 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 16)
10581 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
10582 const char *name, int mode, int prot)
10584 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10586 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10587 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10588 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10592 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
10593 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
10594 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
10595 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
10596 const char *name, unsigned int mode)
10598 basic_ifstream_char_open(this, name, mode, _SH_DENYNO);
10601 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
10602 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
10603 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
10604 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
10605 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar, 16)
10606 void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this,
10607 const wchar_t *name, int mode, int prot)
10609 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
10611 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10612 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
10613 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10617 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
10618 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
10619 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
10620 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
10621 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old, 12)
10622 void __thiscall basic_ifstream_char_open_wchar_old(basic_ifstream_char *this,
10623 const wchar_t *name, unsigned int mode)
10625 basic_ifstream_char_open_wchar(this, name, mode, _SH_DENYNO);
10628 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10629 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10630 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
10631 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
10633 TRACE("(%p)\n", this);
10634 return (basic_filebuf_char*)&this->filebuf;
10637 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
10639 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
10642 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10644 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
10647 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10648 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10649 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor, 8)
10650 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10652 basic_ios_wchar *basic_ios;
10654 TRACE("(%p %d)\n", this, virt_init);
10657 this->base.vbtable = basic_ifstream_wchar_vbtable;
10658 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10659 basic_ios_wchar_ctor(basic_ios);
10661 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10664 basic_filebuf_wchar_ctor(&this->filebuf);
10665 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10666 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10670 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10671 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10672 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
10673 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
10675 basic_ifstream_wchar_ctor(this, virt_init);
10676 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10680 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10681 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10682 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_file, 12)
10683 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_file(
10684 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10686 basic_ios_wchar *basic_ios;
10688 TRACE("(%p %p %d)\n", this, file, virt_init);
10691 this->base.vbtable = basic_ifstream_wchar_vbtable;
10692 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10693 basic_ios_wchar_ctor(basic_ios);
10695 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10698 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10699 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
10700 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
10704 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10705 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10706 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_file, 12)
10707 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_file(
10708 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
10710 basic_ifstream_wchar_ctor_file(this, file, virt_init);
10711 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10715 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBDHH@Z */
10716 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBDHH@Z */
10717 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name, 20)
10718 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_name(basic_ifstream_wchar *this,
10719 const char *name, int mode, int prot, MSVCP_bool virt_init)
10721 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10723 basic_ifstream_wchar_ctor(this, virt_init);
10725 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10726 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10727 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10732 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDHH@Z */
10733 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDHH@Z */
10734 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 20)
10735 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
10736 const char *name, int mode, int prot, MSVCP_bool virt_init)
10738 basic_ifstream_wchar_ctor_name(this, name, mode, prot, virt_init);
10739 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10743 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
10744 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
10745 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10746 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10747 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_ctor_name_wchar, 20)
10748 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_ctor_name_wchar(basic_ifstream_wchar *this,
10749 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
10751 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
10753 basic_ifstream_wchar_ctor(this, virt_init);
10755 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10756 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10757 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10762 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
10763 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
10764 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
10765 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
10766 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name_wchar, 20)
10767 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name_wchar(basic_ifstream_wchar *this,
10768 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
10770 basic_ifstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init);
10771 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
10775 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10776 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10777 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10778 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10779 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
10780 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
10782 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10784 TRACE("(%p)\n", this);
10786 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10787 basic_filebuf_wchar_dtor(&this->filebuf);
10790 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10791 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10792 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10793 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10794 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10795 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10797 TRACE("(%p)\n", this);
10799 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10800 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10803 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10804 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10806 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10808 TRACE("(%p %x)\n", this, flags);
10811 /* we have an array, with the number of elements stored before the first object */
10812 int i, *ptr = (int *)this-1;
10814 for(i=*ptr-1; i>=0; i--)
10815 basic_ifstream_wchar_vbase_dtor(this+i);
10816 MSVCRT_operator_delete(ptr);
10818 basic_ifstream_wchar_vbase_dtor(this);
10820 MSVCRT_operator_delete(this);
10826 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10827 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10828 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10829 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10830 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10831 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10833 TRACE("(%p)\n", this);
10835 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10836 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10837 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10841 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10842 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10843 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10844 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10845 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10846 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10848 TRACE("(%p)\n", this);
10849 return basic_filebuf_wchar_is_open(&this->filebuf);
10852 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
10853 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
10854 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
10855 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
10856 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 16)
10857 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10858 const char *name, int mode, int prot)
10860 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
10862 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10863 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10864 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10868 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
10869 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
10870 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
10871 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
10872 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10873 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10874 const char *name, unsigned int mode)
10876 basic_ifstream_wchar_open(this, name, mode, _SH_DENYNO);
10879 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
10880 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
10881 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
10882 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
10883 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
10884 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
10885 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
10886 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
10887 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar, 16)
10888 void __thiscall basic_ifstream_wchar_open_wchar(basic_ifstream_wchar *this,
10889 const wchar_t *name, int mode, int prot)
10891 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
10893 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) {
10894 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10895 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10899 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
10900 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
10901 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
10902 /* ?open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
10903 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
10904 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
10905 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
10906 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
10907 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_wchar_old, 12)
10908 void __thiscall basic_ifstream_wchar_open_wchar_old(basic_ifstream_wchar *this,
10909 const wchar_t *name, unsigned int mode)
10911 basic_ifstream_wchar_open_wchar(this, name, mode, _SH_DENYNO);
10914 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10915 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10916 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10917 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10918 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10919 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10921 TRACE("(%p)\n", this);
10922 return (basic_filebuf_wchar*)&this->filebuf;
10925 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10927 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10930 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10932 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10935 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10936 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10937 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10938 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10940 basic_ios_char *basic_ios;
10942 TRACE("(%p %d)\n", this, virt_init);
10945 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10946 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10947 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10948 basic_ios_char_ctor(basic_ios);
10950 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10953 basic_filebuf_char_ctor(&this->filebuf);
10954 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10955 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10959 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10960 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10961 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file, 12)
10962 basic_fstream_char* __thiscall basic_fstream_char_ctor_file(basic_fstream_char *this,
10963 FILE *file, MSVCP_bool virt_init)
10965 basic_ios_char *basic_ios;
10967 TRACE("(%p %p %d)\n", this, file, virt_init);
10970 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10971 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10972 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10973 basic_ios_char_ctor(basic_ios);
10975 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10978 basic_filebuf_char_ctor_file(&this->filebuf, file);
10979 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10980 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10984 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
10985 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
10986 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 20)
10987 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10988 const char *name, int mode, int prot, MSVCP_bool virt_init)
10990 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
10992 basic_fstream_char_ctor(this, virt_init);
10994 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
10995 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10996 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
11001 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
11002 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
11003 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
11004 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
11005 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar, 20)
11006 basic_fstream_char* __thiscall basic_fstream_char_ctor_name_wchar(basic_fstream_char *this,
11007 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
11009 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
11011 basic_fstream_char_ctor(this, virt_init);
11013 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
11014 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11015 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
11020 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
11021 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
11022 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
11023 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
11025 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
11027 TRACE("(%p)\n", this);
11029 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11030 basic_filebuf_char_dtor(&this->filebuf);
11033 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
11034 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
11035 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
11036 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
11038 TRACE("(%p)\n", this);
11040 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
11041 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11044 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
11045 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11047 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
11049 TRACE("(%p %x)\n", this, flags);
11052 /* we have an array, with the number of elements stored before the first object */
11053 int i, *ptr = (int *)this-1;
11055 for(i=*ptr-1; i>=0; i--)
11056 basic_fstream_char_vbase_dtor(this+i);
11057 MSVCRT_operator_delete(ptr);
11059 basic_fstream_char_vbase_dtor(this);
11061 MSVCRT_operator_delete(this);
11067 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
11068 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
11069 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
11070 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
11072 TRACE("(%p)\n", this);
11074 if(!basic_filebuf_char_close(&this->filebuf)) {
11075 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11076 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
11080 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
11081 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
11082 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
11083 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
11085 TRACE("(%p)\n", this);
11086 return basic_filebuf_char_is_open(&this->filebuf);
11089 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
11090 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
11091 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 16)
11092 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
11093 const char *name, int mode, int prot)
11095 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
11097 if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) {
11098 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11099 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
11103 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
11104 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
11105 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
11106 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
11107 const char *name, unsigned int mode)
11109 basic_fstream_char_open(this, name, mode, _SH_DENYNO);
11112 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
11113 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
11114 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
11115 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
11116 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar, 16)
11117 void __thiscall basic_fstream_char_open_wchar(basic_fstream_char *this,
11118 const wchar_t *name, int mode, int prot)
11120 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
11122 if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) {
11123 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11124 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
11128 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
11129 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
11130 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
11131 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
11132 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old, 12)
11133 void __thiscall basic_fstream_char_open_wchar_old(basic_fstream_char *this,
11134 const wchar_t *name, unsigned int mode)
11136 basic_fstream_char_open_wchar(this, name, mode, _SH_DENYNO);
11139 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
11140 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
11141 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
11142 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
11144 TRACE("(%p)\n", this);
11145 return (basic_filebuf_char*)&this->filebuf;
11148 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
11150 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
11153 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11155 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
11158 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
11159 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
11160 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor, 8)
11161 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
11163 basic_ios_wchar *basic_ios;
11165 TRACE("(%p %d)\n", this, virt_init);
11168 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
11169 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
11170 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11171 basic_ios_wchar_ctor(basic_ios);
11173 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11176 basic_filebuf_wchar_ctor(&this->filebuf);
11177 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
11178 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
11182 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
11183 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
11184 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
11185 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
11187 basic_fstream_wchar_ctor(this, virt_init);
11188 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11192 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
11193 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11194 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_file, 12)
11195 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
11196 FILE *file, MSVCP_bool virt_init)
11198 basic_ios_wchar *basic_ios;
11200 TRACE("(%p %p %d)\n", this, file, virt_init);
11203 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
11204 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
11205 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11206 basic_ios_wchar_ctor(basic_ios);
11208 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11211 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
11212 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
11213 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
11217 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
11218 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
11219 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_file, 12)
11220 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_file(basic_fstream_wchar *this,
11221 FILE *file, MSVCP_bool virt_init)
11223 basic_fstream_wchar_ctor_file(this, file, virt_init);
11224 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11228 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
11229 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
11230 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name, 20)
11231 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_name(basic_fstream_wchar *this,
11232 const char *name, int mode, int prot, MSVCP_bool virt_init)
11234 TRACE("(%p %s %d %d %d)\n", this, name, mode, prot, virt_init);
11236 basic_fstream_wchar_ctor(this, virt_init);
11238 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) {
11239 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11240 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11245 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
11246 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
11247 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 20)
11248 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
11249 const char *name, int mode, int prot, MSVCP_bool virt_init)
11251 basic_fstream_wchar_ctor_name(this, name, mode, prot, virt_init);
11252 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11256 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PBGHH@Z */
11257 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEBGHH@Z */
11258 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
11259 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
11260 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_ctor_name_wchar, 20)
11261 basic_fstream_wchar* __thiscall basic_fstream_wchar_ctor_name_wchar(basic_fstream_wchar *this,
11262 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
11264 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name), mode, prot, virt_init);
11266 basic_fstream_wchar_ctor(this, virt_init);
11268 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode, prot)) {
11269 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11270 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11275 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PBGHH@Z */
11276 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEBGHH@Z */
11277 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PB_WHH@Z */
11278 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEB_WHH@Z */
11279 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name_wchar, 20)
11280 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name_wchar(basic_fstream_wchar *this,
11281 const wchar_t *name, int mode, int prot, MSVCP_bool virt_init)
11283 basic_fstream_wchar_ctor_name_wchar(this, name, mode, prot, virt_init);
11284 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
11288 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
11289 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
11290 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
11291 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
11292 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
11293 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
11295 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
11297 TRACE("(%p)\n", this);
11299 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11300 basic_filebuf_wchar_dtor(&this->filebuf);
11303 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11304 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11305 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11306 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11307 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
11308 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
11310 TRACE("(%p)\n", this);
11312 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
11313 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11316 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
11317 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11319 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
11321 TRACE("(%p %x)\n", this, flags);
11324 /* we have an array, with the number of elements stored before the first object */
11325 int i, *ptr = (int *)this-1;
11327 for(i=*ptr-1; i>=0; i--)
11328 basic_fstream_wchar_vbase_dtor(this+i);
11329 MSVCRT_operator_delete(ptr);
11331 basic_fstream_wchar_vbase_dtor(this);
11333 MSVCRT_operator_delete(this);
11339 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
11340 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
11341 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
11342 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
11343 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
11344 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
11346 TRACE("(%p)\n", this);
11348 if(!basic_filebuf_wchar_close(&this->filebuf)) {
11349 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11350 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11354 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
11355 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
11356 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
11357 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
11358 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
11359 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
11361 TRACE("(%p)\n", this);
11362 return basic_filebuf_wchar_is_open(&this->filebuf);
11365 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDHH@Z */
11366 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDHH@Z */
11367 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDHH@Z */
11368 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDHH@Z */
11369 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 16)
11370 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
11371 const char *name, int mode, int prot)
11373 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
11375 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, prot)) {
11376 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11377 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11381 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBDI@Z */
11382 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBDI@Z */
11383 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBDI@Z */
11384 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDI@Z */
11385 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
11386 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
11387 const char *name, unsigned int mode)
11389 basic_fstream_wchar_open(this, name, mode, _SH_DENYNO);
11392 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGHH@Z */
11393 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGHH@Z */
11394 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WHH@Z */
11395 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WHH@Z */
11396 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGHH@Z */
11397 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGHH@Z */
11398 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WHH@Z */
11399 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WHH@Z */
11400 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar, 16)
11401 void __thiscall basic_fstream_wchar_open_wchar(basic_fstream_wchar *this,
11402 const wchar_t *name, int mode, int prot)
11404 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
11406 if(!basic_filebuf_wchar_open_wchar(&this->filebuf, name, mode, prot)) {
11407 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11408 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
11412 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPBGI@Z */
11413 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEBGI@Z */
11414 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXPB_WI@Z */
11415 /* ?open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXPEB_WI@Z */
11416 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPBGI@Z */
11417 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEBGI@Z */
11418 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXPB_WI@Z */
11419 /* ?open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXPEB_WI@Z */
11420 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_wchar_old, 12)
11421 void __thiscall basic_fstream_wchar_open_wchar_old(basic_fstream_wchar *this,
11422 const wchar_t *name, unsigned int mode)
11424 basic_fstream_wchar_open_wchar(this, name, mode, _SH_DENYNO);
11427 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11428 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
11429 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11430 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
11431 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
11432 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
11434 TRACE("(%p)\n", this);
11435 return (basic_filebuf_wchar*)&this->filebuf;
11438 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
11440 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
11443 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
11445 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
11448 /* ??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 */
11449 /* ??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 */
11450 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
11451 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
11452 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11454 basic_ios_char *basic_ios;
11456 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11459 this->base.vbtable = basic_ostringstream_char_vbtable;
11460 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11461 basic_ios_char_ctor(basic_ios);
11463 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11466 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
11467 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11468 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
11472 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11473 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11474 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
11475 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
11476 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
11478 basic_ios_char *basic_ios;
11480 TRACE("(%p %d %d)\n", this, mode, virt_init);
11483 this->base.vbtable = basic_ostringstream_char_vbtable;
11484 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11485 basic_ios_char_ctor(basic_ios);
11487 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11490 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
11491 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11492 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
11496 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11497 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11498 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 8)
11499 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
11500 basic_ostringstream_char *this, MSVCP_bool virt_init)
11502 return basic_ostringstream_char_ctor_mode(this, 0, virt_init);
11505 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11506 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11507 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
11508 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
11510 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
11512 TRACE("(%p)\n", this);
11514 basic_stringbuf_char_dtor(&this->strbuf);
11515 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11518 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11519 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11520 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
11521 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
11523 TRACE("(%p)\n", this);
11525 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
11526 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11529 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
11530 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11532 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
11534 TRACE("(%p %x)\n", this, flags);
11537 /* we have an array, with the number of elements stored before the first object */
11538 int i, *ptr = (int *)this-1;
11540 for(i=*ptr-1; i>=0; i--)
11541 basic_ostringstream_char_vbase_dtor(this+i);
11542 MSVCRT_operator_delete(ptr);
11544 basic_ostringstream_char_vbase_dtor(this);
11546 MSVCRT_operator_delete(this);
11552 /* ?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 */
11553 /* ?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 */
11554 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
11555 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
11557 TRACE("(%p)\n", this);
11558 return (basic_stringbuf_char*)&this->strbuf;
11561 /* ?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 */
11562 /* ?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 */
11563 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
11564 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
11566 TRACE("(%p %p)\n", this, str);
11567 basic_stringbuf_char_str_set(&this->strbuf, str);
11570 /* ?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 */
11571 /* ?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 */
11572 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
11573 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
11575 TRACE("(%p %p)\n", this, ret);
11576 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11579 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
11581 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
11584 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11586 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
11589 /* ??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 */
11590 /* ??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 */
11591 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str, 16)
11592 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
11593 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11595 basic_ios_wchar *basic_ios;
11597 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11600 this->base.vbtable = basic_ostringstream_wchar_vbtable;
11601 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11602 basic_ios_wchar_ctor(basic_ios);
11604 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11607 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
11608 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11609 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
11613 /* ??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 */
11614 /* ??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 */
11615 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
11616 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
11617 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11619 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
11620 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
11624 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11625 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11626 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode, 12)
11627 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor_mode(
11628 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
11630 basic_ios_wchar *basic_ios;
11632 TRACE("(%p %d %d)\n", this, mode, virt_init);
11635 this->base.vbtable = basic_ostringstream_wchar_vbtable;
11636 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11637 basic_ios_wchar_ctor(basic_ios);
11639 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
11642 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
11643 basic_ostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11644 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
11648 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11649 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11650 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
11651 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
11652 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
11654 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
11655 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
11659 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11660 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11661 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor, 8)
11662 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_ctor(
11663 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
11665 return basic_ostringstream_wchar_ctor_mode(this, 0, virt_init);
11668 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11669 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11670 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 8)
11671 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
11672 basic_ostringstream_wchar *this, MSVCP_bool virt_init)
11674 return basic_ostringstream_short_ctor_mode(this, 0, virt_init);
11677 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11678 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11679 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11680 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11681 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
11682 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
11684 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
11686 TRACE("(%p)\n", this);
11688 basic_stringbuf_wchar_dtor(&this->strbuf);
11689 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
11692 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11693 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11694 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11695 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11696 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
11697 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
11699 TRACE("(%p)\n", this);
11701 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
11702 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
11705 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
11706 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11708 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
11710 TRACE("(%p %x)\n", this, flags);
11713 /* we have an array, with the number of elements stored before the first object */
11714 int i, *ptr = (int *)this-1;
11716 for(i=*ptr-1; i>=0; i--)
11717 basic_ostringstream_wchar_vbase_dtor(this+i);
11718 MSVCRT_operator_delete(ptr);
11720 basic_ostringstream_wchar_vbase_dtor(this);
11722 MSVCRT_operator_delete(this);
11728 /* ?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 */
11729 /* ?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 */
11730 /* ?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 */
11731 /* ?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 */
11732 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
11733 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
11735 TRACE("(%p)\n", this);
11736 return (basic_stringbuf_wchar*)&this->strbuf;
11739 /* ?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 */
11740 /* ?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 */
11741 /* ?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 */
11742 /* ?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 */
11743 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
11744 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
11746 TRACE("(%p %p)\n", this, str);
11747 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11750 /* ?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 */
11751 /* ?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 */
11752 /* ?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 */
11753 /* ?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 */
11754 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
11755 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
11757 TRACE("(%p %p)\n", this, ret);
11758 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11761 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
11763 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
11766 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
11768 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
11771 /* ??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 */
11772 /* ??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 */
11773 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
11774 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
11775 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11777 basic_ios_char *basic_ios;
11779 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11782 this->base.vbtable = basic_istringstream_char_vbtable;
11783 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11784 basic_ios_char_ctor(basic_ios);
11786 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11789 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11790 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11791 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11795 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11796 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11797 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
11798 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
11799 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
11801 basic_ios_char *basic_ios;
11803 TRACE("(%p %d %d)\n", this, mode, virt_init);
11806 this->base.vbtable = basic_istringstream_char_vbtable;
11807 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11808 basic_ios_char_ctor(basic_ios);
11810 basic_ios = basic_istream_char_get_basic_ios(&this->base);
11813 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11814 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11815 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
11819 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11820 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11821 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 8)
11822 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
11823 basic_istringstream_char *this, MSVCP_bool virt_init)
11825 return basic_istringstream_char_ctor_mode(this, 0, virt_init);
11828 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11829 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11830 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
11831 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
11833 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11835 TRACE("(%p)\n", this);
11837 basic_stringbuf_char_dtor(&this->strbuf);
11838 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11841 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11842 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11843 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
11844 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
11846 TRACE("(%p)\n", this);
11848 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
11849 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
11852 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
11853 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11855 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
11857 TRACE("(%p %x)\n", this, flags);
11860 /* we have an array, with the number of elements stored before the first object */
11861 int i, *ptr = (int *)this-1;
11863 for(i=*ptr-1; i>=0; i--)
11864 basic_istringstream_char_vbase_dtor(this+i);
11865 MSVCRT_operator_delete(ptr);
11867 basic_istringstream_char_vbase_dtor(this);
11869 MSVCRT_operator_delete(this);
11875 /* ?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 */
11876 /* ?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 */
11877 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
11878 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
11880 TRACE("(%p)\n", this);
11881 return (basic_stringbuf_char*)&this->strbuf;
11884 /* ?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 */
11885 /* ?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 */
11886 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
11887 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
11889 TRACE("(%p %p)\n", this, str);
11890 basic_stringbuf_char_str_set(&this->strbuf, str);
11893 /* ?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 */
11894 /* ?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 */
11895 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
11896 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
11898 TRACE("(%p %p)\n", this, ret);
11899 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11902 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
11904 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
11907 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11909 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
11912 /* ??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 */
11913 /* ??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 */
11914 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str, 16)
11915 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
11916 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11918 basic_ios_wchar *basic_ios;
11920 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11923 this->base.vbtable = basic_istringstream_wchar_vbtable;
11924 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11925 basic_ios_wchar_ctor(basic_ios);
11927 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11930 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11931 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11932 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11936 /* ??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 */
11937 /* ??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 */
11938 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
11939 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
11940 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11942 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
11943 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11947 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11948 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11949 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode, 12)
11950 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor_mode(
11951 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11953 basic_ios_wchar *basic_ios;
11955 TRACE("(%p %d %d)\n", this, mode, virt_init);
11958 this->base.vbtable = basic_istringstream_wchar_vbtable;
11959 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11960 basic_ios_wchar_ctor(basic_ios);
11962 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11965 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11966 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11967 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11971 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11972 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11973 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11974 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11975 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11977 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11978 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11982 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11983 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11984 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor, 8)
11985 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_ctor(
11986 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11988 return basic_istringstream_wchar_ctor_mode(this, 0, virt_init);
11991 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11992 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11993 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 8)
11994 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11995 basic_istringstream_wchar *this, MSVCP_bool virt_init)
11997 return basic_istringstream_short_ctor_mode(this, 0, virt_init);
12000 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
12001 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
12002 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
12003 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
12004 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
12005 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
12007 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
12009 TRACE("(%p)\n", this);
12011 basic_stringbuf_wchar_dtor(&this->strbuf);
12012 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
12015 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
12016 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
12017 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
12018 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
12019 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
12020 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
12022 TRACE("(%p)\n", this);
12024 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
12025 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
12028 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
12029 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
12031 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
12033 TRACE("(%p %x)\n", this, flags);
12036 /* we have an array, with the number of elements stored before the first object */
12037 int i, *ptr = (int *)this-1;
12039 for(i=*ptr-1; i>=0; i--)
12040 basic_istringstream_wchar_vbase_dtor(this+i);
12041 MSVCRT_operator_delete(ptr);
12043 basic_istringstream_wchar_vbase_dtor(this);
12045 MSVCRT_operator_delete(this);
12051 /* ?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 */
12052 /* ?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 */
12053 /* ?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 */
12054 /* ?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 */
12055 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
12056 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
12058 TRACE("(%p)\n", this);
12059 return (basic_stringbuf_wchar*)&this->strbuf;
12062 /* ?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 */
12063 /* ?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 */
12064 /* ?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 */
12065 /* ?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 */
12066 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
12067 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
12069 TRACE("(%p %p)\n", this, str);
12070 basic_stringbuf_wchar_str_set(&this->strbuf, str);
12073 /* ?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 */
12074 /* ?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 */
12075 /* ?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 */
12076 /* ?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 */
12077 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
12078 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
12080 TRACE("(%p %p)\n", this, ret);
12081 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
12084 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
12086 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
12089 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
12091 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
12094 /* ??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 */
12095 /* ??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 */
12096 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
12097 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
12098 const basic_string_char *str, int mode, MSVCP_bool virt_init)
12100 basic_ios_char *basic_ios;
12102 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
12105 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
12106 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
12107 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12108 basic_ios_char_ctor(basic_ios);
12110 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12113 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
12114 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
12115 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
12119 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
12120 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
12121 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
12122 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
12123 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
12125 basic_ios_char *basic_ios;
12127 TRACE("(%p %d %d)\n", this, mode, virt_init);
12130 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
12131 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
12132 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12133 basic_ios_char_ctor(basic_ios);
12135 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
12138 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
12139 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
12140 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
12144 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
12145 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
12146 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 8)
12147 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
12148 basic_stringstream_char *this, MSVCP_bool virt_init)
12150 return basic_stringstream_char_ctor_mode(
12151 this, OPENMODE_out|OPENMODE_in, virt_init);
12154 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
12155 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
12156 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
12157 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
12159 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
12161 TRACE("(%p)\n", this);
12163 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
12164 basic_stringbuf_char_dtor(&this->strbuf);
12167 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
12168 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
12169 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
12170 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
12172 TRACE("(%p)\n", this);
12174 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
12175 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
12178 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
12179 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
12181 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
12183 TRACE("(%p %x)\n", this, flags);
12186 /* we have an array, with the number of elements stored before the first object */
12187 int i, *ptr = (int *)this-1;
12189 for(i=*ptr-1; i>=0; i--)
12190 basic_stringstream_char_vbase_dtor(this+i);
12191 MSVCRT_operator_delete(ptr);
12193 basic_stringstream_char_vbase_dtor(this);
12195 MSVCRT_operator_delete(this);
12201 /* ?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 */
12202 /* ?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 */
12203 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
12204 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
12206 TRACE("(%p)\n", this);
12207 return (basic_stringbuf_char*)&this->strbuf;
12210 /* ?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 */
12211 /* ?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 */
12212 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
12213 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
12215 TRACE("(%p %p)\n", this, str);
12216 basic_stringbuf_char_str_set(&this->strbuf, str);
12219 /* ?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 */
12220 /* ?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 */
12221 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
12222 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
12224 TRACE("(%p %p)\n", this, ret);
12225 return basic_stringbuf_char_str_get(&this->strbuf, ret);
12228 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
12230 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
12233 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
12235 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
12238 /* ??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 */
12239 /* ??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 */
12240 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str, 16)
12241 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
12242 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
12244 basic_ios_wchar *basic_ios;
12246 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
12249 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
12250 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
12251 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12252 basic_ios_wchar_ctor(basic_ios);
12254 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12257 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
12258 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
12259 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
12263 /* ??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 */
12264 /* ??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 */
12265 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
12266 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
12267 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
12269 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
12270 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
12274 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
12275 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
12276 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode, 12)
12277 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor_mode(
12278 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
12280 basic_ios_wchar *basic_ios;
12282 TRACE("(%p %d %d)\n", this, mode, virt_init);
12285 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
12286 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
12287 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12288 basic_ios_wchar_ctor(basic_ios);
12290 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
12293 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
12294 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
12295 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
12299 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
12300 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
12301 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
12302 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
12303 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
12305 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
12306 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
12310 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
12311 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
12312 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor, 8)
12313 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_ctor(
12314 basic_stringstream_wchar *this, MSVCP_bool virt_init)
12316 return basic_stringstream_wchar_ctor_mode(
12317 this, OPENMODE_out|OPENMODE_in, virt_init);
12320 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
12321 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
12322 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 8)
12323 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
12324 basic_stringstream_wchar *this, MSVCP_bool virt_init)
12326 return basic_stringstream_short_ctor_mode(
12327 this, OPENMODE_out|OPENMODE_in, virt_init);
12330 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
12331 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
12332 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
12333 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
12334 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
12335 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
12337 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
12339 TRACE("(%p)\n", this);
12341 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
12342 basic_stringbuf_wchar_dtor(&this->strbuf);
12345 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
12346 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
12347 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
12348 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
12349 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
12350 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
12352 TRACE("(%p)\n", this);
12354 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
12355 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
12358 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
12359 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
12361 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
12363 TRACE("(%p %x)\n", this, flags);
12366 /* we have an array, with the number of elements stored before the first object */
12367 int i, *ptr = (int *)this-1;
12369 for(i=*ptr-1; i>=0; i--)
12370 basic_stringstream_wchar_vbase_dtor(this+i);
12371 MSVCRT_operator_delete(ptr);
12373 basic_stringstream_wchar_vbase_dtor(this);
12375 MSVCRT_operator_delete(this);
12381 /* ?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 */
12382 /* ?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 */
12383 /* ?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 */
12384 /* ?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 */
12385 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
12386 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
12388 TRACE("(%p)\n", this);
12389 return (basic_stringbuf_wchar*)&this->strbuf;
12392 /* ?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 */
12393 /* ?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 */
12394 /* ?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 */
12395 /* ?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 */
12396 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
12397 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
12399 TRACE("(%p %p)\n", this, str);
12400 basic_stringbuf_wchar_str_set(&this->strbuf, str);
12403 /* ?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 */
12404 /* ?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 */
12405 /* ?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 */
12406 /* ?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 */
12407 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
12408 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
12410 TRACE("(%p %p)\n", this, ret);
12411 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
12414 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
12415 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
12416 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 24)
12417 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
12419 TRACE("(%p %s %p %p %d)\n", this, wine_dbgstr_longlong(len), g, p, mode);
12421 this->minsize = 32;
12422 this->endsave = NULL;
12423 this->strmode = mode;
12424 this->palloc = NULL;
12425 this->pfree = NULL;
12428 this->strmode |= STRSTATE_Dynamic;
12429 if(len > this->minsize)
12430 this->minsize = len;
12431 this->seekhigh = NULL;
12440 this->seekhigh = g+len;
12441 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
12443 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
12446 /* ??0strstreambuf@std@@QAE@PACH0@Z */
12447 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
12448 /* ??0strstreambuf@std@@QAE@PADH0@Z */
12449 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
12450 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
12451 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
12452 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get_put, 20)
12453 strstreambuf* __thiscall strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
12455 TRACE("(%p %p %s %p)\n", this, g, wine_dbgstr_longlong(len), p);
12457 basic_streambuf_char_ctor(&this->base);
12458 this->base.vtable = &MSVCP_strstreambuf_vtable;
12460 strstreambuf__Init(this, len, g, p, 0);
12464 /* ??0strstreambuf@std@@QAE@H@Z */
12465 /* ??0strstreambuf@std@@QEAA@_J@Z */
12466 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_len, 12)
12467 strstreambuf* __thiscall strstreambuf_ctor_len(strstreambuf *this, streamsize len)
12469 return strstreambuf_ctor_get_put(this, NULL, len, NULL);
12472 /* ??0strstreambuf@std@@QAE@P6APAXI@ZP6AXPAX@Z@Z */
12473 /* ??0strstreambuf@std@@QEAA@P6APEAX_K@ZP6AXPEAX@Z@Z */
12474 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_alloc, 12)
12475 strstreambuf* __thiscall strstreambuf_ctor_alloc(strstreambuf *this, void* (__cdecl *palloc)(MSVCP_size_t), void (__cdecl *pfree)(void*))
12477 TRACE("(%p %p %p)\n", this, palloc, pfree);
12479 strstreambuf_ctor_get_put(this, NULL, 0, NULL);
12480 this->palloc = palloc;
12481 this->pfree = pfree;
12485 /* ??0strstreambuf@std@@QAE@PBCH@Z */
12486 /* ??0strstreambuf@std@@QEAA@PEBC_J@Z */
12487 /* ??0strstreambuf@std@@QAE@PBDH@Z */
12488 /* ??0strstreambuf@std@@QEAA@PEBD_J@Z */
12489 /* ??0strstreambuf@std@@QAE@PBEH@Z */
12490 /* ??0strstreambuf@std@@QEAA@PEBE_J@Z */
12491 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor_get, 16)
12492 strstreambuf* __thiscall strstreambuf_ctor_get(strstreambuf *this, const char *g, streamsize len)
12494 TRACE("(%p %p %s)\n", this, g, wine_dbgstr_longlong(len));
12496 strstreambuf_ctor_get_put(this, NULL, 0, NULL);
12497 this->strmode |= STRSTATE_Constant;
12501 /* ??_Fstrstreambuf@std@@QAEXXZ */
12502 /* ??_Fstrstreambuf@std@@QEAAXXZ */
12503 DEFINE_THISCALL_WRAPPER(strstreambuf_ctor, 4)
12504 strstreambuf* __thiscall strstreambuf_ctor(strstreambuf *this)
12506 return strstreambuf_ctor_get_put(this, NULL, 0, NULL);
12509 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
12510 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
12511 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
12512 void __thiscall strstreambuf__Tidy(strstreambuf *this)
12514 TRACE("(%p)\n", this);
12516 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
12518 this->pfree(basic_streambuf_char_eback(&this->base));
12520 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
12523 this->endsave = NULL;
12524 this->seekhigh = NULL;
12525 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
12526 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
12527 basic_streambuf_char_setp(&this->base, NULL, NULL);
12530 /* ??1strstreambuf@std@@UAE@XZ */
12531 /* ??1strstreambuf@std@@UEAA@XZ */
12532 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
12533 void __thiscall strstreambuf_dtor(strstreambuf *this)
12535 TRACE("(%p)\n", this);
12537 strstreambuf__Tidy(this);
12538 basic_streambuf_char_dtor(&this->base);
12541 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
12542 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
12544 TRACE("(%p %x)\n", this, flags);
12546 /* we have an array, with the number of elements stored before the first object */
12547 int i, *ptr = (int *)this-1;
12549 for(i=*ptr-1; i>=0; i--)
12550 strstreambuf_dtor(this+i);
12551 MSVCRT_operator_delete(ptr);
12553 strstreambuf_dtor(this);
12555 MSVCRT_operator_delete(this);
12561 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
12562 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
12563 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
12564 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
12566 TRACE("(%p %d)\n", this, freeze);
12568 if(!freeze == !(this->strmode *STRSTATE_Frozen))
12572 this->strmode |= STRSTATE_Frozen;
12573 this->endsave = basic_streambuf_char_epptr(&this->base);
12574 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
12575 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
12577 this->strmode &= ~STRSTATE_Frozen;
12578 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
12579 basic_streambuf_char_pptr(&this->base), this->endsave);
12583 /* ?str@strstreambuf@std@@QAEPADXZ */
12584 /* ?str@strstreambuf@std@@QEAAPEADXZ */
12585 DEFINE_THISCALL_WRAPPER(strstreambuf_str, 4)
12586 char* __thiscall strstreambuf_str(strstreambuf *this)
12588 TRACE("(%p)\n", this);
12590 strstreambuf_freeze(this, TRUE);
12591 return basic_streambuf_char_gptr(&this->base);
12594 /* ?pcount@strstreambuf@std@@QBEHXZ */
12595 /* ?pcount@strstreambuf@std@@QEBA_JXZ */
12596 DEFINE_THISCALL_WRAPPER(strstreambuf_pcount, 4)
12597 streamsize __thiscall strstreambuf_pcount(const strstreambuf *this)
12599 char *ppos = basic_streambuf_char_pptr(&this->base);
12601 TRACE("(%p)\n", this);
12603 return ppos ? ppos-basic_streambuf_char_pbase(&this->base) : 0;
12606 /* ?overflow@strstreambuf@std@@MAEHH@Z */
12607 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
12608 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
12609 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
12611 MSVCP_size_t old_size, size;
12614 TRACE("(%p %d)\n", this, c);
12619 if(this->strmode & STRSTATE_Frozen)
12622 ptr = basic_streambuf_char_pptr(&this->base);
12623 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
12624 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
12626 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
12629 ptr = basic_streambuf_char_eback(&this->base);
12630 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
12632 size = old_size + old_size/2;
12633 if(size < this->minsize)
12634 size = this->minsize;
12637 buf = this->palloc(size);
12639 buf = MSVCRT_operator_new(size);
12643 memcpy(buf, ptr, old_size);
12644 if(this->strmode & STRSTATE_Allocated) {
12648 MSVCRT_operator_delete(ptr);
12651 this->strmode |= STRSTATE_Allocated;
12653 this->seekhigh = buf;
12654 basic_streambuf_char_setp(&this->base, buf, buf+size);
12655 basic_streambuf_char_setg(&this->base, buf, buf, buf);
12657 this->seekhigh = this->seekhigh-ptr+buf;
12658 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
12659 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
12660 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
12661 basic_streambuf_char_pptr(&this->base));
12664 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
12667 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
12668 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
12669 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
12670 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
12672 char *ptr = basic_streambuf_char_gptr(&this->base);
12674 TRACE("(%p %d)\n", this, c);
12676 if(ptr<=basic_streambuf_char_eback(&this->base)
12677 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
12680 basic_streambuf_char_gbump(&this->base, -1);
12683 if(this->strmode & STRSTATE_Constant)
12684 return (unsigned char)c;
12686 return (unsigned char)(ptr[0] = c);
12689 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JHH@Z */
12690 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
12691 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 24)
12692 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
12694 char *eback = basic_streambuf_char_eback(&this->base);
12695 char *pptr = basic_streambuf_char_pptr(&this->base);
12696 char *gptr = basic_streambuf_char_gptr(&this->base);
12698 TRACE("(%p %p %s %d %d)\n", this, ret, wine_dbgstr_longlong(off), way, mode);
12703 if(pptr > this->seekhigh)
12704 this->seekhigh = pptr;
12706 if((mode & OPENMODE_in) && gptr) {
12707 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
12709 else if(way == SEEKDIR_end)
12710 off += this->seekhigh-eback;
12711 else if(way != SEEKDIR_beg)
12714 if(off<0 || off>this->seekhigh-eback) {
12717 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
12718 if((mode & OPENMODE_out) && pptr) {
12719 basic_streambuf_char_setp_next(&this->base, eback,
12720 gptr, basic_streambuf_char_epptr(&this->base));
12723 }else if((mode & OPENMODE_out) && pptr) {
12724 if(way == SEEKDIR_cur)
12726 else if(way == SEEKDIR_end)
12727 off += this->seekhigh-eback;
12728 else if(way != SEEKDIR_beg)
12731 if(off<0 || off>this->seekhigh-eback)
12734 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
12743 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
12744 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
12745 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
12746 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
12748 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
12750 if(pos.off==0 && pos.pos==-1 && pos.state==0) {
12755 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
12758 /* ?underflow@strstreambuf@std@@MAEHXZ */
12759 /* ?underflow@strstreambuf@std@@MEAAHXZ */
12760 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
12761 int __thiscall strstreambuf_underflow(strstreambuf *this)
12763 char *gptr = basic_streambuf_char_gptr(&this->base);
12766 TRACE("(%p)\n", this);
12771 if(gptr < basic_streambuf_char_egptr(&this->base))
12772 return (unsigned char)(*gptr);
12774 pptr = basic_streambuf_char_gptr(&this->base);
12775 if(pptr > this->seekhigh)
12776 this->seekhigh = pptr;
12778 if(this->seekhigh <= gptr)
12781 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
12782 gptr, this->seekhigh);
12783 return (unsigned char)(*gptr);
12786 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
12788 ios_base_precision_set(base, prec);
12791 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
12792 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12793 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
12795 TRACE("(%p %s)\n", ret, wine_dbgstr_longlong(prec));
12797 ret->pfunc = setprecision_func;
12802 static void __cdecl setw_func(ios_base *base, streamsize width)
12804 ios_base_width_set(base, width);
12807 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
12808 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
12809 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
12811 TRACE("(%p %s)\n", ret, wine_dbgstr_longlong(width));
12813 ret->pfunc = setw_func;
12818 static basic_filebuf_char filebuf_char_stdin;
12819 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12821 basic_istream_char obj;
12822 basic_ios_char vbase;
12824 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12825 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12826 basic_istream_char *_Ptr_cin = &cin.obj;
12828 static basic_filebuf_wchar filebuf_short_stdin;
12829 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12831 basic_istream_wchar obj;
12832 basic_ios_wchar vbase;
12833 } ucin = { { 0 } };
12834 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12835 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12836 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12838 static basic_filebuf_wchar filebuf_wchar_stdin;
12839 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12841 basic_istream_wchar obj;
12842 basic_ios_wchar vbase;
12843 } wcin = { { 0 } };
12844 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12845 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12846 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12848 static basic_filebuf_char filebuf_char_stdout;
12849 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12851 basic_ostream_char obj;
12852 basic_ios_char vbase;
12853 } cout = { { 0 } };
12854 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12855 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12856 basic_ostream_char *_Ptr_cout = &cout.obj;
12858 static basic_filebuf_wchar filebuf_short_stdout;
12859 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12861 basic_ostream_wchar obj;
12862 basic_ios_wchar vbase;
12863 } ucout = { { 0 } };
12864 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12865 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12866 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12868 static basic_filebuf_wchar filebuf_wchar_stdout;
12869 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12871 basic_ostream_wchar obj;
12872 basic_ios_wchar vbase;
12873 } wcout = { { 0 } };
12874 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12875 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12876 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12878 static basic_filebuf_char filebuf_char_stderr;
12879 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12881 basic_ostream_char obj;
12882 basic_ios_char vbase;
12883 } cerr = { { 0 } };
12884 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12885 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12886 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12888 static basic_filebuf_wchar filebuf_short_stderr;
12889 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12891 basic_ostream_wchar obj;
12892 basic_ios_wchar vbase;
12893 } ucerr = { { 0 } };
12894 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12895 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12896 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12898 static basic_filebuf_wchar filebuf_wchar_stderr;
12899 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12901 basic_ostream_wchar obj;
12902 basic_ios_wchar vbase;
12903 } wcerr = { { 0 } };
12904 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12905 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12906 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12908 static basic_filebuf_char filebuf_char_log;
12909 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12911 basic_ostream_char obj;
12912 basic_ios_char vbase;
12913 } clog = { { 0 } };
12914 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12915 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12916 basic_ostream_char *_Ptr_clog = &clog.obj;
12918 static basic_filebuf_wchar filebuf_short_log;
12919 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12921 basic_ostream_wchar obj;
12922 basic_ios_wchar vbase;
12923 } uclog = { { 0 } };
12924 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12925 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12926 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12928 static basic_filebuf_wchar filebuf_wchar_log;
12929 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12931 basic_ostream_wchar obj;
12932 basic_ios_wchar vbase;
12933 } wclog = { { 0 } };
12934 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12935 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12936 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12940 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12941 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12943 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12944 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12946 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12947 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12949 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12950 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE);
12952 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12953 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE);
12955 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12956 basic_ostream_wchar_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE);
12958 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12959 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE);
12961 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12962 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE);
12964 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12965 basic_ostream_wchar_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE);
12967 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12968 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE);
12970 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12971 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE);
12973 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12974 basic_ostream_wchar_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE);
12979 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&cin.obj));
12980 basic_filebuf_char_dtor(&filebuf_char_stdin);
12982 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&ucin.obj));
12983 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12985 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&wcin.obj));
12986 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12988 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cout.obj));
12989 basic_filebuf_char_dtor(&filebuf_char_stdout);
12991 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&ucout.obj));
12992 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12994 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&wcout.obj));
12995 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12997 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cerr.obj));
12998 basic_filebuf_char_dtor(&filebuf_char_stderr);
13000 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&ucerr.obj));
13001 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
13003 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&wcerr.obj));
13004 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
13006 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&clog.obj));
13007 basic_filebuf_char_dtor(&filebuf_char_log);
13009 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&uclog.obj));
13010 basic_filebuf_wchar_dtor(&filebuf_short_log);
13012 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&wclog.obj));
13013 basic_filebuf_wchar_dtor(&filebuf_wchar_log);