2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index
= 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 MSVCP_bool ios_base_Sync
= FALSE
;
39 __int64
DECLSPEC_ALIGN(8) pos
;
43 static inline const char* debugstr_fpos_int(fpos_int
*fpos
)
45 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos
->off
, wine_dbgstr_longlong(fpos
->pos
), fpos
->state
);
49 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
57 } basic_filebuf__Initfl
;
60 basic_streambuf_char base
;
70 STRINGBUF_allocated
= 1,
71 STRINGBUF_no_write
= 2,
72 STRINGBUF_no_read
= 4,
75 } basic_stringbuf_state
;
78 basic_streambuf_char base
;
81 char allocator
; /* empty struct */
82 } basic_stringbuf_char
;
85 basic_streambuf_wchar base
;
88 char allocator
; /* empty struct */
89 } basic_stringbuf_wchar
;
93 basic_streambuf_char
*strbuf
;
94 struct _basic_ostream_char
*stream
;
100 basic_streambuf_wchar
*strbuf
;
101 struct _basic_ostream_wchar
*stream
;
105 typedef struct _basic_ostream_char
{
107 /* virtual inheritance
108 * basic_ios_char basic_ios;
110 } basic_ostream_char
;
112 typedef struct _basic_ostream_wchar
{
114 /* virtual inheritance
115 * basic_ios_wchar basic_ios;
117 } basic_ostream_wchar
;
122 /* virtual inheritance
123 * basic_ios_char basic_ios;
125 } basic_istream_char
;
130 /* virtual inheritance
131 * basic_ios_wchar basic_ios;
133 } basic_istream_wchar
;
136 basic_istream_char base1
;
137 basic_ostream_char base2
;
138 /* virtual inheritance
139 * basic_ios_char basic_ios;
141 } basic_iostream_char
;
144 basic_istream_wchar base1
;
145 basic_ostream_wchar base2
;
146 /* virtual inheritance
147 * basic_ios_wchar basic_ios;
149 } basic_iostream_wchar
;
152 basic_ostream_char base
;
153 basic_filebuf_char filebuf
;
154 /* virtual inheritance
155 * basic_ios_char basic_ios;
157 } basic_ofstream_char
;
160 basic_istream_char base
;
161 basic_filebuf_char filebuf
;
162 /* virtual inheritance
163 * basic_ios_char basic_ios;
165 } basic_ifstream_char
;
168 basic_iostream_char base
;
169 basic_filebuf_char filebuf
;
170 /* virtual inheritance
171 * basic_ios_char basic_ios;
173 } basic_fstream_char
;
176 basic_ostream_char base
;
177 basic_stringbuf_char strbuf
;
178 /* virtual inheritance
179 * basic_ios_char basic_ios;
181 } basic_ostringstream_char
;
184 basic_ostream_wchar base
;
185 basic_stringbuf_wchar strbuf
;
186 /* virtual inheritance
187 * basic_ios_wchar basic_ios;
189 } basic_ostringstream_wchar
;
192 basic_istream_char base
;
193 basic_stringbuf_char strbuf
;
194 /* virtual inheritance
195 * basic_ios_char basic_ios;
197 } basic_istringstream_char
;
200 basic_istream_wchar base
;
201 basic_stringbuf_wchar strbuf
;
202 /* virtual inheritance
203 * basic_ios_wchar basic_ios;
205 } basic_istringstream_wchar
;
208 basic_iostream_char base
;
209 basic_stringbuf_char strbuf
;
210 /* virtual inheritance
211 * basic_ios_char basic_ios;
213 } basic_stringstream_char
;
216 basic_iostream_wchar base
;
217 basic_stringbuf_wchar strbuf
;
218 /* virtual inheritance
219 * basic_ios_wchar basic_ios;
221 } basic_stringstream_wchar
;
223 extern const vtable_ptr MSVCP_iosb_vtable
;
225 /* ??_7ios_base@std@@6B@ */
226 extern const vtable_ptr MSVCP_ios_base_vtable
;
228 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
229 extern const vtable_ptr MSVCP_basic_ios_char_vtable
;
231 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
232 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable
;
234 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
235 extern const vtable_ptr MSVCP_basic_ios_short_vtable
;
237 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
238 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable
;
240 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
241 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable
;
243 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
244 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable
;
246 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
247 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable
;
249 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
250 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable
;
252 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
253 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable
;
255 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
256 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable
;
258 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
259 const int basic_ostream_char_vbtable
[] = {0, sizeof(basic_ostream_char
)};
260 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
261 extern const vtable_ptr MSVCP_basic_ostream_char_vtable
;
263 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
264 const int basic_ostream_wchar_vbtable
[] = {0, sizeof(basic_ostream_wchar
)};
265 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
266 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable
;
268 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
269 const int basic_istream_char_vbtable
[] = {0, sizeof(basic_istream_char
)};
270 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
271 extern const vtable_ptr MSVCP_basic_istream_char_vtable
;
273 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
274 const int basic_istream_wchar_vbtable
[] = {0, sizeof(basic_istream_wchar
)};
275 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
276 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable
;
278 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
279 const int basic_iostream_char_vbtable1
[] = {0, sizeof(basic_iostream_char
)};
280 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
281 const int basic_iostream_char_vbtable2
[] = {0, sizeof(basic_iostream_char
)-FIELD_OFFSET(basic_iostream_char
, base2
)};
282 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
283 extern const vtable_ptr MSVCP_basic_iostream_char_vtable
;
285 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
286 const int basic_iostream_wchar_vbtable1
[] = {0, sizeof(basic_iostream_wchar
)};
287 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
288 const int basic_iostream_wchar_vbtable2
[] = {0, sizeof(basic_iostream_wchar
)-FIELD_OFFSET(basic_iostream_wchar
, base2
)};
289 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
290 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable
;
292 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
293 const int basic_ofstream_char_vbtable
[] = {0, sizeof(basic_ofstream_char
)};
294 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
295 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable
;
297 /*??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
298 const int basic_ifstream_char_vbtable
[] = {0, sizeof(basic_ifstream_char
)};
299 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
300 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable
;
302 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
303 const int basic_fstream_char_vbtable1
[] = {0, sizeof(basic_fstream_char
)};
304 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
305 const int basic_fstream_char_vbtable2
[] = {0, sizeof(basic_fstream_char
)-FIELD_OFFSET(basic_fstream_char
, base
.base2
)};
306 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
307 extern const vtable_ptr MSVCP_basic_fstream_char_vtable
;
309 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
310 const int basic_ostringstream_char_vbtable
[] = {0, sizeof(basic_ostringstream_char
)};
311 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
312 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable
;
314 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
315 const int basic_ostringstream_wchar_vbtable
[] = {0, sizeof(basic_ostringstream_wchar
)};
316 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
317 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable
;
319 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
320 const int basic_istringstream_char_vbtable
[] = {0, sizeof(basic_istringstream_char
)};
321 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
322 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable
;
324 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
325 const int basic_istringstream_wchar_vbtable
[] = {0, sizeof(basic_istringstream_wchar
)};
326 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
327 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable
;
329 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
330 const int basic_stringstream_char_vbtable1
[] = {0, sizeof(basic_stringstream_char
)};
331 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
332 const int basic_stringstream_char_vbtable2
[] = {0, sizeof(basic_stringstream_char
)-FIELD_OFFSET(basic_stringstream_char
, base
.base2
)};
333 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
334 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable
;
336 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
337 const int basic_stringstream_wchar_vbtable1
[] = {0, sizeof(basic_stringstream_wchar
)};
338 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
339 const int basic_stringstream_wchar_vbtable2
[] = {0, sizeof(basic_stringstream_wchar
)-FIELD_OFFSET(basic_stringstream_wchar
, base
.base2
)};
340 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
341 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable
;
343 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@");
344 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@");
345 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
346 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@");
347 DEFINE_RTTI_DATA2(basic_ios_wchar
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
348 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@");
349 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
350 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@");
351 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
352 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@");
353 DEFINE_RTTI_DATA0(basic_streambuf_wchar
, 0,
354 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@");
355 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
356 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@");
357 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
358 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@");
359 DEFINE_RTTI_DATA1(basic_stringbuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
360 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
361 DEFINE_RTTI_DATA1(basic_stringbuf_wchar
, 0, &basic_streambuf_wchar_rtti_base_descriptor
,
362 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
363 DEFINE_RTTI_DATA1(basic_stringbuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
364 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@");
365 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
366 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
367 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@");
368 DEFINE_RTTI_DATA3(basic_ostream_wchar
, sizeof(basic_ostream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
369 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
370 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@");
371 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
372 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
373 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@");
374 DEFINE_RTTI_DATA3(basic_istream_wchar
, sizeof(basic_istream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
375 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
376 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@");
377 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
378 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
379 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
380 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
381 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
382 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@");
383 DEFINE_RTTI_DATA8(basic_iostream_wchar
, sizeof(basic_iostream_wchar
),
384 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
385 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
386 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
387 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
388 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@");
389 DEFINE_RTTI_DATA4(basic_ofstream_char
, sizeof(basic_ofstream_char
),
390 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
391 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
392 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@");
393 DEFINE_RTTI_DATA4(basic_ifstream_char
, sizeof(basic_ifstream_char
),
394 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
395 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
396 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@");
397 DEFINE_RTTI_DATA8(basic_fstream_char
, sizeof(basic_fstream_char
),
398 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
399 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
400 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
401 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
402 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@");
403 DEFINE_RTTI_DATA4(basic_ostringstream_char
, sizeof(basic_ostringstream_char
),
404 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
405 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
406 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
407 DEFINE_RTTI_DATA4(basic_ostringstream_wchar
, sizeof(basic_ostringstream_wchar
),
408 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
409 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
410 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
411 DEFINE_RTTI_DATA4(basic_istringstream_char
, sizeof(basic_istringstream_char
),
412 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
413 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
414 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
415 DEFINE_RTTI_DATA4(basic_istringstream_wchar
, sizeof(basic_istringstream_wchar
),
416 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
417 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
418 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
419 DEFINE_RTTI_DATA8(basic_stringstream_char
, sizeof(basic_stringstream_char
),
420 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
421 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
422 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
423 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
424 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@");
425 DEFINE_RTTI_DATA8(basic_stringstream_wchar
, sizeof(basic_stringstream_wchar
),
426 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
427 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
428 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
429 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
430 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@");
433 void __asm_dummy_vtables(void) {
435 __ASM_VTABLE(iosb
, "");
436 __ASM_VTABLE(ios_base
, "");
437 __ASM_VTABLE(basic_ios_char
, "");
438 __ASM_VTABLE(basic_ios_wchar
, "");
439 __ASM_VTABLE(basic_ios_short
, "");
440 __ASM_VTABLE(basic_streambuf_char
,
441 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
442 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
443 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
444 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
445 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
446 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
447 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
448 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
449 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
450 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
451 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
452 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
453 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
454 __ASM_VTABLE(basic_streambuf_wchar
,
455 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
456 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
457 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
458 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
459 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
460 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
461 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
462 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
463 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
464 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
465 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
466 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
467 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
468 __ASM_VTABLE(basic_streambuf_short
,
469 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
470 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
471 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
472 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
473 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
474 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
475 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
476 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
477 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
478 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
479 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
480 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
481 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
482 __ASM_VTABLE(basic_filebuf_char
,
483 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
484 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
485 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
486 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
487 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
488 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
489 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
490 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
491 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
492 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
493 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
494 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
495 VTABLE_ADD_FUNC(basic_filebuf_char_imbue
));
496 __ASM_VTABLE(basic_stringbuf_char
,
497 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow
)
498 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail
)
499 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
500 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow
)
501 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
502 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
503 VTABLE_ADD_FUNC(basic_streambuf_char__Xsgetn_s
)
504 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
505 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff
)
506 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos
)
507 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
508 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
509 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
510 __ASM_VTABLE(basic_stringbuf_wchar
,
511 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow
)
512 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail
)
513 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
514 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow
)
515 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
516 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
517 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
518 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
519 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff
)
520 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos
)
521 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
522 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
523 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
524 __ASM_VTABLE(basic_stringbuf_short
,
525 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow
)
526 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail
)
527 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
528 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow
)
529 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
530 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
531 VTABLE_ADD_FUNC(basic_streambuf_wchar__Xsgetn_s
)
532 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
533 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff
)
534 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos
)
535 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
536 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
537 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
538 __ASM_VTABLE(basic_ostream_char
, "");
539 __ASM_VTABLE(basic_ostream_wchar
, "");
540 __ASM_VTABLE(basic_istream_char
, "");
541 __ASM_VTABLE(basic_istream_wchar
, "");
542 __ASM_VTABLE(basic_iostream_char
, "");
543 __ASM_VTABLE(basic_iostream_wchar
, "");
544 __ASM_VTABLE(basic_ofstream_char
, "");
545 __ASM_VTABLE(basic_ifstream_char
, "");
546 __ASM_VTABLE(basic_fstream_char
, "");
547 __ASM_VTABLE(basic_ostringstream_char
, "");
548 __ASM_VTABLE(basic_ostringstream_wchar
, "");
549 __ASM_VTABLE(basic_istringstream_char
, "");
550 __ASM_VTABLE(basic_istringstream_wchar
, "");
551 __ASM_VTABLE(basic_stringstream_char
, "");
552 __ASM_VTABLE(basic_stringstream_wchar
, "");
557 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
558 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
559 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
560 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
562 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
566 this->wsize
= last
-next
;
569 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
570 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
571 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
572 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
574 basic_streambuf_char_setp_next(this, first
, first
, last
);
577 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
578 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
579 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
580 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
582 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
586 this->rsize
= last
-next
;
589 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
590 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
591 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
592 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
594 TRACE("(%p)\n", this);
596 this->prbuf
= &this->rbuf
;
597 this->pwbuf
= &this->wbuf
;
598 this->prpos
= &this->rpos
;
599 this->pwpos
= &this->wpos
;
600 this->prsize
= &this->rsize
;
601 this->pwsize
= &this->wsize
;
603 basic_streambuf_char_setp(this, NULL
, NULL
);
604 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
607 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
608 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
609 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
610 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
612 TRACE("(%p %d)\n", this, uninitialized
);
613 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
614 mutex_ctor(&this->lock
);
618 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
619 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
620 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
621 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
623 TRACE("(%p)\n", this);
625 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
626 mutex_ctor(&this->lock
);
627 this->loc
= MSVCRT_operator_new(sizeof(locale
));
628 locale_ctor(this->loc
);
629 basic_streambuf_char__Init_empty(this);
634 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
635 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
636 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
637 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
639 TRACE("(%p)\n", this);
641 mutex_dtor(&this->lock
);
642 locale_dtor(this->loc
);
643 MSVCRT_operator_delete(this->loc
);
646 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_char_vector_dtor
, 8)
647 basic_streambuf_char
* __thiscall
MSVCP_basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
649 TRACE("(%p %x)\n", this, flags
);
651 /* we have an array, with the number of elements stored before the first object */
652 int i
, *ptr
= (int *)this-1;
654 for(i
=*ptr
-1; i
>=0; i
--)
655 basic_streambuf_char_dtor(this+i
);
656 MSVCRT_operator_delete(ptr
);
658 basic_streambuf_char_dtor(this);
660 MSVCRT_operator_delete(this);
666 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
667 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
668 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail
, 4)
669 streamsize __thiscall
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
671 TRACE("(%p)\n", this);
672 return *this->prpos
? *this->prsize
: 0;
675 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
676 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
677 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
678 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
680 TRACE("(%p)\n", this);
686 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
687 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
688 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
689 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
691 TRACE("(%p)\n", this);
693 return (*this->prpos
)++;
696 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
697 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
698 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc
, 4)
699 char* __thiscall
basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
701 TRACE("(%p)\n", this);
707 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
708 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
709 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
710 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
712 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
722 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
723 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
724 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock
, 4)
725 void __thiscall
basic_streambuf_char__Lock(basic_streambuf_char
*this)
727 TRACE("(%p)\n", this);
728 mutex_lock(&this->lock
);
731 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
732 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
733 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail
, 4)
734 streamsize __thiscall
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
736 TRACE("(%p)\n", this);
737 return *this->pwpos
? *this->pwsize
: 0;
740 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
741 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
742 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
743 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
745 TRACE("(%p)\n", this);
747 return (*this->pwpos
)++;
750 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
751 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
752 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
753 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
754 int, (basic_streambuf_char*), (this))
755 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
757 TRACE("(%p)\n", this);
761 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
762 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
763 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
764 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
765 int, (basic_streambuf_char*), (this))
766 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
770 TRACE("(%p)\n", this);
772 if(call_basic_streambuf_char_underflow(this)==EOF
)
781 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
782 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
783 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Xsgetn_s
, 16)
784 #define call_basic_streambuf_char__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
785 streamsize, (basic_streambuf_char*, char*, MSVCP_size_t, streamsize), (this, ptr, size, count))
786 streamsize __thiscall
basic_streambuf_char__Xsgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
788 streamsize copied
, chunk
;
791 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
793 for(copied
=0; copied
<count
&& size
;) {
794 chunk
= basic_streambuf_char__Gnavail(this);
795 if(chunk
> count
-copied
)
796 chunk
= count
-copied
;
799 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
800 *this->prpos
+= chunk
;
801 *this->prsize
-= chunk
;
804 }else if((c
= call_basic_streambuf_char_uflow(this)) != EOF
) {
816 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
817 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
818 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s
, 16)
819 streamsize __thiscall
basic_streambuf_char__Sgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
821 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
822 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, size
, count
);
825 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
826 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
827 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock
, 4)
828 void __thiscall
basic_streambuf_char__Unlock(basic_streambuf_char
*this)
830 TRACE("(%p)\n", this);
831 mutex_unlock(&this->lock
);
834 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
835 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
836 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
837 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
839 TRACE("(%p)\n", this);
843 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
844 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
845 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
846 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
848 TRACE("(%p)\n", this);
852 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
853 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
854 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
855 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
857 TRACE("(%p)\n", this);
858 return *this->prpos
+*this->prsize
;
861 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
862 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
863 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
864 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
866 TRACE("(%p)\n", this);
867 return *this->pwpos
+*this->pwsize
;
870 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
871 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
872 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
873 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
875 TRACE("(%p %d)\n", this, off
);
877 *this->prsize
-= off
;
880 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
881 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
882 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
883 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
885 TRACE("(%p)\n", this);
886 return locale_copy_ctor(ret
, this->loc
);
889 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
890 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
891 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
892 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
893 void, (basic_streambuf_char*, const locale*), (this, loc))
894 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
896 TRACE("(%p %p)\n", this, loc
);
899 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
900 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
901 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
902 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
903 int, (basic_streambuf_char*, int), (this, ch))
904 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
906 TRACE("(%p %d)\n", this, ch
);
910 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
911 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
912 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
913 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
914 int, (basic_streambuf_char*, int), (this, ch))
915 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
917 TRACE("(%p %d)\n", this, ch
);
921 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
922 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
923 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
924 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
926 TRACE("(%p)\n", this);
930 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
931 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
932 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
933 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
935 TRACE("(%p %d)\n", this, off
);
937 *this->pwsize
-= off
;
940 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
941 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
942 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
943 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
945 TRACE("(%p)\n", this);
949 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
950 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
951 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
952 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
954 TRACE("(%p %p)\n", this, loc
);
955 memcpy(ret
, this->loc
, sizeof(locale
));
956 call_basic_streambuf_char_imbue(this, loc
);
957 locale_copy_ctor(this->loc
, loc
);
961 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
962 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
963 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
964 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
965 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
966 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
967 fpos_int
*ret
, streamoff off
, int way
, int mode
)
969 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
976 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
977 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
978 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
979 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
980 fpos_int
*ret
, streamoff off
, int way
, int mode
)
982 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
983 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
986 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
987 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
988 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 20)
989 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff_old(basic_streambuf_char
*this,
990 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
992 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
993 return basic_streambuf_char_pubseekoff(this, ret
, off
, way
, mode
);
996 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
997 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
998 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
999 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1000 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1001 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
1002 fpos_int
*ret
, fpos_int pos
, int mode
)
1004 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1011 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1012 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1013 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
1014 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
1015 fpos_int
*ret
, fpos_int pos
, int mode
)
1017 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1018 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
1021 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1022 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1023 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old
, 36)
1024 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos_old(basic_streambuf_char
*this,
1025 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1027 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1028 return basic_streambuf_char_pubseekpos(this, ret
, pos
, mode
);
1031 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1032 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1033 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
1034 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1035 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1036 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1038 TRACE("(%p %p %ld)\n", this, buf
, count
);
1042 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1043 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1044 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
1045 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1047 TRACE("(%p %p %ld)\n", this, buf
, count
);
1048 return call_basic_streambuf_char_setbuf(this, buf
, count
);
1051 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1052 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1053 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
1054 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
1055 int, (basic_streambuf_char*), (this))
1056 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
1058 TRACE("(%p)\n", this);
1062 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1063 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1064 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
1065 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
1067 TRACE("(%p)\n", this);
1068 return call_basic_streambuf_char_sync(this);
1071 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1072 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1073 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
1074 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1076 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1077 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1080 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1081 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1082 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
1083 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1084 streamsize, (basic_streambuf_char*), (this))
1085 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
1087 TRACE("(%p)\n", this);
1091 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1092 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1093 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
1094 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
1098 TRACE("(%p)\n", this);
1100 ret
= basic_streambuf_char__Gnavail(this);
1101 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
1104 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1105 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1106 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
1107 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
1109 TRACE("(%p %d)\n", this, ch
);
1110 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1116 return call_basic_streambuf_char_pbackfail(this, ch
);
1119 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1120 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1121 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
1122 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
1124 TRACE("(%p %d)\n", this, ch
);
1125 return basic_streambuf_char__Pnavail(this) ?
1126 (*basic_streambuf_char__Pninc(this) = ch
) :
1127 call_basic_streambuf_char_overflow(this, ch
);
1130 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1131 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1132 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
1133 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
1135 TRACE("(%p)\n", this);
1136 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1139 return **this->prpos
;
1142 return call_basic_streambuf_char_pbackfail(this, EOF
);
1145 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1146 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1147 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1148 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1150 TRACE("(%p)\n", this);
1151 if(basic_streambuf_char__Gnavail(this))
1152 basic_streambuf_char__Gninc(this);
1154 call_basic_streambuf_char_uflow(this);
1157 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1158 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1159 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1160 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1162 TRACE("(%p)\n", this);
1163 return basic_streambuf_char__Gnavail(this) ?
1164 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1167 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1168 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1169 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1170 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1172 TRACE("(%p)\n", this);
1173 return basic_streambuf_char__Gnavail(this) ?
1174 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1177 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1178 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1179 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1180 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1182 TRACE("(%p)\n", this);
1184 if(basic_streambuf_char__Gnavail(this) > 1)
1185 return *basic_streambuf_char__Gnpreinc(this);
1186 return basic_streambuf_char_sbumpc(this)==EOF
?
1187 EOF
: basic_streambuf_char_sgetc(this);
1190 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1191 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1192 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
1193 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1194 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1195 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1197 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1198 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1201 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1202 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1203 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
1204 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1205 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1206 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1208 streamsize copied
, chunk
;
1210 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1212 for(copied
=0; copied
<count
;) {
1213 chunk
= basic_streambuf_char__Pnavail(this);
1214 if(chunk
> count
-copied
)
1215 chunk
= count
-copied
;
1218 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1219 *this->pwpos
+= chunk
;
1220 *this->pwsize
-= chunk
;
1222 }else if(call_basic_streambuf_char_overflow(this, ptr
[copied
]) != EOF
) {
1232 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1233 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
1235 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1237 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1238 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
1241 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1242 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1243 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1244 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1245 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1246 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1248 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1252 this->wsize
= last
-next
;
1255 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1256 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1257 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1258 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1259 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1260 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1262 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1265 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1266 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1267 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1268 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1269 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1270 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1272 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1276 this->rsize
= last
-next
;
1279 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1280 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1281 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1282 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1283 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1284 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1286 TRACE("(%p)\n", this);
1288 this->prbuf
= &this->rbuf
;
1289 this->pwbuf
= &this->wbuf
;
1290 this->prpos
= &this->rpos
;
1291 this->pwpos
= &this->wpos
;
1292 this->prsize
= &this->rsize
;
1293 this->pwsize
= &this->wsize
;
1295 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1296 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1299 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1300 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1301 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized
, 8)
1302 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1304 TRACE("(%p %d)\n", this, uninitialized
);
1305 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1306 mutex_ctor(&this->lock
);
1310 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1311 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1312 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1313 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1315 TRACE("(%p %d)\n", this, uninitialized
);
1316 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized
);
1317 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1321 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1322 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1323 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor
, 4)
1324 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor(basic_streambuf_wchar
*this)
1326 TRACE("(%p)\n", this);
1328 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1329 mutex_ctor(&this->lock
);
1330 this->loc
= MSVCRT_operator_new(sizeof(locale
));
1331 locale_ctor(this->loc
);
1332 basic_streambuf_wchar__Init_empty(this);
1337 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1338 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1339 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1340 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1342 TRACE("(%p)\n", this);
1343 basic_streambuf_wchar_ctor(this);
1344 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1348 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1349 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1350 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1351 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1352 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1353 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1355 TRACE("(%p)\n", this);
1357 mutex_dtor(&this->lock
);
1358 locale_dtor(this->loc
);
1359 MSVCRT_operator_delete(this->loc
);
1362 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor
, 8)
1363 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1365 TRACE("(%p %x)\n", this, flags
);
1367 /* we have an array, with the number of elements stored before the first object */
1368 int i
, *ptr
= (int *)this-1;
1370 for(i
=*ptr
-1; i
>=0; i
--)
1371 basic_streambuf_wchar_dtor(this+i
);
1372 MSVCRT_operator_delete(ptr
);
1374 basic_streambuf_wchar_dtor(this);
1376 MSVCRT_operator_delete(this);
1382 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor
, 8)
1383 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1385 TRACE("(%p %x)\n", this, flags
);
1386 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags
);
1389 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1390 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1391 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1392 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1393 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail
, 4)
1394 streamsize __thiscall
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1396 TRACE("(%p)\n", this);
1397 return *this->prpos
? *this->prsize
: 0;
1400 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1401 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1402 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1403 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1404 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1405 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1407 TRACE("(%p)\n", this);
1410 return *this->prpos
;
1413 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1414 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1415 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1416 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1417 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1418 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1420 TRACE("(%p)\n", this);
1422 return (*this->prpos
)++;
1425 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1426 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1427 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1428 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1429 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc
, 4)
1430 wchar_t* __thiscall
basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1432 TRACE("(%p)\n", this);
1435 return *this->prpos
;
1438 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1439 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1440 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1441 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1442 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1443 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
)
1445 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1455 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1456 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1457 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1458 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1459 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock
, 4)
1460 void __thiscall
basic_streambuf_wchar__Lock(basic_streambuf_wchar
*this)
1462 TRACE("(%p)\n", this);
1463 mutex_lock(&this->lock
);
1466 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1467 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1468 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1469 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1470 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail
, 4)
1471 streamsize __thiscall
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1473 TRACE("(%p)\n", this);
1474 return *this->pwpos
? *this->pwsize
: 0;
1477 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1478 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1479 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1480 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1481 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1482 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1484 TRACE("(%p)\n", this);
1486 return (*this->pwpos
)++;
1489 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1490 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1491 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1492 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1493 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1494 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1495 unsigned short, (basic_streambuf_wchar*), (this))
1496 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1498 TRACE("(%p)\n", this);
1502 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1503 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1504 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1505 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1506 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1507 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1508 unsigned short, (basic_streambuf_wchar*), (this))
1509 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1513 TRACE("(%p)\n", this);
1515 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1518 ret
= **this->prpos
;
1524 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1525 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1526 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1527 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1528 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s
, 16)
1529 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1530 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1531 streamsize __thiscall
basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1533 streamsize copied
, chunk
;
1536 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1538 for(copied
=0; copied
<count
&& size
;) {
1539 chunk
= basic_streambuf_wchar__Gnavail(this);
1540 if(chunk
> count
-copied
)
1541 chunk
= count
-copied
;
1544 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
1545 *this->prpos
+= chunk
;
1546 *this->prsize
-= chunk
;
1549 }else if((c
= call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1561 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1562 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1563 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1564 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1565 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s
, 16)
1566 streamsize __thiscall
basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1568 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1569 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, size
, count
);
1572 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1573 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1574 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1575 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1576 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock
, 4)
1577 void __thiscall
basic_streambuf_wchar__Unlock(basic_streambuf_wchar
*this)
1579 TRACE("(%p)\n", this);
1580 mutex_unlock(&this->lock
);
1583 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1584 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1585 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1586 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1587 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1588 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1590 TRACE("(%p)\n", this);
1591 return *this->prbuf
;
1594 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1595 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1596 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1597 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1598 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1599 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1601 TRACE("(%p)\n", this);
1602 return *this->prpos
;
1605 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1606 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1607 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1608 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1609 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1610 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1612 TRACE("(%p)\n", this);
1613 return *this->prpos
+*this->prsize
;
1616 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1617 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1618 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1619 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1620 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1621 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1623 TRACE("(%p)\n", this);
1624 return *this->pwpos
+*this->pwsize
;
1627 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1628 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1629 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1630 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1631 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1632 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1634 TRACE("(%p %d)\n", this, off
);
1635 *this->prpos
+= off
;
1636 *this->prsize
-= off
;
1639 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1640 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1641 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1642 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1643 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc
, 8)
1644 locale
* __thiscall
basic_streambuf_wchar_getloc(const basic_streambuf_wchar
*this, locale
*ret
)
1646 TRACE("(%p)\n", this);
1647 return locale_copy_ctor(ret
, this->loc
);
1650 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1651 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1652 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1653 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1654 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1655 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1656 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1657 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1659 TRACE("(%p %p)\n", this, loc
);
1662 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1663 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1664 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1665 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1666 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1667 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1668 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1669 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1671 TRACE("(%p %d)\n", this, ch
);
1675 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1676 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1677 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1678 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1679 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1680 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1681 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1682 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1684 TRACE("(%p %d)\n", this, ch
);
1688 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1689 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1690 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1691 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1692 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1693 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1695 TRACE("(%p)\n", this);
1696 return *this->pwbuf
;
1699 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1700 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1701 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1702 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1703 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1704 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1706 TRACE("(%p %d)\n", this, off
);
1707 *this->pwpos
+= off
;
1708 *this->pwsize
-= off
;
1711 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1712 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1713 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1714 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1715 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1716 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1718 TRACE("(%p)\n", this);
1719 return *this->pwpos
;
1722 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1723 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1724 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1725 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1726 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1727 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1729 TRACE("(%p %p)\n", this, loc
);
1730 memcpy(ret
, this->loc
, sizeof(locale
));
1731 call_basic_streambuf_wchar_imbue(this, loc
);
1732 locale_copy_ctor(this->loc
, loc
);
1736 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1737 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1738 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1739 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1740 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
1741 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1742 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1743 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1744 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1746 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1753 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1754 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1755 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1756 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1757 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
1758 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1759 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1761 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1762 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1765 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1766 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1767 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1768 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1769 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 20)
1770 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
*this,
1771 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
1773 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1774 return basic_streambuf_wchar_pubseekoff(this, ret
, off
, way
, mode
);
1777 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1778 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1779 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1780 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1781 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1782 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1783 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1784 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1785 fpos_int
*ret
, fpos_int pos
, int mode
)
1787 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1794 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1795 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1796 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1797 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1798 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1799 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1800 fpos_int
*ret
, fpos_int pos
, int mode
)
1802 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1803 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1806 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1807 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1808 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1809 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1810 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old
, 36)
1811 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar
*this,
1812 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1814 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1815 return basic_streambuf_wchar_pubseekpos(this, ret
, pos
, mode
);
1818 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1819 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1820 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1821 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1822 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
1823 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1824 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1825 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1827 TRACE("(%p %p %ld)\n", this, buf
, count
);
1831 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1832 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1833 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1834 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1835 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
1836 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1838 TRACE("(%p %p %ld)\n", this, buf
, count
);
1839 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1842 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1843 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1844 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1845 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1846 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1847 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1848 int, (basic_streambuf_wchar*), (this))
1849 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1851 TRACE("(%p)\n", this);
1855 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1856 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1857 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1858 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1859 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1860 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1862 TRACE("(%p)\n", this);
1863 return call_basic_streambuf_wchar_sync(this);
1866 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1867 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1868 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1869 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1870 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
1871 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1873 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1874 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1877 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1878 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1879 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1880 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1881 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1882 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1883 streamsize, (basic_streambuf_wchar*), (this))
1884 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1886 TRACE("(%p)\n", this);
1890 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1891 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1892 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1893 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1894 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1895 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1899 TRACE("(%p)\n", this);
1901 ret
= basic_streambuf_wchar__Gnavail(this);
1902 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1905 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1906 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1907 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1908 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1909 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1910 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1912 TRACE("(%p %d)\n", this, ch
);
1913 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1919 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1922 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1923 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1924 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1925 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1926 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1927 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1929 TRACE("(%p %d)\n", this, ch
);
1930 return basic_streambuf_wchar__Pnavail(this) ?
1931 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1932 call_basic_streambuf_wchar_overflow(this, ch
);
1935 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1936 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1937 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1938 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1939 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1940 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1942 TRACE("(%p)\n", this);
1943 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1946 return **this->prpos
;
1949 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1952 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1953 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1954 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1955 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1956 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1957 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1959 TRACE("(%p)\n", this);
1960 if(basic_streambuf_wchar__Gnavail(this))
1961 basic_streambuf_wchar__Gninc(this);
1963 call_basic_streambuf_wchar_uflow(this);
1966 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1967 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1968 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1969 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1970 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1971 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1973 TRACE("(%p)\n", this);
1974 return basic_streambuf_wchar__Gnavail(this) ?
1975 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1978 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1979 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1980 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1981 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1982 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1983 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1985 TRACE("(%p)\n", this);
1986 return basic_streambuf_wchar__Gnavail(this) ?
1987 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1990 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1991 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1992 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1993 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1994 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1995 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1997 TRACE("(%p)\n", this);
1999 if(basic_streambuf_wchar__Gnavail(this) > 1)
2000 return *basic_streambuf_wchar__Gnpreinc(this);
2001 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
2002 WEOF
: basic_streambuf_wchar_sgetc(this);
2005 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2006 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2007 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2008 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2009 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
2010 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2011 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2012 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
2014 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2015 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
2018 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2019 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2020 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2021 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2022 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
2023 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
2024 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2025 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2027 streamsize copied
, chunk
;
2029 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2031 for(copied
=0; copied
<count
;) {
2032 chunk
= basic_streambuf_wchar__Pnavail(this);
2033 if(chunk
> count
-copied
)
2034 chunk
= count
-copied
;
2037 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
2038 *this->pwpos
+= chunk
;
2039 *this->pwsize
-= chunk
;
2041 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
2051 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2052 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2053 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2054 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2055 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
2056 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2058 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2059 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
2062 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2063 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2064 int basic_filebuf_char__Init__Stinit
= 0;
2066 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2067 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2068 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
2069 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
2071 TRACE("(%p %p %d)\n", this, file
, which
);
2074 this->wrotesome
= FALSE
;
2075 this->state
= basic_filebuf_char__Init__Stinit
;
2076 this->close
= (which
== INITFL_open
);
2079 basic_streambuf_char__Init_empty(&this->base
);
2081 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
2082 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
2085 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2086 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2087 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 8)
2088 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this, codecvt_char
*cvt
)
2090 TRACE("(%p %p)\n", this, cvt
);
2092 if(codecvt_base_always_noconv(&cvt
->base
)) {
2095 basic_streambuf_char__Init_empty(&this->base
);
2100 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2101 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2102 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite
, 4)
2103 MSVCP_bool __thiscall
basic_filebuf_char__Endwrite(basic_filebuf_char
*this)
2105 TRACE("(%p)\n", this);
2107 if(!this->wrotesome
|| !this->cvt
)
2111 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2115 /* TODO: check if we need a dynamic buffer here */
2120 ret
= codecvt_char_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
2123 this->wrotesome
= FALSE
;
2125 case CODECVT_partial
:
2126 if(!fwrite(buf
, next
-buf
, 1, this->file
))
2131 case CODECVT_noconv
:
2132 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2141 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2142 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2143 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
2144 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
2146 basic_filebuf_char
*ret
= this;
2148 TRACE("(%p)\n", this);
2153 /* TODO: handle exceptions */
2154 if(!basic_filebuf_char__Endwrite(this))
2156 if(!fclose(this->file
))
2159 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
2163 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2164 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2165 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
2166 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
2168 TRACE("(%p %p)\n", this, file
);
2170 basic_streambuf_char_ctor(&this->base
);
2171 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
2173 basic_filebuf_char__Init(this, file
, INITFL_new
);
2177 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2178 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2179 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
2180 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
2182 return basic_filebuf_char_ctor_file(this, NULL
);
2185 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2186 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2187 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
2188 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
2190 TRACE("(%p %d)\n", this, uninitialized
);
2192 basic_streambuf_char_ctor(&this->base
);
2193 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
2197 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2198 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2199 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
2200 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
2202 TRACE("(%p)\n", this);
2205 basic_filebuf_char_close(this);
2206 basic_streambuf_char_dtor(&this->base
);
2209 DEFINE_THISCALL_WRAPPER(MSVCP_basic_filebuf_char_vector_dtor
, 8)
2210 basic_filebuf_char
* __thiscall
MSVCP_basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
2212 TRACE("(%p %x)\n", this, flags
);
2214 /* we have an array, with the number of elements stored before the first object */
2215 int i
, *ptr
= (int *)this-1;
2217 for(i
=*ptr
-1; i
>=0; i
--)
2218 basic_filebuf_char_dtor(this+i
);
2219 MSVCRT_operator_delete(ptr
);
2221 basic_filebuf_char_dtor(this);
2223 MSVCRT_operator_delete(this);
2229 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2230 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2231 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
2232 MSVCP_bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
2234 TRACE("(%p)\n", this);
2235 return this->file
!= NULL
;
2238 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2239 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2240 FILE* __cdecl
_Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
2242 static const wchar_t rW
[] = {'r',0};
2243 static const struct {
2245 const wchar_t str
[4];
2246 const wchar_t str_bin
[4];
2248 {OPENMODE_out
, {'w',0}, {'w','b',0}},
2249 {OPENMODE_out
|OPENMODE_app
, {'a',0}, {'a','b',0}},
2250 {OPENMODE_app
, {'a',0}, {'a','b',0}},
2251 {OPENMODE_out
|OPENMODE_trunc
, {'w',0}, {'w','b',0}},
2252 {OPENMODE_in
, {'r',0}, {'r','b',0}},
2253 {OPENMODE_in
|OPENMODE_out
, {'r','+',0}, {'r','+','b',0}},
2254 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, {'w','+',0}, {'w','+','b',0}},
2255 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}},
2256 {OPENMODE_in
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}}
2259 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2263 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
2265 for(mode_idx
=0; mode_idx
<sizeof(str_mode
)/sizeof(str_mode
[0]); mode_idx
++)
2266 if(str_mode
[mode_idx
].mode
== real_mode
)
2268 if(mode_idx
== sizeof(str_mode
)/sizeof(str_mode
[0]))
2271 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, rW
)))
2276 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2277 && (f
= _wfopen(name
, rW
))) {
2282 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2283 : str_mode
[mode_idx
].str
, prot
);
2287 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2295 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2296 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2297 FILE* __cdecl
_Fiopen(const char *name
, int mode
, int prot
)
2299 wchar_t nameW
[FILENAME_MAX
];
2301 TRACE("(%s %d %d)\n", name
, mode
, prot
);
2303 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2305 return _Fiopen_wchar(nameW
, mode
, prot
);
2308 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2309 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2310 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2311 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2312 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar
, 16)
2313 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar(basic_filebuf_char
*this, const wchar_t *name
, int mode
, int prot
)
2317 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
2319 if(basic_filebuf_char_is_open(this))
2322 if(!(f
= _Fiopen_wchar(name
, mode
, prot
)))
2325 basic_filebuf_char__Init(this, f
, INITFL_open
);
2326 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base
.loc
));
2330 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2331 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2332 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2333 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2334 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode
, 12)
2335 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar_mode(basic_filebuf_char
*this, const wchar_t *name
, unsigned int mode
)
2337 return basic_filebuf_char_open_wchar(this, name
, mode
, SH_DENYNO
);
2340 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2341 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2342 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open
, 16)
2343 basic_filebuf_char
* __thiscall
basic_filebuf_char_open(basic_filebuf_char
*this, const char *name
, int mode
, int prot
)
2345 wchar_t nameW
[FILENAME_MAX
];
2347 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
2349 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2351 return basic_filebuf_char_open_wchar(this, nameW
, mode
, prot
);
2354 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2355 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2356 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
2357 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
2359 return basic_filebuf_char_open(this, name
, mode
, SH_DENYNO
);
2362 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2363 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2364 #define call_basic_filebuf_char_overflow(this, c) CALL_VTBL_FUNC(this, 4, \
2365 int, (basic_filebuf_char*, int), (this, c))
2366 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2367 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2369 char buf
[8], *dyn_buf
;
2370 char ch
= c
, *to_next
;
2371 const char *from_next
;
2375 TRACE("(%p %d)\n", this, c
);
2377 if(!basic_filebuf_char_is_open(this))
2383 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2387 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2388 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2391 case CODECVT_partial
:
2396 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2398 if(ret
== CODECVT_partial
)
2401 case CODECVT_noconv
:
2402 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2408 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2409 dyn_buf
= malloc(max_size
);
2413 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2414 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2418 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2420 return ret
? c
: EOF
;
2421 case CODECVT_partial
:
2422 ERR("buffer should be big enough to store all output\n");
2430 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2431 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2432 #define call_basic_filebuf_char_pbackfail(this, c) CALL_VTBL_FUNC(this, 8, \
2433 int, (basic_filebuf_char*, int), (this, c))
2434 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2435 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2437 TRACE("(%p %d)\n", this, c
);
2439 if(!basic_filebuf_char_is_open(this))
2442 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2443 && (c
==EOF
|| basic_streambuf_char_gptr(&this->base
)[-1]==(char)c
)) {
2444 basic_streambuf_char__Gndec(&this->base
);
2445 return c
==EOF
? !c
: c
;
2446 }else if(c
!=EOF
&& !this->cvt
) {
2447 return ungetc(c
, this->file
);
2453 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2454 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2455 #define call_basic_filebuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
2456 int, (basic_filebuf_char*), (this))
2457 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2458 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2460 char ch
, buf
[128], *to_next
;
2461 const char *buf_next
;
2464 TRACE("(%p)\n", this);
2466 if(!basic_filebuf_char_is_open(this))
2469 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2470 return *basic_streambuf_char__Gninc(&this->base
);
2472 c
= fgetc(this->file
);
2473 if(!this->cvt
|| c
==EOF
)
2477 for(i
=0; i
< sizeof(buf
)/sizeof(char); i
++) {
2480 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
2481 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2482 case CODECVT_partial
:
2484 if(to_next
== &ch
) {
2485 c
= fgetc(this->file
);
2491 for(i
--; i
>=buf_next
-buf
; i
--)
2492 ungetc(buf
[i
], this->file
);
2494 case CODECVT_noconv
:
2501 FIXME("buffer is too small\n");
2505 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2506 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2507 #define call_basic_filebuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
2508 int, (basic_filebuf_char*), (this))
2509 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2510 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2514 TRACE("(%p)\n", this);
2516 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2517 return *basic_streambuf_char_gptr(&this->base
);
2519 ret
= call_basic_filebuf_char_uflow(this);
2521 ret
= call_basic_filebuf_char_pbackfail(this, ret
);
2525 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2526 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2527 #define call_basic_filebuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
2528 fpos_int*, (basic_filebuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2529 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
2530 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2531 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2535 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
2537 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2538 || fseek(this->file
, off
, way
)) {
2545 fgetpos(this->file
, &pos
);
2548 ret
->state
= this->state
;
2552 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2553 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2554 #define call_basic_filebuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
2555 fpos_int*, (basic_filebuf_char*, fpos_int*, fpos_int, mode), (this, ret, pos, mode))
2556 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2557 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2558 fpos_int
*ret
, fpos_int pos
, int mode
)
2562 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2564 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2565 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2566 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2573 fgetpos(this->file
, &fpos
);
2576 ret
->state
= this->state
;
2580 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2581 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2582 #define call_basic_filebuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
2583 basic_streambuf_char*, (basic_filebuf_char*, char*, streamsize), (this, buf, count))
2584 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
2585 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2587 TRACE("(%p %p %ld)\n", this, buf
, count
);
2589 if(!basic_filebuf_char_is_open(this))
2592 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2595 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2599 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2600 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2601 #define call_basic_filebuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
2602 int, (basic_filebuf_char*), (this))
2603 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2604 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2606 TRACE("(%p)\n", this);
2608 if(!basic_filebuf_char_is_open(this))
2611 if(call_basic_filebuf_char_overflow(this, EOF
) == EOF
)
2613 return fflush(this->file
);
2616 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2617 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2618 #define call_basic_filebuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
2619 void, (basic_filebuf_char*, const locale*), (this, loc))
2620 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
2621 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
2623 TRACE("(%p %p)\n", this, loc
);
2624 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc
));
2627 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2628 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2629 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate
, 8)
2630 int __thiscall
basic_stringbuf_char__Getstate(basic_stringbuf_char
*this, IOSB_openmode mode
)
2634 if(!(mode
& OPENMODE_in
))
2635 state
|= STRINGBUF_no_read
;
2637 if(!(mode
& OPENMODE_out
))
2638 state
|= STRINGBUF_no_write
;
2640 if(mode
& OPENMODE_ate
)
2641 state
|= STRINGBUF_at_end
;
2643 if(mode
& OPENMODE_app
)
2644 state
|= STRINGBUF_append
;
2649 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
2650 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
2651 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init
, 16)
2652 void __thiscall
basic_stringbuf_char__Init(basic_stringbuf_char
*this, const char *str
, MSVCP_size_t count
, int state
)
2654 TRACE("(%p, %p, %ld, %d)\n", this, str
, count
, state
);
2656 basic_streambuf_char__Init_empty(&this->base
);
2658 this->state
= state
;
2659 this->seekhigh
= NULL
;
2662 char *buf
= MSVCRT_operator_new(count
);
2664 ERR("Out of memory\n");
2665 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2668 memcpy(buf
, str
, count
);
2669 this->seekhigh
= buf
+ count
;
2671 this->state
|= STRINGBUF_allocated
;
2673 if(!(state
& STRINGBUF_no_read
))
2674 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+ count
);
2676 if(!(state
& STRINGBUF_no_write
)) {
2677 basic_streambuf_char_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
2679 if(!basic_streambuf_char_gptr(&this->base
))
2680 basic_streambuf_char_setg(&this->base
, buf
, 0, buf
);
2685 /* ??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 */
2686 /* ??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 */
2687 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str
, 12)
2688 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_str(basic_stringbuf_char
*this,
2689 const basic_string_char
*str
, IOSB_openmode mode
)
2691 TRACE("(%p %p %d)\n", this, str
, mode
);
2693 basic_streambuf_char_ctor(&this->base
);
2694 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
2696 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
),
2697 str
->size
, basic_stringbuf_char__Getstate(this, mode
));
2701 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
2702 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
2703 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode
, 8)
2704 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_mode(
2705 basic_stringbuf_char
*this, IOSB_openmode mode
)
2707 TRACE("(%p %d)\n", this, mode
);
2709 basic_streambuf_char_ctor(&this->base
);
2710 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
2712 basic_stringbuf_char__Init(this, NULL
, 0, basic_stringbuf_char__Getstate(this, mode
));
2716 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
2717 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
2718 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor
, 4)
2719 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor(basic_stringbuf_char
*this)
2721 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
2724 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
2725 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
2726 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy
, 4)
2727 void __thiscall
basic_stringbuf_char__Tidy(basic_stringbuf_char
*this)
2729 TRACE("(%p)\n", this);
2731 if(this->state
& STRINGBUF_allocated
) {
2732 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base
));
2733 this->seekhigh
= NULL
;
2734 this->state
&= ~STRINGBUF_allocated
;
2737 basic_streambuf_char__Init_empty(&this->base
);
2740 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
2741 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
2742 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor
, 4)
2743 void __thiscall
basic_stringbuf_char_dtor(basic_stringbuf_char
*this)
2745 TRACE("(%p)\n", this);
2747 basic_stringbuf_char__Tidy(this);
2748 basic_streambuf_char_dtor(&this->base
);
2751 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_char_vector_dtor
, 8)
2752 basic_stringbuf_char
* __thiscall
MSVCP_basic_stringbuf_char_vector_dtor(basic_stringbuf_char
*this, unsigned int flags
)
2754 TRACE("(%p %x)\n", this, flags
);
2757 /* we have an array, with the number of elements stored before the first object */
2758 int i
, *ptr
= (int *) this - 1;
2760 for (i
= *ptr
- 1; i
>= 0; i
--)
2761 basic_stringbuf_char_dtor(this+i
);
2763 MSVCRT_operator_delete(ptr
);
2765 basic_stringbuf_char_dtor(this);
2768 MSVCRT_operator_delete(this);
2774 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2775 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2776 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow
, 8)
2777 int __thiscall
basic_stringbuf_char_overflow(basic_stringbuf_char
*this, int meta
)
2779 MSVCP_size_t oldsize
, size
;
2782 TRACE("(%p %x)\n", this, meta
);
2786 if(this->state
& STRINGBUF_no_write
)
2789 ptr
= basic_streambuf_char_pptr(&this->base
);
2790 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
2791 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
2792 this->seekhigh
, basic_streambuf_char_epptr(&this->base
));
2794 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
2795 return (*basic_streambuf_char__Pninc(&this->base
) = meta
);
2797 oldsize
= (ptr
? basic_streambuf_char_epptr(&this->base
)-basic_streambuf_char_eback(&this->base
): 0);
2800 buf
= MSVCRT_operator_new(size
);
2802 ERR("Out of memory\n");
2803 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2807 this->seekhigh
= buf
;
2808 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
2809 if(this->state
& STRINGBUF_no_read
)
2810 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2812 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+1);
2814 this->state
|= STRINGBUF_allocated
;
2816 ptr
= basic_streambuf_char_eback(&this->base
);
2817 memcpy(buf
, ptr
, oldsize
);
2819 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
2820 basic_streambuf_char_setp_next(&this->base
, buf
,
2821 buf
+(basic_streambuf_char_pptr(&this->base
)-ptr
), buf
+size
);
2822 if(this->state
& STRINGBUF_no_read
)
2823 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2825 basic_streambuf_char_setg(&this->base
, buf
,
2826 buf
+(basic_streambuf_char_gptr(&this->base
)-ptr
),
2827 basic_streambuf_char_pptr(&this->base
)+1);
2829 MSVCRT_operator_delete(ptr
);
2832 return (*basic_streambuf_char__Pninc(&this->base
) = meta
);
2835 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2836 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2837 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail
, 8)
2838 int __thiscall
basic_stringbuf_char_pbackfail(basic_stringbuf_char
*this, int c
)
2842 TRACE("(%p %x)\n", this, c
);
2844 cur
= basic_streambuf_char_gptr(&this->base
);
2845 if(!cur
|| cur
==basic_streambuf_char_eback(&this->base
)
2846 || (c
!=EOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
2851 basic_streambuf_char_gbump(&this->base
, -1);
2852 return c
==EOF
? !EOF
: c
;
2855 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
2856 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
2857 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow
, 4)
2858 int __thiscall
basic_stringbuf_char_underflow(basic_stringbuf_char
*this)
2862 TRACE("(%p)\n", this);
2864 cur
= basic_streambuf_char_gptr(&this->base
);
2865 if(!cur
|| this->state
&STRINGBUF_no_read
)
2868 ptr
= basic_streambuf_char_pptr(&this->base
);
2869 if(this->seekhigh
< ptr
)
2870 this->seekhigh
= ptr
;
2872 ptr
= basic_streambuf_char_egptr(&this->base
);
2873 if(this->seekhigh
> ptr
)
2874 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
), cur
, this->seekhigh
);
2876 if(cur
< this->seekhigh
)
2881 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2882 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2883 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 20)
2884 fpos_int
* __thiscall
basic_stringbuf_char_seekoff(basic_stringbuf_char
*this,
2885 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2887 char *beg
, *cur_r
, *cur_w
;
2889 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
2891 cur_w
= basic_streambuf_char_pptr(&this->base
);
2892 if(cur_w
> this->seekhigh
)
2893 this->seekhigh
= cur_w
;
2898 beg
= basic_streambuf_char_eback(&this->base
);
2899 cur_r
= basic_streambuf_char_gptr(&this->base
);
2900 if((mode
& OPENMODE_in
) && cur_r
) {
2901 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
2903 else if(way
== SEEKDIR_end
)
2904 off
+= this->seekhigh
-beg
;
2905 else if(way
!= SEEKDIR_beg
)
2908 if(off
<0 || off
>this->seekhigh
-beg
) {
2911 basic_streambuf_char_gbump(&this->base
, beg
-cur_r
+off
);
2912 if((mode
& OPENMODE_out
) && cur_w
) {
2913 basic_streambuf_char_setp_next(&this->base
, beg
,
2914 basic_streambuf_char_gptr(&this->base
),
2915 basic_streambuf_char_epptr(&this->base
));
2918 }else if((mode
& OPENMODE_out
) && cur_w
) {
2919 if(way
== SEEKDIR_cur
)
2921 else if(way
== SEEKDIR_end
)
2922 off
+= this->seekhigh
-beg
;
2923 else if(way
!= SEEKDIR_beg
)
2926 if(off
<0 || off
>this->seekhigh
-beg
)
2929 basic_streambuf_char_pbump(&this->base
, beg
-cur_w
+off
);
2938 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2939 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2940 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos
, 36)
2941 fpos_int
* __thiscall
basic_stringbuf_char_seekpos(basic_stringbuf_char
*this,
2942 fpos_int
*ret
, fpos_int pos
, int mode
)
2944 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2946 if(pos
.off
==0 && pos
.pos
==-1 && pos
.state
==0) {
2951 return basic_stringbuf_char_seekoff(this, ret
, pos
.off
, SEEKDIR_beg
, mode
);
2954 /* ?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 */
2955 /* ?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 */
2956 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set
, 8)
2957 void __thiscall
basic_stringbuf_char_str_set(basic_stringbuf_char
*this, const basic_string_char
*str
)
2959 TRACE("(%p %p)\n", this, str
);
2961 basic_stringbuf_char__Tidy(this);
2962 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
), str
->size
, this->state
);
2965 /* ?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 */
2966 /* ?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 */
2967 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get
, 8)
2968 basic_string_char
* __thiscall
basic_stringbuf_char_str_get(const basic_stringbuf_char
*this, basic_string_char
*ret
)
2972 TRACE("(%p)\n", this);
2974 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_char_pptr(&this->base
)) {
2977 ptr
= basic_streambuf_char_pbase(&this->base
);
2978 pptr
= basic_streambuf_char_pptr(&this->base
);
2980 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
2983 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_char_gptr(&this->base
)) {
2984 ptr
= basic_streambuf_char_eback(&this->base
);
2985 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, basic_streambuf_char_egptr(&this->base
) - ptr
);
2988 return MSVCP_basic_string_char_ctor(ret
);
2991 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
2992 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
2993 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
2994 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
2995 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate
, 8)
2996 int __thiscall
basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3000 if(!(mode
& OPENMODE_in
))
3001 state
|= STRINGBUF_no_read
;
3003 if(!(mode
& OPENMODE_out
))
3004 state
|= STRINGBUF_no_write
;
3006 if(mode
& OPENMODE_ate
)
3007 state
|= STRINGBUF_at_end
;
3009 if(mode
& OPENMODE_app
)
3010 state
|= STRINGBUF_append
;
3015 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3016 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3017 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3018 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3019 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init
, 16)
3020 void __thiscall
basic_stringbuf_wchar__Init(basic_stringbuf_wchar
*this, const wchar_t *str
, MSVCP_size_t count
, int state
)
3022 TRACE("(%p, %p, %ld, %d)\n", this, str
, count
, state
);
3024 basic_streambuf_wchar__Init_empty(&this->base
);
3026 this->state
= state
;
3027 this->seekhigh
= NULL
;
3030 wchar_t *buf
= MSVCRT_operator_new(count
);
3032 ERR("Out of memory\n");
3033 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3036 memcpy(buf
, str
, count
);
3037 this->seekhigh
= buf
+ count
;
3039 this->state
|= STRINGBUF_allocated
;
3041 if(!(state
& STRINGBUF_no_read
))
3042 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+ count
);
3044 if(!(state
& STRINGBUF_no_write
)) {
3045 basic_streambuf_wchar_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
3047 if(!basic_streambuf_wchar_gptr(&this->base
))
3048 basic_streambuf_wchar_setg(&this->base
, buf
, 0, buf
);
3053 /* ??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 */
3054 /* ??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 */
3055 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str
, 12)
3056 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar
*this,
3057 const basic_string_wchar
*str
, IOSB_openmode mode
)
3059 TRACE("(%p %p %d)\n", this, str
, mode
);
3061 basic_streambuf_wchar_ctor(&this->base
);
3062 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
3064 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
),
3065 str
->size
, basic_stringbuf_wchar__Getstate(this, mode
));
3069 /* ??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 */
3070 /* ??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 */
3071 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str
, 12)
3072 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_str(basic_stringbuf_wchar
*this,
3073 const basic_string_wchar
*str
, IOSB_openmode mode
)
3075 basic_stringbuf_wchar_ctor_str(this, str
, mode
);
3076 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
3080 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3081 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3082 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode
, 8)
3083 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_mode(
3084 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3086 TRACE("(%p %d)\n", this, mode
);
3088 basic_streambuf_wchar_ctor(&this->base
);
3089 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
3091 basic_stringbuf_wchar__Init(this, NULL
, 0, basic_stringbuf_wchar__Getstate(this, mode
));
3095 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3096 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3097 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode
, 8)
3098 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_mode(
3099 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3101 basic_stringbuf_wchar_ctor_mode(this, mode
);
3102 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
3106 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
3107 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
3108 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor
, 4)
3109 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor(basic_stringbuf_wchar
*this)
3111 return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3114 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3115 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3116 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor
, 4)
3117 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor(basic_stringbuf_wchar
*this)
3119 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3122 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3123 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3124 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3125 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3126 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy
, 4)
3127 void __thiscall
basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar
*this)
3129 TRACE("(%p)\n", this);
3131 if(this->state
& STRINGBUF_allocated
) {
3132 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base
));
3133 this->seekhigh
= NULL
;
3134 this->state
&= ~STRINGBUF_allocated
;
3137 basic_streambuf_wchar__Init_empty(&this->base
);
3140 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3141 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3142 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3143 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3144 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor
, 4)
3145 void __thiscall
basic_stringbuf_wchar_dtor(basic_stringbuf_wchar
*this)
3147 TRACE("(%p)\n", this);
3149 basic_stringbuf_wchar__Tidy(this);
3150 basic_streambuf_wchar_dtor(&this->base
);
3153 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_wchar_vector_dtor
, 8)
3154 basic_stringbuf_wchar
* __thiscall
MSVCP_basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3156 TRACE("(%p %x)\n", this, flags
);
3159 /* we have an array, with the number of elements stored before the first object */
3160 int i
, *ptr
= (int *) this - 1;
3162 for (i
= *ptr
- 1; i
>= 0; i
--)
3163 basic_stringbuf_wchar_dtor(this+i
);
3165 MSVCRT_operator_delete(ptr
);
3167 basic_stringbuf_wchar_dtor(this);
3170 MSVCRT_operator_delete(this);
3176 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_short_vector_dtor
, 8)
3177 basic_stringbuf_wchar
* __thiscall
MSVCP_basic_stringbuf_short_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3179 return MSVCP_basic_stringbuf_wchar_vector_dtor(this, flags
);
3182 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3183 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3184 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3185 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3186 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow
, 8)
3187 unsigned short __thiscall
basic_stringbuf_wchar_overflow(basic_stringbuf_wchar
*this, unsigned short meta
)
3189 MSVCP_size_t oldsize
, size
;
3192 TRACE("(%p %x)\n", this, meta
);
3196 if(this->state
& STRINGBUF_no_write
)
3199 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3200 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
3201 basic_streambuf_wchar_setp_next(&this->base
, basic_streambuf_wchar_pbase(&this->base
),
3202 this->seekhigh
, basic_streambuf_wchar_epptr(&this->base
));
3204 if(ptr
&& ptr
<basic_streambuf_wchar_epptr(&this->base
))
3205 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3207 oldsize
= (ptr
? basic_streambuf_wchar_epptr(&this->base
)-basic_streambuf_wchar_eback(&this->base
): 0);
3210 buf
= MSVCRT_operator_new(size
);
3212 ERR("Out of memory\n");
3213 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3217 this->seekhigh
= buf
;
3218 basic_streambuf_wchar_setp(&this->base
, buf
, buf
+size
);
3219 if(this->state
& STRINGBUF_no_read
)
3220 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3222 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+1);
3224 this->state
|= STRINGBUF_allocated
;
3226 ptr
= basic_streambuf_wchar_eback(&this->base
);
3227 memcpy(buf
, ptr
, oldsize
);
3229 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
3230 basic_streambuf_wchar_setp_next(&this->base
, buf
,
3231 buf
+(basic_streambuf_wchar_pptr(&this->base
)-ptr
), buf
+size
);
3232 if(this->state
& STRINGBUF_no_read
)
3233 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3235 basic_streambuf_wchar_setg(&this->base
, buf
,
3236 buf
+(basic_streambuf_wchar_gptr(&this->base
)-ptr
),
3237 basic_streambuf_wchar_pptr(&this->base
)+1);
3239 MSVCRT_operator_delete(ptr
);
3242 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3245 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3246 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3247 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3248 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3249 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail
, 8)
3250 unsigned short __thiscall
basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar
*this, unsigned short c
)
3254 TRACE("(%p %x)\n", this, c
);
3256 cur
= basic_streambuf_wchar_gptr(&this->base
);
3257 if(!cur
|| cur
==basic_streambuf_wchar_eback(&this->base
)
3258 || (c
!=WEOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3263 basic_streambuf_wchar_gbump(&this->base
, -1);
3264 return c
==WEOF
? !WEOF
: c
;
3267 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3268 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3269 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3270 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3271 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow
, 4)
3272 unsigned short __thiscall
basic_stringbuf_wchar_underflow(basic_stringbuf_wchar
*this)
3276 TRACE("(%p)\n", this);
3278 cur
= basic_streambuf_wchar_gptr(&this->base
);
3279 if(!cur
|| this->state
&STRINGBUF_no_read
)
3282 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3283 if(this->seekhigh
< ptr
)
3284 this->seekhigh
= ptr
;
3286 ptr
= basic_streambuf_wchar_egptr(&this->base
);
3287 if(this->seekhigh
> ptr
)
3288 basic_streambuf_wchar_setg(&this->base
, basic_streambuf_wchar_eback(&this->base
), cur
, this->seekhigh
);
3290 if(cur
< this->seekhigh
)
3295 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3296 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3297 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3298 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3299 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff
, 20)
3300 fpos_int
* __thiscall
basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar
*this,
3301 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3303 wchar_t *beg
, *cur_r
, *cur_w
;
3305 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
3307 cur_w
= basic_streambuf_wchar_pptr(&this->base
);
3308 if(cur_w
> this->seekhigh
)
3309 this->seekhigh
= cur_w
;
3314 beg
= basic_streambuf_wchar_eback(&this->base
);
3315 cur_r
= basic_streambuf_wchar_gptr(&this->base
);
3316 if((mode
& OPENMODE_in
) && cur_r
) {
3317 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3319 else if(way
== SEEKDIR_end
)
3320 off
+= this->seekhigh
-beg
;
3321 else if(way
!= SEEKDIR_beg
)
3324 if(off
<0 || off
>this->seekhigh
-beg
) {
3327 basic_streambuf_wchar_gbump(&this->base
, beg
-cur_r
+off
);
3328 if((mode
& OPENMODE_out
) && cur_w
) {
3329 basic_streambuf_wchar_setp_next(&this->base
, beg
,
3330 basic_streambuf_wchar_gptr(&this->base
),
3331 basic_streambuf_wchar_epptr(&this->base
));
3334 }else if((mode
& OPENMODE_out
) && cur_w
) {
3335 if(way
== SEEKDIR_cur
)
3337 else if(way
== SEEKDIR_end
)
3338 off
+= this->seekhigh
-beg
;
3339 else if(way
!= SEEKDIR_beg
)
3342 if(off
<0 || off
>this->seekhigh
-beg
)
3345 basic_streambuf_wchar_pbump(&this->base
, beg
-cur_w
+off
);
3354 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3355 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3356 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3357 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3358 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos
, 36)
3359 fpos_int
* __thiscall
basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar
*this,
3360 fpos_int
*ret
, fpos_int pos
, int mode
)
3362 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3364 if(pos
.off
==0 && pos
.pos
==-1 && pos
.state
==0) {
3369 return basic_stringbuf_wchar_seekoff(this, ret
, pos
.off
, SEEKDIR_beg
, mode
);
3372 /* ?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 */
3373 /* ?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 */
3374 /* ?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 */
3375 /* ?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 */
3376 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set
, 8)
3377 void __thiscall
basic_stringbuf_wchar_str_set(basic_stringbuf_wchar
*this, const basic_string_wchar
*str
)
3379 TRACE("(%p %p)\n", this, str
);
3381 basic_stringbuf_wchar__Tidy(this);
3382 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
), str
->size
, this->state
);
3385 /* ?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 */
3386 /* ?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 */
3387 /* ?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 */
3388 /* ?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 */
3389 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get
, 8)
3390 basic_string_wchar
* __thiscall
basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar
*this, basic_string_wchar
*ret
)
3394 TRACE("(%p)\n", this);
3396 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_wchar_pptr(&this->base
)) {
3399 ptr
= basic_streambuf_wchar_pbase(&this->base
);
3400 pptr
= basic_streambuf_wchar_pptr(&this->base
);
3402 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3405 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_wchar_gptr(&this->base
)) {
3406 ptr
= basic_streambuf_wchar_eback(&this->base
);
3407 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, basic_streambuf_wchar_egptr(&this->base
) - ptr
);
3410 return MSVCP_basic_string_wchar_ctor(ret
);
3413 /* ??0ios_base@std@@IAE@XZ */
3414 /* ??0ios_base@std@@IEAA@XZ */
3415 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
3416 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
3418 TRACE("(%p)\n", this);
3419 this->vtable
= &MSVCP_ios_base_vtable
;
3423 /* ??0ios_base@std@@QAE@ABV01@@Z */
3424 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
3425 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
3426 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
3428 TRACE("(%p %p)\n", this, copy
);
3430 this->vtable
= &MSVCP_ios_base_vtable
;
3434 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
3435 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
3436 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
3437 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
3439 IOS_BASE_fnarray
*cur
;
3441 TRACE("(%p %x)\n", this, event
);
3443 for(cur
=this->calls
; cur
; cur
=cur
->next
)
3444 cur
->event_handler(event
, this, cur
->index
);
3447 /* ?_Tidy@ios_base@std@@AAAXXZ */
3448 /* ?_Tidy@ios_base@std@@AEAAXXZ */
3449 void CDECL
ios_base_Tidy(ios_base
*this)
3451 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
3452 IOS_BASE_fnarray
*event_cur
, *event_next
;
3454 TRACE("(%p)\n", this);
3456 ios_base_Callfns(this, EVENT_erase_event
);
3458 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
3459 arr_next
= arr_cur
->next
;
3460 MSVCRT_operator_delete(arr_cur
);
3464 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
3465 event_next
= event_cur
->next
;
3466 MSVCRT_operator_delete(event_cur
);
3471 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
3472 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
3473 void CDECL
ios_base_Ios_base_dtor(ios_base
*obj
)
3475 TRACE("(%p)\n", obj
);
3477 locale_dtor(obj
->loc
);
3478 MSVCRT_operator_delete(obj
->loc
);
3483 /* ??1ios_base@std@@UAE@XZ */
3484 /* ??1ios_base@std@@UEAA@XZ */
3485 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
3486 void __thiscall
ios_base_dtor(ios_base
*this)
3488 ios_base_Ios_base_dtor(this);
3491 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor
, 8)
3492 ios_base
* __thiscall
MSVCP_ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
3494 TRACE("(%p %x)\n", this, flags
);
3496 /* we have an array, with the number of elements stored before the first object */
3497 int i
, *ptr
= (int *)this-1;
3499 for(i
=*ptr
-1; i
>=0; i
--)
3500 ios_base_dtor(this+i
);
3501 MSVCRT_operator_delete(ptr
);
3503 ios_base_dtor(this);
3505 MSVCRT_operator_delete(this);
3511 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor
, 8)
3512 void* __thiscall
MSVCP_iosb_vector_dtor(void *this, unsigned int flags
)
3514 TRACE("(%p %x)\n", this, flags
);
3516 int *ptr
= (int *)this-1;
3517 MSVCRT_operator_delete(ptr
);
3520 MSVCRT_operator_delete(this);
3526 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
3527 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
3528 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
3529 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
3531 IOS_BASE_iosarray
*p
;
3533 TRACE("(%p %d)\n", this, index
);
3535 for(p
=this->arr
; p
; p
=p
->next
) {
3536 if(p
->index
== index
)
3540 for(p
=this->arr
; p
; p
=p
->next
) {
3541 if(!p
->long_val
&& !p
->ptr_val
) {
3547 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
3548 p
->next
= this->arr
;
3556 /* ?iword@ios_base@std@@QAEAAJH@Z */
3557 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3558 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3559 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3561 TRACE("(%p %d)\n", this, index
);
3562 return &ios_base_Findarr(this, index
)->long_val
;
3565 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3566 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3567 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3568 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3570 TRACE("(%p %d)\n", this, index
);
3571 return &ios_base_Findarr(this, index
)->ptr_val
;
3574 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3575 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3576 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3577 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3579 IOS_BASE_fnarray
*event
;
3581 TRACE("(%p %p %d)\n", this, callback
, index
);
3583 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
3584 event
->next
= this->calls
;
3585 event
->index
= index
;
3586 event
->event_handler
= callback
;
3587 this->calls
= event
;
3590 /* ?clear@ios_base@std@@QAEXH_N@Z */
3591 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3592 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3593 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3595 TRACE("(%p %x %x)\n", this, state
, reraise
);
3597 this->state
= state
& IOSTATE_mask
;
3598 if(!(this->state
& this->except
))
3602 throw_exception(EXCEPTION_RERAISE
, NULL
);
3603 else if(this->state
& this->except
& IOSTATE_eofbit
)
3604 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
3605 else if(this->state
& this->except
& IOSTATE_failbit
)
3606 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
3607 else if(this->state
& this->except
& IOSTATE_badbit
)
3608 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
3609 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3610 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
3613 /* ?clear@ios_base@std@@QAEXH@Z */
3614 /* ?clear@ios_base@std@@QEAAXH@Z */
3615 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3616 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3618 ios_base_clear_reraise(this, state
, FALSE
);
3621 /* ?clear@ios_base@std@@QAEXI@Z */
3622 /* ?clear@ios_base@std@@QEAAXI@Z */
3623 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
3624 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
3626 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3629 /* ?exceptions@ios_base@std@@QAEXH@Z */
3630 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3631 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3632 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3634 TRACE("(%p %x)\n", this, state
);
3635 this->except
= state
& IOSTATE_mask
;
3636 ios_base_clear(this, this->state
);
3639 /* ?exceptions@ios_base@std@@QAEXI@Z */
3640 /* ?exceptions@ios_base@std@@QEAAXI@Z */
3641 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
3642 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
3644 TRACE("(%p %x)\n", this, state
);
3645 ios_base_exceptions_set(this, state
);
3648 /* ?exceptions@ios_base@std@@QBEHXZ */
3649 /* ?exceptions@ios_base@std@@QEBAHXZ */
3650 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3651 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3653 TRACE("(%p)\n", this);
3654 return this->except
;
3657 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3658 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3659 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3660 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3662 TRACE("(%p %p)\n", this, rhs
);
3665 IOS_BASE_iosarray
*arr_cur
;
3666 IOS_BASE_fnarray
*event_cur
;
3668 ios_base_Tidy(this);
3670 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3671 if(arr_cur
->long_val
)
3672 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3673 if(arr_cur
->ptr_val
)
3674 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3676 this->stdstr
= rhs
->stdstr
;
3677 this->fmtfl
= rhs
->fmtfl
;
3678 this->prec
= rhs
->prec
;
3679 this->wide
= rhs
->wide
;
3680 locale_operator_assign(this->loc
, rhs
->loc
);
3682 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3683 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3685 ios_base_Callfns(this, EVENT_copyfmt_event
);
3686 ios_base_exceptions_set(this, rhs
->except
);
3692 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3693 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3694 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3695 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3697 TRACE("(%p %p)\n", this, right
);
3700 this->state
= right
->state
;
3701 ios_base_copyfmt(this, right
);
3707 /* ?fail@ios_base@std@@QBE_NXZ */
3708 /* ?fail@ios_base@std@@QEBA_NXZ */
3709 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3710 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
3712 TRACE("(%p)\n", this);
3713 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3716 /* ??7ios_base@std@@QBE_NXZ */
3717 /* ??7ios_base@std@@QEBA_NXZ */
3718 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3719 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
3721 TRACE("(%p)\n", this);
3722 return ios_base_fail(this);
3725 /* ??Bios_base@std@@QBEPAXXZ */
3726 /* ??Bios_base@std@@QEBAPEAXXZ */
3727 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3728 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3730 TRACE("(%p)\n", this);
3731 return ios_base_fail(this) ? NULL
: (void*)this;
3734 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
3735 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
3736 void CDECL
ios_base_Addstd(ios_base
*add
)
3738 FIXME("(%p) stub\n", add
);
3741 /* ?_Index_func@ios_base@std@@CAAAHXZ */
3742 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
3743 int* CDECL
ios_base_Index_func(void)
3746 return &ios_base_Index
;
3749 /* ?_Init@ios_base@std@@IAEXXZ */
3750 /* ?_Init@ios_base@std@@IEAAXXZ */
3751 DEFINE_THISCALL_WRAPPER(ios_base_Init
, 4)
3752 void __thiscall
ios_base_Init(ios_base
*this)
3754 TRACE("(%p)\n", this);
3757 this->state
= this->except
= IOSTATE_goodbit
;
3758 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3763 this->loc
= MSVCRT_operator_new(sizeof(locale
));
3764 locale_ctor(this->loc
);
3767 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
3768 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
3769 MSVCP_bool
* CDECL
ios_base_Sync_func(void)
3772 return &ios_base_Sync
;
3775 /* ?bad@ios_base@std@@QBE_NXZ */
3776 /* ?bad@ios_base@std@@QEBA_NXZ */
3777 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3778 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
3780 TRACE("(%p)\n", this);
3781 return (this->state
& IOSTATE_badbit
) != 0;
3784 /* ?eof@ios_base@std@@QBE_NXZ */
3785 /* ?eof@ios_base@std@@QEBA_NXZ */
3786 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3787 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
3789 TRACE("(%p)\n", this);
3790 return (this->state
& IOSTATE_eofbit
) != 0;
3793 /* ?flags@ios_base@std@@QAEHH@Z */
3794 /* ?flags@ios_base@std@@QEAAHH@Z */
3795 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3796 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3798 IOSB_fmtflags ret
= this->fmtfl
;
3800 TRACE("(%p %x)\n", this, flags
);
3802 this->fmtfl
= flags
& FMTFLAG_mask
;
3806 /* ?flags@ios_base@std@@QBEHXZ */
3807 /* ?flags@ios_base@std@@QEBAHXZ */
3808 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3809 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3811 TRACE("(%p)\n", this);
3815 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3816 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3817 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3818 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3820 TRACE("(%p)\n", this);
3821 return locale_copy_ctor(ret
, this->loc
);
3824 /* ?good@ios_base@std@@QBE_NXZ */
3825 /* ?good@ios_base@std@@QEBA_NXZ */
3826 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3827 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
3829 TRACE("(%p)\n", this);
3830 return this->state
== IOSTATE_goodbit
;
3833 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3834 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3835 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3836 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3838 TRACE("(%p %p)\n", this, loc
);
3840 locale_copy_ctor(this->loc
, loc
);
3844 /* ?precision@ios_base@std@@QAEHH@Z */
3845 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3846 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
3847 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3849 streamsize ret
= this->prec
;
3851 TRACE("(%p %ld)\n", this, precision
);
3853 this->prec
= precision
;
3857 /* ?precision@ios_base@std@@QBEHXZ */
3858 /* ?precision@ios_base@std@@QEBA_JXZ */
3859 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3860 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3862 TRACE("(%p)\n", this);
3866 /* ?rdstate@ios_base@std@@QBEHXZ */
3867 /* ?rdstate@ios_base@std@@QEBAHXZ */
3868 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3869 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3871 TRACE("(%p)\n", this);
3875 /* ?setf@ios_base@std@@QAEHHH@Z */
3876 /* ?setf@ios_base@std@@QEAAHHH@Z */
3877 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3878 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3880 IOSB_fmtflags ret
= this->fmtfl
;
3882 TRACE("(%p %x %x)\n", this, flags
, mask
);
3884 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3888 /* ?setf@ios_base@std@@QAEHH@Z */
3889 /* ?setf@ios_base@std@@QEAAHH@Z */
3890 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3891 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3893 return ios_base_setf_mask(this, flags
, ~0);
3896 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3897 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3898 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3899 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3901 TRACE("(%p %x %x)\n", this, state
, reraise
);
3903 if(state
!= IOSTATE_goodbit
)
3904 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3907 /* ?setstate@ios_base@std@@QAEXH@Z */
3908 /* ?setstate@ios_base@std@@QEAAXH@Z */
3909 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3910 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3912 ios_base_setstate_reraise(this, state
, FALSE
);
3915 /* ?setstate@ios_base@std@@QAEXI@Z */
3916 /* ?setstate@ios_base@std@@QEAAXI@Z */
3917 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
3918 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
3920 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3923 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3924 MSVCP_bool CDECL
ios_base_sync_with_stdio(MSVCP_bool sync
)
3929 TRACE("(%x)\n", sync
);
3931 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3932 ret
= ios_base_Sync
;
3933 ios_base_Sync
= sync
;
3934 _Lockit_dtor(&lock
);
3938 /* ?unsetf@ios_base@std@@QAEXH@Z */
3939 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3940 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3941 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3943 TRACE("(%p %x)\n", this, flags
);
3944 this->fmtfl
&= ~flags
;
3947 /* ?width@ios_base@std@@QAEHH@Z */
3948 /* ?width@ios_base@std@@QEAA_J_J@Z */
3949 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
3950 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
3952 streamsize ret
= this->wide
;
3954 TRACE("(%p %ld)\n", this, width
);
3960 /* ?width@ios_base@std@@QBEHXZ */
3961 /* ?width@ios_base@std@@QEBA_JXZ */
3962 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
3963 streamsize __thiscall
ios_base_width_get(ios_base
*this)
3965 TRACE("(%p)\n", this);
3969 /* ?xalloc@ios_base@std@@SAHXZ */
3970 int CDECL
ios_base_xalloc(void)
3977 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3978 ret
= ios_base_Index
++;
3979 _Lockit_dtor(&lock
);
3983 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3984 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3985 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
3986 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
3988 TRACE("(%p)\n", this);
3990 ios_base_ctor(&this->base
);
3991 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
3995 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3996 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3997 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
3998 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
4000 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4001 ios_base_Init(&this->base
);
4002 this->strbuf
= streambuf
;
4003 this->stream
= NULL
;
4007 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4010 FIXME("standard streams not handled yet\n");
4013 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4014 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4015 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
4016 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
4018 TRACE("(%p %p)\n", this, strbuf
);
4020 basic_ios_char_ctor(this);
4021 basic_ios_char_init(this, strbuf
, FALSE
);
4025 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4026 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4027 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
4028 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
4030 TRACE("(%p)\n", this);
4031 ios_base_dtor(&this->base
);
4034 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor
, 8)
4035 basic_ios_char
* __thiscall
MSVCP_basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
4037 TRACE("(%p %x)\n", this, flags
);
4039 /* we have an array, with the number of elements stored before the first object */
4040 int i
, *ptr
= (int *)this-1;
4042 for(i
=*ptr
-1; i
>=0; i
--)
4043 basic_ios_char_dtor(this+i
);
4044 MSVCRT_operator_delete(ptr
);
4046 basic_ios_char_dtor(this);
4048 MSVCRT_operator_delete(this);
4054 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4055 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4056 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
4057 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4059 TRACE("(%p %x %x)\n", this, state
, reraise
);
4060 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4063 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4064 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4065 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
4066 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
4068 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4071 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4072 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4073 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
4074 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
4076 TRACE("(%p %p)\n", this, copy
);
4080 this->stream
= copy
->stream
;
4081 this->fillch
= copy
->fillch
;
4082 ios_base_copyfmt(&this->base
, ©
->base
);
4086 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4087 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4088 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
4089 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
4091 char ret
= this->fillch
;
4093 TRACE("(%p %c)\n", this, fill
);
4095 this->fillch
= fill
;
4099 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4100 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4101 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
4102 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
4104 TRACE("(%p)\n", this);
4105 return this->fillch
;
4108 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4109 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4110 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
4111 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
4113 TRACE("(%p %p %p)\n", this, ret
, loc
);
4116 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
4120 return ios_base_imbue(&this->base
, ret
, loc
);
4123 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4124 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4125 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
4126 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
4128 TRACE("(%p %c %c)\n", this, ch
, def
);
4129 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
, def
);
4132 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4133 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4134 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
4135 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
4137 basic_streambuf_char
*ret
= this->strbuf
;
4139 TRACE("(%p %p)\n", this, streambuf
);
4141 this->strbuf
= streambuf
;
4142 basic_ios_char_clear(this, IOSTATE_goodbit
);
4146 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4147 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4148 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
4149 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
4151 TRACE("(%p)\n", this);
4152 return this->strbuf
;
4155 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4156 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4157 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
4158 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4160 TRACE("(%p %x %x)\n", this, state
, reraise
);
4162 if(state
!= IOSTATE_goodbit
)
4163 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
4166 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4167 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4168 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
4169 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
4171 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
4174 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4175 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4176 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
4177 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
4179 basic_ostream_char
*ret
= this->stream
;
4181 TRACE("(%p %p)\n", this, ostream
);
4183 this->stream
= ostream
;
4187 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4188 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4189 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
4190 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
4192 TRACE("(%p)\n", this);
4193 return this->stream
;
4196 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4197 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4198 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
4199 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
4201 TRACE("(%p %c)\n", this, ch
);
4202 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
);
4206 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4207 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4208 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
4209 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
4211 TRACE("(%p)\n", this);
4213 ios_base_ctor(&this->base
);
4214 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
4218 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4219 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4220 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
4221 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
4223 basic_ios_wchar_ctor(this);
4224 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
4228 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4229 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4230 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4231 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4232 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
4233 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
4235 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4236 ios_base_Init(&this->base
);
4237 this->strbuf
= streambuf
;
4238 this->stream
= NULL
;
4242 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4245 FIXME("standard streams not handled yet\n");
4248 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4249 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4250 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
4251 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4253 TRACE("(%p %p)\n", this, strbuf
);
4255 basic_ios_wchar_ctor(this);
4256 basic_ios_wchar_init(this, strbuf
, FALSE
);
4260 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4261 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4262 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
4263 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4265 basic_ios_wchar_ctor_streambuf(this, strbuf
);
4266 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
4270 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4271 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4272 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4273 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4274 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
4275 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
4277 TRACE("(%p)\n", this);
4278 ios_base_dtor(&this->base
);
4281 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor
, 8)
4282 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4284 TRACE("(%p %x)\n", this, flags
);
4286 /* we have an array, with the number of elements stored before the first object */
4287 int i
, *ptr
= (int *)this-1;
4289 for(i
=*ptr
-1; i
>=0; i
--)
4290 basic_ios_wchar_dtor(this+i
);
4291 MSVCRT_operator_delete(ptr
);
4293 basic_ios_wchar_dtor(this);
4295 MSVCRT_operator_delete(this);
4301 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor
, 8)
4302 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4304 return MSVCP_basic_ios_wchar_vector_dtor(this, flags
);
4307 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4308 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4309 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4310 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4311 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
4312 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4314 TRACE("(%p %x %x)\n", this, state
, reraise
);
4315 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4318 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4319 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4320 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4321 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4322 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
4323 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
4325 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4328 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
4329 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4330 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4331 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4332 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
4333 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
4335 TRACE("(%p %p)\n", this, copy
);
4339 this->stream
= copy
->stream
;
4340 this->fillch
= copy
->fillch
;
4341 ios_base_copyfmt(&this->base
, ©
->base
);
4345 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
4346 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
4347 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4348 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4349 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
4350 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
4352 wchar_t ret
= this->fillch
;
4354 TRACE("(%p %c)\n", this, fill
);
4356 this->fillch
= fill
;
4360 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
4361 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
4362 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4363 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4364 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
4365 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
4367 TRACE("(%p)\n", this);
4368 return this->fillch
;
4371 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4372 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4373 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4374 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4375 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
4376 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
4378 TRACE("(%p %p %p)\n", this, ret
, loc
);
4381 return basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
4383 locale_copy_ctor(ret
, loc
);
4387 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
4388 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
4389 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4390 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4391 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
4392 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
4394 TRACE("(%p %c %c)\n", this, ch
, def
);
4395 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
, def
);
4398 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4399 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4400 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4401 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4402 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
4403 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
4405 basic_streambuf_wchar
*ret
= this->strbuf
;
4407 TRACE("(%p %p)\n", this, streambuf
);
4409 this->strbuf
= streambuf
;
4410 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
4414 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4415 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4416 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4417 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4418 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
4419 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
4421 TRACE("(%p)\n", this);
4422 return this->strbuf
;
4425 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4426 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4427 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4428 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4429 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
4430 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4432 TRACE("(%p %x %x)\n", this, state
, reraise
);
4434 if(state
!= IOSTATE_goodbit
)
4435 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
4438 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4439 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4440 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4441 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4442 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
4443 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
4445 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
4448 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4449 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4450 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
4451 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4452 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
4453 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
4455 basic_ostream_wchar
*ret
= this->stream
;
4457 TRACE("(%p %p)\n", this, ostream
);
4459 this->stream
= ostream
;
4463 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
4464 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
4465 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4466 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4467 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
4468 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
4470 TRACE("(%p)\n", this);
4471 return this->stream
;
4474 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
4475 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
4476 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
4477 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
4478 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
4479 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
4481 TRACE("(%p %c)\n", this, ch
);
4482 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
);
4485 /* Caution: basic_ostream uses virtual inheritance.
4486 * All constructors have additional parameter that says if base class should be initialized.
4487 * Base class needs to be accessed using vbtable.
4489 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
4491 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
4494 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
4496 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
4499 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
4501 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
4504 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4505 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4506 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
4507 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
4508 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4510 basic_ios_char
*base
;
4512 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
4515 this->vbtable
= basic_ostream_char_vbtable
;
4516 base
= basic_ostream_char_get_basic_ios(this);
4517 basic_ios_char_ctor(base
);
4519 base
= basic_ostream_char_get_basic_ios(this);
4522 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
4523 basic_ios_char_init(base
, strbuf
, isstd
);
4527 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4528 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4529 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
4530 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
4531 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4533 basic_ios_char
*base
;
4535 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
4538 this->vbtable
= basic_ostream_char_vbtable
;
4539 base
= basic_ostream_char_get_basic_ios(this);
4540 basic_ios_char_ctor(base
);
4542 base
= basic_ostream_char_get_basic_ios(this);
4545 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
4547 ios_base_Addstd(&base
->base
);
4551 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4552 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4553 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
4554 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
4556 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4558 /* don't destroy virtual base here */
4559 TRACE("(%p)\n", this);
4562 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4563 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4564 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
4565 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4567 TRACE("(%p)\n", this);
4568 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4569 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4572 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor
, 8)
4573 basic_ostream_char
* __thiscall
MSVCP_basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4575 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4577 TRACE("(%p %x)\n", this, flags
);
4580 /* we have an array, with the number of elements stored before the first object */
4581 int i
, *ptr
= (int *)this-1;
4583 for(i
=*ptr
-1; i
>=0; i
--)
4584 basic_ostream_char_vbase_dtor(this+i
);
4585 MSVCRT_operator_delete(ptr
);
4587 basic_ostream_char_vbase_dtor(this);
4589 MSVCRT_operator_delete(this);
4595 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4596 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4597 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4598 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4600 /* this function is not matching C++ specification */
4601 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4603 TRACE("(%p)\n", this);
4605 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4606 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4607 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4611 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4612 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4613 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
4614 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
4616 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4618 TRACE("(%p)\n", this);
4620 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4621 basic_ostream_char_flush(this);
4624 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4625 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4626 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4627 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4629 TRACE("(%p)\n", this);
4630 basic_ostream_char__Osfx(this);
4633 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4635 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4637 if(basic_ios_char_rdbuf_get(base
))
4638 basic_streambuf_char__Lock(base
->strbuf
);
4640 if(ios_base_good(&base
->base
) && base
->stream
)
4641 basic_ostream_char_flush(base
->stream
);
4643 return ios_base_good(&base
->base
);
4646 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4648 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4650 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4651 basic_ostream_char_osfx(ostr
);
4653 if(basic_ios_char_rdbuf_get(base
))
4654 basic_streambuf_char__Unlock(base
->strbuf
);
4657 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4658 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4659 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4660 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4662 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4664 TRACE("(%p)\n", this);
4666 if(ios_base_good(&base
->base
) && base
->stream
)
4667 basic_ostream_char_flush(base
->stream
);
4668 return ios_base_good(&base
->base
);
4671 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4672 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4673 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4674 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4676 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4678 TRACE("(%p %c)\n", this, ch
);
4680 if(!basic_ostream_char_sentry_create(this)
4681 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4682 basic_ostream_char_sentry_destroy(this);
4683 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4687 basic_ostream_char_sentry_destroy(this);
4691 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4692 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4693 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
4694 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4696 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4698 TRACE("(%p %ld %d)\n", this, off
, way
);
4700 if(!ios_base_fail(&base
->base
)) {
4703 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4704 &seek
, off
, way
, OPENMODE_out
);
4705 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
4706 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4711 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4712 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4713 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4714 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4716 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4718 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4720 if(!ios_base_fail(&base
->base
)) {
4723 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4724 &seek
, pos
, OPENMODE_out
);
4725 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
4726 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4731 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4732 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4733 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4734 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4736 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4738 TRACE("(%p)\n", this);
4740 if(!ios_base_fail(&base
->base
)) {
4741 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4742 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4751 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4752 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4753 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
4754 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4756 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4758 TRACE("(%p %s %ld)\n", this, debugstr_a(str
), count
);
4760 if(!basic_ostream_char_sentry_create(this)
4761 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4762 basic_ostream_char_sentry_destroy(this);
4763 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4767 basic_ostream_char_sentry_destroy(this);
4771 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4772 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4773 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4774 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4776 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4777 int state
= IOSTATE_goodbit
;
4779 TRACE("(%p %d)\n", this, val
);
4781 if(basic_ostream_char_sentry_create(this)) {
4782 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4783 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4784 ostreambuf_iterator_char dest
= {0, strbuf
};
4786 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4787 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4788 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4790 basic_ostream_char_sentry_destroy(this);
4792 basic_ios_char_setstate(base
, state
);
4796 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4797 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4798 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4799 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4801 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4802 int state
= IOSTATE_goodbit
;
4804 TRACE("(%p %u)\n", this, val
);
4806 if(basic_ostream_char_sentry_create(this)) {
4807 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4808 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4809 ostreambuf_iterator_char dest
= {0, strbuf
};
4811 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4813 basic_ostream_char_sentry_destroy(this);
4815 basic_ios_char_setstate(base
, state
);
4819 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4820 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4821 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4822 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4823 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4824 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4826 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4827 int state
= IOSTATE_goodbit
;
4829 TRACE("(%p %d)\n", this, val
);
4831 if(basic_ostream_char_sentry_create(this)) {
4832 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4833 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4834 ostreambuf_iterator_char dest
= {0, strbuf
};
4836 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4838 basic_ostream_char_sentry_destroy(this);
4840 basic_ios_char_setstate(base
, state
);
4844 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4845 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4846 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4847 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4848 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4849 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4851 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4852 int state
= IOSTATE_goodbit
;
4854 TRACE("(%p %u)\n", this, val
);
4856 if(basic_ostream_char_sentry_create(this)) {
4857 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4858 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4859 ostreambuf_iterator_char dest
= {0, strbuf
};
4861 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4863 basic_ostream_char_sentry_destroy(this);
4865 basic_ios_char_setstate(base
, state
);
4869 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4870 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4871 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4872 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4874 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4875 int state
= IOSTATE_goodbit
;
4877 TRACE("(%p %f)\n", this, val
);
4879 if(basic_ostream_char_sentry_create(this)) {
4880 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4881 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4882 ostreambuf_iterator_char dest
= {0, strbuf
};
4884 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4886 basic_ostream_char_sentry_destroy(this);
4888 basic_ios_char_setstate(base
, state
);
4892 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4893 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4894 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4895 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4897 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4898 int state
= IOSTATE_goodbit
;
4900 TRACE("(%p %lf)\n", this, val
);
4902 if(basic_ostream_char_sentry_create(this)) {
4903 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4904 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4905 ostreambuf_iterator_char dest
= {0, strbuf
};
4907 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4909 basic_ostream_char_sentry_destroy(this);
4911 basic_ios_char_setstate(base
, state
);
4915 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4916 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4917 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4918 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4920 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4921 int state
= IOSTATE_goodbit
;
4923 TRACE("(%p %lf)\n", this, val
);
4925 if(basic_ostream_char_sentry_create(this)) {
4926 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4927 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4928 ostreambuf_iterator_char dest
= {0, strbuf
};
4930 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4932 basic_ostream_char_sentry_destroy(this);
4934 basic_ios_char_setstate(base
, state
);
4938 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4939 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4940 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4941 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4943 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4944 IOSB_iostate state
= IOSTATE_badbit
;
4947 TRACE("(%p %p)\n", this, val
);
4949 if(basic_ostream_char_sentry_create(this)) {
4950 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4951 c
= basic_streambuf_char_snextc(val
)) {
4952 state
= IOSTATE_goodbit
;
4954 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4955 state
= IOSTATE_badbit
;
4960 state
= IOSTATE_badbit
;
4962 basic_ostream_char_sentry_destroy(this);
4964 ios_base_width_set(&base
->base
, 0);
4965 basic_ios_char_setstate(base
, state
);
4969 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4970 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4971 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4972 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4974 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4975 int state
= IOSTATE_goodbit
;
4977 TRACE("(%p %p)\n", this, val
);
4979 if(basic_ostream_char_sentry_create(this)) {
4980 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4981 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4982 ostreambuf_iterator_char dest
= {0, strbuf
};
4984 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4986 basic_ostream_char_sentry_destroy(this);
4988 basic_ios_char_setstate(base
, state
);
4992 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4993 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4994 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4995 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
4997 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4998 int state
= IOSTATE_goodbit
;
5000 TRACE("(%p)\n", this);
5002 if(basic_ostream_char_sentry_create(this)) {
5003 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5004 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5005 ostreambuf_iterator_char dest
= {0, strbuf
};
5007 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5009 basic_ostream_char_sentry_destroy(this);
5011 basic_ios_char_setstate(base
, state
);
5015 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5016 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5017 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
5018 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
5020 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5021 int state
= IOSTATE_goodbit
;
5023 TRACE("(%p)\n", this);
5025 if(basic_ostream_char_sentry_create(this)) {
5026 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5027 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5028 ostreambuf_iterator_char dest
= {0, strbuf
};
5030 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5032 basic_ostream_char_sentry_destroy(this);
5034 basic_ios_char_setstate(base
, state
);
5038 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5039 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5040 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
5041 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
5043 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5044 int state
= IOSTATE_goodbit
;
5046 TRACE("(%p %x)\n", this, val
);
5048 if(basic_ostream_char_sentry_create(this)) {
5049 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5050 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5051 ostreambuf_iterator_char dest
= {0, strbuf
};
5053 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5055 basic_ostream_char_sentry_destroy(this);
5057 basic_ios_char_setstate(base
, state
);
5061 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5062 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5063 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
5065 TRACE("(%p)\n", ostr
);
5067 basic_ostream_char_put(ostr
, '\n');
5068 basic_ostream_char_flush(ostr
);
5072 /* $?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 */
5073 /* ??$?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 */
5074 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
5076 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5077 IOSB_iostate state
= IOSTATE_goodbit
;
5079 TRACE("(%p %p)\n", ostr
, str
);
5081 if(basic_ostream_char_sentry_create(ostr
)) {
5082 MSVCP_size_t len
= MSVCP_basic_string_char_length(str
);
5083 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5085 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5086 for(; pad
!=0; pad
--) {
5087 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5088 state
= IOSTATE_badbit
;
5094 if(state
== IOSTATE_goodbit
) {
5095 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
5096 state
= IOSTATE_badbit
;
5099 if(state
== IOSTATE_goodbit
) {
5100 for(; pad
!=0; pad
--) {
5101 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5102 state
= IOSTATE_badbit
;
5108 base
->base
.wide
= 0;
5110 state
= IOSTATE_badbit
;
5112 basic_ostream_char_sentry_destroy(ostr
);
5114 basic_ios_char_setstate(base
, state
);
5118 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5119 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5120 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5121 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5122 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5123 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5124 basic_ostream_char
* __cdecl
basic_ostream_char_print_ch(basic_ostream_char
*ostr
, char ch
)
5126 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5127 IOSB_iostate state
= IOSTATE_goodbit
;
5129 TRACE("(%p %d)\n", ostr
, ch
);
5131 if(basic_ostream_char_sentry_create(ostr
)) {
5132 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5134 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5135 for(; pad
!=0; pad
--) {
5136 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5137 state
= IOSTATE_badbit
;
5143 if(state
== IOSTATE_goodbit
) {
5144 if(basic_streambuf_char_sputc(base
->strbuf
, ch
) == EOF
)
5145 state
= IOSTATE_badbit
;
5148 if(state
== IOSTATE_goodbit
) {
5149 for(; pad
!=0; pad
--) {
5150 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5151 state
= IOSTATE_badbit
;
5157 base
->base
.wide
= 0;
5159 state
= IOSTATE_badbit
;
5161 basic_ostream_char_sentry_destroy(ostr
);
5163 basic_ios_char_setstate(base
, state
);
5167 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5168 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5169 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5170 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5171 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5172 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5173 basic_ostream_char
* __cdecl
basic_ostream_char_print_str(basic_ostream_char
*ostr
, const char *str
)
5175 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5176 IOSB_iostate state
= IOSTATE_goodbit
;
5178 TRACE("(%p %s)\n", ostr
, str
);
5180 if(basic_ostream_char_sentry_create(ostr
)) {
5181 MSVCP_size_t len
= strlen(str
);
5182 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5184 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5185 for(; pad
!=0; pad
--) {
5186 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5187 state
= IOSTATE_badbit
;
5193 if(state
== IOSTATE_goodbit
) {
5194 if(basic_streambuf_char_sputn(base
->strbuf
, str
, len
) != len
)
5195 state
= IOSTATE_badbit
;
5198 if(state
== IOSTATE_goodbit
) {
5199 for(; pad
!=0; pad
--) {
5200 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5201 state
= IOSTATE_badbit
;
5207 base
->base
.wide
= 0;
5209 state
= IOSTATE_badbit
;
5211 basic_ostream_char_sentry_destroy(ostr
);
5213 basic_ios_char_setstate(base
, state
);
5217 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5218 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5219 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
5220 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
5221 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
5223 TRACE("(%p %p)\n", this, pfunc
);
5228 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5229 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5230 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
5231 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
5232 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
5234 TRACE("(%p %p)\n", this, pfunc
);
5235 pfunc(basic_ostream_char_get_basic_ios(this));
5239 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5240 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5241 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
5242 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
5243 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5245 TRACE("(%p %p)\n", this, pfunc
);
5246 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
5250 /* Caution: basic_ostream uses virtual inheritance. */
5251 static inline basic_ios_wchar
* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar
*this)
5253 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
5256 static inline basic_ios_wchar
* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar
*ptr
)
5258 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_wchar_vbtable
[1]);
5261 static inline basic_ostream_wchar
* basic_ostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
5263 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_wchar_vbtable
[1]);
5266 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5267 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5268 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor
, 16)
5269 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor(basic_ostream_wchar
*this,
5270 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
5272 basic_ios_wchar
*base
;
5274 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
5277 this->vbtable
= basic_ostream_wchar_vbtable
;
5278 base
= basic_ostream_wchar_get_basic_ios(this);
5279 basic_ios_wchar_ctor(base
);
5281 base
= basic_ostream_wchar_get_basic_ios(this);
5284 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
5285 basic_ios_wchar_init(base
, strbuf
, isstd
);
5289 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5290 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5291 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized
, 16)
5292 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar
*this,
5293 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
5295 basic_ios_wchar
*base
;
5297 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
5300 this->vbtable
= basic_ostream_wchar_vbtable
;
5301 base
= basic_ostream_wchar_get_basic_ios(this);
5302 basic_ios_wchar_ctor(base
);
5304 base
= basic_ostream_wchar_get_basic_ios(this);
5307 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
5309 ios_base_Addstd(&base
->base
);
5313 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5314 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5315 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor
, 4)
5316 void __thiscall
basic_ostream_wchar_dtor(basic_ios_wchar
*base
)
5318 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
5320 /* don't destroy virtual base here */
5321 TRACE("(%p)\n", this);
5324 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5325 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5326 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor
, 4)
5327 void __thiscall
basic_ostream_wchar_vbase_dtor(basic_ostream_wchar
*this)
5329 TRACE("(%p)\n", this);
5330 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5331 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5334 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_wchar_vector_dtor
, 8)
5335 basic_ostream_wchar
* __thiscall
MSVCP_basic_ostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
5337 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
5339 TRACE("(%p %x)\n", this, flags
);
5342 /* we have an array, with the number of elements stored before the first object */
5343 int i
, *ptr
= (int *)this-1;
5345 for(i
=*ptr
-1; i
>=0; i
--)
5346 basic_ostream_wchar_vbase_dtor(this+i
);
5347 MSVCRT_operator_delete(ptr
);
5349 basic_ostream_wchar_vbase_dtor(this);
5351 MSVCRT_operator_delete(this);
5357 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
5358 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
5359 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush
, 4)
5360 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_flush(basic_ostream_wchar
*this)
5362 /* this function is not matching C++ specification */
5363 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5365 TRACE("(%p)\n", this);
5367 if(basic_ios_wchar_rdbuf_get(base
) && ios_base_good(&base
->base
)
5368 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base
))==-1)
5369 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5373 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5374 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5375 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx
, 4)
5376 void __thiscall
basic_ostream_wchar__Osfx(basic_ostream_wchar
*this)
5378 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5380 TRACE("(%p)\n", this);
5382 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
5383 basic_ostream_wchar_flush(this);
5386 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5387 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5388 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx
, 4)
5389 void __thiscall
basic_ostream_wchar_osfx(basic_ostream_wchar
*this)
5391 TRACE("(%p)\n", this);
5392 basic_ostream_wchar__Osfx(this);
5395 static BOOL
basic_ostream_wchar_sentry_create(basic_ostream_wchar
*ostr
)
5397 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5399 if(basic_ios_wchar_rdbuf_get(base
))
5400 basic_streambuf_wchar__Lock(base
->strbuf
);
5402 if(ios_base_good(&base
->base
) && base
->stream
)
5403 basic_ostream_wchar_flush(base
->stream
);
5405 return ios_base_good(&base
->base
);
5408 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar
*ostr
)
5410 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5412 if(ios_base_good(&base
->base
) && !__uncaught_exception())
5413 basic_ostream_wchar_osfx(ostr
);
5415 if(basic_ios_wchar_rdbuf_get(base
))
5416 basic_streambuf_wchar__Unlock(base
->strbuf
);
5419 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
5420 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
5421 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx
, 4)
5422 MSVCP_bool __thiscall
basic_ostream_wchar_opfx(basic_ostream_wchar
*this)
5424 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5426 TRACE("(%p)\n", this);
5428 if(ios_base_good(&base
->base
) && base
->stream
)
5429 basic_ostream_wchar_flush(base
->stream
);
5430 return ios_base_good(&base
->base
);
5433 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
5434 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
5435 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put
, 8)
5436 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_put(basic_ostream_wchar
*this, wchar_t ch
)
5438 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5440 TRACE("(%p %c)\n", this, ch
);
5442 if(!basic_ostream_wchar_sentry_create(this)
5443 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
5444 basic_ostream_wchar_sentry_destroy(this);
5445 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5449 basic_ostream_wchar_sentry_destroy(this);
5453 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
5454 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
5455 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 12)
5456 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
5458 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5460 TRACE("(%p %ld %d)\n", this, off
, way
);
5462 if(!ios_base_fail(&base
->base
)) {
5465 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
5466 &seek
, off
, way
, OPENMODE_out
);
5467 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
5468 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
5473 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5474 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5475 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos
, 28)
5476 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
5478 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5480 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
5482 if(!ios_base_fail(&base
->base
)) {
5485 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base
),
5486 &seek
, pos
, OPENMODE_out
);
5487 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
5488 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
5493 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5494 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5495 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp
, 8)
5496 fpos_int
* __thiscall
basic_ostream_wchar_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
5498 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5500 TRACE("(%p)\n", this);
5502 if(!ios_base_fail(&base
->base
)) {
5503 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
5504 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
5513 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
5514 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
5515 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 12)
5516 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
5518 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5520 TRACE("(%p %s %ld)\n", this, debugstr_w(str
), count
);
5522 if(!basic_ostream_wchar_sentry_create(this)
5523 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
5524 basic_ostream_wchar_sentry_destroy(this);
5525 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5529 basic_ostream_wchar_sentry_destroy(this);
5533 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
5534 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
5535 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short
, 8)
5536 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_short(basic_ostream_wchar
*this, short val
)
5538 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5539 int state
= IOSTATE_goodbit
;
5541 TRACE("(%p %d)\n", this, val
);
5543 if(basic_ostream_wchar_sentry_create(this)) {
5544 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5545 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5546 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5548 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
),
5549 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
5550 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
5552 basic_ostream_wchar_sentry_destroy(this);
5554 basic_ios_wchar_setstate(base
, state
);
5558 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
5559 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
5560 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort
, 8)
5561 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
5563 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5564 int state
= IOSTATE_goodbit
;
5566 TRACE("(%p %u)\n", this, val
);
5568 if(basic_ostream_wchar_sentry_create(this)) {
5569 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5570 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5571 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5573 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5575 basic_ostream_wchar_sentry_destroy(this);
5577 basic_ios_wchar_setstate(base
, state
);
5581 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
5582 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
5583 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
5584 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
5585 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int
, 8)
5586 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int(basic_ostream_wchar
*this, int val
)
5588 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5589 int state
= IOSTATE_goodbit
;
5591 TRACE("(%p %d)\n", this, val
);
5593 if(basic_ostream_wchar_sentry_create(this)) {
5594 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5595 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5596 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5598 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5600 basic_ostream_wchar_sentry_destroy(this);
5602 basic_ios_wchar_setstate(base
, state
);
5606 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
5607 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
5608 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
5609 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
5610 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint
, 8)
5611 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5613 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5614 int state
= IOSTATE_goodbit
;
5616 TRACE("(%p %u)\n", this, val
);
5618 if(basic_ostream_wchar_sentry_create(this)) {
5619 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5620 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5621 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5623 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5625 basic_ostream_wchar_sentry_destroy(this);
5627 basic_ios_wchar_setstate(base
, state
);
5631 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
5632 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
5633 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float
, 8)
5634 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_float(basic_ostream_wchar
*this, float val
)
5636 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5637 int state
= IOSTATE_goodbit
;
5639 TRACE("(%p %f)\n", this, val
);
5641 if(basic_ostream_wchar_sentry_create(this)) {
5642 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5643 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5644 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5646 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5648 basic_ostream_wchar_sentry_destroy(this);
5650 basic_ios_wchar_setstate(base
, state
);
5654 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
5655 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
5656 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double
, 12)
5657 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_double(basic_ostream_wchar
*this, double val
)
5659 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5660 int state
= IOSTATE_goodbit
;
5662 TRACE("(%p %lf)\n", this, val
);
5664 if(basic_ostream_wchar_sentry_create(this)) {
5665 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5666 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5667 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5669 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5671 basic_ostream_wchar_sentry_destroy(this);
5673 basic_ios_wchar_setstate(base
, state
);
5677 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
5678 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
5679 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble
, 12)
5680 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ldouble(basic_ostream_wchar
*this, double val
)
5682 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5683 int state
= IOSTATE_goodbit
;
5685 TRACE("(%p %lf)\n", this, val
);
5687 if(basic_ostream_wchar_sentry_create(this)) {
5688 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5689 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5690 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5692 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5694 basic_ostream_wchar_sentry_destroy(this);
5696 basic_ios_wchar_setstate(base
, state
);
5700 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5701 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5702 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf
, 8)
5703 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5705 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5706 IOSB_iostate state
= IOSTATE_badbit
;
5707 unsigned short c
= '\n';
5709 TRACE("(%p %p)\n", this, val
);
5711 if(basic_ostream_wchar_sentry_create(this)) {
5712 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5713 c
= basic_streambuf_wchar_snextc(val
)) {
5714 state
= IOSTATE_goodbit
;
5716 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5717 state
= IOSTATE_badbit
;
5722 state
= IOSTATE_badbit
;
5724 basic_ostream_wchar_sentry_destroy(this);
5726 ios_base_width_set(&base
->base
, 0);
5727 basic_ios_wchar_setstate(base
, state
);
5731 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
5732 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
5733 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr
, 8)
5734 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ptr(basic_ostream_wchar
*this, const void *val
)
5736 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5737 int state
= IOSTATE_goodbit
;
5739 TRACE("(%p %p)\n", this, val
);
5741 if(basic_ostream_wchar_sentry_create(this)) {
5742 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5743 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5744 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5746 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5748 basic_ostream_wchar_sentry_destroy(this);
5750 basic_ios_wchar_setstate(base
, state
);
5754 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
5755 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
5756 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64
, 12)
5757 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int64(basic_ostream_wchar
*this, __int64 val
)
5759 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5760 int state
= IOSTATE_goodbit
;
5762 TRACE("(%p)\n", this);
5764 if(basic_ostream_wchar_sentry_create(this)) {
5765 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5766 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5767 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5769 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5771 basic_ostream_wchar_sentry_destroy(this);
5773 basic_ios_wchar_setstate(base
, state
);
5777 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
5778 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
5779 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64
, 12)
5780 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5782 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5783 int state
= IOSTATE_goodbit
;
5785 TRACE("(%p)\n", this);
5787 if(basic_ostream_wchar_sentry_create(this)) {
5788 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5789 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5790 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5792 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5794 basic_ostream_wchar_sentry_destroy(this);
5796 basic_ios_wchar_setstate(base
, state
);
5800 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
5801 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
5802 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool
, 8)
5803 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5805 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5806 int state
= IOSTATE_goodbit
;
5808 TRACE("(%p %x)\n", this, val
);
5810 if(basic_ostream_wchar_sentry_create(this)) {
5811 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5812 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5813 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5815 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5817 basic_ostream_wchar_sentry_destroy(this);
5819 basic_ios_wchar_setstate(base
, state
);
5823 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5824 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5825 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_endl(basic_ostream_wchar
*ostr
)
5827 TRACE("(%p)\n", ostr
);
5829 basic_ostream_wchar_put(ostr
, '\n');
5830 basic_ostream_wchar_flush(ostr
);
5834 /* ??$?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 */
5835 /* ??$?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 */
5836 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_bstr(basic_ostream_wchar
*ostr
, const basic_string_wchar
*str
)
5838 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5839 IOSB_iostate state
= IOSTATE_goodbit
;
5841 TRACE("(%p %p)\n", ostr
, str
);
5843 if(basic_ostream_wchar_sentry_create(ostr
)) {
5844 MSVCP_size_t len
= MSVCP_basic_string_wchar_length(str
);
5845 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5847 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5848 for(; pad
!=0; pad
--) {
5849 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5850 state
= IOSTATE_badbit
;
5856 if(state
== IOSTATE_goodbit
) {
5857 if(basic_streambuf_wchar_sputn(base
->strbuf
, MSVCP_basic_string_wchar_c_str(str
), len
) != len
)
5858 state
= IOSTATE_badbit
;
5861 if(state
== IOSTATE_goodbit
) {
5862 for(; pad
!=0; pad
--) {
5863 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5864 state
= IOSTATE_badbit
;
5870 base
->base
.wide
= 0;
5872 state
= IOSTATE_badbit
;
5874 basic_ostream_wchar_sentry_destroy(ostr
);
5876 basic_ios_wchar_setstate(base
, state
);
5880 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
5881 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
5882 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_ch(basic_ostream_wchar
*ostr
, wchar_t ch
)
5884 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5885 IOSB_iostate state
= IOSTATE_goodbit
;
5887 TRACE("(%p %d)\n", ostr
, ch
);
5889 if(basic_ostream_wchar_sentry_create(ostr
)) {
5890 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5892 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5893 for(; pad
!=0; pad
--) {
5894 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5895 state
= IOSTATE_badbit
;
5901 if(state
== IOSTATE_goodbit
) {
5902 if(basic_streambuf_wchar_sputc(base
->strbuf
, ch
) == WEOF
)
5903 state
= IOSTATE_badbit
;
5906 if(state
== IOSTATE_goodbit
) {
5907 for(; pad
!=0; pad
--) {
5908 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5909 state
= IOSTATE_badbit
;
5915 base
->base
.wide
= 0;
5917 state
= IOSTATE_badbit
;
5919 basic_ostream_wchar_sentry_destroy(ostr
);
5921 basic_ios_wchar_setstate(base
, state
);
5925 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
5926 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
5927 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_str(basic_ostream_wchar
*ostr
, const wchar_t *str
)
5929 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5930 IOSB_iostate state
= IOSTATE_goodbit
;
5932 TRACE("(%p %s)\n", ostr
, debugstr_w(str
));
5934 if(basic_ostream_wchar_sentry_create(ostr
)) {
5935 MSVCP_size_t len
= wcslen(str
);
5936 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5938 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5939 for(; pad
!=0; pad
--) {
5940 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5941 state
= IOSTATE_badbit
;
5947 if(state
== IOSTATE_goodbit
) {
5948 if(basic_streambuf_wchar_sputn(base
->strbuf
, str
, len
) != len
)
5949 state
= IOSTATE_badbit
;
5952 if(state
== IOSTATE_goodbit
) {
5953 for(; pad
!=0; pad
--) {
5954 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5955 state
= IOSTATE_badbit
;
5961 base
->base
.wide
= 0;
5963 state
= IOSTATE_badbit
;
5965 basic_ostream_wchar_sentry_destroy(ostr
);
5967 basic_ios_wchar_setstate(base
, state
);
5971 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5972 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5973 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func
, 8)
5974 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func(basic_ostream_wchar
*this,
5975 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
5977 TRACE("(%p %p)\n", this, pfunc
);
5982 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
5983 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
5984 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios
, 8)
5985 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar
*this,
5986 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
5988 TRACE("(%p %p)\n", this, pfunc
);
5989 pfunc(basic_ostream_wchar_get_basic_ios(this));
5993 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5994 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5995 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base
, 8)
5996 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_ios_base(
5997 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5999 TRACE("(%p %p)\n", this, pfunc
);
6000 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base
);
6004 /* Caution: basic_istream uses virtual inheritance. */
6005 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
6007 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
6010 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
6012 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
6015 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
6017 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
6020 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6021 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6022 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
6023 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
)
6025 basic_ios_char
*base
;
6027 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
6030 this->vbtable
= basic_istream_char_vbtable
;
6031 base
= basic_istream_char_get_basic_ios(this);
6032 basic_ios_char_ctor(base
);
6034 base
= basic_istream_char_get_basic_ios(this);
6037 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
6040 basic_ios_char_init(base
, strbuf
, isstd
);
6044 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6045 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6046 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
6047 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6049 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6052 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6053 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6054 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
6055 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
6057 basic_ios_char
*base
;
6059 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6062 this->vbtable
= basic_istream_char_vbtable
;
6063 base
= basic_istream_char_get_basic_ios(this);
6064 basic_ios_char_ctor(base
);
6066 base
= basic_istream_char_get_basic_ios(this);
6069 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
6070 ios_base_Addstd(&base
->base
);
6074 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6075 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6076 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
6077 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
6079 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6081 /* don't destroy virtual base here */
6082 TRACE("(%p)\n", this);
6085 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6086 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6087 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
6088 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
6090 TRACE("(%p)\n", this);
6091 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6092 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6095 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor
, 8)
6096 basic_istream_char
* __thiscall
MSVCP_basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
6098 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6100 TRACE("(%p %x)\n", this, flags
);
6103 /* we have an array, with the number of elements stored before the first object */
6104 int i
, *ptr
= (int *)this-1;
6106 for(i
=*ptr
-1; i
>=0; i
--)
6107 basic_istream_char_vbase_dtor(this+i
);
6108 MSVCRT_operator_delete(ptr
);
6110 basic_istream_char_vbase_dtor(this);
6112 MSVCRT_operator_delete(this);
6118 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6119 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6120 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
6121 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
6123 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6125 TRACE("(%p %d)\n", this, noskip
);
6127 if(!ios_base_good(&base
->base
)) {
6128 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6132 if(basic_ios_char_tie_get(base
))
6133 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
6135 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6136 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6137 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
6140 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
6141 ch
= basic_streambuf_char_snextc(strbuf
)) {
6143 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6147 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6155 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6156 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6157 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
6158 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
6160 return basic_istream_char__Ipfx(this, noskip
);
6163 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6164 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6165 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
6166 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
6168 TRACE("(%p)\n", this);
6171 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
6173 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
6175 if(basic_ios_char_rdbuf_get(base
))
6176 basic_streambuf_char__Lock(base
->strbuf
);
6178 return basic_istream_char_ipfx(istr
, noskip
);
6181 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
6183 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
6185 if(basic_ios_char_rdbuf_get(base
))
6186 basic_streambuf_char__Unlock(base
->strbuf
);
6189 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6190 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6191 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
6192 int __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
6194 TRACE("(%p)\n", this);
6198 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6199 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6200 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
6201 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
6203 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6206 TRACE("(%p)\n", this);
6210 if(!basic_istream_char_sentry_create(this, TRUE
)) {
6211 basic_istream_char_sentry_destroy(this);
6215 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
6216 basic_istream_char_sentry_destroy(this);
6218 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6225 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6226 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6227 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
6228 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
6232 TRACE("(%p %p)\n", this, ch
);
6234 ret
= basic_istream_char_get(this);
6240 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6241 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6242 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
6243 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6245 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6248 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
6252 if(basic_istream_char_sentry_create(this, TRUE
)) {
6253 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6255 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
6256 ch
= basic_streambuf_char_snextc(strbuf
)) {
6257 if(ch
==EOF
|| ch
==delim
)
6265 basic_istream_char_sentry_destroy(this);
6267 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6268 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6274 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6275 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6276 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
6277 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
6279 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
6282 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6283 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6284 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
6285 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
6287 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6290 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
6294 if(basic_istream_char_sentry_create(this, TRUE
)) {
6295 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
6297 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
6298 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
6299 if(ch
==EOF
|| ch
==delim
)
6302 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
6307 basic_istream_char_sentry_destroy(this);
6309 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6310 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6314 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6315 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6316 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
6317 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
6319 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
6322 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6323 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6324 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
6325 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6327 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6330 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
6334 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
6335 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6338 ch
= basic_streambuf_char_sbumpc(strbuf
);
6340 if(ch
==EOF
|| ch
==delim
)
6350 else if(ch
!= EOF
) {
6351 ch
= basic_streambuf_char_sgetc(strbuf
);
6354 basic_streambuf_char__Gninc(strbuf
);
6359 basic_istream_char_sentry_destroy(this);
6361 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6362 (!this->count
|| (ch
!=delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6368 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6369 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6370 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
6371 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
6373 return basic_istream_char_getline_delim(this, str
, count
, '\n');
6376 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
6377 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6378 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
6379 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
6381 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6384 TRACE("(%p %ld %d)\n", this, count
, delim
);
6388 if(basic_istream_char_sentry_create(this, TRUE
)) {
6389 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6392 ch
= basic_streambuf_char_sbumpc(strbuf
);
6394 if(ch
==EOF
|| ch
==delim
)
6398 if(count
!= INT_MAX
)
6402 basic_istream_char_sentry_destroy(this);
6405 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6409 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6410 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6411 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
6412 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
6414 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6417 TRACE("(%p)\n", this);
6421 if(basic_istream_char_sentry_create(this, TRUE
))
6422 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
6423 basic_istream_char_sentry_destroy(this);
6427 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
6428 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
6429 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s
, 16)
6430 basic_istream_char
* __thiscall
basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
6432 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6433 IOSB_iostate state
= IOSTATE_goodbit
;
6435 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
6437 if(basic_istream_char_sentry_create(this, TRUE
)) {
6438 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6440 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
6441 if(this->count
!= count
)
6442 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
6446 basic_istream_char_sentry_destroy(this);
6448 basic_ios_char_setstate(base
, state
);
6452 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6453 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6454 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
6455 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
6457 return basic_istream_char__Read_s(this, str
, count
, count
);
6460 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
6461 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
6462 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s
, 16)
6463 streamsize __thiscall
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
6465 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6466 IOSB_iostate state
= IOSTATE_goodbit
;
6468 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
6472 if(basic_istream_char_sentry_create(this, TRUE
)) {
6473 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
6478 state
|= IOSTATE_eofbit
;
6480 basic_istream_char__Read_s(this, str
, size
, avail
);
6482 state
|= IOSTATE_failbit
;
6484 basic_istream_char_sentry_destroy(this);
6486 basic_ios_char_setstate(base
, state
);
6490 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
6491 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
6492 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
6493 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
6495 return basic_istream_char__Readsome_s(this, str
, count
, count
);
6498 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
6499 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
6500 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
6501 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
6503 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6504 IOSB_iostate state
= IOSTATE_goodbit
;
6506 TRACE("(%p %c)\n", this, ch
);
6510 if(basic_istream_char_sentry_create(this, TRUE
)) {
6511 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6513 if(!ios_base_good(&base
->base
))
6514 state
|= IOSTATE_failbit
;
6515 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
6516 state
|= IOSTATE_badbit
;
6518 basic_istream_char_sentry_destroy(this);
6520 basic_ios_char_setstate(base
, state
);
6524 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
6525 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
6526 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
6527 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
6529 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6530 IOSB_iostate state
= IOSTATE_goodbit
;
6532 TRACE("(%p)\n", this);
6536 if(basic_istream_char_sentry_create(this, TRUE
)) {
6537 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6539 if(!ios_base_good(&base
->base
))
6540 state
|= IOSTATE_failbit
;
6541 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
6542 state
|= IOSTATE_badbit
;
6544 basic_istream_char_sentry_destroy(this);
6546 basic_ios_char_setstate(base
, state
);
6550 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6551 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6552 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
6553 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
6555 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6556 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6558 TRACE("(%p)\n", this);
6563 if(basic_istream_char_sentry_create(this, TRUE
)) {
6564 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
6565 basic_istream_char_sentry_destroy(this);
6569 basic_istream_char_sentry_destroy(this);
6571 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6575 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6576 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6577 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
6578 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
6580 TRACE("(%p %p)\n", this, ret
);
6582 if(basic_istream_char_sentry_create(this, TRUE
)) {
6583 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6584 if(!ios_base_fail(&base
->base
)) {
6585 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6586 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
6587 basic_istream_char_sentry_destroy(this);
6589 if(ret
->off
==0 && ret
->pos
==-1 && ret
->state
==0)
6590 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6594 basic_istream_char_sentry_destroy(this);
6602 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6603 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6604 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
6605 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6607 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6609 TRACE("(%p %ld %d)\n", this, off
, dir
);
6611 if(basic_istream_char_sentry_create(this, TRUE
)) {
6612 if(!ios_base_fail(&base
->base
)) {
6613 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6616 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6617 basic_istream_char_sentry_destroy(this);
6619 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
6620 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6622 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6626 basic_istream_char_sentry_destroy(this);
6628 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6632 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6633 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6634 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6635 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6637 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6639 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6641 if(basic_istream_char_sentry_create(this, TRUE
)) {
6642 if(!ios_base_fail(&base
->base
)) {
6643 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6646 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6647 basic_istream_char_sentry_destroy(this);
6649 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
6650 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6652 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6656 basic_istream_char_sentry_destroy(this);
6658 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6662 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6663 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6664 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6665 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6667 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6668 int state
= IOSTATE_goodbit
;
6670 TRACE("(%p %p)\n", this, v
);
6672 if(basic_istream_char_sentry_create(this, FALSE
)) {
6673 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6674 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6675 istreambuf_iterator_char first
={0}, last
={0};
6678 first
.strbuf
= strbuf
;
6679 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6681 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6684 state
|= IOSTATE_failbit
;
6686 basic_istream_char_sentry_destroy(this);
6688 basic_ios_char_setstate(base
, state
);
6692 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6693 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6694 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6695 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6697 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6698 int state
= IOSTATE_goodbit
;
6700 TRACE("(%p %p)\n", this, v
);
6702 if(basic_istream_char_sentry_create(this, FALSE
)) {
6703 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6704 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6705 istreambuf_iterator_char first
={0}, last
={0};
6707 first
.strbuf
= strbuf
;
6708 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6710 basic_istream_char_sentry_destroy(this);
6712 basic_ios_char_setstate(base
, state
);
6716 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6717 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6718 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6719 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6721 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6722 int state
= IOSTATE_goodbit
;
6724 TRACE("(%p %p)\n", this, v
);
6726 if(basic_istream_char_sentry_create(this, FALSE
)) {
6727 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6728 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6729 istreambuf_iterator_char first
={0}, last
={0};
6731 first
.strbuf
= strbuf
;
6732 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6734 basic_istream_char_sentry_destroy(this);
6736 basic_ios_char_setstate(base
, state
);
6740 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6741 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6742 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6743 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6745 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6746 int state
= IOSTATE_goodbit
;
6748 TRACE("(%p %p)\n", this, v
);
6750 if(basic_istream_char_sentry_create(this, FALSE
)) {
6751 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6752 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6753 istreambuf_iterator_char first
={0}, last
={0};
6755 first
.strbuf
= strbuf
;
6756 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6758 basic_istream_char_sentry_destroy(this);
6760 basic_ios_char_setstate(base
, state
);
6764 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6765 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6766 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6767 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6769 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6770 int state
= IOSTATE_goodbit
;
6772 TRACE("(%p %p)\n", this, v
);
6774 if(basic_istream_char_sentry_create(this, FALSE
)) {
6775 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6776 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6777 istreambuf_iterator_char first
={0}, last
={0};
6779 first
.strbuf
= strbuf
;
6780 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6782 basic_istream_char_sentry_destroy(this);
6784 basic_ios_char_setstate(base
, state
);
6788 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6789 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6790 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6791 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6793 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6794 int state
= IOSTATE_goodbit
;
6796 TRACE("(%p %p)\n", this, v
);
6798 if(basic_istream_char_sentry_create(this, FALSE
)) {
6799 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6800 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6801 istreambuf_iterator_char first
={0}, last
={0};
6803 first
.strbuf
= strbuf
;
6804 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6806 basic_istream_char_sentry_destroy(this);
6808 basic_ios_char_setstate(base
, state
);
6812 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6813 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6814 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6815 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6817 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6818 int state
= IOSTATE_goodbit
;
6820 TRACE("(%p %p)\n", this, v
);
6822 if(basic_istream_char_sentry_create(this, FALSE
)) {
6823 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6824 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6825 istreambuf_iterator_char first
={0}, last
={0};
6827 first
.strbuf
= strbuf
;
6828 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6830 basic_istream_char_sentry_destroy(this);
6832 basic_ios_char_setstate(base
, state
);
6836 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6837 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6838 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6839 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6841 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6842 int state
= IOSTATE_goodbit
;
6844 TRACE("(%p %p)\n", this, v
);
6846 if(basic_istream_char_sentry_create(this, FALSE
)) {
6847 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6848 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6849 istreambuf_iterator_char first
={0}, last
={0};
6851 first
.strbuf
= strbuf
;
6852 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6854 basic_istream_char_sentry_destroy(this);
6856 basic_ios_char_setstate(base
, state
);
6860 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6861 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6862 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6863 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6865 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6866 int state
= IOSTATE_goodbit
;
6868 TRACE("(%p %p)\n", this, v
);
6870 if(basic_istream_char_sentry_create(this, FALSE
)) {
6871 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6872 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6873 istreambuf_iterator_char first
={0}, last
={0};
6875 first
.strbuf
= strbuf
;
6876 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6878 basic_istream_char_sentry_destroy(this);
6880 basic_ios_char_setstate(base
, state
);
6884 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6885 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6886 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6887 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6889 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6890 int state
= IOSTATE_goodbit
;
6892 TRACE("(%p %p)\n", this, v
);
6894 if(basic_istream_char_sentry_create(this, FALSE
)) {
6895 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6896 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6897 istreambuf_iterator_char first
={0}, last
={0};
6899 first
.strbuf
= strbuf
;
6900 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6902 basic_istream_char_sentry_destroy(this);
6904 basic_ios_char_setstate(base
, state
);
6908 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6909 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6910 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6911 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6913 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6914 int state
= IOSTATE_goodbit
;
6916 TRACE("(%p %p)\n", this, v
);
6918 if(basic_istream_char_sentry_create(this, FALSE
)) {
6919 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6920 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6921 istreambuf_iterator_char first
={0}, last
={0};
6923 first
.strbuf
= strbuf
;
6924 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6926 basic_istream_char_sentry_destroy(this);
6928 basic_ios_char_setstate(base
, state
);
6932 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6933 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6934 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6935 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6937 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6938 int state
= IOSTATE_goodbit
;
6940 TRACE("(%p %p)\n", this, v
);
6942 if(basic_istream_char_sentry_create(this, FALSE
)) {
6943 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6944 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6945 istreambuf_iterator_char first
={0}, last
={0};
6947 first
.strbuf
= strbuf
;
6948 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6950 basic_istream_char_sentry_destroy(this);
6952 basic_ios_char_setstate(base
, state
);
6956 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6957 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6958 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6959 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
6961 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6962 int state
= IOSTATE_goodbit
;
6964 TRACE("(%p %p)\n", this, v
);
6966 if(basic_istream_char_sentry_create(this, FALSE
)) {
6967 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6968 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6969 istreambuf_iterator_char first
={0}, last
={0};
6971 first
.strbuf
= strbuf
;
6972 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6974 basic_istream_char_sentry_destroy(this);
6976 basic_ios_char_setstate(base
, state
);
6980 /* ??$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 */
6981 /* ??$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 */
6982 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
6983 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
6985 IOSB_iostate state
= IOSTATE_failbit
;
6988 TRACE("(%p %p %c)\n", istream
, str
, delim
);
6990 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
6991 MSVCP_basic_string_char_clear(str
);
6993 for(c
= basic_istream_char_get(istream
); c
!=delim
&& c
!=EOF
;
6994 c
= basic_istream_char_get(istream
)) {
6995 state
= IOSTATE_goodbit
;
6996 MSVCP_basic_string_char_append_ch(str
, c
);
6999 basic_istream_char_sentry_destroy(istream
);
7001 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
7002 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7006 /* ??$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 */
7007 /* ??$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 */
7008 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
7009 basic_istream_char
*istream
, basic_string_char
*str
)
7011 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
7014 /* ??$?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 */
7015 /* ??$?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 */
7016 basic_istream_char
* __cdecl
basic_istream_char_read_bstr(
7017 basic_istream_char
*istream
, basic_string_char
*str
)
7019 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7020 IOSB_iostate state
= IOSTATE_failbit
;
7023 TRACE("(%p %p)\n", istream
, str
);
7025 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7026 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
7027 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
7032 MSVCP_basic_string_char_clear(str
);
7034 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7035 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7036 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7037 state
= IOSTATE_goodbit
;
7038 MSVCP_basic_string_char_append_ch(str
, c
);
7041 ios_base_width_set(&base
->base
, 0);
7043 basic_istream_char_sentry_destroy(istream
);
7045 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7049 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7050 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7051 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7052 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7053 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7054 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7055 basic_istream_char
* __cdecl
basic_istream_char_read_str(basic_istream_char
*istream
, char *str
)
7057 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7058 IOSB_iostate state
= IOSTATE_failbit
;
7061 TRACE("(%p %p)\n", istream
, str
);
7063 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7064 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
7065 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
7067 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7068 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7069 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7070 state
= IOSTATE_goodbit
;
7075 ios_base_width_set(&base
->base
, 0);
7077 basic_istream_char_sentry_destroy(istream
);
7079 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7083 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7084 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7085 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7086 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7087 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7088 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7089 basic_istream_char
* __cdecl
basic_istream_char_read_ch(basic_istream_char
*istream
, char *ch
)
7091 IOSB_iostate state
= IOSTATE_failbit
;
7094 TRACE("(%p %p)\n", istream
, ch
);
7096 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7097 c
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7098 basic_istream_char_get_basic_ios(istream
)));
7100 state
= IOSTATE_goodbit
;
7104 basic_istream_char_sentry_destroy(istream
);
7106 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
7107 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7111 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7112 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7113 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
7114 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
7115 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
7117 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
7118 IOSB_iostate state
= IOSTATE_failbit
;
7121 TRACE("(%p %p)\n", this, streambuf
);
7123 if(basic_istream_char_sentry_create(this, FALSE
)) {
7124 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
7125 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
7126 state
= IOSTATE_goodbit
;
7127 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
7131 basic_istream_char_sentry_destroy(this);
7133 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7137 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7138 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7139 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
7140 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
7141 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
7143 TRACE("(%p %p)\n", this, pfunc
);
7148 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7149 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7150 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
7151 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
7152 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
7154 TRACE("(%p %p)\n", this, pfunc
);
7155 pfunc(basic_istream_char_get_basic_ios(this));
7159 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7160 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7161 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
7162 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
7163 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7165 TRACE("(%p %p)\n", this, pfunc
);
7166 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
7170 /* Caution: basic_istream uses virtual inheritance. */
7171 static inline basic_ios_wchar
* basic_istream_wchar_get_basic_ios(basic_istream_wchar
*this)
7173 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
7176 static inline basic_ios_wchar
* basic_istream_wchar_to_basic_ios(basic_istream_wchar
*ptr
)
7178 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_wchar_vbtable
[1]);
7181 static inline basic_istream_wchar
* basic_istream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
7183 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_wchar_vbtable
[1]);
7186 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7187 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7188 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init
, 20)
7189 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_init(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
7191 basic_ios_wchar
*base
;
7193 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
7196 this->vbtable
= basic_istream_wchar_vbtable
;
7197 base
= basic_istream_wchar_get_basic_ios(this);
7198 basic_ios_wchar_ctor(base
);
7200 base
= basic_istream_wchar_get_basic_ios(this);
7203 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
7206 basic_ios_wchar_init(base
, strbuf
, isstd
);
7210 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7211 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7212 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor
, 16)
7213 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
7215 return basic_istream_wchar_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
7218 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7219 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7220 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized
, 12)
7221 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_uninitialized(basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
7223 basic_ios_wchar
*base
;
7225 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
7228 this->vbtable
= basic_istream_wchar_vbtable
;
7229 base
= basic_istream_wchar_get_basic_ios(this);
7230 basic_ios_wchar_ctor(base
);
7232 base
= basic_istream_wchar_get_basic_ios(this);
7235 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
7236 ios_base_Addstd(&base
->base
);
7240 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7241 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7242 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor
, 4)
7243 void __thiscall
basic_istream_wchar_dtor(basic_ios_wchar
*base
)
7245 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
7247 /* don't destroy virtual base here */
7248 TRACE("(%p)\n", this);
7251 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7252 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7253 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor
, 4)
7254 void __thiscall
basic_istream_wchar_vbase_dtor(basic_istream_wchar
*this)
7256 TRACE("(%p)\n", this);
7257 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7258 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7261 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_wchar_vector_dtor
, 8)
7262 basic_istream_wchar
* __thiscall
MSVCP_basic_istream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7264 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
7266 TRACE("(%p %x)\n", this, flags
);
7269 /* we have an array, with the number of elements stored before the first object */
7270 int i
, *ptr
= (int *)this-1;
7272 for(i
=*ptr
-1; i
>=0; i
--)
7273 basic_istream_wchar_vbase_dtor(this+i
);
7274 MSVCRT_operator_delete(ptr
);
7276 basic_istream_wchar_vbase_dtor(this);
7278 MSVCRT_operator_delete(this);
7284 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7285 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7286 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx
, 8)
7287 MSVCP_bool __thiscall
basic_istream_wchar__Ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
7289 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7291 TRACE("(%p %d)\n", this, noskip
);
7293 if(!ios_base_good(&base
->base
)) {
7294 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7298 if(basic_ios_wchar_tie_get(base
))
7299 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base
));
7301 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
7302 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7303 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
7306 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
7307 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7309 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
7313 if(!ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
7321 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7322 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7323 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx
, 8)
7324 MSVCP_bool __thiscall
basic_istream_wchar_ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
7326 return basic_istream_wchar__Ipfx(this, noskip
);
7329 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7330 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7331 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx
, 4)
7332 void __thiscall
basic_istream_wchar_isfx(basic_istream_wchar
*this)
7334 TRACE("(%p)\n", this);
7337 static BOOL
basic_istream_wchar_sentry_create(basic_istream_wchar
*istr
, MSVCP_bool noskip
)
7339 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
7341 if(basic_ios_wchar_rdbuf_get(base
))
7342 basic_streambuf_wchar__Lock(base
->strbuf
);
7344 return basic_istream_wchar_ipfx(istr
, noskip
);
7347 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar
*istr
)
7349 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
7351 if(basic_ios_wchar_rdbuf_get(base
))
7352 basic_streambuf_wchar__Unlock(base
->strbuf
);
7355 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
7356 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
7357 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount
, 4)
7358 int __thiscall
basic_istream_wchar_gcount(const basic_istream_wchar
*this)
7360 TRACE("(%p)\n", this);
7364 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
7365 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
7366 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get
, 4)
7367 unsigned short __thiscall
basic_istream_wchar_get(basic_istream_wchar
*this)
7369 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7372 TRACE("(%p)\n", this);
7376 if(!basic_istream_wchar_sentry_create(this, TRUE
)) {
7377 basic_istream_wchar_sentry_destroy(this);
7381 ret
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base
));
7382 basic_istream_wchar_sentry_destroy(this);
7384 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
7391 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
7392 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
7393 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch
, 8)
7394 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
7398 TRACE("(%p %p)\n", this, ch
);
7400 ret
= basic_istream_wchar_get(this);
7406 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
7407 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
7408 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 16)
7409 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7411 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7412 unsigned short ch
= delim
;
7414 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
7418 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7419 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7421 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
7422 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7423 if(ch
==WEOF
|| ch
==delim
)
7431 basic_istream_wchar_sentry_destroy(this);
7433 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7434 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7440 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7441 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7442 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 12)
7443 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7445 return basic_istream_wchar_get_str_delim(this, str
, count
, '\n');
7448 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
7449 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
7450 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim
, 12)
7451 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
7453 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7454 unsigned short ch
= delim
;
7456 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
7460 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7461 basic_streambuf_wchar
*strbuf_read
= basic_ios_wchar_rdbuf_get(base
);
7463 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
7464 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
7465 if(ch
==WEOF
|| ch
==delim
)
7468 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
7473 basic_istream_wchar_sentry_destroy(this);
7475 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7476 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7480 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
7481 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
7482 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf
, 8)
7483 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
7485 return basic_istream_wchar_get_streambuf_delim(this, strbuf
, '\n');
7488 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
7489 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
7490 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 16)
7491 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7493 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7494 unsigned short ch
= delim
;
7496 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
7500 if(basic_istream_wchar_sentry_create(this, TRUE
) && count
>0) {
7501 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7504 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7506 if(ch
==WEOF
|| ch
==delim
)
7516 else if(ch
!= WEOF
) {
7517 ch
= basic_streambuf_wchar_sgetc(strbuf
);
7520 basic_streambuf_wchar__Gninc(strbuf
);
7525 basic_istream_wchar_sentry_destroy(this);
7527 basic_ios_wchar_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
7528 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
7534 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7535 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7536 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 12)
7537 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7539 return basic_istream_wchar_getline_delim(this, str
, count
, '\n');
7542 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
7543 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
7544 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 12)
7545 basic_istream_wchar
* __thiscall
basic_istream_wchar_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
7547 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7548 unsigned short ch
= delim
;
7550 TRACE("(%p %ld %d)\n", this, count
, delim
);
7554 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7555 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7558 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7560 if(ch
==WEOF
|| ch
==delim
)
7564 if(count
!= INT_MAX
)
7568 basic_istream_wchar_sentry_destroy(this);
7571 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
7575 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
7576 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
7577 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek
, 4)
7578 unsigned short __thiscall
basic_istream_wchar_peek(basic_istream_wchar
*this)
7580 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7581 unsigned short ret
= WEOF
;
7583 TRACE("(%p)\n", this);
7587 if(basic_istream_wchar_sentry_create(this, TRUE
))
7588 ret
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
7589 basic_istream_wchar_sentry_destroy(this);
7593 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
7594 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
7595 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s
, 16)
7596 basic_istream_wchar
* __thiscall
basic_istream_wchar__Read_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7598 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7599 IOSB_iostate state
= IOSTATE_goodbit
;
7601 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
7603 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7604 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7606 this->count
= basic_streambuf_wchar__Sgetn_s(strbuf
, str
, size
, count
);
7607 if(this->count
!= count
)
7608 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
7612 basic_istream_wchar_sentry_destroy(this);
7614 basic_ios_wchar_setstate(base
, state
);
7618 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7619 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7620 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 12)
7621 basic_istream_wchar
* __thiscall
basic_istream_wchar_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7623 return basic_istream_wchar__Read_s(this, str
, count
, count
);
7626 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
7627 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
7628 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s
, 16)
7629 streamsize __thiscall
basic_istream_wchar__Readsome_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7631 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7632 IOSB_iostate state
= IOSTATE_goodbit
;
7634 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
7638 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7639 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base
));
7644 state
|= IOSTATE_eofbit
;
7646 basic_istream_wchar__Read_s(this, str
, size
, avail
);
7648 state
|= IOSTATE_failbit
;
7650 basic_istream_wchar_sentry_destroy(this);
7652 basic_ios_wchar_setstate(base
, state
);
7656 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
7657 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
7658 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 12)
7659 streamsize __thiscall
basic_istream_wchar_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7661 return basic_istream_wchar__Readsome_s(this, str
, count
, count
);
7664 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
7665 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
7666 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback
, 8)
7667 basic_istream_wchar
* __thiscall
basic_istream_wchar_putback(basic_istream_wchar
*this, wchar_t ch
)
7669 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7670 IOSB_iostate state
= IOSTATE_goodbit
;
7672 TRACE("(%p %c)\n", this, ch
);
7676 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7677 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7679 if(!ios_base_good(&base
->base
))
7680 state
|= IOSTATE_failbit
;
7681 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7682 state
|= IOSTATE_badbit
;
7684 basic_istream_wchar_sentry_destroy(this);
7686 basic_ios_wchar_setstate(base
, state
);
7690 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
7691 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
7692 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget
, 4)
7693 basic_istream_wchar
* __thiscall
basic_istream_wchar_unget(basic_istream_wchar
*this)
7695 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7696 IOSB_iostate state
= IOSTATE_goodbit
;
7698 TRACE("(%p)\n", this);
7702 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7703 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7705 if(!ios_base_good(&base
->base
))
7706 state
|= IOSTATE_failbit
;
7707 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7708 state
|= IOSTATE_badbit
;
7710 basic_istream_wchar_sentry_destroy(this);
7712 basic_ios_wchar_setstate(base
, state
);
7716 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
7717 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
7718 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync
, 4)
7719 int __thiscall
basic_istream_wchar_sync(basic_istream_wchar
*this)
7721 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7722 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7724 TRACE("(%p)\n", this);
7729 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7730 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7731 basic_istream_wchar_sentry_destroy(this);
7735 basic_istream_wchar_sentry_destroy(this);
7737 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7741 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7742 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7743 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg
, 8)
7744 fpos_int
* __thiscall
basic_istream_wchar_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7746 TRACE("(%p %p)\n", this, ret
);
7748 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7749 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7750 if(!ios_base_fail(&base
->base
)) {
7751 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7752 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7753 basic_istream_wchar_sentry_destroy(this);
7755 if(ret
->off
==0 && ret
->pos
==-1 && ret
->state
==0)
7756 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7760 basic_istream_wchar_sentry_destroy(this);
7768 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
7769 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
7770 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 12)
7771 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7773 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7775 TRACE("(%p %ld %d)\n", this, off
, dir
);
7777 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7778 if(!ios_base_fail(&base
->base
)) {
7779 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7782 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7783 basic_istream_wchar_sentry_destroy(this);
7785 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
7786 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7788 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7792 basic_istream_wchar_sentry_destroy(this);
7794 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7798 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7799 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7800 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos
, 28)
7801 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7803 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7805 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7807 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7808 if(!ios_base_fail(&base
->base
)) {
7809 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7812 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7813 basic_istream_wchar_sentry_destroy(this);
7815 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
7816 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7818 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7822 basic_istream_wchar_sentry_destroy(this);
7824 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7828 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
7829 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
7830 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short
, 8)
7831 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_short(basic_istream_wchar
*this, short *v
)
7833 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7834 int state
= IOSTATE_goodbit
;
7836 TRACE("(%p %p)\n", this, v
);
7838 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7839 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7840 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7841 istreambuf_iterator_wchar first
={0}, last
={0};
7844 first
.strbuf
= strbuf
;
7845 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7847 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7850 state
|= IOSTATE_failbit
;
7852 basic_istream_wchar_sentry_destroy(this);
7854 basic_ios_wchar_setstate(base
, state
);
7858 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
7859 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
7860 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort
, 8)
7861 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ushort(basic_istream_wchar
*this, unsigned short *v
)
7863 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7864 int state
= IOSTATE_goodbit
;
7866 TRACE("(%p %p)\n", this, v
);
7868 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7869 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7870 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7871 istreambuf_iterator_wchar first
={0}, last
={0};
7873 first
.strbuf
= strbuf
;
7874 num_get_wchar_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7876 basic_istream_wchar_sentry_destroy(this);
7878 basic_ios_wchar_setstate(base
, state
);
7882 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
7883 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
7884 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int
, 8)
7885 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int(basic_istream_wchar
*this, int *v
)
7887 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7888 int state
= IOSTATE_goodbit
;
7890 TRACE("(%p %p)\n", this, v
);
7892 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7893 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7894 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7895 istreambuf_iterator_wchar first
={0}, last
={0};
7897 first
.strbuf
= strbuf
;
7898 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7900 basic_istream_wchar_sentry_destroy(this);
7902 basic_ios_wchar_setstate(base
, state
);
7906 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
7907 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
7908 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint
, 8)
7909 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7911 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7912 int state
= IOSTATE_goodbit
;
7914 TRACE("(%p %p)\n", this, v
);
7916 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7917 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7918 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7919 istreambuf_iterator_wchar first
={0}, last
={0};
7921 first
.strbuf
= strbuf
;
7922 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7924 basic_istream_wchar_sentry_destroy(this);
7926 basic_ios_wchar_setstate(base
, state
);
7930 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7931 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7932 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long
, 8)
7933 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_long(basic_istream_wchar
*this, LONG
*v
)
7935 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7936 int state
= IOSTATE_goodbit
;
7938 TRACE("(%p %p)\n", this, v
);
7940 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7941 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7942 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7943 istreambuf_iterator_wchar first
={0}, last
={0};
7945 first
.strbuf
= strbuf
;
7946 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7948 basic_istream_wchar_sentry_destroy(this);
7950 basic_ios_wchar_setstate(base
, state
);
7954 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
7955 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
7956 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong
, 8)
7957 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7959 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7960 int state
= IOSTATE_goodbit
;
7962 TRACE("(%p %p)\n", this, v
);
7964 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7965 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7966 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7967 istreambuf_iterator_wchar first
={0}, last
={0};
7969 first
.strbuf
= strbuf
;
7970 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7972 basic_istream_wchar_sentry_destroy(this);
7974 basic_ios_wchar_setstate(base
, state
);
7978 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
7979 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
7980 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float
, 8)
7981 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_float(basic_istream_wchar
*this, float *v
)
7983 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7984 int state
= IOSTATE_goodbit
;
7986 TRACE("(%p %p)\n", this, v
);
7988 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7989 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7990 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7991 istreambuf_iterator_wchar first
={0}, last
={0};
7993 first
.strbuf
= strbuf
;
7994 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7996 basic_istream_wchar_sentry_destroy(this);
7998 basic_ios_wchar_setstate(base
, state
);
8002 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
8003 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
8004 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double
, 8)
8005 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_double(basic_istream_wchar
*this, double *v
)
8007 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8008 int state
= IOSTATE_goodbit
;
8010 TRACE("(%p %p)\n", this, v
);
8012 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8013 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8014 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8015 istreambuf_iterator_wchar first
={0}, last
={0};
8017 first
.strbuf
= strbuf
;
8018 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8020 basic_istream_wchar_sentry_destroy(this);
8022 basic_ios_wchar_setstate(base
, state
);
8026 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
8027 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
8028 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble
, 8)
8029 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ldouble(basic_istream_wchar
*this, double *v
)
8031 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8032 int state
= IOSTATE_goodbit
;
8034 TRACE("(%p %p)\n", this, v
);
8036 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8037 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8038 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8039 istreambuf_iterator_wchar first
={0}, last
={0};
8041 first
.strbuf
= strbuf
;
8042 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8044 basic_istream_wchar_sentry_destroy(this);
8046 basic_ios_wchar_setstate(base
, state
);
8050 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
8051 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8052 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr
, 8)
8053 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ptr(basic_istream_wchar
*this, void **v
)
8055 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8056 int state
= IOSTATE_goodbit
;
8058 TRACE("(%p %p)\n", this, v
);
8060 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8061 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8062 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8063 istreambuf_iterator_wchar first
={0}, last
={0};
8065 first
.strbuf
= strbuf
;
8066 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8068 basic_istream_wchar_sentry_destroy(this);
8070 basic_ios_wchar_setstate(base
, state
);
8074 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
8075 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
8076 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64
, 8)
8077 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int64(basic_istream_wchar
*this, __int64
*v
)
8079 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8080 int state
= IOSTATE_goodbit
;
8082 TRACE("(%p %p)\n", this, v
);
8084 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8085 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8086 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8087 istreambuf_iterator_wchar first
={0}, last
={0};
8089 first
.strbuf
= strbuf
;
8090 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8092 basic_istream_wchar_sentry_destroy(this);
8094 basic_ios_wchar_setstate(base
, state
);
8098 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
8099 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
8100 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64
, 8)
8101 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
8103 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8104 int state
= IOSTATE_goodbit
;
8106 TRACE("(%p %p)\n", this, v
);
8108 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8109 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8110 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8111 istreambuf_iterator_wchar first
={0}, last
={0};
8113 first
.strbuf
= strbuf
;
8114 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8116 basic_istream_wchar_sentry_destroy(this);
8118 basic_ios_wchar_setstate(base
, state
);
8122 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
8123 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
8124 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool
, 8)
8125 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
8127 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8128 int state
= IOSTATE_goodbit
;
8130 TRACE("(%p %p)\n", this, v
);
8132 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8133 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8134 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8135 istreambuf_iterator_wchar first
={0}, last
={0};
8137 first
.strbuf
= strbuf
;
8138 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8140 basic_istream_wchar_sentry_destroy(this);
8142 basic_ios_wchar_setstate(base
, state
);
8146 /* ??$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 */
8147 /* ??$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 */
8148 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr_delim(
8149 basic_istream_wchar
*istream
, basic_string_wchar
*str
, wchar_t delim
)
8151 IOSB_iostate state
= IOSTATE_failbit
;
8154 TRACE("(%p %p %c)\n", istream
, str
, delim
);
8156 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
8157 MSVCP_basic_string_wchar_clear(str
);
8159 for(c
= basic_istream_wchar_get(istream
); c
!=delim
&& c
!=WEOF
;
8160 c
= basic_istream_wchar_get(istream
)) {
8161 state
= IOSTATE_goodbit
;
8162 MSVCP_basic_string_wchar_append_ch(str
, c
);
8165 basic_istream_wchar_sentry_destroy(istream
);
8167 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
),
8168 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8172 /* ??$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 */
8173 /* ??$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 */
8174 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr(
8175 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8177 return basic_istream_wchar_getline_bstr_delim(istream
, str
, '\n');
8180 /* ??$?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 */
8181 /* ??$?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 */
8182 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_bstr(
8183 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8185 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
8186 IOSB_iostate state
= IOSTATE_failbit
;
8189 TRACE("(%p %p)\n", istream
, str
);
8191 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8192 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
8193 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
8198 MSVCP_basic_string_wchar_clear(str
);
8200 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
8201 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8202 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
8203 state
= IOSTATE_goodbit
;
8204 MSVCP_basic_string_wchar_append_ch(str
, c
);
8207 ios_base_width_set(&base
->base
, 0);
8209 basic_istream_wchar_sentry_destroy(istream
);
8211 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8215 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */
8216 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */
8217 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
8219 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
8220 IOSB_iostate state
= IOSTATE_failbit
;
8221 unsigned short c
= '\n';
8223 TRACE("(%p %p)\n", istream
, str
);
8225 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8226 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
8227 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
8229 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
8230 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8231 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
8232 state
= IOSTATE_goodbit
;
8237 ios_base_width_set(&base
->base
, 0);
8239 basic_istream_wchar_sentry_destroy(istream
);
8241 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8245 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
8246 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
8247 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_ch(basic_istream_wchar
*istream
, wchar_t *ch
)
8249 IOSB_iostate state
= IOSTATE_failbit
;
8250 unsigned short c
= 0;
8252 TRACE("(%p %p)\n", istream
, ch
);
8254 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8255 c
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
8256 basic_istream_wchar_get_basic_ios(istream
)));
8258 state
= IOSTATE_goodbit
;
8262 basic_istream_wchar_sentry_destroy(istream
);
8264 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
),
8265 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8269 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8270 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8271 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf
, 8)
8272 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_streambuf(
8273 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
8275 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8276 IOSB_iostate state
= IOSTATE_failbit
;
8277 unsigned short c
= '\n';
8279 TRACE("(%p %p)\n", this, streambuf
);
8281 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8282 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
)); c
!=WEOF
;
8283 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
))) {
8284 state
= IOSTATE_goodbit
;
8285 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
8289 basic_istream_wchar_sentry_destroy(this);
8291 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8295 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8296 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8297 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func
, 8)
8298 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func(basic_istream_wchar
*this,
8299 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
8301 TRACE("(%p %p)\n", this, pfunc
);
8306 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
8307 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
8308 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios
, 8)
8309 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_basic_ios(basic_istream_wchar
*this,
8310 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
8312 TRACE("(%p %p)\n", this, pfunc
);
8313 pfunc(basic_istream_wchar_get_basic_ios(this));
8317 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8318 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8319 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base
, 8)
8320 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_ios_base(
8321 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
8323 TRACE("(%p %p)\n", this, pfunc
);
8324 pfunc(&basic_istream_wchar_get_basic_ios(this)->base
);
8328 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
8330 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
8333 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
8335 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
8338 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8339 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8340 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
8341 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
8343 basic_ios_char
*basic_ios
;
8345 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8348 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
8349 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
8350 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8351 basic_ios_char_ctor(basic_ios
);
8353 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8356 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
8358 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8359 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
8363 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8364 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8365 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
8366 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
8368 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8370 TRACE("(%p)\n", this);
8371 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
8372 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
8375 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8376 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8377 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
8378 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
8380 TRACE("(%p)\n", this);
8381 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
8382 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
8385 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_char_vector_dtor
, 8)
8386 basic_iostream_char
* __thiscall
MSVCP_basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8388 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8390 TRACE("(%p %x)\n", this, flags
);
8393 /* we have an array, with the number of elements stored before the first object */
8394 int i
, *ptr
= (int *)this-1;
8396 for(i
=*ptr
-1; i
>=0; i
--)
8397 basic_iostream_char_vbase_dtor(this+i
);
8398 MSVCRT_operator_delete(ptr
);
8400 basic_iostream_char_vbase_dtor(this);
8402 MSVCRT_operator_delete(this);
8408 static inline basic_ios_wchar
* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar
*ptr
)
8410 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_wchar_vbtable1
[1]);
8413 static inline basic_iostream_wchar
* basic_iostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
8415 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_wchar_vbtable1
[1]);
8418 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8419 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8420 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor
, 12)
8421 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_ctor(basic_iostream_wchar
*this, basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
8423 basic_ios_wchar
*basic_ios
;
8425 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8428 this->base1
.vbtable
= basic_iostream_wchar_vbtable1
;
8429 this->base2
.vbtable
= basic_iostream_wchar_vbtable2
;
8430 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
8431 basic_ios_wchar_ctor(basic_ios
);
8433 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
8436 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_wchar_vtable
;
8438 basic_istream_wchar_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8439 basic_ostream_wchar_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
8443 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8444 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8445 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor
, 4)
8446 void __thiscall
basic_iostream_wchar_dtor(basic_ios_wchar
*base
)
8448 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
8450 TRACE("(%p)\n", this);
8451 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2
));
8452 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1
));
8455 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8456 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8457 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor
, 4)
8458 void __thiscall
basic_iostream_wchar_vbase_dtor(basic_iostream_wchar
*this)
8460 TRACE("(%p)\n", this);
8461 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
8462 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1
));
8465 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_wchar_vector_dtor
, 8)
8466 basic_iostream_wchar
* __thiscall
MSVCP_basic_iostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8468 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
8470 TRACE("(%p %x)\n", this, flags
);
8473 /* we have an array, with the number of elements stored before the first object */
8474 int i
, *ptr
= (int *)this-1;
8476 for(i
=*ptr
-1; i
>=0; i
--)
8477 basic_iostream_wchar_vbase_dtor(this+i
);
8478 MSVCRT_operator_delete(ptr
);
8480 basic_iostream_wchar_vbase_dtor(this);
8482 MSVCRT_operator_delete(this);
8488 static inline basic_ios_char
* basic_ofstream_char_to_basic_ios(basic_ofstream_char
*ptr
)
8490 return (basic_ios_char
*)((char*)ptr
+basic_ofstream_char_vbtable
[1]);
8493 static inline basic_ofstream_char
* basic_ofstream_char_from_basic_ios(basic_ios_char
*ptr
)
8495 return (basic_ofstream_char
*)((char*)ptr
-basic_ofstream_char_vbtable
[1]);
8498 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8499 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8500 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
8501 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, MSVCP_bool virt_init
)
8503 basic_ios_char
*basic_ios
;
8505 TRACE("(%p %d)\n", this, virt_init
);
8508 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8509 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8510 basic_ios_char_ctor(basic_ios
);
8512 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8515 basic_filebuf_char_ctor(&this->filebuf
);
8516 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8517 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
8521 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8522 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8523 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file
, 12)
8524 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_file(
8525 basic_ofstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
8527 basic_ios_char
*basic_ios
;
8529 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8532 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8533 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8534 basic_ios_char_ctor(basic_ios
);
8536 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8539 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8540 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8541 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
8545 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8546 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8547 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 20)
8548 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
8549 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8551 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8553 basic_ofstream_char_ctor(this, virt_init
);
8555 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8556 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8557 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8562 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
8563 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
8564 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
8565 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
8566 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar
, 20)
8567 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name_wchar(basic_ofstream_char
*this,
8568 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8570 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
8572 basic_ofstream_char_ctor(this, virt_init
);
8574 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8575 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8576 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8581 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8582 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8583 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
8584 void __thiscall
basic_ofstream_char_dtor(basic_ios_char
*base
)
8586 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8588 TRACE("(%p)\n", this);
8590 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
8591 basic_filebuf_char_dtor(&this->filebuf
);
8594 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8595 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8596 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
8597 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
8599 TRACE("(%p)\n", this);
8601 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
8602 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
8605 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ofstream_char_vector_dtor
, 8)
8606 basic_ofstream_char
* __thiscall
MSVCP_basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8608 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8610 TRACE("(%p %x)\n", this, flags
);
8613 /* we have an array, with the number of elements stored before the first object */
8614 int i
, *ptr
= (int *)this-1;
8616 for(i
=*ptr
-1; i
>=0; i
--)
8617 basic_ofstream_char_vbase_dtor(this+i
);
8618 MSVCRT_operator_delete(ptr
);
8620 basic_ofstream_char_vbase_dtor(this);
8622 MSVCRT_operator_delete(this);
8628 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8629 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8630 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
8631 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
8633 TRACE("(%p)\n", this);
8635 if(!basic_filebuf_char_close(&this->filebuf
)) {
8636 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8637 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8641 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8642 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8643 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
8644 MSVCP_bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
8646 TRACE("(%p)\n", this);
8647 return basic_filebuf_char_is_open(&this->filebuf
);
8650 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
8651 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
8652 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 16)
8653 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
8654 const char *name
, int mode
, int prot
)
8656 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
8658 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8659 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8660 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8664 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
8665 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
8666 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
8667 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
8668 const char *name
, unsigned int mode
)
8670 basic_ofstream_char_open(this, name
, mode
, _SH_DENYNO
);
8673 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
8674 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
8675 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
8676 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
8677 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar
, 16)
8678 void __thiscall
basic_ofstream_char_open_wchar(basic_ofstream_char
*this,
8679 const wchar_t *name
, int mode
, int prot
)
8681 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
8683 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8684 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8685 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8689 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
8690 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
8691 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
8692 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
8693 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old
, 12)
8694 void __thiscall
basic_ofstream_char_open_wchar_old(basic_ofstream_char
*this,
8695 const wchar_t *name
, unsigned int mode
)
8697 basic_ofstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
8700 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8701 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8702 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
8703 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
8705 TRACE("(%p)\n", this);
8706 return (basic_filebuf_char
*)&this->filebuf
;
8709 static inline basic_ios_char
* basic_ifstream_char_to_basic_ios(basic_ifstream_char
*ptr
)
8711 return (basic_ios_char
*)((char*)ptr
+basic_ifstream_char_vbtable
[1]);
8714 static inline basic_ifstream_char
* basic_ifstream_char_from_basic_ios(basic_ios_char
*ptr
)
8716 return (basic_ifstream_char
*)((char*)ptr
-basic_ifstream_char_vbtable
[1]);
8719 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8720 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8721 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
8722 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, MSVCP_bool virt_init
)
8724 basic_ios_char
*basic_ios
;
8726 TRACE("(%p %d)\n", this, virt_init
);
8729 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8730 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8731 basic_ios_char_ctor(basic_ios
);
8733 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8736 basic_filebuf_char_ctor(&this->filebuf
);
8737 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8738 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
8742 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8743 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8744 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file
, 12)
8745 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_file(
8746 basic_ifstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
8748 basic_ios_char
*basic_ios
;
8750 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8753 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8754 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8755 basic_ios_char_ctor(basic_ios
);
8757 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8760 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8761 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8762 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
8766 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8767 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8768 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 20)
8769 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
8770 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8772 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8774 basic_ifstream_char_ctor(this, virt_init
);
8776 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8777 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8778 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8783 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
8784 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
8785 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
8786 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
8787 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar
, 20)
8788 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name_wchar(basic_ifstream_char
*this,
8789 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8791 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
8793 basic_ifstream_char_ctor(this, virt_init
);
8795 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8796 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8797 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8802 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8803 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8804 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
8805 void __thiscall
basic_ifstream_char_dtor(basic_ios_char
*base
)
8807 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8809 TRACE("(%p)\n", this);
8811 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
8812 basic_filebuf_char_dtor(&this->filebuf
);
8815 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8816 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8817 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
8818 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
8820 TRACE("(%p)\n", this);
8822 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
8823 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
8826 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ifstream_char_vector_dtor
, 8)
8827 basic_ifstream_char
* __thiscall
MSVCP_basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8829 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8831 TRACE("(%p %x)\n", this, flags
);
8834 /* we have an array, with the number of elements stored before the first object */
8835 int i
, *ptr
= (int *)this-1;
8837 for(i
=*ptr
-1; i
>=0; i
--)
8838 basic_ifstream_char_vbase_dtor(this+i
);
8839 MSVCRT_operator_delete(ptr
);
8841 basic_ifstream_char_vbase_dtor(this);
8843 MSVCRT_operator_delete(this);
8849 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8850 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8851 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
8852 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
8854 TRACE("(%p)\n", this);
8856 if(!basic_filebuf_char_close(&this->filebuf
)) {
8857 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8858 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8862 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8863 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8864 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
8865 MSVCP_bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
8867 TRACE("(%p)\n", this);
8868 return basic_filebuf_char_is_open(&this->filebuf
);
8871 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
8872 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
8873 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 16)
8874 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
8875 const char *name
, int mode
, int prot
)
8877 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
8879 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8880 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8881 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8885 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
8886 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
8887 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
8888 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
8889 const char *name
, unsigned int mode
)
8891 basic_ifstream_char_open(this, name
, mode
, _SH_DENYNO
);
8894 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
8895 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
8896 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
8897 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
8898 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar
, 16)
8899 void __thiscall
basic_ifstream_char_open_wchar(basic_ifstream_char
*this,
8900 const wchar_t *name
, int mode
, int prot
)
8902 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
8904 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8905 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8906 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8910 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
8911 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
8912 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
8913 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
8914 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old
, 12)
8915 void __thiscall
basic_ifstream_char_open_wchar_old(basic_ifstream_char
*this,
8916 const wchar_t *name
, unsigned int mode
)
8918 basic_ifstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
8921 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8922 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8923 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
8924 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
8926 TRACE("(%p)\n", this);
8927 return (basic_filebuf_char
*)&this->filebuf
;
8930 static inline basic_ios_char
* basic_fstream_char_to_basic_ios(basic_fstream_char
*ptr
)
8932 return (basic_ios_char
*)((char*)ptr
+basic_fstream_char_vbtable1
[1]);
8935 static inline basic_fstream_char
* basic_fstream_char_from_basic_ios(basic_ios_char
*ptr
)
8937 return (basic_fstream_char
*)((char*)ptr
-basic_fstream_char_vbtable1
[1]);
8940 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8941 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8942 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
8943 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, MSVCP_bool virt_init
)
8945 basic_ios_char
*basic_ios
;
8947 TRACE("(%p %d)\n", this, virt_init
);
8950 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
8951 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
8952 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8953 basic_ios_char_ctor(basic_ios
);
8955 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8958 basic_filebuf_char_ctor(&this->filebuf
);
8959 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
8960 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
8964 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8965 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8966 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file
, 12)
8967 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_file(basic_fstream_char
*this,
8968 FILE *file
, MSVCP_bool virt_init
)
8970 basic_ios_char
*basic_ios
;
8972 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8975 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
8976 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
8977 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8978 basic_ios_char_ctor(basic_ios
);
8980 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8983 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8984 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
8985 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
8989 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8990 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8991 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 20)
8992 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
8993 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8995 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8997 basic_fstream_char_ctor(this, virt_init
);
8999 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
9000 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9001 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9006 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
9007 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
9008 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
9009 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
9010 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar
, 20)
9011 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name_wchar(basic_fstream_char
*this,
9012 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
9014 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
9016 basic_fstream_char_ctor(this, virt_init
);
9018 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
9019 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9020 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9025 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9026 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9027 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
9028 void __thiscall
basic_fstream_char_dtor(basic_ios_char
*base
)
9030 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9032 TRACE("(%p)\n", this);
9034 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9035 basic_filebuf_char_dtor(&this->filebuf
);
9038 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9039 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9040 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
9041 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
9043 TRACE("(%p)\n", this);
9045 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
9046 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9049 DEFINE_THISCALL_WRAPPER(MSVCP_basic_fstream_char_vector_dtor
, 8)
9050 basic_fstream_char
* __thiscall
MSVCP_basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9052 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9054 TRACE("(%p %x)\n", this, flags
);
9057 /* we have an array, with the number of elements stored before the first object */
9058 int i
, *ptr
= (int *)this-1;
9060 for(i
=*ptr
-1; i
>=0; i
--)
9061 basic_fstream_char_vbase_dtor(this+i
);
9062 MSVCRT_operator_delete(ptr
);
9064 basic_fstream_char_vbase_dtor(this);
9066 MSVCRT_operator_delete(this);
9072 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9073 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9074 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
9075 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
9077 TRACE("(%p)\n", this);
9079 if(!basic_filebuf_char_close(&this->filebuf
)) {
9080 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9081 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9085 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9086 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9087 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
9088 MSVCP_bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
9090 TRACE("(%p)\n", this);
9091 return basic_filebuf_char_is_open(&this->filebuf
);
9094 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
9095 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
9096 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 16)
9097 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
9098 const char *name
, int mode
, int prot
)
9100 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
9102 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
9103 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9104 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9108 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
9109 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
9110 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
9111 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
9112 const char *name
, unsigned int mode
)
9114 basic_fstream_char_open(this, name
, mode
, _SH_DENYNO
);
9117 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
9118 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
9119 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
9120 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
9121 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar
, 16)
9122 void __thiscall
basic_fstream_char_open_wchar(basic_fstream_char
*this,
9123 const wchar_t *name
, int mode
, int prot
)
9125 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
9127 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
9128 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9129 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9133 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
9134 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
9135 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
9136 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
9137 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old
, 12)
9138 void __thiscall
basic_fstream_char_open_wchar_old(basic_fstream_char
*this,
9139 const wchar_t *name
, unsigned int mode
)
9141 basic_fstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
9144 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9145 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9146 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
9147 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
9149 TRACE("(%p)\n", this);
9150 return (basic_filebuf_char
*)&this->filebuf
;
9153 static inline basic_ios_char
* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char
*ptr
)
9155 return (basic_ios_char
*)((char*)ptr
+basic_ostringstream_char_vbtable
[1]);
9158 static inline basic_ostringstream_char
* basic_ostringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9160 return (basic_ostringstream_char
*)((char*)ptr
-basic_ostringstream_char_vbtable
[1]);
9163 /* ??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 */
9164 /* ??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 */
9165 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str
, 16)
9166 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_str(basic_ostringstream_char
*this,
9167 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9169 basic_ios_char
*basic_ios
;
9171 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9174 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9175 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9176 basic_ios_char_ctor(basic_ios
);
9178 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9181 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9182 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9183 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
9187 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9188 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9189 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode
, 12)
9190 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_mode(
9191 basic_ostringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9193 basic_ios_char
*basic_ios
;
9195 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9198 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9199 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9200 basic_ios_char_ctor(basic_ios
);
9202 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9205 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9206 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9207 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
9211 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9212 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9213 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor
, 8)
9214 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor(
9215 basic_ostringstream_char
*this, MSVCP_bool virt_init
)
9217 return basic_ostringstream_char_ctor_mode(this, 0, virt_init
);
9220 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9221 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9222 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor
, 4)
9223 void __thiscall
basic_ostringstream_char_dtor(basic_ios_char
*base
)
9225 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9227 TRACE("(%p)\n", this);
9229 basic_stringbuf_char_dtor(&this->strbuf
);
9230 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
9233 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9234 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9235 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor
, 4)
9236 void __thiscall
basic_ostringstream_char_vbase_dtor(basic_ostringstream_char
*this)
9238 TRACE("(%p)\n", this);
9240 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
9241 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
9244 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostringstream_char_vector_dtor
, 8)
9245 basic_ostringstream_char
* __thiscall
MSVCP_basic_ostringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9247 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9249 TRACE("(%p %x)\n", this, flags
);
9252 /* we have an array, with the number of elements stored before the first object */
9253 int i
, *ptr
= (int *)this-1;
9255 for(i
=*ptr
-1; i
>=0; i
--)
9256 basic_ostringstream_char_vbase_dtor(this+i
);
9257 MSVCRT_operator_delete(ptr
);
9259 basic_ostringstream_char_vbase_dtor(this);
9261 MSVCRT_operator_delete(this);
9267 /* ?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 */
9268 /* ?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 */
9269 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf
, 4)
9270 basic_stringbuf_char
* __thiscall
basic_ostringstream_char_rdbuf(const basic_ostringstream_char
*this)
9272 TRACE("(%p)\n", this);
9273 return (basic_stringbuf_char
*)&this->strbuf
;
9276 /* ?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 */
9277 /* ?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 */
9278 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set
, 8)
9279 void __thiscall
basic_ostringstream_char_str_set(basic_ostringstream_char
*this, const basic_string_char
*str
)
9281 TRACE("(%p %p)\n", this, str
);
9282 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9285 /* ?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 */
9286 /* ?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 */
9287 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get
, 8)
9288 basic_string_char
* __thiscall
basic_ostringstream_char_str_get(const basic_ostringstream_char
*this, basic_string_char
*ret
)
9290 TRACE("(%p %p)\n", this, ret
);
9291 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9294 static inline basic_ios_wchar
* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar
*ptr
)
9296 return (basic_ios_wchar
*)((char*)ptr
+basic_ostringstream_wchar_vbtable
[1]);
9299 static inline basic_ostringstream_wchar
* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9301 return (basic_ostringstream_wchar
*)((char*)ptr
-basic_ostringstream_wchar_vbtable
[1]);
9304 /* ??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 */
9305 /* ??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 */
9306 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str
, 16)
9307 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar
*this,
9308 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9310 basic_ios_wchar
*basic_ios
;
9312 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9315 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
9316 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9317 basic_ios_wchar_ctor(basic_ios
);
9319 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9322 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9323 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9324 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
9328 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9329 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9330 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode
, 12)
9331 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_mode(
9332 basic_ostringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9334 basic_ios_wchar
*basic_ios
;
9336 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9339 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
9340 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9341 basic_ios_wchar_ctor(basic_ios
);
9343 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9346 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9347 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9348 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
9352 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9353 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9354 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor
, 8)
9355 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor(
9356 basic_ostringstream_wchar
*this, MSVCP_bool virt_init
)
9358 return basic_ostringstream_wchar_ctor_mode(this, 0, virt_init
);
9361 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9362 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9363 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor
, 4)
9364 void __thiscall
basic_ostringstream_wchar_dtor(basic_ios_wchar
*base
)
9366 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
9368 TRACE("(%p)\n", this);
9370 basic_stringbuf_wchar_dtor(&this->strbuf
);
9371 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base
));
9374 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9375 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9376 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor
, 4)
9377 void __thiscall
basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar
*this)
9379 TRACE("(%p)\n", this);
9381 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
9382 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base
));
9385 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostringstream_wchar_vector_dtor
, 8)
9386 basic_ostringstream_wchar
* __thiscall
MSVCP_basic_ostringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9388 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
9390 TRACE("(%p %x)\n", this, flags
);
9393 /* we have an array, with the number of elements stored before the first object */
9394 int i
, *ptr
= (int *)this-1;
9396 for(i
=*ptr
-1; i
>=0; i
--)
9397 basic_ostringstream_wchar_vbase_dtor(this+i
);
9398 MSVCRT_operator_delete(ptr
);
9400 basic_ostringstream_wchar_vbase_dtor(this);
9402 MSVCRT_operator_delete(this);
9408 /* ?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 */
9409 /* ?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 */
9410 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf
, 4)
9411 basic_stringbuf_wchar
* __thiscall
basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar
*this)
9413 TRACE("(%p)\n", this);
9414 return (basic_stringbuf_wchar
*)&this->strbuf
;
9417 /* ?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 */
9418 /* ?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 */
9419 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set
, 8)
9420 void __thiscall
basic_ostringstream_wchar_str_set(basic_ostringstream_wchar
*this, const basic_string_wchar
*str
)
9422 TRACE("(%p %p)\n", this, str
);
9423 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9426 /* ?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 */
9427 /* ?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 */
9428 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get
, 8)
9429 basic_string_wchar
* __thiscall
basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar
*this, basic_string_wchar
*ret
)
9431 TRACE("(%p %p)\n", this, ret
);
9432 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
9435 static inline basic_ios_char
* basic_istringstream_char_to_basic_ios(basic_istringstream_char
*ptr
)
9437 return (basic_ios_char
*)((char*)ptr
+basic_istringstream_char_vbtable
[1]);
9440 static inline basic_istringstream_char
* basic_istringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9442 return (basic_istringstream_char
*)((char*)ptr
-basic_istringstream_char_vbtable
[1]);
9445 /* ??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 */
9446 /* ??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 */
9447 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str
, 16)
9448 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_str(basic_istringstream_char
*this,
9449 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9451 basic_ios_char
*basic_ios
;
9453 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9456 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9457 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9458 basic_ios_char_ctor(basic_ios
);
9460 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9463 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9464 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9465 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
9469 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9470 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9471 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode
, 12)
9472 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_mode(
9473 basic_istringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9475 basic_ios_char
*basic_ios
;
9477 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9480 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9481 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9482 basic_ios_char_ctor(basic_ios
);
9484 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9487 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9488 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9489 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
9493 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9494 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9495 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor
, 8)
9496 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor(
9497 basic_istringstream_char
*this, MSVCP_bool virt_init
)
9499 return basic_istringstream_char_ctor_mode(this, 0, virt_init
);
9502 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9503 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9504 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor
, 4)
9505 void __thiscall
basic_istringstream_char_dtor(basic_ios_char
*base
)
9507 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9509 TRACE("(%p)\n", this);
9511 basic_stringbuf_char_dtor(&this->strbuf
);
9512 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
9515 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9516 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9517 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor
, 4)
9518 void __thiscall
basic_istringstream_char_vbase_dtor(basic_istringstream_char
*this)
9520 TRACE("(%p)\n", this);
9522 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
9523 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
9526 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istringstream_char_vector_dtor
, 8)
9527 basic_istringstream_char
* __thiscall
MSVCP_basic_istringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9529 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9531 TRACE("(%p %x)\n", this, flags
);
9534 /* we have an array, with the number of elements stored before the first object */
9535 int i
, *ptr
= (int *)this-1;
9537 for(i
=*ptr
-1; i
>=0; i
--)
9538 basic_istringstream_char_vbase_dtor(this+i
);
9539 MSVCRT_operator_delete(ptr
);
9541 basic_istringstream_char_vbase_dtor(this);
9543 MSVCRT_operator_delete(this);
9549 /* ?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 */
9550 /* ?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 */
9551 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf
, 4)
9552 basic_stringbuf_char
* __thiscall
basic_istringstream_char_rdbuf(const basic_istringstream_char
*this)
9554 TRACE("(%p)\n", this);
9555 return (basic_stringbuf_char
*)&this->strbuf
;
9558 /* ?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 */
9559 /* ?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 */
9560 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set
, 8)
9561 void __thiscall
basic_istringstream_char_str_set(basic_istringstream_char
*this, const basic_string_char
*str
)
9563 TRACE("(%p %p)\n", this, str
);
9564 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9567 /* ?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 */
9568 /* ?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 */
9569 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get
, 8)
9570 basic_string_char
* __thiscall
basic_istringstream_char_str_get(const basic_istringstream_char
*this, basic_string_char
*ret
)
9572 TRACE("(%p %p)\n", this, ret
);
9573 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9576 static inline basic_ios_wchar
* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar
*ptr
)
9578 return (basic_ios_wchar
*)((char*)ptr
+basic_istringstream_wchar_vbtable
[1]);
9581 static inline basic_istringstream_wchar
* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9583 return (basic_istringstream_wchar
*)((char*)ptr
-basic_istringstream_wchar_vbtable
[1]);
9586 /* ??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 */
9587 /* ??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 */
9588 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str
, 16)
9589 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_str(basic_istringstream_wchar
*this,
9590 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9592 basic_ios_wchar
*basic_ios
;
9594 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9597 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
9598 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9599 basic_ios_wchar_ctor(basic_ios
);
9601 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9604 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9605 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9606 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
9610 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9611 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9612 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode
, 12)
9613 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_mode(
9614 basic_istringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9616 basic_ios_wchar
*basic_ios
;
9618 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9621 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
9622 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9623 basic_ios_wchar_ctor(basic_ios
);
9625 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9628 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9629 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9630 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
9634 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9635 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9636 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor
, 8)
9637 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor(
9638 basic_istringstream_wchar
*this, MSVCP_bool virt_init
)
9640 return basic_istringstream_wchar_ctor_mode(this, 0, virt_init
);
9643 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9644 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9645 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor
, 4)
9646 void __thiscall
basic_istringstream_wchar_dtor(basic_ios_wchar
*base
)
9648 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
9650 TRACE("(%p)\n", this);
9652 basic_stringbuf_wchar_dtor(&this->strbuf
);
9653 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base
));
9656 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9657 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9658 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor
, 4)
9659 void __thiscall
basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar
*this)
9661 TRACE("(%p)\n", this);
9663 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
9664 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base
));
9667 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istringstream_wchar_vector_dtor
, 8)
9668 basic_istringstream_wchar
* __thiscall
MSVCP_basic_istringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9670 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
9672 TRACE("(%p %x)\n", this, flags
);
9675 /* we have an array, with the number of elements stored before the first object */
9676 int i
, *ptr
= (int *)this-1;
9678 for(i
=*ptr
-1; i
>=0; i
--)
9679 basic_istringstream_wchar_vbase_dtor(this+i
);
9680 MSVCRT_operator_delete(ptr
);
9682 basic_istringstream_wchar_vbase_dtor(this);
9684 MSVCRT_operator_delete(this);
9690 /* ?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 */
9691 /* ?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 */
9692 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf
, 4)
9693 basic_stringbuf_wchar
* __thiscall
basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar
*this)
9695 TRACE("(%p)\n", this);
9696 return (basic_stringbuf_wchar
*)&this->strbuf
;
9699 /* ?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 */
9700 /* ?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 */
9701 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set
, 8)
9702 void __thiscall
basic_istringstream_wchar_str_set(basic_istringstream_wchar
*this, const basic_string_wchar
*str
)
9704 TRACE("(%p %p)\n", this, str
);
9705 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9708 /* ?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 */
9709 /* ?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 */
9710 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get
, 8)
9711 basic_string_wchar
* __thiscall
basic_istringstream_wchar_str_get(const basic_istringstream_wchar
*this, basic_string_wchar
*ret
)
9713 TRACE("(%p %p)\n", this, ret
);
9714 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
9717 static inline basic_ios_char
* basic_stringstream_char_to_basic_ios(basic_stringstream_char
*ptr
)
9719 return (basic_ios_char
*)((char*)ptr
+basic_stringstream_char_vbtable1
[1]);
9722 static inline basic_stringstream_char
* basic_stringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9724 return (basic_stringstream_char
*)((char*)ptr
-basic_stringstream_char_vbtable1
[1]);
9727 /* ??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 */
9728 /* ??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 */
9729 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str
, 16)
9730 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_str(basic_stringstream_char
*this,
9731 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9733 basic_ios_char
*basic_ios
;
9735 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9738 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
9739 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
9740 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9741 basic_ios_char_ctor(basic_ios
);
9743 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9746 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
);
9747 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9748 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
9752 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9753 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9754 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode
, 12)
9755 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_mode(
9756 basic_stringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9758 basic_ios_char
*basic_ios
;
9760 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9763 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
9764 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
9765 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9766 basic_ios_char_ctor(basic_ios
);
9768 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9771 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
);
9772 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9773 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
9777 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9778 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9779 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor
, 8)
9780 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor(
9781 basic_stringstream_char
*this, MSVCP_bool virt_init
)
9783 return basic_stringstream_char_ctor_mode(
9784 this, OPENMODE_out
|OPENMODE_in
, virt_init
);
9787 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9788 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9789 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor
, 4)
9790 void __thiscall
basic_stringstream_char_dtor(basic_ios_char
*base
)
9792 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
9794 TRACE("(%p)\n", this);
9796 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9797 basic_stringbuf_char_dtor(&this->strbuf
);
9800 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9801 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9802 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor
, 4)
9803 void __thiscall
basic_stringstream_char_vbase_dtor(basic_stringstream_char
*this)
9805 TRACE("(%p)\n", this);
9807 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
9808 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9811 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringstream_char_vector_dtor
, 8)
9812 basic_stringstream_char
* __thiscall
MSVCP_basic_stringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9814 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
9816 TRACE("(%p %x)\n", this, flags
);
9819 /* we have an array, with the number of elements stored before the first object */
9820 int i
, *ptr
= (int *)this-1;
9822 for(i
=*ptr
-1; i
>=0; i
--)
9823 basic_stringstream_char_vbase_dtor(this+i
);
9824 MSVCRT_operator_delete(ptr
);
9826 basic_stringstream_char_vbase_dtor(this);
9828 MSVCRT_operator_delete(this);
9834 /* ?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 */
9835 /* ?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 */
9836 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf
, 4)
9837 basic_stringbuf_char
* __thiscall
basic_stringstream_char_rdbuf(const basic_stringstream_char
*this)
9839 TRACE("(%p)\n", this);
9840 return (basic_stringbuf_char
*)&this->strbuf
;
9843 /* ?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 */
9844 /* ?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 */
9845 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set
, 8)
9846 void __thiscall
basic_stringstream_char_str_set(basic_stringstream_char
*this, const basic_string_char
*str
)
9848 TRACE("(%p %p)\n", this, str
);
9849 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9852 /* ?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 */
9853 /* ?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 */
9854 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get
, 8)
9855 basic_string_char
* __thiscall
basic_stringstream_char_str_get(const basic_stringstream_char
*this, basic_string_char
*ret
)
9857 TRACE("(%p %p)\n", this, ret
);
9858 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9861 static inline basic_ios_wchar
* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar
*ptr
)
9863 return (basic_ios_wchar
*)((char*)ptr
+basic_stringstream_wchar_vbtable1
[1]);
9866 static inline basic_stringstream_wchar
* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9868 return (basic_stringstream_wchar
*)((char*)ptr
-basic_stringstream_wchar_vbtable1
[1]);
9871 /* ??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 */
9872 /* ??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 */
9873 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str
, 16)
9874 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_str(basic_stringstream_wchar
*this,
9875 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9877 basic_ios_wchar
*basic_ios
;
9879 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9882 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
9883 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
9884 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9885 basic_ios_wchar_ctor(basic_ios
);
9887 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9890 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
);
9891 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9892 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
9896 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9897 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9898 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode
, 12)
9899 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_mode(
9900 basic_stringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9902 basic_ios_wchar
*basic_ios
;
9904 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9907 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
9908 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
9909 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9910 basic_ios_wchar_ctor(basic_ios
);
9912 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9915 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
);
9916 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9917 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
9921 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9922 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9923 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor
, 8)
9924 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor(
9925 basic_stringstream_wchar
*this, MSVCP_bool virt_init
)
9927 return basic_stringstream_wchar_ctor_mode(
9928 this, OPENMODE_out
|OPENMODE_in
, virt_init
);
9931 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9932 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9933 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor
, 4)
9934 void __thiscall
basic_stringstream_wchar_dtor(basic_ios_wchar
*base
)
9936 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
9938 TRACE("(%p)\n", this);
9940 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base
));
9941 basic_stringbuf_wchar_dtor(&this->strbuf
);
9944 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9945 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9946 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor
, 4)
9947 void __thiscall
basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar
*this)
9949 TRACE("(%p)\n", this);
9951 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
9952 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base
.base1
));
9955 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringstream_wchar_vector_dtor
, 8)
9956 basic_stringstream_wchar
* __thiscall
MSVCP_basic_stringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9958 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
9960 TRACE("(%p %x)\n", this, flags
);
9963 /* we have an array, with the number of elements stored before the first object */
9964 int i
, *ptr
= (int *)this-1;
9966 for(i
=*ptr
-1; i
>=0; i
--)
9967 basic_stringstream_wchar_vbase_dtor(this+i
);
9968 MSVCRT_operator_delete(ptr
);
9970 basic_stringstream_wchar_vbase_dtor(this);
9972 MSVCRT_operator_delete(this);
9978 /* ?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 */
9979 /* ?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 */
9980 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf
, 4)
9981 basic_stringbuf_wchar
* __thiscall
basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar
*this)
9983 TRACE("(%p)\n", this);
9984 return (basic_stringbuf_wchar
*)&this->strbuf
;
9987 /* ?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 */
9988 /* ?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 */
9989 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set
, 8)
9990 void __thiscall
basic_stringstream_wchar_str_set(basic_stringstream_wchar
*this, const basic_string_wchar
*str
)
9992 TRACE("(%p %p)\n", this, str
);
9993 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9996 /* ?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 */
9997 /* ?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 */
9998 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get
, 8)
9999 basic_string_wchar
* __thiscall
basic_stringstream_wchar_str_get(const basic_stringstream_wchar
*this, basic_string_wchar
*ret
)
10001 TRACE("(%p %p)\n", this, ret
);
10002 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
10005 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
10007 ios_base_precision_set(base
, prec
);
10010 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
10011 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10012 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
10014 TRACE("(%p %ld)\n", ret
, prec
);
10016 ret
->pfunc
= setprecision_func
;
10021 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
10023 ios_base_width_set(base
, width
);
10026 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
10027 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10028 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
10030 TRACE("(%p %ld)\n", ret
, width
);
10032 ret
->pfunc
= setw_func
;
10037 static basic_filebuf_char filebuf_stdin
;
10038 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
10040 basic_istream_char obj
;
10041 basic_ios_char vbase
;
10043 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
10044 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
10045 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
10047 static basic_filebuf_char filebuf_stdout
;
10048 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10050 basic_ostream_char obj
;
10051 basic_ios_char vbase
;
10052 } cout
= { { 0 } };
10053 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10054 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10055 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
10057 static basic_filebuf_char filebuf_stderr
;
10058 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10060 basic_ostream_char obj
;
10061 basic_ios_char vbase
;
10062 } cerr
= { { 0 } };
10063 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10064 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10065 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
10067 static basic_filebuf_char filebuf_log
;
10068 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10070 basic_ostream_char obj
;
10071 basic_ios_char vbase
;
10072 } clog
= { { 0 } };
10073 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10074 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10075 basic_ostream_char
*_Ptr_clog
= &clog
.obj
;
10079 basic_filebuf_char_ctor_file(&filebuf_stdin
, stdin
);
10080 basic_istream_char_ctor(&cin
.obj
, &filebuf_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
10082 basic_filebuf_char_ctor_file(&filebuf_stdout
, stdout
);
10083 basic_ostream_char_ctor(&cout
.obj
, &filebuf_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
10085 basic_filebuf_char_ctor_file(&filebuf_stderr
, stderr
);
10086 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
10088 basic_filebuf_char_ctor_file(&filebuf_log
, stderr
);
10089 basic_ostream_char_ctor(&clog
.obj
, &filebuf_log
.base
, FALSE
/*FIXME*/, TRUE
);
10094 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&cin
.obj
));
10095 basic_filebuf_char_dtor(&filebuf_stdin
);
10097 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cout
.obj
));
10098 basic_filebuf_char_dtor(&filebuf_stdout
);
10100 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cerr
.obj
));
10101 basic_filebuf_char_dtor(&filebuf_stderr
);
10103 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&clog
.obj
));
10104 basic_filebuf_char_dtor(&filebuf_log
);