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(msvcp90
);
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
;
790 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
792 for(copied
=0; copied
<count
&& size
;) {
793 chunk
= basic_streambuf_char__Gnavail(this);
794 if(chunk
> count
-copied
)
795 chunk
= count
-copied
;
798 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
799 *this->prpos
+= chunk
;
800 *this->prsize
-= chunk
;
803 }else if((ptr
[copied
] = call_basic_streambuf_char_uflow(this)) != EOF
) {
814 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
815 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
816 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Sgetn_s
, 16)
817 streamsize __thiscall
basic_streambuf_char__Sgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
819 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
820 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, size
, count
);
823 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
824 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
825 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock
, 4)
826 void __thiscall
basic_streambuf_char__Unlock(basic_streambuf_char
*this)
828 TRACE("(%p)\n", this);
829 mutex_unlock(&this->lock
);
832 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
833 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
834 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
835 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
837 TRACE("(%p)\n", this);
841 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
842 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
843 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
844 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
846 TRACE("(%p)\n", this);
850 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
851 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
852 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
853 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
855 TRACE("(%p)\n", this);
856 return *this->prpos
+*this->prsize
;
859 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
860 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
861 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
862 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
864 TRACE("(%p)\n", this);
865 return *this->pwpos
+*this->pwsize
;
868 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
869 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
870 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
871 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
873 TRACE("(%p %d)\n", this, off
);
875 *this->prsize
-= off
;
878 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
879 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
880 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
881 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
883 TRACE("(%p)\n", this);
884 return locale_copy_ctor(ret
, this->loc
);
887 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
888 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
889 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
890 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
891 void, (basic_streambuf_char*, const locale*), (this, loc))
892 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
894 TRACE("(%p %p)\n", this, loc
);
897 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
898 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
899 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
900 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
901 int, (basic_streambuf_char*, int), (this, ch))
902 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
904 TRACE("(%p %d)\n", this, ch
);
908 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
909 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
910 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
911 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
912 int, (basic_streambuf_char*, int), (this, ch))
913 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
915 TRACE("(%p %d)\n", this, ch
);
919 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
920 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
921 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
922 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
924 TRACE("(%p)\n", this);
928 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
929 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
930 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
931 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
933 TRACE("(%p %d)\n", this, off
);
935 *this->pwsize
-= off
;
938 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
939 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
940 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
941 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
943 TRACE("(%p)\n", this);
947 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
948 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
949 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
950 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
952 TRACE("(%p %p)\n", this, loc
);
953 memcpy(ret
, this->loc
, sizeof(locale
));
954 call_basic_streambuf_char_imbue(this, loc
);
955 locale_copy_ctor(this->loc
, loc
);
959 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
960 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
961 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 20)
962 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
963 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
964 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
965 fpos_int
*ret
, streamoff off
, int way
, int mode
)
967 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
974 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
975 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
976 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 20)
977 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
978 fpos_int
*ret
, streamoff off
, int way
, int mode
)
980 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
981 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
984 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
985 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
986 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 20)
987 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff_old(basic_streambuf_char
*this,
988 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
990 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
991 return basic_streambuf_char_pubseekoff(this, ret
, off
, way
, mode
);
994 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
995 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
996 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
997 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
998 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
999 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
1000 fpos_int
*ret
, fpos_int pos
, int mode
)
1002 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1009 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1010 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1011 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
1012 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
1013 fpos_int
*ret
, fpos_int pos
, int mode
)
1015 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1016 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
1019 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1020 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1021 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old
, 36)
1022 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos_old(basic_streambuf_char
*this,
1023 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1025 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1026 return basic_streambuf_char_pubseekpos(this, ret
, pos
, mode
);
1029 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1030 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1031 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 12)
1032 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1033 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1034 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1036 TRACE("(%p %p %ld)\n", this, buf
, count
);
1040 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1041 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1042 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 12)
1043 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
1045 TRACE("(%p %p %ld)\n", this, buf
, count
);
1046 return call_basic_streambuf_char_setbuf(this, buf
, count
);
1049 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1050 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1051 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
1052 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
1053 int, (basic_streambuf_char*), (this))
1054 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
1056 TRACE("(%p)\n", this);
1060 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1061 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1062 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
1063 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
1065 TRACE("(%p)\n", this);
1066 return call_basic_streambuf_char_sync(this);
1069 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1070 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1071 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 12)
1072 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1074 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1075 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1078 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1079 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1080 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
1081 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1082 streamsize, (basic_streambuf_char*), (this))
1083 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
1085 TRACE("(%p)\n", this);
1089 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1090 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1091 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
1092 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
1096 TRACE("(%p)\n", this);
1098 ret
= basic_streambuf_char__Gnavail(this);
1099 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
1102 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1103 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1104 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
1105 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
1107 TRACE("(%p %d)\n", this, ch
);
1108 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1114 return call_basic_streambuf_char_pbackfail(this, ch
);
1117 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1118 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1119 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
1120 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
1122 TRACE("(%p %d)\n", this, ch
);
1123 return basic_streambuf_char__Pnavail(this) ?
1124 (*basic_streambuf_char__Pninc(this) = ch
) :
1125 call_basic_streambuf_char_overflow(this, ch
);
1128 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1129 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1130 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
1131 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
1133 TRACE("(%p)\n", this);
1134 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1137 return **this->prpos
;
1140 return call_basic_streambuf_char_pbackfail(this, EOF
);
1143 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1144 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1145 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1146 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1148 TRACE("(%p)\n", this);
1149 if(basic_streambuf_char__Gnavail(this))
1150 basic_streambuf_char__Gninc(this);
1152 call_basic_streambuf_char_uflow(this);
1155 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1156 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1157 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1158 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1160 TRACE("(%p)\n", this);
1161 return basic_streambuf_char__Gnavail(this) ?
1162 *basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1165 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1166 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1167 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1168 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1170 TRACE("(%p)\n", this);
1171 return basic_streambuf_char__Gnavail(this) ?
1172 *basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1175 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1176 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1177 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1178 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1180 TRACE("(%p)\n", this);
1182 if(basic_streambuf_char__Gnavail(this) > 1)
1183 return *basic_streambuf_char__Gnpreinc(this);
1184 return basic_streambuf_char_sbumpc(this)==EOF
?
1185 EOF
: basic_streambuf_char_sgetc(this);
1188 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1189 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1190 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 12)
1191 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1192 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1193 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1195 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1196 return call_basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1199 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1200 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1201 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 12)
1202 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1203 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1204 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1206 streamsize copied
, chunk
;
1208 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1210 for(copied
=0; copied
<count
;) {
1211 chunk
= basic_streambuf_char__Pnavail(this);
1212 if(chunk
> count
-copied
)
1213 chunk
= count
-copied
;
1216 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1217 *this->pwpos
+= chunk
;
1218 *this->pwsize
-= chunk
;
1220 }else if(call_basic_streambuf_char_overflow(this, ptr
[copied
]) != EOF
) {
1230 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1231 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1232 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 12)
1233 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1235 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1236 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
1239 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1240 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1241 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1242 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1243 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1244 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1246 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1250 this->wsize
= last
-next
;
1253 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1254 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1255 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1256 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1257 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1258 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1260 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1263 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1264 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1265 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1266 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1267 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1268 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1270 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1274 this->rsize
= last
-next
;
1277 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1278 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1279 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1280 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1281 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1282 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1284 TRACE("(%p)\n", this);
1286 this->prbuf
= &this->rbuf
;
1287 this->pwbuf
= &this->wbuf
;
1288 this->prpos
= &this->rpos
;
1289 this->pwpos
= &this->wpos
;
1290 this->prsize
= &this->rsize
;
1291 this->pwsize
= &this->wsize
;
1293 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1294 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1297 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1298 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1299 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized
, 8)
1300 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1302 TRACE("(%p %d)\n", this, uninitialized
);
1303 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1304 mutex_ctor(&this->lock
);
1308 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1309 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1310 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1311 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1313 TRACE("(%p %d)\n", this, uninitialized
);
1314 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized
);
1315 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1319 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1320 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1321 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor
, 4)
1322 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor(basic_streambuf_wchar
*this)
1324 TRACE("(%p)\n", this);
1326 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1327 mutex_ctor(&this->lock
);
1328 this->loc
= MSVCRT_operator_new(sizeof(locale
));
1329 locale_ctor(this->loc
);
1330 basic_streambuf_wchar__Init_empty(this);
1335 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1336 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1337 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1338 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1340 TRACE("(%p)\n", this);
1341 basic_streambuf_wchar_ctor(this);
1342 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1346 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1347 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1348 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1349 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1350 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1351 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1353 TRACE("(%p)\n", this);
1355 mutex_dtor(&this->lock
);
1356 locale_dtor(this->loc
);
1357 MSVCRT_operator_delete(this->loc
);
1360 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_wchar_vector_dtor
, 8)
1361 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1363 TRACE("(%p %x)\n", this, flags
);
1365 /* we have an array, with the number of elements stored before the first object */
1366 int i
, *ptr
= (int *)this-1;
1368 for(i
=*ptr
-1; i
>=0; i
--)
1369 basic_streambuf_wchar_dtor(this+i
);
1370 MSVCRT_operator_delete(ptr
);
1372 basic_streambuf_wchar_dtor(this);
1374 MSVCRT_operator_delete(this);
1380 DEFINE_THISCALL_WRAPPER(MSVCP_basic_streambuf_short_vector_dtor
, 8)
1381 basic_streambuf_wchar
* __thiscall
MSVCP_basic_streambuf_short_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1383 TRACE("(%p %x)\n", this, flags
);
1384 return MSVCP_basic_streambuf_wchar_vector_dtor(this, flags
);
1387 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1388 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1389 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1390 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1391 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail
, 4)
1392 streamsize __thiscall
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1394 TRACE("(%p)\n", this);
1395 return *this->prpos
? *this->prsize
: 0;
1398 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1399 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1400 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1401 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1402 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1403 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1405 TRACE("(%p)\n", this);
1408 return *this->prpos
;
1411 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1412 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1413 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1414 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1415 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1416 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1418 TRACE("(%p)\n", this);
1420 return (*this->prpos
)++;
1423 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1424 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1425 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1426 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1427 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc
, 4)
1428 wchar_t* __thiscall
basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1430 TRACE("(%p)\n", this);
1433 return *this->prpos
;
1436 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1437 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1438 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1439 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1440 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1441 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
)
1443 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1453 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1454 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1455 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1456 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1457 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock
, 4)
1458 void __thiscall
basic_streambuf_wchar__Lock(basic_streambuf_wchar
*this)
1460 TRACE("(%p)\n", this);
1461 mutex_lock(&this->lock
);
1464 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1465 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1466 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1467 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1468 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail
, 4)
1469 streamsize __thiscall
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1471 TRACE("(%p)\n", this);
1472 return *this->pwpos
? *this->pwsize
: 0;
1475 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1476 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1477 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1478 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1479 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1480 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1482 TRACE("(%p)\n", this);
1484 return (*this->pwpos
)++;
1487 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1488 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1489 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1490 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1491 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1492 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1493 unsigned short, (basic_streambuf_wchar*), (this))
1494 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1496 TRACE("(%p)\n", this);
1500 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1501 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1502 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1503 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1504 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1505 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1506 unsigned short, (basic_streambuf_wchar*), (this))
1507 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1511 TRACE("(%p)\n", this);
1513 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1516 ret
= **this->prpos
;
1522 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1523 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1524 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1525 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1526 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Xsgetn_s
, 16)
1527 #define call_basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count) CALL_VTBL_FUNC(this, 28, \
1528 streamsize, (basic_streambuf_wchar*, wchar_t*, MSVCP_size_t, streamsize), (this, ptr, size, count))
1529 streamsize __thiscall
basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1531 streamsize copied
, chunk
;
1533 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1535 for(copied
=0; copied
<count
&& size
;) {
1536 chunk
= basic_streambuf_wchar__Gnavail(this);
1537 if(chunk
> count
-copied
)
1538 chunk
= count
-copied
;
1541 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
1542 *this->prpos
+= chunk
;
1543 *this->prsize
-= chunk
;
1546 }else if((ptr
[copied
] = call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1557 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1558 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1559 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1560 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1561 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Sgetn_s
, 16)
1562 streamsize __thiscall
basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1564 TRACE("(%p %p %lu %ld)\n", this, ptr
, size
, count
);
1565 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, size
, count
);
1568 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1569 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1570 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1571 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1572 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock
, 4)
1573 void __thiscall
basic_streambuf_wchar__Unlock(basic_streambuf_wchar
*this)
1575 TRACE("(%p)\n", this);
1576 mutex_unlock(&this->lock
);
1579 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1580 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1581 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1582 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1583 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1584 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1586 TRACE("(%p)\n", this);
1587 return *this->prbuf
;
1590 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1591 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1592 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1593 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1594 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1595 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1597 TRACE("(%p)\n", this);
1598 return *this->prpos
;
1601 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1602 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1603 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1604 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1605 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1606 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1608 TRACE("(%p)\n", this);
1609 return *this->prpos
+*this->prsize
;
1612 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1613 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1614 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1615 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1616 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1617 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1619 TRACE("(%p)\n", this);
1620 return *this->pwpos
+*this->pwsize
;
1623 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1624 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1625 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1626 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1627 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1628 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1630 TRACE("(%p %d)\n", this, off
);
1631 *this->prpos
+= off
;
1632 *this->prsize
-= off
;
1635 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1636 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1637 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1638 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1639 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc
, 8)
1640 locale
* __thiscall
basic_streambuf_wchar_getloc(const basic_streambuf_wchar
*this, locale
*ret
)
1642 TRACE("(%p)\n", this);
1643 return locale_copy_ctor(ret
, this->loc
);
1646 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1647 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1648 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1649 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1650 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1651 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
1652 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1653 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1655 TRACE("(%p %p)\n", this, loc
);
1658 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1659 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1660 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1661 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1662 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1663 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1664 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1665 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1667 TRACE("(%p %d)\n", this, ch
);
1671 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1672 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1673 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1674 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1675 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1676 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1677 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1678 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1680 TRACE("(%p %d)\n", this, ch
);
1684 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1685 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1686 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1687 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1688 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1689 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1691 TRACE("(%p)\n", this);
1692 return *this->pwbuf
;
1695 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1696 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1697 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1698 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1699 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1700 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1702 TRACE("(%p %d)\n", this, off
);
1703 *this->pwpos
+= off
;
1704 *this->pwsize
-= off
;
1707 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1708 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1709 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1710 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1711 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1712 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1714 TRACE("(%p)\n", this);
1715 return *this->pwpos
;
1718 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1719 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1720 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1721 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1722 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1723 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1725 TRACE("(%p %p)\n", this, loc
);
1726 memcpy(ret
, this->loc
, sizeof(locale
));
1727 call_basic_streambuf_wchar_imbue(this, loc
);
1728 locale_copy_ctor(this->loc
, loc
);
1732 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1733 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1734 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1735 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1736 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 20)
1737 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
1738 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1739 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1740 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1742 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1749 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1750 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1751 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1752 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1753 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 20)
1754 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1755 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1757 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1758 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1761 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1762 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1763 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1764 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1765 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 20)
1766 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
*this,
1767 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
1769 TRACE("(%p %ld %d %d)\n", this, off
, way
, mode
);
1770 return basic_streambuf_wchar_pubseekoff(this, ret
, off
, way
, mode
);
1773 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1774 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1775 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1776 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1777 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1778 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
1779 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1780 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1781 fpos_int
*ret
, fpos_int pos
, int mode
)
1783 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1790 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1791 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1792 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1793 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1794 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1795 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1796 fpos_int
*ret
, fpos_int pos
, int mode
)
1798 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1799 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1802 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1803 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1804 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1805 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1806 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old
, 36)
1807 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar
*this,
1808 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1810 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1811 return basic_streambuf_wchar_pubseekpos(this, ret
, pos
, mode
);
1814 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1815 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1816 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1817 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1818 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 12)
1819 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
1820 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1821 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1823 TRACE("(%p %p %ld)\n", this, buf
, count
);
1827 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1828 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1829 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1830 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1831 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 12)
1832 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1834 TRACE("(%p %p %ld)\n", this, buf
, count
);
1835 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1838 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1839 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1840 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1841 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1842 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1843 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 48, \
1844 int, (basic_streambuf_wchar*), (this))
1845 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1847 TRACE("(%p)\n", this);
1851 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1852 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1853 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1854 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1855 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1856 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1858 TRACE("(%p)\n", this);
1859 return call_basic_streambuf_wchar_sync(this);
1862 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1863 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1864 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1865 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1866 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 12)
1867 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1869 TRACE("(%p %p %ld)\n", this, ptr
, count
);
1870 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1873 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1874 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1875 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1876 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1877 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1878 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1879 streamsize, (basic_streambuf_wchar*), (this))
1880 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1882 TRACE("(%p)\n", this);
1886 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1887 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1888 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1889 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1890 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1891 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1895 TRACE("(%p)\n", this);
1897 ret
= basic_streambuf_wchar__Gnavail(this);
1898 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1901 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1902 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1903 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1904 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1905 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1906 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1908 TRACE("(%p %d)\n", this, ch
);
1909 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1915 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1918 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1919 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1920 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1921 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1922 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1923 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1925 TRACE("(%p %d)\n", this, ch
);
1926 return basic_streambuf_wchar__Pnavail(this) ?
1927 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1928 call_basic_streambuf_wchar_overflow(this, ch
);
1931 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1932 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1933 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1934 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1935 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1936 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1938 TRACE("(%p)\n", this);
1939 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1942 return **this->prpos
;
1945 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1948 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1949 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1950 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1951 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1952 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1953 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1955 TRACE("(%p)\n", this);
1956 if(basic_streambuf_wchar__Gnavail(this))
1957 basic_streambuf_wchar__Gninc(this);
1959 call_basic_streambuf_wchar_uflow(this);
1962 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1963 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1964 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1965 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1966 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1967 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1969 TRACE("(%p)\n", this);
1970 return basic_streambuf_wchar__Gnavail(this) ?
1971 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1974 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1975 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1976 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1977 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1978 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1979 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1981 TRACE("(%p)\n", this);
1982 return basic_streambuf_wchar__Gnavail(this) ?
1983 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1986 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1987 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1988 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1989 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1990 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1991 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1993 TRACE("(%p)\n", this);
1995 if(basic_streambuf_wchar__Gnavail(this) > 1)
1996 return *basic_streambuf_wchar__Gnpreinc(this);
1997 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
1998 WEOF
: basic_streambuf_wchar_sgetc(this);
2001 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2002 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2003 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2004 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2005 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 12)
2006 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2007 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2008 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
2010 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2011 return call_basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
2014 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2015 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2016 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2017 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2018 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 12)
2019 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
2020 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2021 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2023 streamsize copied
, chunk
;
2025 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2027 for(copied
=0; copied
<count
;) {
2028 chunk
= basic_streambuf_wchar__Pnavail(this);
2029 if(chunk
> count
-copied
)
2030 chunk
= count
-copied
;
2033 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
2034 *this->pwpos
+= chunk
;
2035 *this->pwsize
-= chunk
;
2037 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
2047 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2048 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2049 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2050 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2051 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 12)
2052 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
2054 TRACE("(%p %p %ld)\n", this, ptr
, count
);
2055 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
2058 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2059 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2060 int basic_filebuf_char__Init__Stinit
= 0;
2062 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2063 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2064 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init
, 12)
2065 void __thiscall
basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
2067 TRACE("(%p %p %d)\n", this, file
, which
);
2070 this->wrotesome
= FALSE
;
2071 this->state
= basic_filebuf_char__Init__Stinit
;
2072 this->close
= (which
== INITFL_open
);
2075 basic_streambuf_char__Init_empty(&this->base
);
2077 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
2078 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
2081 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
2082 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
2083 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt
, 8)
2084 void __thiscall
basic_filebuf_char__Initcvt(basic_filebuf_char
*this, codecvt_char
*cvt
)
2086 TRACE("(%p %p)\n", this, cvt
);
2088 if(codecvt_base_always_noconv(&cvt
->base
)) {
2091 basic_streambuf_char__Init_empty(&this->base
);
2096 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
2097 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
2098 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Endwrite
, 4)
2099 MSVCP_bool __thiscall
basic_filebuf_char__Endwrite(basic_filebuf_char
*this)
2101 TRACE("(%p)\n", this);
2103 if(!this->wrotesome
|| !this->cvt
)
2107 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2111 /* TODO: check if we need a dynamic buffer here */
2116 ret
= codecvt_char_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
2119 this->wrotesome
= FALSE
;
2121 case CODECVT_partial
:
2122 if(!fwrite(buf
, next
-buf
, 1, this->file
))
2127 case CODECVT_noconv
:
2128 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2137 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2138 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2139 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close
, 4)
2140 basic_filebuf_char
* __thiscall
basic_filebuf_char_close(basic_filebuf_char
*this)
2142 basic_filebuf_char
*ret
= this;
2144 TRACE("(%p)\n", this);
2149 /* TODO: handle exceptions */
2150 if(!basic_filebuf_char__Endwrite(this))
2152 if(!fclose(this->file
))
2155 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
2159 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2160 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2161 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file
, 8)
2162 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
2164 TRACE("(%p %p)\n", this, file
);
2166 basic_streambuf_char_ctor(&this->base
);
2167 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
2169 basic_filebuf_char__Init(this, file
, INITFL_new
);
2173 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2174 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2175 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor
, 4)
2176 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor(basic_filebuf_char
*this)
2178 return basic_filebuf_char_ctor_file(this, NULL
);
2181 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2182 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2183 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized
, 8)
2184 basic_filebuf_char
* __thiscall
basic_filebuf_char_ctor_uninitialized(basic_filebuf_char
*this, int uninitialized
)
2186 TRACE("(%p %d)\n", this, uninitialized
);
2188 basic_streambuf_char_ctor(&this->base
);
2189 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
2193 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2194 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2195 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor
, 4)
2196 void __thiscall
basic_filebuf_char_dtor(basic_filebuf_char
*this)
2198 TRACE("(%p)\n", this);
2201 basic_filebuf_char_close(this);
2202 basic_streambuf_char_dtor(&this->base
);
2205 DEFINE_THISCALL_WRAPPER(MSVCP_basic_filebuf_char_vector_dtor
, 8)
2206 basic_filebuf_char
* __thiscall
MSVCP_basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
2208 TRACE("(%p %x)\n", this, flags
);
2210 /* we have an array, with the number of elements stored before the first object */
2211 int i
, *ptr
= (int *)this-1;
2213 for(i
=*ptr
-1; i
>=0; i
--)
2214 basic_filebuf_char_dtor(this+i
);
2215 MSVCRT_operator_delete(ptr
);
2217 basic_filebuf_char_dtor(this);
2219 MSVCRT_operator_delete(this);
2225 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2226 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2227 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open
, 4)
2228 MSVCP_bool __thiscall
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
2230 TRACE("(%p)\n", this);
2231 return this->file
!= NULL
;
2234 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2235 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2236 FILE* __cdecl
_Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
2238 static const wchar_t rW
[] = {'r',0};
2239 static const struct {
2241 const wchar_t str
[4];
2242 const wchar_t str_bin
[4];
2244 {OPENMODE_out
, {'w',0}, {'w','b',0}},
2245 {OPENMODE_out
|OPENMODE_app
, {'a',0}, {'a','b',0}},
2246 {OPENMODE_app
, {'a',0}, {'a','b',0}},
2247 {OPENMODE_out
|OPENMODE_trunc
, {'w',0}, {'w','b',0}},
2248 {OPENMODE_in
, {'r',0}, {'r','b',0}},
2249 {OPENMODE_in
|OPENMODE_out
, {'r','+',0}, {'r','+','b',0}},
2250 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, {'w','+',0}, {'w','+','b',0}},
2251 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}},
2252 {OPENMODE_in
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}}
2255 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2259 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
2261 for(mode_idx
=0; mode_idx
<sizeof(str_mode
)/sizeof(str_mode
[0]); mode_idx
++)
2262 if(str_mode
[mode_idx
].mode
== real_mode
)
2264 if(mode_idx
== sizeof(str_mode
)/sizeof(str_mode
[0]))
2267 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, rW
)))
2272 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2273 && (f
= _wfopen(name
, rW
))) {
2278 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2279 : str_mode
[mode_idx
].str
, prot
);
2283 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2291 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2292 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2293 FILE* __cdecl
_Fiopen(const char *name
, int mode
, int prot
)
2295 wchar_t nameW
[FILENAME_MAX
];
2297 TRACE("(%s %d %d)\n", name
, mode
, prot
);
2299 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2301 return _Fiopen_wchar(nameW
, mode
, prot
);
2304 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2305 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2306 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2307 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2308 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar
, 16)
2309 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar(basic_filebuf_char
*this, const wchar_t *name
, int mode
, int prot
)
2313 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
2315 if(basic_filebuf_char_is_open(this))
2318 if(!(f
= _Fiopen_wchar(name
, mode
, prot
)))
2321 basic_filebuf_char__Init(this, f
, INITFL_open
);
2322 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(this->base
.loc
));
2326 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WI@Z */
2327 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WI@Z */
2328 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGI@Z */
2329 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGI@Z */
2330 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_wchar_mode
, 12)
2331 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_wchar_mode(basic_filebuf_char
*this, const wchar_t *name
, unsigned int mode
)
2333 return basic_filebuf_char_open_wchar(this, name
, mode
, SH_DENYNO
);
2336 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2337 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2338 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open
, 16)
2339 basic_filebuf_char
* __thiscall
basic_filebuf_char_open(basic_filebuf_char
*this, const char *name
, int mode
, int prot
)
2341 wchar_t nameW
[FILENAME_MAX
];
2343 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
2345 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2347 return basic_filebuf_char_open_wchar(this, nameW
, mode
, prot
);
2350 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDI@Z */
2351 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDI@Z */
2352 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode
, 12)
2353 basic_filebuf_char
* __thiscall
basic_filebuf_char_open_mode(basic_filebuf_char
*this, const char *name
, unsigned int mode
)
2355 return basic_filebuf_char_open(this, name
, mode
, SH_DENYNO
);
2358 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2359 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2360 #define call_basic_filebuf_char_overflow(this, c) CALL_VTBL_FUNC(this, 4, \
2361 int, (basic_filebuf_char*, int), (this, c))
2362 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2363 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2365 char buf
[8], *dyn_buf
;
2366 char ch
= c
, *to_next
;
2367 const char *from_next
;
2371 TRACE("(%p %d)\n", this, c
);
2373 if(!basic_filebuf_char_is_open(this))
2379 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2383 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2384 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2387 case CODECVT_partial
:
2392 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2394 if(ret
== CODECVT_partial
)
2397 case CODECVT_noconv
:
2398 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2404 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2405 dyn_buf
= malloc(max_size
);
2409 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2410 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2414 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2416 return ret
? c
: EOF
;
2417 case CODECVT_partial
:
2418 ERR("buffer should be big enough to store all output\n");
2426 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2427 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2428 #define call_basic_filebuf_char_pbackfail(this, c) CALL_VTBL_FUNC(this, 8, \
2429 int, (basic_filebuf_char*, int), (this, c))
2430 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2431 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2433 TRACE("(%p %d)\n", this, c
);
2435 if(!basic_filebuf_char_is_open(this))
2438 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2439 && (c
==EOF
|| basic_streambuf_char_gptr(&this->base
)[-1]==(char)c
)) {
2440 basic_streambuf_char__Gndec(&this->base
);
2441 return c
==EOF
? !c
: c
;
2442 }else if(c
!=EOF
&& !this->cvt
) {
2443 return ungetc(c
, this->file
);
2449 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2450 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2451 #define call_basic_filebuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
2452 int, (basic_filebuf_char*), (this))
2453 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2454 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2456 char ch
, buf
[128], *to_next
;
2457 const char *buf_next
;
2460 TRACE("(%p)\n", this);
2462 if(!basic_filebuf_char_is_open(this))
2465 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2466 return *basic_streambuf_char__Gninc(&this->base
);
2468 c
= fgetc(this->file
);
2469 if(!this->cvt
|| !c
)
2473 for(i
=0; i
< sizeof(buf
)/sizeof(char); i
++) {
2476 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
2477 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2478 case CODECVT_partial
:
2480 if(to_next
== &ch
) {
2481 c
= fgetc(this->file
);
2487 for(i
--; i
>=buf_next
-buf
; i
--)
2488 ungetc(buf
[i
], this->file
);
2490 case CODECVT_noconv
:
2497 FIXME("buffer is too small\n");
2501 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2502 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2503 #define call_basic_filebuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
2504 int, (basic_filebuf_char*), (this))
2505 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2506 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2510 TRACE("(%p)\n", this);
2512 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2513 return *basic_streambuf_char_gptr(&this->base
);
2515 ret
= call_basic_filebuf_char_uflow(this);
2517 ret
= call_basic_filebuf_char_pbackfail(this, ret
);
2521 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2522 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2523 #define call_basic_filebuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 36, \
2524 fpos_int*, (basic_filebuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2525 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 20)
2526 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2527 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2531 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
2533 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2534 || fseek(this->file
, off
, way
)) {
2541 fgetpos(this->file
, &pos
);
2544 ret
->state
= this->state
;
2548 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2549 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2550 #define call_basic_filebuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 40, \
2551 fpos_int*, (basic_filebuf_char*, fpos_int*, fpos_int, mode), (this, ret, pos, mode))
2552 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2553 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2554 fpos_int
*ret
, fpos_int pos
, int mode
)
2558 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2560 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2561 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2562 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2569 fgetpos(this->file
, &fpos
);
2572 ret
->state
= this->state
;
2576 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2577 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2578 #define call_basic_filebuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 44, \
2579 basic_streambuf_char*, (basic_filebuf_char*, char*, streamsize), (this, buf, count))
2580 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 12)
2581 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2583 TRACE("(%p %p %ld)\n", this, buf
, count
);
2585 if(!basic_filebuf_char_is_open(this))
2588 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2591 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2595 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2596 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2597 #define call_basic_filebuf_char_sync(this) CALL_VTBL_FUNC(this, 48, \
2598 int, (basic_filebuf_char*), (this))
2599 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2600 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2602 TRACE("(%p)\n", this);
2604 if(!basic_filebuf_char_is_open(this))
2607 if(call_basic_filebuf_char_overflow(this, EOF
) == EOF
)
2609 return fflush(this->file
);
2612 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2613 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2614 #define call_basic_filebuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 52, \
2615 void, (basic_filebuf_char*, const locale*), (this, loc))
2616 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
2617 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
2619 TRACE("(%p %p)\n", this, loc
);
2620 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc
));
2623 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
2624 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
2625 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate
, 8)
2626 int __thiscall
basic_stringbuf_char__Getstate(basic_stringbuf_char
*this, IOSB_openmode mode
)
2630 if(!(mode
& OPENMODE_in
))
2631 state
|= STRINGBUF_no_read
;
2633 if(!(mode
& OPENMODE_out
))
2634 state
|= STRINGBUF_no_write
;
2636 if(mode
& OPENMODE_ate
)
2637 state
|= STRINGBUF_at_end
;
2639 if(mode
& OPENMODE_app
)
2640 state
|= STRINGBUF_append
;
2645 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
2646 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
2647 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init
, 16)
2648 void __thiscall
basic_stringbuf_char__Init(basic_stringbuf_char
*this, const char *str
, MSVCP_size_t count
, int state
)
2650 TRACE("(%p, %p, %ld, %d)\n", this, str
, count
, state
);
2652 basic_streambuf_char__Init_empty(&this->base
);
2654 this->state
= state
;
2655 this->seekhigh
= NULL
;
2658 char *buf
= MSVCRT_operator_new(count
);
2660 ERR("Out of memory\n");
2661 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2664 memcpy(buf
, str
, count
);
2665 this->seekhigh
= buf
+ count
;
2667 this->state
|= STRINGBUF_allocated
;
2669 if(!(state
& STRINGBUF_no_read
))
2670 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+ count
);
2672 if(!(state
& STRINGBUF_no_write
)) {
2673 basic_streambuf_char_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
2675 if(!basic_streambuf_char_gptr(&this->base
))
2676 basic_streambuf_char_setg(&this->base
, buf
, 0, buf
);
2681 /* ??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 */
2682 /* ??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 */
2683 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str
, 12)
2684 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_str(basic_stringbuf_char
*this,
2685 const basic_string_char
*str
, IOSB_openmode mode
)
2687 TRACE("(%p %p %d)\n", this, str
, mode
);
2689 basic_streambuf_char_ctor(&this->base
);
2690 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
2692 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
),
2693 str
->size
, basic_stringbuf_char__Getstate(this, mode
));
2697 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
2698 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
2699 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode
, 8)
2700 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor_mode(
2701 basic_stringbuf_char
*this, IOSB_openmode mode
)
2703 TRACE("(%p %d)\n", this, mode
);
2705 basic_streambuf_char_ctor(&this->base
);
2706 this->base
.vtable
= &MSVCP_basic_stringbuf_char_vtable
;
2708 basic_stringbuf_char__Init(this, NULL
, 0, basic_stringbuf_char__Getstate(this, mode
));
2712 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
2713 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
2714 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor
, 4)
2715 basic_stringbuf_char
* __thiscall
basic_stringbuf_char_ctor(basic_stringbuf_char
*this)
2717 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
2720 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
2721 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
2722 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy
, 4)
2723 void __thiscall
basic_stringbuf_char__Tidy(basic_stringbuf_char
*this)
2725 TRACE("(%p)\n", this);
2727 if(this->state
& STRINGBUF_allocated
) {
2728 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base
));
2729 this->seekhigh
= NULL
;
2730 this->state
&= ~STRINGBUF_allocated
;
2733 basic_streambuf_char__Init_empty(&this->base
);
2736 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
2737 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
2738 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor
, 4)
2739 void __thiscall
basic_stringbuf_char_dtor(basic_stringbuf_char
*this)
2741 TRACE("(%p)\n", this);
2743 basic_stringbuf_char__Tidy(this);
2744 basic_streambuf_char_dtor(&this->base
);
2747 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_char_vector_dtor
, 8)
2748 basic_stringbuf_char
* __thiscall
MSVCP_basic_stringbuf_char_vector_dtor(basic_stringbuf_char
*this, unsigned int flags
)
2750 TRACE("(%p %x)\n", this, flags
);
2753 /* we have an array, with the number of elements stored before the first object */
2754 int i
, *ptr
= (int *) this - 1;
2756 for (i
= *ptr
- 1; i
>= 0; i
--)
2757 basic_stringbuf_char_dtor(this+i
);
2759 MSVCRT_operator_delete(ptr
);
2761 basic_stringbuf_char_dtor(this);
2764 MSVCRT_operator_delete(this);
2770 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2771 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2772 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow
, 8)
2773 int __thiscall
basic_stringbuf_char_overflow(basic_stringbuf_char
*this, int meta
)
2775 MSVCP_size_t oldsize
, size
;
2778 TRACE("(%p %x)\n", this, meta
);
2782 if(this->state
& STRINGBUF_no_write
)
2785 ptr
= basic_streambuf_char_pptr(&this->base
);
2786 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
2787 basic_streambuf_char_setp_next(&this->base
, basic_streambuf_char_pbase(&this->base
),
2788 this->seekhigh
, basic_streambuf_char_epptr(&this->base
));
2790 if(ptr
&& ptr
<basic_streambuf_char_epptr(&this->base
))
2791 return (*basic_streambuf_char__Pninc(&this->base
) = meta
);
2793 oldsize
= (ptr
? basic_streambuf_char_epptr(&this->base
)-basic_streambuf_char_eback(&this->base
): 0);
2796 buf
= MSVCRT_operator_new(size
);
2798 ERR("Out of memory\n");
2799 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2803 this->seekhigh
= buf
;
2804 basic_streambuf_char_setp(&this->base
, buf
, buf
+size
);
2805 if(this->state
& STRINGBUF_no_read
)
2806 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2808 basic_streambuf_char_setg(&this->base
, buf
, buf
, buf
+1);
2810 this->state
|= STRINGBUF_allocated
;
2812 ptr
= basic_streambuf_char_eback(&this->base
);
2813 memcpy(buf
, ptr
, oldsize
);
2815 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
2816 basic_streambuf_char_setp_next(&this->base
, buf
,
2817 buf
+(basic_streambuf_char_pptr(&this->base
)-ptr
), buf
+size
);
2818 if(this->state
& STRINGBUF_no_read
)
2819 basic_streambuf_char_setg(&this->base
, buf
, NULL
, buf
);
2821 basic_streambuf_char_setg(&this->base
, buf
,
2822 buf
+(basic_streambuf_char_gptr(&this->base
)-ptr
),
2823 basic_streambuf_char_pptr(&this->base
)+1);
2825 MSVCRT_operator_delete(ptr
);
2828 return (*basic_streambuf_char__Pninc(&this->base
) = meta
);
2831 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
2832 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
2833 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail
, 8)
2834 int __thiscall
basic_stringbuf_char_pbackfail(basic_stringbuf_char
*this, int c
)
2838 TRACE("(%p %x)\n", this, c
);
2840 cur
= basic_streambuf_char_gptr(&this->base
);
2841 if(!cur
|| cur
==basic_streambuf_char_eback(&this->base
)
2842 || (c
!=EOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
2847 basic_streambuf_char_gbump(&this->base
, -1);
2848 return c
==EOF
? !EOF
: c
;
2851 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
2852 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
2853 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow
, 4)
2854 int __thiscall
basic_stringbuf_char_underflow(basic_stringbuf_char
*this)
2858 TRACE("(%p)\n", this);
2860 cur
= basic_streambuf_char_gptr(&this->base
);
2861 if(!cur
|| this->state
&STRINGBUF_no_read
)
2864 ptr
= basic_streambuf_char_pptr(&this->base
);
2865 if(this->seekhigh
< ptr
)
2866 this->seekhigh
= ptr
;
2868 ptr
= basic_streambuf_char_egptr(&this->base
);
2869 if(this->seekhigh
> ptr
)
2870 basic_streambuf_char_setg(&this->base
, basic_streambuf_char_eback(&this->base
), cur
, this->seekhigh
);
2872 if(cur
< this->seekhigh
)
2877 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2878 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2879 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff
, 20)
2880 fpos_int
* __thiscall
basic_stringbuf_char_seekoff(basic_stringbuf_char
*this,
2881 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2883 char *beg
, *cur_r
, *cur_w
;
2885 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
2887 cur_w
= basic_streambuf_char_pptr(&this->base
);
2888 if(cur_w
> this->seekhigh
)
2889 this->seekhigh
= cur_w
;
2894 beg
= basic_streambuf_char_eback(&this->base
);
2895 cur_r
= basic_streambuf_char_gptr(&this->base
);
2896 if((mode
& OPENMODE_in
) && cur_r
) {
2897 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
2899 else if(way
== SEEKDIR_end
)
2900 off
+= this->seekhigh
-beg
;
2901 else if(way
!= SEEKDIR_beg
)
2904 if(off
<0 || off
>this->seekhigh
-beg
) {
2907 basic_streambuf_char_gbump(&this->base
, beg
-cur_r
+off
);
2908 if((mode
& OPENMODE_out
) && cur_w
) {
2909 basic_streambuf_char_setp_next(&this->base
, beg
,
2910 basic_streambuf_char_gptr(&this->base
),
2911 basic_streambuf_char_epptr(&this->base
));
2914 }else if((mode
& OPENMODE_out
) && cur_w
) {
2915 if(way
== SEEKDIR_cur
)
2917 else if(way
== SEEKDIR_end
)
2918 off
+= this->seekhigh
-beg
;
2919 else if(way
!= SEEKDIR_beg
)
2922 if(off
<0 || off
>this->seekhigh
-beg
)
2925 basic_streambuf_char_pbump(&this->base
, beg
-cur_w
+off
);
2934 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2935 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2936 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos
, 36)
2937 fpos_int
* __thiscall
basic_stringbuf_char_seekpos(basic_stringbuf_char
*this,
2938 fpos_int
*ret
, fpos_int pos
, int mode
)
2940 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2942 if(pos
.off
==0 && pos
.pos
==-1 && pos
.state
==0) {
2947 return basic_stringbuf_char_seekoff(this, ret
, pos
.off
, SEEKDIR_beg
, mode
);
2950 /* ?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 */
2951 /* ?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 */
2952 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set
, 8)
2953 void __thiscall
basic_stringbuf_char_str_set(basic_stringbuf_char
*this, const basic_string_char
*str
)
2955 TRACE("(%p %p)\n", this, str
);
2957 basic_stringbuf_char__Tidy(this);
2958 basic_stringbuf_char__Init(this, MSVCP_basic_string_char_c_str(str
), str
->size
, this->state
);
2961 /* ?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 */
2962 /* ?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 */
2963 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get
, 8)
2964 basic_string_char
* __thiscall
basic_stringbuf_char_str_get(const basic_stringbuf_char
*this, basic_string_char
*ret
)
2968 TRACE("(%p)\n", this);
2970 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_char_pptr(&this->base
)) {
2973 ptr
= basic_streambuf_char_pbase(&this->base
);
2974 pptr
= basic_streambuf_char_pptr(&this->base
);
2976 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
2979 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_char_gptr(&this->base
)) {
2980 ptr
= basic_streambuf_char_eback(&this->base
);
2981 return MSVCP_basic_string_char_ctor_cstr_len(ret
, ptr
, basic_streambuf_char_egptr(&this->base
) - ptr
);
2984 return MSVCP_basic_string_char_ctor(ret
);
2987 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
2988 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
2989 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
2990 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
2991 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate
, 8)
2992 int __thiscall
basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar
*this, IOSB_openmode mode
)
2996 if(!(mode
& OPENMODE_in
))
2997 state
|= STRINGBUF_no_read
;
2999 if(!(mode
& OPENMODE_out
))
3000 state
|= STRINGBUF_no_write
;
3002 if(mode
& OPENMODE_ate
)
3003 state
|= STRINGBUF_at_end
;
3005 if(mode
& OPENMODE_app
)
3006 state
|= STRINGBUF_append
;
3011 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3012 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3013 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3014 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3015 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init
, 16)
3016 void __thiscall
basic_stringbuf_wchar__Init(basic_stringbuf_wchar
*this, const wchar_t *str
, MSVCP_size_t count
, int state
)
3018 TRACE("(%p, %p, %ld, %d)\n", this, str
, count
, state
);
3020 basic_streambuf_wchar__Init_empty(&this->base
);
3022 this->state
= state
;
3023 this->seekhigh
= NULL
;
3026 wchar_t *buf
= MSVCRT_operator_new(count
);
3028 ERR("Out of memory\n");
3029 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3032 memcpy(buf
, str
, count
);
3033 this->seekhigh
= buf
+ count
;
3035 this->state
|= STRINGBUF_allocated
;
3037 if(!(state
& STRINGBUF_no_read
))
3038 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+ count
);
3040 if(!(state
& STRINGBUF_no_write
)) {
3041 basic_streambuf_wchar_setp_next(&this->base
, buf
, (state
& STRINGBUF_at_end
) ? buf
+ count
: buf
, buf
+ count
);
3043 if(!basic_streambuf_wchar_gptr(&this->base
))
3044 basic_streambuf_wchar_setg(&this->base
, buf
, 0, buf
);
3049 /* ??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 */
3050 /* ??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 */
3051 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_str
, 12)
3052 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar
*this,
3053 const basic_string_wchar
*str
, IOSB_openmode mode
)
3055 TRACE("(%p %p %d)\n", this, str
, mode
);
3057 basic_streambuf_wchar_ctor(&this->base
);
3058 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
3060 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
),
3061 str
->size
, basic_stringbuf_wchar__Getstate(this, mode
));
3065 /* ??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 */
3066 /* ??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 */
3067 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str
, 12)
3068 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_str(basic_stringbuf_wchar
*this,
3069 const basic_string_wchar
*str
, IOSB_openmode mode
)
3071 basic_stringbuf_wchar_ctor_str(this, str
, mode
);
3072 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
3076 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3077 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3078 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor_mode
, 8)
3079 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor_mode(
3080 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3082 TRACE("(%p %d)\n", this, mode
);
3084 basic_streambuf_wchar_ctor(&this->base
);
3085 this->base
.vtable
= &MSVCP_basic_stringbuf_wchar_vtable
;
3087 basic_stringbuf_wchar__Init(this, NULL
, 0, basic_stringbuf_wchar__Getstate(this, mode
));
3091 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3092 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3093 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode
, 8)
3094 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor_mode(
3095 basic_stringbuf_wchar
*this, IOSB_openmode mode
)
3097 basic_stringbuf_wchar_ctor_mode(this, mode
);
3098 this->base
.vtable
= &MSVCP_basic_stringbuf_short_vtable
;
3102 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
3103 /* ??_F?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
3104 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_ctor
, 4)
3105 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_wchar_ctor(basic_stringbuf_wchar
*this)
3107 return basic_stringbuf_wchar_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3110 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3111 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3112 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor
, 4)
3113 basic_stringbuf_wchar
* __thiscall
basic_stringbuf_short_ctor(basic_stringbuf_wchar
*this)
3115 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in
|OPENMODE_out
);
3118 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3119 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3120 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3121 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3122 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy
, 4)
3123 void __thiscall
basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar
*this)
3125 TRACE("(%p)\n", this);
3127 if(this->state
& STRINGBUF_allocated
) {
3128 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base
));
3129 this->seekhigh
= NULL
;
3130 this->state
&= ~STRINGBUF_allocated
;
3133 basic_streambuf_wchar__Init_empty(&this->base
);
3136 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3137 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3138 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3139 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3140 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor
, 4)
3141 void __thiscall
basic_stringbuf_wchar_dtor(basic_stringbuf_wchar
*this)
3143 TRACE("(%p)\n", this);
3145 basic_stringbuf_wchar__Tidy(this);
3146 basic_streambuf_wchar_dtor(&this->base
);
3149 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_wchar_vector_dtor
, 8)
3150 basic_stringbuf_wchar
* __thiscall
MSVCP_basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3152 TRACE("(%p %x)\n", this, flags
);
3155 /* we have an array, with the number of elements stored before the first object */
3156 int i
, *ptr
= (int *) this - 1;
3158 for (i
= *ptr
- 1; i
>= 0; i
--)
3159 basic_stringbuf_wchar_dtor(this+i
);
3161 MSVCRT_operator_delete(ptr
);
3163 basic_stringbuf_wchar_dtor(this);
3166 MSVCRT_operator_delete(this);
3172 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringbuf_short_vector_dtor
, 8)
3173 basic_stringbuf_wchar
* __thiscall
MSVCP_basic_stringbuf_short_vector_dtor(basic_stringbuf_wchar
*this, unsigned int flags
)
3175 return MSVCP_basic_stringbuf_wchar_vector_dtor(this, flags
);
3178 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3179 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3180 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3181 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3182 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow
, 8)
3183 unsigned short __thiscall
basic_stringbuf_wchar_overflow(basic_stringbuf_wchar
*this, unsigned short meta
)
3185 MSVCP_size_t oldsize
, size
;
3188 TRACE("(%p %x)\n", this, meta
);
3192 if(this->state
& STRINGBUF_no_write
)
3195 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3196 if((this->state
&STRINGBUF_append
) && ptr
<this->seekhigh
)
3197 basic_streambuf_wchar_setp_next(&this->base
, basic_streambuf_wchar_pbase(&this->base
),
3198 this->seekhigh
, basic_streambuf_wchar_epptr(&this->base
));
3200 if(ptr
&& ptr
<basic_streambuf_wchar_epptr(&this->base
))
3201 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3203 oldsize
= (ptr
? basic_streambuf_wchar_epptr(&this->base
)-basic_streambuf_wchar_eback(&this->base
): 0);
3206 buf
= MSVCRT_operator_new(size
);
3208 ERR("Out of memory\n");
3209 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3213 this->seekhigh
= buf
;
3214 basic_streambuf_wchar_setp(&this->base
, buf
, buf
+size
);
3215 if(this->state
& STRINGBUF_no_read
)
3216 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3218 basic_streambuf_wchar_setg(&this->base
, buf
, buf
, buf
+1);
3220 this->state
|= STRINGBUF_allocated
;
3222 ptr
= basic_streambuf_wchar_eback(&this->base
);
3223 memcpy(buf
, ptr
, oldsize
);
3225 this->seekhigh
= buf
+(this->seekhigh
-ptr
);
3226 basic_streambuf_wchar_setp_next(&this->base
, buf
,
3227 buf
+(basic_streambuf_wchar_pptr(&this->base
)-ptr
), buf
+size
);
3228 if(this->state
& STRINGBUF_no_read
)
3229 basic_streambuf_wchar_setg(&this->base
, buf
, NULL
, buf
);
3231 basic_streambuf_wchar_setg(&this->base
, buf
,
3232 buf
+(basic_streambuf_wchar_gptr(&this->base
)-ptr
),
3233 basic_streambuf_wchar_pptr(&this->base
)+1);
3235 MSVCRT_operator_delete(ptr
);
3238 return (*basic_streambuf_wchar__Pninc(&this->base
) = meta
);
3241 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3242 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3243 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3244 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3245 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail
, 8)
3246 unsigned short __thiscall
basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar
*this, unsigned short c
)
3250 TRACE("(%p %x)\n", this, c
);
3252 cur
= basic_streambuf_wchar_gptr(&this->base
);
3253 if(!cur
|| cur
==basic_streambuf_wchar_eback(&this->base
)
3254 || (c
!=WEOF
&& c
!=cur
[-1] && this->state
&STRINGBUF_no_write
))
3259 basic_streambuf_wchar_gbump(&this->base
, -1);
3260 return c
==WEOF
? !WEOF
: c
;
3263 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3264 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3265 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3266 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3267 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow
, 4)
3268 unsigned short __thiscall
basic_stringbuf_wchar_underflow(basic_stringbuf_wchar
*this)
3272 TRACE("(%p)\n", this);
3274 cur
= basic_streambuf_wchar_gptr(&this->base
);
3275 if(!cur
|| this->state
&STRINGBUF_no_read
)
3278 ptr
= basic_streambuf_wchar_pptr(&this->base
);
3279 if(this->seekhigh
< ptr
)
3280 this->seekhigh
= ptr
;
3282 ptr
= basic_streambuf_wchar_egptr(&this->base
);
3283 if(this->seekhigh
> ptr
)
3284 basic_streambuf_wchar_setg(&this->base
, basic_streambuf_wchar_eback(&this->base
), cur
, this->seekhigh
);
3286 if(cur
< this->seekhigh
)
3291 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3292 /* ?seekoff@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3293 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JHH@Z */
3294 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
3295 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff
, 20)
3296 fpos_int
* __thiscall
basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar
*this,
3297 fpos_int
*ret
, streamoff off
, int way
, int mode
)
3299 wchar_t *beg
, *cur_r
, *cur_w
;
3301 TRACE("(%p %p %ld %d %d)\n", this, ret
, off
, way
, mode
);
3303 cur_w
= basic_streambuf_wchar_pptr(&this->base
);
3304 if(cur_w
> this->seekhigh
)
3305 this->seekhigh
= cur_w
;
3310 beg
= basic_streambuf_wchar_eback(&this->base
);
3311 cur_r
= basic_streambuf_wchar_gptr(&this->base
);
3312 if((mode
& OPENMODE_in
) && cur_r
) {
3313 if(way
==SEEKDIR_cur
&& !(mode
& OPENMODE_out
))
3315 else if(way
== SEEKDIR_end
)
3316 off
+= this->seekhigh
-beg
;
3317 else if(way
!= SEEKDIR_beg
)
3320 if(off
<0 || off
>this->seekhigh
-beg
) {
3323 basic_streambuf_wchar_gbump(&this->base
, beg
-cur_r
+off
);
3324 if((mode
& OPENMODE_out
) && cur_w
) {
3325 basic_streambuf_wchar_setp_next(&this->base
, beg
,
3326 basic_streambuf_wchar_gptr(&this->base
),
3327 basic_streambuf_wchar_epptr(&this->base
));
3330 }else if((mode
& OPENMODE_out
) && cur_w
) {
3331 if(way
== SEEKDIR_cur
)
3333 else if(way
== SEEKDIR_end
)
3334 off
+= this->seekhigh
-beg
;
3335 else if(way
!= SEEKDIR_beg
)
3338 if(off
<0 || off
>this->seekhigh
-beg
)
3341 basic_streambuf_wchar_pbump(&this->base
, beg
-cur_w
+off
);
3350 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3351 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3352 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3353 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3354 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos
, 36)
3355 fpos_int
* __thiscall
basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar
*this,
3356 fpos_int
*ret
, fpos_int pos
, int mode
)
3358 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
3360 if(pos
.off
==0 && pos
.pos
==-1 && pos
.state
==0) {
3365 return basic_stringbuf_wchar_seekoff(this, ret
, pos
.off
, SEEKDIR_beg
, mode
);
3368 /* ?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 */
3369 /* ?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 */
3370 /* ?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 */
3371 /* ?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 */
3372 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set
, 8)
3373 void __thiscall
basic_stringbuf_wchar_str_set(basic_stringbuf_wchar
*this, const basic_string_wchar
*str
)
3375 TRACE("(%p %p)\n", this, str
);
3377 basic_stringbuf_wchar__Tidy(this);
3378 basic_stringbuf_wchar__Init(this, MSVCP_basic_string_wchar_c_str(str
), str
->size
, this->state
);
3381 /* ?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 */
3382 /* ?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 */
3383 /* ?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 */
3384 /* ?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 */
3385 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get
, 8)
3386 basic_string_wchar
* __thiscall
basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar
*this, basic_string_wchar
*ret
)
3390 TRACE("(%p)\n", this);
3392 if(!(this->state
& STRINGBUF_no_write
) && basic_streambuf_wchar_pptr(&this->base
)) {
3395 ptr
= basic_streambuf_wchar_pbase(&this->base
);
3396 pptr
= basic_streambuf_wchar_pptr(&this->base
);
3398 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, (this->seekhigh
< pptr
? pptr
: this->seekhigh
) - ptr
);
3401 if(!(this->state
& STRINGBUF_no_read
) && basic_streambuf_wchar_gptr(&this->base
)) {
3402 ptr
= basic_streambuf_wchar_eback(&this->base
);
3403 return MSVCP_basic_string_wchar_ctor_cstr_len(ret
, ptr
, basic_streambuf_wchar_egptr(&this->base
) - ptr
);
3406 return MSVCP_basic_string_wchar_ctor(ret
);
3409 /* ??0ios_base@std@@IAE@XZ */
3410 /* ??0ios_base@std@@IEAA@XZ */
3411 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
3412 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
3414 TRACE("(%p)\n", this);
3415 this->vtable
= &MSVCP_ios_base_vtable
;
3419 /* ??0ios_base@std@@QAE@ABV01@@Z */
3420 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
3421 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
3422 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
3424 TRACE("(%p %p)\n", this, copy
);
3426 this->vtable
= &MSVCP_ios_base_vtable
;
3430 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
3431 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
3432 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
3433 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
3435 IOS_BASE_fnarray
*cur
;
3437 TRACE("(%p %x)\n", this, event
);
3439 for(cur
=this->calls
; cur
; cur
=cur
->next
)
3440 cur
->event_handler(event
, this, cur
->index
);
3443 /* ?_Tidy@ios_base@std@@AAAXXZ */
3444 /* ?_Tidy@ios_base@std@@AEAAXXZ */
3445 void CDECL
ios_base_Tidy(ios_base
*this)
3447 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
3448 IOS_BASE_fnarray
*event_cur
, *event_next
;
3450 TRACE("(%p)\n", this);
3452 ios_base_Callfns(this, EVENT_erase_event
);
3454 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
3455 arr_next
= arr_cur
->next
;
3456 MSVCRT_operator_delete(arr_cur
);
3460 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
3461 event_next
= event_cur
->next
;
3462 MSVCRT_operator_delete(event_cur
);
3467 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
3468 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
3469 void CDECL
ios_base_Ios_base_dtor(ios_base
*obj
)
3471 TRACE("(%p)\n", obj
);
3473 locale_dtor(obj
->loc
);
3474 MSVCRT_operator_delete(obj
->loc
);
3479 /* ??1ios_base@std@@UAE@XZ */
3480 /* ??1ios_base@std@@UEAA@XZ */
3481 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
3482 void __thiscall
ios_base_dtor(ios_base
*this)
3484 ios_base_Ios_base_dtor(this);
3487 DEFINE_THISCALL_WRAPPER(MSVCP_ios_base_vector_dtor
, 8)
3488 ios_base
* __thiscall
MSVCP_ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
3490 TRACE("(%p %x)\n", this, flags
);
3492 /* we have an array, with the number of elements stored before the first object */
3493 int i
, *ptr
= (int *)this-1;
3495 for(i
=*ptr
-1; i
>=0; i
--)
3496 ios_base_dtor(this+i
);
3497 MSVCRT_operator_delete(ptr
);
3499 ios_base_dtor(this);
3501 MSVCRT_operator_delete(this);
3507 DEFINE_THISCALL_WRAPPER(MSVCP_iosb_vector_dtor
, 8)
3508 void* __thiscall
MSVCP_iosb_vector_dtor(void *this, unsigned int flags
)
3510 TRACE("(%p %x)\n", this, flags
);
3512 int *ptr
= (int *)this-1;
3513 MSVCRT_operator_delete(ptr
);
3516 MSVCRT_operator_delete(this);
3522 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
3523 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
3524 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
3525 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
3527 IOS_BASE_iosarray
*p
;
3529 TRACE("(%p %d)\n", this, index
);
3531 for(p
=this->arr
; p
; p
=p
->next
) {
3532 if(p
->index
== index
)
3536 for(p
=this->arr
; p
; p
=p
->next
) {
3537 if(!p
->long_val
&& !p
->ptr_val
) {
3543 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
3544 p
->next
= this->arr
;
3552 /* ?iword@ios_base@std@@QAEAAJH@Z */
3553 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3554 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3555 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3557 TRACE("(%p %d)\n", this, index
);
3558 return &ios_base_Findarr(this, index
)->long_val
;
3561 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3562 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3563 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3564 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3566 TRACE("(%p %d)\n", this, index
);
3567 return &ios_base_Findarr(this, index
)->ptr_val
;
3570 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3571 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3572 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3573 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3575 IOS_BASE_fnarray
*event
;
3577 TRACE("(%p %p %d)\n", this, callback
, index
);
3579 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
3580 event
->next
= this->calls
;
3581 event
->index
= index
;
3582 event
->event_handler
= callback
;
3583 this->calls
= event
;
3586 /* ?clear@ios_base@std@@QAEXH_N@Z */
3587 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3588 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3589 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3591 TRACE("(%p %x %x)\n", this, state
, reraise
);
3593 this->state
= state
& IOSTATE_mask
;
3594 if(!(this->state
& this->except
))
3598 throw_exception(EXCEPTION_RERAISE
, NULL
);
3599 else if(this->state
& this->except
& IOSTATE_eofbit
)
3600 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
3601 else if(this->state
& this->except
& IOSTATE_failbit
)
3602 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
3603 else if(this->state
& this->except
& IOSTATE_badbit
)
3604 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
3605 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3606 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
3609 /* ?clear@ios_base@std@@QAEXH@Z */
3610 /* ?clear@ios_base@std@@QEAAXH@Z */
3611 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3612 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3614 ios_base_clear_reraise(this, state
, FALSE
);
3617 /* ?clear@ios_base@std@@QAEXI@Z */
3618 /* ?clear@ios_base@std@@QEAAXI@Z */
3619 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
3620 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
3622 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3625 /* ?exceptions@ios_base@std@@QAEXH@Z */
3626 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3627 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3628 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3630 TRACE("(%p %x)\n", this, state
);
3631 this->except
= state
& IOSTATE_mask
;
3632 ios_base_clear(this, this->state
);
3635 /* ?exceptions@ios_base@std@@QAEXI@Z */
3636 /* ?exceptions@ios_base@std@@QEAAXI@Z */
3637 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
3638 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
3640 TRACE("(%p %x)\n", this, state
);
3641 ios_base_exceptions_set(this, state
);
3644 /* ?exceptions@ios_base@std@@QBEHXZ */
3645 /* ?exceptions@ios_base@std@@QEBAHXZ */
3646 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3647 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3649 TRACE("(%p)\n", this);
3650 return this->except
;
3653 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3654 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3655 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3656 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3658 TRACE("(%p %p)\n", this, rhs
);
3661 IOS_BASE_iosarray
*arr_cur
;
3662 IOS_BASE_fnarray
*event_cur
;
3664 ios_base_Tidy(this);
3666 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3667 if(arr_cur
->long_val
)
3668 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3669 if(arr_cur
->ptr_val
)
3670 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3672 this->stdstr
= rhs
->stdstr
;
3673 this->fmtfl
= rhs
->fmtfl
;
3674 this->prec
= rhs
->prec
;
3675 this->wide
= rhs
->wide
;
3676 locale_operator_assign(this->loc
, rhs
->loc
);
3678 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3679 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3681 ios_base_Callfns(this, EVENT_copyfmt_event
);
3682 ios_base_exceptions_set(this, rhs
->except
);
3688 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3689 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3690 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3691 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3693 TRACE("(%p %p)\n", this, right
);
3696 this->state
= right
->state
;
3697 ios_base_copyfmt(this, right
);
3703 /* ?fail@ios_base@std@@QBE_NXZ */
3704 /* ?fail@ios_base@std@@QEBA_NXZ */
3705 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3706 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
3708 TRACE("(%p)\n", this);
3709 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3712 /* ??7ios_base@std@@QBE_NXZ */
3713 /* ??7ios_base@std@@QEBA_NXZ */
3714 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3715 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
3717 TRACE("(%p)\n", this);
3718 return ios_base_fail(this);
3721 /* ??Bios_base@std@@QBEPAXXZ */
3722 /* ??Bios_base@std@@QEBAPEAXXZ */
3723 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3724 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3726 TRACE("(%p)\n", this);
3727 return ios_base_fail(this) ? NULL
: (void*)this;
3730 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
3731 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
3732 void CDECL
ios_base_Addstd(ios_base
*add
)
3734 FIXME("(%p) stub\n", add
);
3737 /* ?_Index_func@ios_base@std@@CAAAHXZ */
3738 /* ?_Index_func@ios_base@std@@CAAEAHXZ */
3739 int* CDECL
ios_base_Index_func(void)
3742 return &ios_base_Index
;
3745 /* ?_Init@ios_base@std@@IAEXXZ */
3746 /* ?_Init@ios_base@std@@IEAAXXZ */
3747 DEFINE_THISCALL_WRAPPER(ios_base_Init
, 4)
3748 void __thiscall
ios_base_Init(ios_base
*this)
3750 TRACE("(%p)\n", this);
3753 this->state
= this->except
= IOSTATE_goodbit
;
3754 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3759 this->loc
= MSVCRT_operator_new(sizeof(locale
));
3760 locale_ctor(this->loc
);
3763 /* ?_Sync_func@ios_base@std@@CAAA_NXZ */
3764 /* ?_Sync_func@ios_base@std@@CAAEA_NXZ */
3765 MSVCP_bool
* CDECL
ios_base_Sync_func(void)
3768 return &ios_base_Sync
;
3771 /* ?bad@ios_base@std@@QBE_NXZ */
3772 /* ?bad@ios_base@std@@QEBA_NXZ */
3773 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3774 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
3776 TRACE("(%p)\n", this);
3777 return (this->state
& IOSTATE_badbit
) != 0;
3780 /* ?eof@ios_base@std@@QBE_NXZ */
3781 /* ?eof@ios_base@std@@QEBA_NXZ */
3782 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3783 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
3785 TRACE("(%p)\n", this);
3786 return (this->state
& IOSTATE_eofbit
) != 0;
3789 /* ?flags@ios_base@std@@QAEHH@Z */
3790 /* ?flags@ios_base@std@@QEAAHH@Z */
3791 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3792 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3794 IOSB_fmtflags ret
= this->fmtfl
;
3796 TRACE("(%p %x)\n", this, flags
);
3798 this->fmtfl
= flags
& FMTFLAG_mask
;
3802 /* ?flags@ios_base@std@@QBEHXZ */
3803 /* ?flags@ios_base@std@@QEBAHXZ */
3804 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3805 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3807 TRACE("(%p)\n", this);
3811 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3812 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3813 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3814 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3816 TRACE("(%p)\n", this);
3817 return locale_copy_ctor(ret
, this->loc
);
3820 /* ?good@ios_base@std@@QBE_NXZ */
3821 /* ?good@ios_base@std@@QEBA_NXZ */
3822 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3823 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
3825 TRACE("(%p)\n", this);
3826 return this->state
== IOSTATE_goodbit
;
3829 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3830 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3831 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3832 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3834 TRACE("(%p %p)\n", this, loc
);
3836 locale_copy_ctor(this->loc
, loc
);
3840 /* ?precision@ios_base@std@@QAEHH@Z */
3841 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3842 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 8)
3843 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3845 streamsize ret
= this->prec
;
3847 TRACE("(%p %ld)\n", this, precision
);
3849 this->prec
= precision
;
3853 /* ?precision@ios_base@std@@QBEHXZ */
3854 /* ?precision@ios_base@std@@QEBA_JXZ */
3855 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3856 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3858 TRACE("(%p)\n", this);
3862 /* ?rdstate@ios_base@std@@QBEHXZ */
3863 /* ?rdstate@ios_base@std@@QEBAHXZ */
3864 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3865 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3867 TRACE("(%p)\n", this);
3871 /* ?setf@ios_base@std@@QAEHHH@Z */
3872 /* ?setf@ios_base@std@@QEAAHHH@Z */
3873 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3874 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3876 IOSB_fmtflags ret
= this->fmtfl
;
3878 TRACE("(%p %x %x)\n", this, flags
, mask
);
3880 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3884 /* ?setf@ios_base@std@@QAEHH@Z */
3885 /* ?setf@ios_base@std@@QEAAHH@Z */
3886 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3887 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3889 return ios_base_setf_mask(this, flags
, ~0);
3892 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3893 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3894 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3895 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3897 TRACE("(%p %x %x)\n", this, state
, reraise
);
3899 if(state
!= IOSTATE_goodbit
)
3900 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3903 /* ?setstate@ios_base@std@@QAEXH@Z */
3904 /* ?setstate@ios_base@std@@QEAAXH@Z */
3905 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3906 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3908 ios_base_setstate_reraise(this, state
, FALSE
);
3911 /* ?setstate@ios_base@std@@QAEXI@Z */
3912 /* ?setstate@ios_base@std@@QEAAXI@Z */
3913 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
3914 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
3916 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3919 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3920 MSVCP_bool CDECL
ios_base_sync_with_stdio(MSVCP_bool sync
)
3925 TRACE("(%x)\n", sync
);
3927 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3928 ret
= ios_base_Sync
;
3929 ios_base_Sync
= sync
;
3930 _Lockit_dtor(&lock
);
3934 /* ?unsetf@ios_base@std@@QAEXH@Z */
3935 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3936 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3937 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3939 TRACE("(%p %x)\n", this, flags
);
3940 this->fmtfl
&= ~flags
;
3943 /* ?width@ios_base@std@@QAEHH@Z */
3944 /* ?width@ios_base@std@@QEAA_J_J@Z */
3945 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 8)
3946 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
3948 streamsize ret
= this->wide
;
3950 TRACE("(%p %ld)\n", this, width
);
3956 /* ?width@ios_base@std@@QBEHXZ */
3957 /* ?width@ios_base@std@@QEBA_JXZ */
3958 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
3959 streamsize __thiscall
ios_base_width_get(ios_base
*this)
3961 TRACE("(%p)\n", this);
3965 /* ?xalloc@ios_base@std@@SAHXZ */
3966 int CDECL
ios_base_xalloc(void)
3973 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3974 ret
= ios_base_Index
++;
3975 _Lockit_dtor(&lock
);
3979 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3980 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3981 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
3982 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
3984 TRACE("(%p)\n", this);
3986 ios_base_ctor(&this->base
);
3987 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
3991 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3992 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3993 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
3994 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
3996 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3997 ios_base_Init(&this->base
);
3998 this->strbuf
= streambuf
;
3999 this->stream
= NULL
;
4003 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4006 FIXME("standard streams not handled yet\n");
4009 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4010 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4011 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
4012 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
4014 TRACE("(%p %p)\n", this, strbuf
);
4016 basic_ios_char_ctor(this);
4017 basic_ios_char_init(this, strbuf
, FALSE
);
4021 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4022 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4023 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
4024 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
4026 TRACE("(%p)\n", this);
4027 ios_base_dtor(&this->base
);
4030 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_char_vector_dtor
, 8)
4031 basic_ios_char
* __thiscall
MSVCP_basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
4033 TRACE("(%p %x)\n", this, flags
);
4035 /* we have an array, with the number of elements stored before the first object */
4036 int i
, *ptr
= (int *)this-1;
4038 for(i
=*ptr
-1; i
>=0; i
--)
4039 basic_ios_char_dtor(this+i
);
4040 MSVCRT_operator_delete(ptr
);
4042 basic_ios_char_dtor(this);
4044 MSVCRT_operator_delete(this);
4050 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4051 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4052 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
4053 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4055 TRACE("(%p %x %x)\n", this, state
, reraise
);
4056 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4059 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4060 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4061 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
4062 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
4064 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4067 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4068 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4069 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
4070 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
4072 TRACE("(%p %p)\n", this, copy
);
4076 this->stream
= copy
->stream
;
4077 this->fillch
= copy
->fillch
;
4078 ios_base_copyfmt(&this->base
, ©
->base
);
4082 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4083 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4084 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
4085 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
4087 char ret
= this->fillch
;
4089 TRACE("(%p %c)\n", this, fill
);
4091 this->fillch
= fill
;
4095 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4096 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4097 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
4098 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
4100 TRACE("(%p)\n", this);
4101 return this->fillch
;
4104 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4105 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4106 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
4107 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
4109 TRACE("(%p %p %p)\n", this, ret
, loc
);
4112 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
4116 return ios_base_imbue(&this->base
, ret
, loc
);
4119 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4120 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4121 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
4122 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
4124 TRACE("(%p %c %c)\n", this, ch
, def
);
4125 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
, def
);
4128 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4129 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4130 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
4131 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
4133 basic_streambuf_char
*ret
= this->strbuf
;
4135 TRACE("(%p %p)\n", this, streambuf
);
4137 this->strbuf
= streambuf
;
4138 basic_ios_char_clear(this, IOSTATE_goodbit
);
4142 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4143 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4144 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
4145 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
4147 TRACE("(%p)\n", this);
4148 return this->strbuf
;
4151 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4152 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4153 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
4154 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4156 TRACE("(%p %x %x)\n", this, state
, reraise
);
4158 if(state
!= IOSTATE_goodbit
)
4159 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
4162 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4163 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4164 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
4165 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
4167 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
4170 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4171 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4172 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
4173 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
4175 basic_ostream_char
*ret
= this->stream
;
4177 TRACE("(%p %p)\n", this, ostream
);
4179 this->stream
= ostream
;
4183 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4184 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4185 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
4186 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
4188 TRACE("(%p)\n", this);
4189 return this->stream
;
4192 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4193 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4194 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
4195 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
4197 TRACE("(%p %c)\n", this, ch
);
4198 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
);
4202 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4203 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4204 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
4205 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
4207 TRACE("(%p)\n", this);
4209 ios_base_ctor(&this->base
);
4210 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
4214 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4215 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4216 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
4217 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
4219 basic_ios_wchar_ctor(this);
4220 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
4224 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4225 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4226 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4227 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4228 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
4229 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
4231 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
4232 ios_base_Init(&this->base
);
4233 this->strbuf
= streambuf
;
4234 this->stream
= NULL
;
4238 ios_base_setstate(&this->base
, IOSTATE_badbit
);
4241 FIXME("standard streams not handled yet\n");
4244 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4245 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4246 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
4247 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4249 TRACE("(%p %p)\n", this, strbuf
);
4251 basic_ios_wchar_ctor(this);
4252 basic_ios_wchar_init(this, strbuf
, FALSE
);
4256 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4257 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4258 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
4259 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
4261 basic_ios_wchar_ctor_streambuf(this, strbuf
);
4262 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
4266 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4267 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4268 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4269 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4270 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
4271 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
4273 TRACE("(%p)\n", this);
4274 ios_base_dtor(&this->base
);
4277 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_wchar_vector_dtor
, 8)
4278 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4280 TRACE("(%p %x)\n", this, flags
);
4282 /* we have an array, with the number of elements stored before the first object */
4283 int i
, *ptr
= (int *)this-1;
4285 for(i
=*ptr
-1; i
>=0; i
--)
4286 basic_ios_wchar_dtor(this+i
);
4287 MSVCRT_operator_delete(ptr
);
4289 basic_ios_wchar_dtor(this);
4291 MSVCRT_operator_delete(this);
4297 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ios_short_vector_dtor
, 8)
4298 basic_ios_wchar
* __thiscall
MSVCP_basic_ios_short_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
4300 return MSVCP_basic_ios_wchar_vector_dtor(this, flags
);
4303 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4304 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4305 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4306 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4307 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
4308 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4310 TRACE("(%p %x %x)\n", this, state
, reraise
);
4311 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
4314 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4315 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4316 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4317 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4318 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
4319 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
4321 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
4324 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
4325 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4326 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4327 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4328 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
4329 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
4331 TRACE("(%p %p)\n", this, copy
);
4335 this->stream
= copy
->stream
;
4336 this->fillch
= copy
->fillch
;
4337 ios_base_copyfmt(&this->base
, ©
->base
);
4341 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
4342 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
4343 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4344 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4345 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
4346 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
4348 wchar_t ret
= this->fillch
;
4350 TRACE("(%p %c)\n", this, fill
);
4352 this->fillch
= fill
;
4356 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
4357 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
4358 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4359 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4360 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
4361 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
4363 TRACE("(%p)\n", this);
4364 return this->fillch
;
4367 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4368 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4369 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4370 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4371 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
4372 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
4374 TRACE("(%p %p %p)\n", this, ret
, loc
);
4377 return basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
4379 locale_copy_ctor(ret
, loc
);
4383 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
4384 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
4385 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4386 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4387 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
4388 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
4390 TRACE("(%p %c %c)\n", this, ch
, def
);
4391 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
, def
);
4394 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4395 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4396 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4397 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4398 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
4399 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
4401 basic_streambuf_wchar
*ret
= this->strbuf
;
4403 TRACE("(%p %p)\n", this, streambuf
);
4405 this->strbuf
= streambuf
;
4406 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
4410 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4411 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
4412 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4413 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
4414 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
4415 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
4417 TRACE("(%p)\n", this);
4418 return this->strbuf
;
4421 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4422 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4423 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4424 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4425 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
4426 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
4428 TRACE("(%p %x %x)\n", this, state
, reraise
);
4430 if(state
!= IOSTATE_goodbit
)
4431 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
4434 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4435 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4436 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4437 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4438 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
4439 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
4441 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
4444 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4445 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4446 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
4447 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4448 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
4449 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
4451 basic_ostream_wchar
*ret
= this->stream
;
4453 TRACE("(%p %p)\n", this, ostream
);
4455 this->stream
= ostream
;
4459 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
4460 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
4461 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4462 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
4463 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
4464 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
4466 TRACE("(%p)\n", this);
4467 return this->stream
;
4470 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
4471 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
4472 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
4473 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
4474 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
4475 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
4477 TRACE("(%p %c)\n", this, ch
);
4478 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
);
4481 /* Caution: basic_ostream uses virtual inheritance.
4482 * All constructors have additional parameter that says if base class should be initialized.
4483 * Base class needs to be accessed using vbtable.
4485 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
4487 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
4490 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
4492 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
4495 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
4497 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
4500 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4501 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
4502 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
4503 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
4504 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4506 basic_ios_char
*base
;
4508 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
4511 this->vbtable
= basic_ostream_char_vbtable
;
4512 base
= basic_ostream_char_get_basic_ios(this);
4513 basic_ios_char_ctor(base
);
4515 base
= basic_ostream_char_get_basic_ios(this);
4518 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
4519 basic_ios_char_init(base
, strbuf
, isstd
);
4523 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4524 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4525 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
4526 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
4527 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4529 basic_ios_char
*base
;
4531 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
4534 this->vbtable
= basic_ostream_char_vbtable
;
4535 base
= basic_ostream_char_get_basic_ios(this);
4536 basic_ios_char_ctor(base
);
4538 base
= basic_ostream_char_get_basic_ios(this);
4541 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
4543 ios_base_Addstd(&base
->base
);
4547 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
4548 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4549 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
4550 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
4552 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4554 /* don't destroy virtual base here */
4555 TRACE("(%p)\n", this);
4558 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4559 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4560 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
4561 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4563 TRACE("(%p)\n", this);
4564 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4565 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4568 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_char_vector_dtor
, 8)
4569 basic_ostream_char
* __thiscall
MSVCP_basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4571 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4573 TRACE("(%p %x)\n", this, flags
);
4576 /* we have an array, with the number of elements stored before the first object */
4577 int i
, *ptr
= (int *)this-1;
4579 for(i
=*ptr
-1; i
>=0; i
--)
4580 basic_ostream_char_vbase_dtor(this+i
);
4581 MSVCRT_operator_delete(ptr
);
4583 basic_ostream_char_vbase_dtor(this);
4585 MSVCRT_operator_delete(this);
4591 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4592 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4593 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4594 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4596 /* this function is not matching C++ specification */
4597 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4599 TRACE("(%p)\n", this);
4601 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4602 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4603 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4607 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4608 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4609 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
4610 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
4612 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4614 TRACE("(%p)\n", this);
4616 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4617 basic_ostream_char_flush(this);
4620 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4621 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4622 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4623 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4625 TRACE("(%p)\n", this);
4626 basic_ostream_char__Osfx(this);
4629 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4631 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4633 if(basic_ios_char_rdbuf_get(base
))
4634 basic_streambuf_char__Lock(base
->strbuf
);
4636 if(ios_base_good(&base
->base
) && base
->stream
)
4637 basic_ostream_char_flush(base
->stream
);
4639 return ios_base_good(&base
->base
);
4642 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4644 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4646 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4647 basic_ostream_char_osfx(ostr
);
4649 if(basic_ios_char_rdbuf_get(base
))
4650 basic_streambuf_char__Unlock(base
->strbuf
);
4653 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4654 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4655 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4656 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4658 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4660 TRACE("(%p)\n", this);
4662 if(ios_base_good(&base
->base
) && base
->stream
)
4663 basic_ostream_char_flush(base
->stream
);
4664 return ios_base_good(&base
->base
);
4667 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4668 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4669 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4670 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4672 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4674 TRACE("(%p %c)\n", this, ch
);
4676 if(!basic_ostream_char_sentry_create(this)
4677 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4678 basic_ostream_char_sentry_destroy(this);
4679 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4683 basic_ostream_char_sentry_destroy(this);
4687 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4688 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4689 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 12)
4690 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4692 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4694 TRACE("(%p %ld %d)\n", this, off
, way
);
4696 if(!ios_base_fail(&base
->base
)) {
4699 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4700 &seek
, off
, way
, OPENMODE_out
);
4701 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
4702 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4707 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4708 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4709 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4710 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4712 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4714 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4716 if(!ios_base_fail(&base
->base
)) {
4719 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4720 &seek
, pos
, OPENMODE_out
);
4721 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
4722 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4727 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4728 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4729 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4730 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4732 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4734 TRACE("(%p)\n", this);
4736 if(!ios_base_fail(&base
->base
)) {
4737 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4738 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4747 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4748 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4749 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 12)
4750 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4752 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4754 TRACE("(%p %s %ld)\n", this, debugstr_a(str
), count
);
4756 if(!basic_ostream_char_sentry_create(this)
4757 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4758 basic_ostream_char_sentry_destroy(this);
4759 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4763 basic_ostream_char_sentry_destroy(this);
4767 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4768 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4769 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4770 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4772 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4773 int state
= IOSTATE_goodbit
;
4775 TRACE("(%p %d)\n", this, val
);
4777 if(basic_ostream_char_sentry_create(this)) {
4778 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4779 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4780 ostreambuf_iterator_char dest
= {0, strbuf
};
4782 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4783 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4784 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4786 basic_ostream_char_sentry_destroy(this);
4788 basic_ios_char_setstate(base
, state
);
4792 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4793 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4794 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4795 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4797 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4798 int state
= IOSTATE_goodbit
;
4800 TRACE("(%p %u)\n", this, val
);
4802 if(basic_ostream_char_sentry_create(this)) {
4803 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4804 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4805 ostreambuf_iterator_char dest
= {0, strbuf
};
4807 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4809 basic_ostream_char_sentry_destroy(this);
4811 basic_ios_char_setstate(base
, state
);
4815 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4816 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4817 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4818 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4819 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4820 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4822 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4823 int state
= IOSTATE_goodbit
;
4825 TRACE("(%p %d)\n", this, val
);
4827 if(basic_ostream_char_sentry_create(this)) {
4828 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4829 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4830 ostreambuf_iterator_char dest
= {0, strbuf
};
4832 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4834 basic_ostream_char_sentry_destroy(this);
4836 basic_ios_char_setstate(base
, state
);
4840 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4841 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4842 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4843 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4844 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4845 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4847 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4848 int state
= IOSTATE_goodbit
;
4850 TRACE("(%p %u)\n", this, val
);
4852 if(basic_ostream_char_sentry_create(this)) {
4853 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4854 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4855 ostreambuf_iterator_char dest
= {0, strbuf
};
4857 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4859 basic_ostream_char_sentry_destroy(this);
4861 basic_ios_char_setstate(base
, state
);
4865 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4866 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4867 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4868 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4870 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4871 int state
= IOSTATE_goodbit
;
4873 TRACE("(%p %f)\n", this, val
);
4875 if(basic_ostream_char_sentry_create(this)) {
4876 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4877 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4878 ostreambuf_iterator_char dest
= {0, strbuf
};
4880 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4882 basic_ostream_char_sentry_destroy(this);
4884 basic_ios_char_setstate(base
, state
);
4888 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4889 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4890 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4891 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4893 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4894 int state
= IOSTATE_goodbit
;
4896 TRACE("(%p %lf)\n", this, val
);
4898 if(basic_ostream_char_sentry_create(this)) {
4899 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4900 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4901 ostreambuf_iterator_char dest
= {0, strbuf
};
4903 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4905 basic_ostream_char_sentry_destroy(this);
4907 basic_ios_char_setstate(base
, state
);
4911 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4912 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4913 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4914 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4916 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4917 int state
= IOSTATE_goodbit
;
4919 TRACE("(%p %lf)\n", this, val
);
4921 if(basic_ostream_char_sentry_create(this)) {
4922 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4923 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4924 ostreambuf_iterator_char dest
= {0, strbuf
};
4926 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4928 basic_ostream_char_sentry_destroy(this);
4930 basic_ios_char_setstate(base
, state
);
4934 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4935 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4936 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4937 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4939 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4940 IOSB_iostate state
= IOSTATE_badbit
;
4943 TRACE("(%p %p)\n", this, val
);
4945 if(basic_ostream_char_sentry_create(this)) {
4946 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4947 c
= basic_streambuf_char_snextc(val
)) {
4948 state
= IOSTATE_goodbit
;
4950 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4951 state
= IOSTATE_badbit
;
4956 state
= IOSTATE_badbit
;
4958 basic_ostream_char_sentry_destroy(this);
4960 ios_base_width_set(&base
->base
, 0);
4961 basic_ios_char_setstate(base
, state
);
4965 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4966 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4967 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4968 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4970 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4971 int state
= IOSTATE_goodbit
;
4973 TRACE("(%p %p)\n", this, val
);
4975 if(basic_ostream_char_sentry_create(this)) {
4976 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4977 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4978 ostreambuf_iterator_char dest
= {0, strbuf
};
4980 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4982 basic_ostream_char_sentry_destroy(this);
4984 basic_ios_char_setstate(base
, state
);
4988 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4989 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4990 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4991 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
4993 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4994 int state
= IOSTATE_goodbit
;
4996 TRACE("(%p)\n", this);
4998 if(basic_ostream_char_sentry_create(this)) {
4999 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5000 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5001 ostreambuf_iterator_char dest
= {0, strbuf
};
5003 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5005 basic_ostream_char_sentry_destroy(this);
5007 basic_ios_char_setstate(base
, state
);
5011 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5012 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5013 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
5014 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
5016 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5017 int state
= IOSTATE_goodbit
;
5019 TRACE("(%p)\n", this);
5021 if(basic_ostream_char_sentry_create(this)) {
5022 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5023 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5024 ostreambuf_iterator_char dest
= {0, strbuf
};
5026 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5028 basic_ostream_char_sentry_destroy(this);
5030 basic_ios_char_setstate(base
, state
);
5034 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5035 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5036 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
5037 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
5039 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
5040 int state
= IOSTATE_goodbit
;
5042 TRACE("(%p %x)\n", this, val
);
5044 if(basic_ostream_char_sentry_create(this)) {
5045 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5046 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
5047 ostreambuf_iterator_char dest
= {0, strbuf
};
5049 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
5051 basic_ostream_char_sentry_destroy(this);
5053 basic_ios_char_setstate(base
, state
);
5057 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5058 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5059 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
5061 TRACE("(%p)\n", ostr
);
5063 basic_ostream_char_put(ostr
, '\n');
5064 basic_ostream_char_flush(ostr
);
5068 /* $?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 */
5069 /* ??$?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 */
5070 basic_ostream_char
* __cdecl
basic_ostream_char_print_bstr(basic_ostream_char
*ostr
, const basic_string_char
*str
)
5072 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5073 IOSB_iostate state
= IOSTATE_goodbit
;
5075 TRACE("(%p %p)\n", ostr
, str
);
5077 if(basic_ostream_char_sentry_create(ostr
)) {
5078 MSVCP_size_t len
= MSVCP_basic_string_char_length(str
);
5079 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5081 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5082 for(; pad
!=0; pad
--) {
5083 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5084 state
= IOSTATE_badbit
;
5090 if(state
== IOSTATE_goodbit
) {
5091 if(basic_streambuf_char_sputn(base
->strbuf
, MSVCP_basic_string_char_c_str(str
), len
) != len
)
5092 state
= IOSTATE_badbit
;
5095 if(state
== IOSTATE_goodbit
) {
5096 for(; pad
!=0; pad
--) {
5097 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5098 state
= IOSTATE_badbit
;
5104 base
->base
.wide
= 0;
5106 state
= IOSTATE_badbit
;
5108 basic_ostream_char_sentry_destroy(ostr
);
5110 basic_ios_char_setstate(base
, state
);
5114 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5115 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5116 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5117 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5118 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5119 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5120 basic_ostream_char
* __cdecl
basic_ostream_char_print_ch(basic_ostream_char
*ostr
, char ch
)
5122 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5123 IOSB_iostate state
= IOSTATE_goodbit
;
5125 TRACE("(%p %d)\n", ostr
, ch
);
5127 if(basic_ostream_char_sentry_create(ostr
)) {
5128 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5130 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5131 for(; pad
!=0; pad
--) {
5132 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5133 state
= IOSTATE_badbit
;
5139 if(state
== IOSTATE_goodbit
) {
5140 if(basic_streambuf_char_sputc(base
->strbuf
, ch
) == EOF
)
5141 state
= IOSTATE_badbit
;
5144 if(state
== IOSTATE_goodbit
) {
5145 for(; pad
!=0; pad
--) {
5146 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5147 state
= IOSTATE_badbit
;
5153 base
->base
.wide
= 0;
5155 state
= IOSTATE_badbit
;
5157 basic_ostream_char_sentry_destroy(ostr
);
5159 basic_ios_char_setstate(base
, state
);
5163 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5164 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5165 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5166 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5167 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5168 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5169 basic_ostream_char
* __cdecl
basic_ostream_char_print_str(basic_ostream_char
*ostr
, const char *str
)
5171 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
5172 IOSB_iostate state
= IOSTATE_goodbit
;
5174 TRACE("(%p %s)\n", ostr
, str
);
5176 if(basic_ostream_char_sentry_create(ostr
)) {
5177 MSVCP_size_t len
= strlen(str
);
5178 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5180 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5181 for(; pad
!=0; pad
--) {
5182 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5183 state
= IOSTATE_badbit
;
5189 if(state
== IOSTATE_goodbit
) {
5190 if(basic_streambuf_char_sputn(base
->strbuf
, str
, len
) != len
)
5191 state
= IOSTATE_badbit
;
5194 if(state
== IOSTATE_goodbit
) {
5195 for(; pad
!=0; pad
--) {
5196 if(basic_streambuf_char_sputc(base
->strbuf
, base
->fillch
) == EOF
) {
5197 state
= IOSTATE_badbit
;
5203 base
->base
.wide
= 0;
5205 state
= IOSTATE_badbit
;
5207 basic_ostream_char_sentry_destroy(ostr
);
5209 basic_ios_char_setstate(base
, state
);
5213 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5214 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5215 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
5216 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
5217 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
5219 TRACE("(%p %p)\n", this, pfunc
);
5224 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5225 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5226 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
5227 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
5228 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
5230 TRACE("(%p %p)\n", this, pfunc
);
5231 pfunc(basic_ostream_char_get_basic_ios(this));
5235 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5236 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5237 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
5238 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
5239 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5241 TRACE("(%p %p)\n", this, pfunc
);
5242 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
5246 /* Caution: basic_ostream uses virtual inheritance. */
5247 static inline basic_ios_wchar
* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar
*this)
5249 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
5252 static inline basic_ios_wchar
* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar
*ptr
)
5254 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_wchar_vbtable
[1]);
5257 static inline basic_ostream_wchar
* basic_ostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
5259 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_wchar_vbtable
[1]);
5262 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5263 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
5264 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor
, 16)
5265 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor(basic_ostream_wchar
*this,
5266 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
5268 basic_ios_wchar
*base
;
5270 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
5273 this->vbtable
= basic_ostream_wchar_vbtable
;
5274 base
= basic_ostream_wchar_get_basic_ios(this);
5275 basic_ios_wchar_ctor(base
);
5277 base
= basic_ostream_wchar_get_basic_ios(this);
5280 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
5281 basic_ios_wchar_init(base
, strbuf
, isstd
);
5285 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
5286 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
5287 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized
, 16)
5288 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar
*this,
5289 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
5291 basic_ios_wchar
*base
;
5293 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
5296 this->vbtable
= basic_ostream_wchar_vbtable
;
5297 base
= basic_ostream_wchar_get_basic_ios(this);
5298 basic_ios_wchar_ctor(base
);
5300 base
= basic_ostream_wchar_get_basic_ios(this);
5303 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
5305 ios_base_Addstd(&base
->base
);
5309 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5310 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5311 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor
, 4)
5312 void __thiscall
basic_ostream_wchar_dtor(basic_ios_wchar
*base
)
5314 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
5316 /* don't destroy virtual base here */
5317 TRACE("(%p)\n", this);
5320 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5321 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5322 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor
, 4)
5323 void __thiscall
basic_ostream_wchar_vbase_dtor(basic_ostream_wchar
*this)
5325 TRACE("(%p)\n", this);
5326 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5327 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5330 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostream_wchar_vector_dtor
, 8)
5331 basic_ostream_wchar
* __thiscall
MSVCP_basic_ostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
5333 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
5335 TRACE("(%p %x)\n", this, flags
);
5338 /* we have an array, with the number of elements stored before the first object */
5339 int i
, *ptr
= (int *)this-1;
5341 for(i
=*ptr
-1; i
>=0; i
--)
5342 basic_ostream_wchar_vbase_dtor(this+i
);
5343 MSVCRT_operator_delete(ptr
);
5345 basic_ostream_wchar_vbase_dtor(this);
5347 MSVCRT_operator_delete(this);
5353 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
5354 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
5355 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush
, 4)
5356 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_flush(basic_ostream_wchar
*this)
5358 /* this function is not matching C++ specification */
5359 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5361 TRACE("(%p)\n", this);
5363 if(basic_ios_wchar_rdbuf_get(base
) && ios_base_good(&base
->base
)
5364 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base
))==-1)
5365 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5369 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5370 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5371 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx
, 4)
5372 void __thiscall
basic_ostream_wchar__Osfx(basic_ostream_wchar
*this)
5374 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5376 TRACE("(%p)\n", this);
5378 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
5379 basic_ostream_wchar_flush(this);
5382 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5383 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5384 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx
, 4)
5385 void __thiscall
basic_ostream_wchar_osfx(basic_ostream_wchar
*this)
5387 TRACE("(%p)\n", this);
5388 basic_ostream_wchar__Osfx(this);
5391 static BOOL
basic_ostream_wchar_sentry_create(basic_ostream_wchar
*ostr
)
5393 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5395 if(basic_ios_wchar_rdbuf_get(base
))
5396 basic_streambuf_wchar__Lock(base
->strbuf
);
5398 if(ios_base_good(&base
->base
) && base
->stream
)
5399 basic_ostream_wchar_flush(base
->stream
);
5401 return ios_base_good(&base
->base
);
5404 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar
*ostr
)
5406 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5408 if(ios_base_good(&base
->base
) && !__uncaught_exception())
5409 basic_ostream_wchar_osfx(ostr
);
5411 if(basic_ios_wchar_rdbuf_get(base
))
5412 basic_streambuf_wchar__Unlock(base
->strbuf
);
5415 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
5416 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
5417 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx
, 4)
5418 MSVCP_bool __thiscall
basic_ostream_wchar_opfx(basic_ostream_wchar
*this)
5420 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5422 TRACE("(%p)\n", this);
5424 if(ios_base_good(&base
->base
) && base
->stream
)
5425 basic_ostream_wchar_flush(base
->stream
);
5426 return ios_base_good(&base
->base
);
5429 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
5430 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
5431 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put
, 8)
5432 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_put(basic_ostream_wchar
*this, wchar_t ch
)
5434 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5436 TRACE("(%p %c)\n", this, ch
);
5438 if(!basic_ostream_wchar_sentry_create(this)
5439 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
5440 basic_ostream_wchar_sentry_destroy(this);
5441 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5445 basic_ostream_wchar_sentry_destroy(this);
5449 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
5450 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
5451 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 12)
5452 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
5454 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5456 TRACE("(%p %ld %d)\n", this, off
, way
);
5458 if(!ios_base_fail(&base
->base
)) {
5461 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
5462 &seek
, off
, way
, OPENMODE_out
);
5463 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
5464 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
5469 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5470 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5471 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos
, 28)
5472 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
5474 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5476 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
5478 if(!ios_base_fail(&base
->base
)) {
5481 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base
),
5482 &seek
, pos
, OPENMODE_out
);
5483 if(seek
.off
==0 && seek
.pos
==-1 && seek
.state
==0)
5484 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
5489 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5490 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5491 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp
, 8)
5492 fpos_int
* __thiscall
basic_ostream_wchar_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
5494 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5496 TRACE("(%p)\n", this);
5498 if(!ios_base_fail(&base
->base
)) {
5499 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
5500 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
5509 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
5510 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
5511 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 12)
5512 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
5514 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5516 TRACE("(%p %s %ld)\n", this, debugstr_w(str
), count
);
5518 if(!basic_ostream_wchar_sentry_create(this)
5519 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
5520 basic_ostream_wchar_sentry_destroy(this);
5521 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
5525 basic_ostream_wchar_sentry_destroy(this);
5529 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
5530 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
5531 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short
, 8)
5532 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_short(basic_ostream_wchar
*this, short val
)
5534 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5535 int state
= IOSTATE_goodbit
;
5537 TRACE("(%p %d)\n", this, val
);
5539 if(basic_ostream_wchar_sentry_create(this)) {
5540 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5541 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5542 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5544 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
),
5545 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
5546 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
5548 basic_ostream_wchar_sentry_destroy(this);
5550 basic_ios_wchar_setstate(base
, state
);
5554 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
5555 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
5556 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort
, 8)
5557 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
5559 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5560 int state
= IOSTATE_goodbit
;
5562 TRACE("(%p %u)\n", this, val
);
5564 if(basic_ostream_wchar_sentry_create(this)) {
5565 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5566 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5567 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5569 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5571 basic_ostream_wchar_sentry_destroy(this);
5573 basic_ios_wchar_setstate(base
, state
);
5577 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
5578 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
5579 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
5580 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
5581 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int
, 8)
5582 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int(basic_ostream_wchar
*this, int val
)
5584 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5585 int state
= IOSTATE_goodbit
;
5587 TRACE("(%p %d)\n", this, val
);
5589 if(basic_ostream_wchar_sentry_create(this)) {
5590 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5591 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5592 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5594 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5596 basic_ostream_wchar_sentry_destroy(this);
5598 basic_ios_wchar_setstate(base
, state
);
5602 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
5603 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
5604 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
5605 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
5606 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint
, 8)
5607 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5609 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5610 int state
= IOSTATE_goodbit
;
5612 TRACE("(%p %u)\n", this, val
);
5614 if(basic_ostream_wchar_sentry_create(this)) {
5615 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5616 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5617 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5619 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5621 basic_ostream_wchar_sentry_destroy(this);
5623 basic_ios_wchar_setstate(base
, state
);
5627 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
5628 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
5629 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float
, 8)
5630 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_float(basic_ostream_wchar
*this, float val
)
5632 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5633 int state
= IOSTATE_goodbit
;
5635 TRACE("(%p %f)\n", this, val
);
5637 if(basic_ostream_wchar_sentry_create(this)) {
5638 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5639 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5640 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5642 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5644 basic_ostream_wchar_sentry_destroy(this);
5646 basic_ios_wchar_setstate(base
, state
);
5650 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
5651 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
5652 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double
, 12)
5653 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_double(basic_ostream_wchar
*this, double val
)
5655 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5656 int state
= IOSTATE_goodbit
;
5658 TRACE("(%p %lf)\n", this, val
);
5660 if(basic_ostream_wchar_sentry_create(this)) {
5661 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5662 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5663 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5665 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5667 basic_ostream_wchar_sentry_destroy(this);
5669 basic_ios_wchar_setstate(base
, state
);
5673 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
5674 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
5675 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble
, 12)
5676 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ldouble(basic_ostream_wchar
*this, double val
)
5678 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5679 int state
= IOSTATE_goodbit
;
5681 TRACE("(%p %lf)\n", this, val
);
5683 if(basic_ostream_wchar_sentry_create(this)) {
5684 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5685 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5686 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5688 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5690 basic_ostream_wchar_sentry_destroy(this);
5692 basic_ios_wchar_setstate(base
, state
);
5696 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5697 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5698 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf
, 8)
5699 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5701 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5702 IOSB_iostate state
= IOSTATE_badbit
;
5703 unsigned short c
= '\n';
5705 TRACE("(%p %p)\n", this, val
);
5707 if(basic_ostream_wchar_sentry_create(this)) {
5708 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5709 c
= basic_streambuf_wchar_snextc(val
)) {
5710 state
= IOSTATE_goodbit
;
5712 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5713 state
= IOSTATE_badbit
;
5718 state
= IOSTATE_badbit
;
5720 basic_ostream_wchar_sentry_destroy(this);
5722 ios_base_width_set(&base
->base
, 0);
5723 basic_ios_wchar_setstate(base
, state
);
5727 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
5728 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
5729 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr
, 8)
5730 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ptr(basic_ostream_wchar
*this, const void *val
)
5732 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5733 int state
= IOSTATE_goodbit
;
5735 TRACE("(%p %p)\n", this, val
);
5737 if(basic_ostream_wchar_sentry_create(this)) {
5738 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5739 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5740 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5742 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5744 basic_ostream_wchar_sentry_destroy(this);
5746 basic_ios_wchar_setstate(base
, state
);
5750 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
5751 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
5752 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64
, 12)
5753 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int64(basic_ostream_wchar
*this, __int64 val
)
5755 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5756 int state
= IOSTATE_goodbit
;
5758 TRACE("(%p)\n", this);
5760 if(basic_ostream_wchar_sentry_create(this)) {
5761 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5762 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5763 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5765 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5767 basic_ostream_wchar_sentry_destroy(this);
5769 basic_ios_wchar_setstate(base
, state
);
5773 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
5774 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
5775 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64
, 12)
5776 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5778 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5779 int state
= IOSTATE_goodbit
;
5781 TRACE("(%p)\n", this);
5783 if(basic_ostream_wchar_sentry_create(this)) {
5784 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5785 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5786 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5788 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5790 basic_ostream_wchar_sentry_destroy(this);
5792 basic_ios_wchar_setstate(base
, state
);
5796 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
5797 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
5798 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool
, 8)
5799 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5801 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5802 int state
= IOSTATE_goodbit
;
5804 TRACE("(%p %x)\n", this, val
);
5806 if(basic_ostream_wchar_sentry_create(this)) {
5807 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5808 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
5809 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5811 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5813 basic_ostream_wchar_sentry_destroy(this);
5815 basic_ios_wchar_setstate(base
, state
);
5819 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5820 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5821 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_endl(basic_ostream_wchar
*ostr
)
5823 TRACE("(%p)\n", ostr
);
5825 basic_ostream_wchar_put(ostr
, '\n');
5826 basic_ostream_wchar_flush(ostr
);
5830 /* ??$?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 */
5831 /* ??$?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 */
5832 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_bstr(basic_ostream_wchar
*ostr
, const basic_string_wchar
*str
)
5834 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5835 IOSB_iostate state
= IOSTATE_goodbit
;
5837 TRACE("(%p %p)\n", ostr
, str
);
5839 if(basic_ostream_wchar_sentry_create(ostr
)) {
5840 MSVCP_size_t len
= MSVCP_basic_string_wchar_length(str
);
5841 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5843 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5844 for(; pad
!=0; pad
--) {
5845 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5846 state
= IOSTATE_badbit
;
5852 if(state
== IOSTATE_goodbit
) {
5853 if(basic_streambuf_wchar_sputn(base
->strbuf
, MSVCP_basic_string_wchar_c_str(str
), len
) != len
)
5854 state
= IOSTATE_badbit
;
5857 if(state
== IOSTATE_goodbit
) {
5858 for(; pad
!=0; pad
--) {
5859 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5860 state
= IOSTATE_badbit
;
5866 base
->base
.wide
= 0;
5868 state
= IOSTATE_badbit
;
5870 basic_ostream_wchar_sentry_destroy(ostr
);
5872 basic_ios_wchar_setstate(base
, state
);
5876 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
5877 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
5878 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_ch(basic_ostream_wchar
*ostr
, wchar_t ch
)
5880 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5881 IOSB_iostate state
= IOSTATE_goodbit
;
5883 TRACE("(%p %d)\n", ostr
, ch
);
5885 if(basic_ostream_wchar_sentry_create(ostr
)) {
5886 streamsize pad
= (base
->base
.wide
>1 ? base
->base
.wide
-1 : 0);
5888 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5889 for(; pad
!=0; pad
--) {
5890 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5891 state
= IOSTATE_badbit
;
5897 if(state
== IOSTATE_goodbit
) {
5898 if(basic_streambuf_wchar_sputc(base
->strbuf
, ch
) == WEOF
)
5899 state
= IOSTATE_badbit
;
5902 if(state
== IOSTATE_goodbit
) {
5903 for(; pad
!=0; pad
--) {
5904 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5905 state
= IOSTATE_badbit
;
5911 base
->base
.wide
= 0;
5913 state
= IOSTATE_badbit
;
5915 basic_ostream_wchar_sentry_destroy(ostr
);
5917 basic_ios_wchar_setstate(base
, state
);
5921 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
5922 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
5923 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_print_str(basic_ostream_wchar
*ostr
, const wchar_t *str
)
5925 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
5926 IOSB_iostate state
= IOSTATE_goodbit
;
5928 TRACE("(%p %s)\n", ostr
, debugstr_w(str
));
5930 if(basic_ostream_wchar_sentry_create(ostr
)) {
5931 MSVCP_size_t len
= wcslen(str
);
5932 streamsize pad
= (base
->base
.wide
>len
? base
->base
.wide
-len
: 0);
5934 if((base
->base
.fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
5935 for(; pad
!=0; pad
--) {
5936 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5937 state
= IOSTATE_badbit
;
5943 if(state
== IOSTATE_goodbit
) {
5944 if(basic_streambuf_wchar_sputn(base
->strbuf
, str
, len
) != len
)
5945 state
= IOSTATE_badbit
;
5948 if(state
== IOSTATE_goodbit
) {
5949 for(; pad
!=0; pad
--) {
5950 if(basic_streambuf_wchar_sputc(base
->strbuf
, base
->fillch
) == WEOF
) {
5951 state
= IOSTATE_badbit
;
5957 base
->base
.wide
= 0;
5959 state
= IOSTATE_badbit
;
5961 basic_ostream_wchar_sentry_destroy(ostr
);
5963 basic_ios_wchar_setstate(base
, state
);
5967 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5968 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5969 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func
, 8)
5970 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func(basic_ostream_wchar
*this,
5971 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
5973 TRACE("(%p %p)\n", this, pfunc
);
5978 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
5979 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
5980 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios
, 8)
5981 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar
*this,
5982 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
5984 TRACE("(%p %p)\n", this, pfunc
);
5985 pfunc(basic_ostream_wchar_get_basic_ios(this));
5989 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5990 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5991 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base
, 8)
5992 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_ios_base(
5993 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5995 TRACE("(%p %p)\n", this, pfunc
);
5996 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base
);
6000 /* Caution: basic_istream uses virtual inheritance. */
6001 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
6003 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
6006 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
6008 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
6011 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
6013 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
6016 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6017 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6018 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
6019 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
)
6021 basic_ios_char
*base
;
6023 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
6026 this->vbtable
= basic_istream_char_vbtable
;
6027 base
= basic_istream_char_get_basic_ios(this);
6028 basic_ios_char_ctor(base
);
6030 base
= basic_istream_char_get_basic_ios(this);
6033 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
6036 basic_ios_char_init(base
, strbuf
, isstd
);
6040 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6041 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6042 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
6043 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6045 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6048 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6049 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6050 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
6051 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
6053 basic_ios_char
*base
;
6055 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6058 this->vbtable
= basic_istream_char_vbtable
;
6059 base
= basic_istream_char_get_basic_ios(this);
6060 basic_ios_char_ctor(base
);
6062 base
= basic_istream_char_get_basic_ios(this);
6065 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
6066 ios_base_Addstd(&base
->base
);
6070 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6071 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6072 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
6073 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
6075 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6077 /* don't destroy virtual base here */
6078 TRACE("(%p)\n", this);
6081 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6082 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6083 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
6084 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
6086 TRACE("(%p)\n", this);
6087 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6088 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6091 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_char_vector_dtor
, 8)
6092 basic_istream_char
* __thiscall
MSVCP_basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
6094 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
6096 TRACE("(%p %x)\n", this, flags
);
6099 /* we have an array, with the number of elements stored before the first object */
6100 int i
, *ptr
= (int *)this-1;
6102 for(i
=*ptr
-1; i
>=0; i
--)
6103 basic_istream_char_vbase_dtor(this+i
);
6104 MSVCRT_operator_delete(ptr
);
6106 basic_istream_char_vbase_dtor(this);
6108 MSVCRT_operator_delete(this);
6114 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6115 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6116 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
6117 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
6119 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6121 TRACE("(%p %d)\n", this, noskip
);
6123 if(!ios_base_good(&base
->base
)) {
6124 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6128 if(basic_ios_char_tie_get(base
))
6129 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
6131 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6132 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6133 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
6136 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
6137 ch
= basic_streambuf_char_snextc(strbuf
)) {
6139 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6143 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6151 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6152 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6153 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
6154 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
6156 return basic_istream_char__Ipfx(this, noskip
);
6159 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6160 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6161 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
6162 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
6164 TRACE("(%p)\n", this);
6167 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
6169 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
6171 if(basic_ios_char_rdbuf_get(base
))
6172 basic_streambuf_char__Lock(base
->strbuf
);
6174 return basic_istream_char_ipfx(istr
, noskip
);
6177 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
6179 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
6181 if(basic_ios_char_rdbuf_get(base
))
6182 basic_streambuf_char__Unlock(base
->strbuf
);
6185 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6186 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6187 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
6188 int __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
6190 TRACE("(%p)\n", this);
6194 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6195 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6196 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
6197 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
6199 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6202 TRACE("(%p)\n", this);
6206 if(!basic_istream_char_sentry_create(this, TRUE
)) {
6207 basic_istream_char_sentry_destroy(this);
6211 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
6212 basic_istream_char_sentry_destroy(this);
6214 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6221 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6222 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6223 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
6224 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
6228 TRACE("(%p %p)\n", this, ch
);
6230 ret
= basic_istream_char_get(this);
6236 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6237 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6238 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 16)
6239 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6241 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6244 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
6248 if(basic_istream_char_sentry_create(this, TRUE
)) {
6249 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6251 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
6252 ch
= basic_streambuf_char_snextc(strbuf
)) {
6253 if(ch
==EOF
|| ch
==delim
)
6261 basic_istream_char_sentry_destroy(this);
6263 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6264 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6270 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6271 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6272 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 12)
6273 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
6275 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
6278 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6279 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6280 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
6281 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
6283 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6286 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
6290 if(basic_istream_char_sentry_create(this, TRUE
)) {
6291 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
6293 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
6294 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
6295 if(ch
==EOF
|| ch
==delim
)
6298 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
6303 basic_istream_char_sentry_destroy(this);
6305 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6306 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6310 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6311 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6312 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
6313 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
6315 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
6318 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6319 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6320 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 16)
6321 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
6323 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6326 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
6330 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
6331 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6334 ch
= basic_streambuf_char_sbumpc(strbuf
);
6336 if(ch
==EOF
|| ch
==delim
)
6346 else if(ch
!= EOF
) {
6347 ch
= basic_streambuf_char_sgetc(strbuf
);
6350 basic_streambuf_char__Gninc(strbuf
);
6355 basic_istream_char_sentry_destroy(this);
6357 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6358 (!this->count
|| (ch
!=delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6364 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6365 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6366 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 12)
6367 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
6369 return basic_istream_char_getline_delim(this, str
, count
, '\n');
6372 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
6373 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6374 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 12)
6375 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
6377 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6380 TRACE("(%p %ld %d)\n", this, count
, delim
);
6384 if(basic_istream_char_sentry_create(this, TRUE
)) {
6385 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6388 ch
= basic_streambuf_char_sbumpc(strbuf
);
6390 if(ch
==EOF
|| ch
==delim
)
6394 if(count
!= INT_MAX
)
6398 basic_istream_char_sentry_destroy(this);
6401 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
6405 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6406 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6407 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
6408 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
6410 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6413 TRACE("(%p)\n", this);
6417 if(basic_istream_char_sentry_create(this, TRUE
))
6418 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
6419 basic_istream_char_sentry_destroy(this);
6423 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
6424 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
6425 DEFINE_THISCALL_WRAPPER(basic_istream_char__Read_s
, 16)
6426 basic_istream_char
* __thiscall
basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
6428 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6429 IOSB_iostate state
= IOSTATE_goodbit
;
6431 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
6433 if(basic_istream_char_sentry_create(this, TRUE
)) {
6434 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6436 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
6437 if(this->count
!= count
)
6438 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
6442 basic_istream_char_sentry_destroy(this);
6444 basic_ios_char_setstate(base
, state
);
6448 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6449 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6450 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 12)
6451 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
6453 return basic_istream_char__Read_s(this, str
, count
, count
);
6456 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
6457 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
6458 DEFINE_THISCALL_WRAPPER(basic_istream_char__Readsome_s
, 16)
6459 streamsize __thiscall
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
6461 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6462 IOSB_iostate state
= IOSTATE_goodbit
;
6464 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
6468 if(basic_istream_char_sentry_create(this, TRUE
)) {
6469 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
6474 state
|= IOSTATE_eofbit
;
6476 basic_istream_char__Read_s(this, str
, size
, avail
);
6478 state
|= IOSTATE_failbit
;
6480 basic_istream_char_sentry_destroy(this);
6482 basic_ios_char_setstate(base
, state
);
6486 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
6487 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
6488 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 12)
6489 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
6491 return basic_istream_char__Readsome_s(this, str
, count
, count
);
6494 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
6495 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
6496 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
6497 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
6499 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6500 IOSB_iostate state
= IOSTATE_goodbit
;
6502 TRACE("(%p %c)\n", this, ch
);
6506 if(basic_istream_char_sentry_create(this, TRUE
)) {
6507 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6509 if(!ios_base_good(&base
->base
))
6510 state
|= IOSTATE_failbit
;
6511 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
6512 state
|= IOSTATE_badbit
;
6514 basic_istream_char_sentry_destroy(this);
6516 basic_ios_char_setstate(base
, state
);
6520 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
6521 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
6522 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
6523 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
6525 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6526 IOSB_iostate state
= IOSTATE_goodbit
;
6528 TRACE("(%p)\n", this);
6532 if(basic_istream_char_sentry_create(this, TRUE
)) {
6533 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6535 if(!ios_base_good(&base
->base
))
6536 state
|= IOSTATE_failbit
;
6537 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
6538 state
|= IOSTATE_badbit
;
6540 basic_istream_char_sentry_destroy(this);
6542 basic_ios_char_setstate(base
, state
);
6546 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6547 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6548 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
6549 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
6551 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6552 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6554 TRACE("(%p)\n", this);
6559 if(basic_istream_char_sentry_create(this, TRUE
)) {
6560 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
6561 basic_istream_char_sentry_destroy(this);
6565 basic_istream_char_sentry_destroy(this);
6567 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6571 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6572 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6573 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
6574 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
6576 TRACE("(%p %p)\n", this, ret
);
6578 if(basic_istream_char_sentry_create(this, TRUE
)) {
6579 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6580 if(!ios_base_fail(&base
->base
)) {
6581 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6582 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
6583 basic_istream_char_sentry_destroy(this);
6585 if(ret
->off
==0 && ret
->pos
==-1 && ret
->state
==0)
6586 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6590 basic_istream_char_sentry_destroy(this);
6598 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6599 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6600 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 12)
6601 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6603 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6605 TRACE("(%p %ld %d)\n", this, off
, dir
);
6607 if(basic_istream_char_sentry_create(this, TRUE
)) {
6608 if(!ios_base_fail(&base
->base
)) {
6609 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6612 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6613 basic_istream_char_sentry_destroy(this);
6615 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
6616 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6618 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6622 basic_istream_char_sentry_destroy(this);
6624 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6628 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6629 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6630 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6631 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6633 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6635 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6637 if(basic_istream_char_sentry_create(this, TRUE
)) {
6638 if(!ios_base_fail(&base
->base
)) {
6639 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6642 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6643 basic_istream_char_sentry_destroy(this);
6645 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
6646 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6648 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6652 basic_istream_char_sentry_destroy(this);
6654 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6658 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6659 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6660 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6661 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6663 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6664 int state
= IOSTATE_goodbit
;
6666 TRACE("(%p %p)\n", this, v
);
6668 if(basic_istream_char_sentry_create(this, FALSE
)) {
6669 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6670 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6671 istreambuf_iterator_char first
={0}, last
={0};
6674 first
.strbuf
= strbuf
;
6675 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6677 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6680 state
|= IOSTATE_failbit
;
6682 basic_istream_char_sentry_destroy(this);
6684 basic_ios_char_setstate(base
, state
);
6688 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6689 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6690 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6691 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6693 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6694 int state
= IOSTATE_goodbit
;
6696 TRACE("(%p %p)\n", this, v
);
6698 if(basic_istream_char_sentry_create(this, FALSE
)) {
6699 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6700 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6701 istreambuf_iterator_char first
={0}, last
={0};
6703 first
.strbuf
= strbuf
;
6704 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6706 basic_istream_char_sentry_destroy(this);
6708 basic_ios_char_setstate(base
, state
);
6712 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6713 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6714 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6715 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6717 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6718 int state
= IOSTATE_goodbit
;
6720 TRACE("(%p %p)\n", this, v
);
6722 if(basic_istream_char_sentry_create(this, FALSE
)) {
6723 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6724 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6725 istreambuf_iterator_char first
={0}, last
={0};
6727 first
.strbuf
= strbuf
;
6728 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6730 basic_istream_char_sentry_destroy(this);
6732 basic_ios_char_setstate(base
, state
);
6736 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6737 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6738 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6739 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6741 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6742 int state
= IOSTATE_goodbit
;
6744 TRACE("(%p %p)\n", this, v
);
6746 if(basic_istream_char_sentry_create(this, FALSE
)) {
6747 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6748 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6749 istreambuf_iterator_char first
={0}, last
={0};
6751 first
.strbuf
= strbuf
;
6752 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6754 basic_istream_char_sentry_destroy(this);
6756 basic_ios_char_setstate(base
, state
);
6760 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6761 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6762 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6763 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6765 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6766 int state
= IOSTATE_goodbit
;
6768 TRACE("(%p %p)\n", this, v
);
6770 if(basic_istream_char_sentry_create(this, FALSE
)) {
6771 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6772 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6773 istreambuf_iterator_char first
={0}, last
={0};
6775 first
.strbuf
= strbuf
;
6776 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6778 basic_istream_char_sentry_destroy(this);
6780 basic_ios_char_setstate(base
, state
);
6784 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6785 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6786 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6787 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6789 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6790 int state
= IOSTATE_goodbit
;
6792 TRACE("(%p %p)\n", this, v
);
6794 if(basic_istream_char_sentry_create(this, FALSE
)) {
6795 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6796 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6797 istreambuf_iterator_char first
={0}, last
={0};
6799 first
.strbuf
= strbuf
;
6800 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6802 basic_istream_char_sentry_destroy(this);
6804 basic_ios_char_setstate(base
, state
);
6808 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6809 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6810 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6811 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6813 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6814 int state
= IOSTATE_goodbit
;
6816 TRACE("(%p %p)\n", this, v
);
6818 if(basic_istream_char_sentry_create(this, FALSE
)) {
6819 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6820 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6821 istreambuf_iterator_char first
={0}, last
={0};
6823 first
.strbuf
= strbuf
;
6824 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6826 basic_istream_char_sentry_destroy(this);
6828 basic_ios_char_setstate(base
, state
);
6832 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6833 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6834 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6835 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6837 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6838 int state
= IOSTATE_goodbit
;
6840 TRACE("(%p %p)\n", this, v
);
6842 if(basic_istream_char_sentry_create(this, FALSE
)) {
6843 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6844 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6845 istreambuf_iterator_char first
={0}, last
={0};
6847 first
.strbuf
= strbuf
;
6848 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6850 basic_istream_char_sentry_destroy(this);
6852 basic_ios_char_setstate(base
, state
);
6856 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6857 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6858 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6859 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6861 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6862 int state
= IOSTATE_goodbit
;
6864 TRACE("(%p %p)\n", this, v
);
6866 if(basic_istream_char_sentry_create(this, FALSE
)) {
6867 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6868 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6869 istreambuf_iterator_char first
={0}, last
={0};
6871 first
.strbuf
= strbuf
;
6872 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6874 basic_istream_char_sentry_destroy(this);
6876 basic_ios_char_setstate(base
, state
);
6880 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6881 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6882 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6883 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6885 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6886 int state
= IOSTATE_goodbit
;
6888 TRACE("(%p %p)\n", this, v
);
6890 if(basic_istream_char_sentry_create(this, FALSE
)) {
6891 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6892 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6893 istreambuf_iterator_char first
={0}, last
={0};
6895 first
.strbuf
= strbuf
;
6896 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6898 basic_istream_char_sentry_destroy(this);
6900 basic_ios_char_setstate(base
, state
);
6904 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6905 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6906 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6907 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6909 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6910 int state
= IOSTATE_goodbit
;
6912 TRACE("(%p %p)\n", this, v
);
6914 if(basic_istream_char_sentry_create(this, FALSE
)) {
6915 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6916 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6917 istreambuf_iterator_char first
={0}, last
={0};
6919 first
.strbuf
= strbuf
;
6920 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6922 basic_istream_char_sentry_destroy(this);
6924 basic_ios_char_setstate(base
, state
);
6928 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6929 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6930 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6931 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6933 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6934 int state
= IOSTATE_goodbit
;
6936 TRACE("(%p %p)\n", this, v
);
6938 if(basic_istream_char_sentry_create(this, FALSE
)) {
6939 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6940 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6941 istreambuf_iterator_char first
={0}, last
={0};
6943 first
.strbuf
= strbuf
;
6944 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6946 basic_istream_char_sentry_destroy(this);
6948 basic_ios_char_setstate(base
, state
);
6952 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6953 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6954 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6955 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
6957 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6958 int state
= IOSTATE_goodbit
;
6960 TRACE("(%p %p)\n", this, v
);
6962 if(basic_istream_char_sentry_create(this, FALSE
)) {
6963 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6964 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6965 istreambuf_iterator_char first
={0}, last
={0};
6967 first
.strbuf
= strbuf
;
6968 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6970 basic_istream_char_sentry_destroy(this);
6972 basic_ios_char_setstate(base
, state
);
6976 /* ??$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 */
6977 /* ??$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 */
6978 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr_delim(
6979 basic_istream_char
*istream
, basic_string_char
*str
, char delim
)
6981 IOSB_iostate state
= IOSTATE_failbit
;
6984 TRACE("(%p %p %c)\n", istream
, str
, delim
);
6986 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
6987 MSVCP_basic_string_char_clear(str
);
6989 for(c
= basic_istream_char_get(istream
); c
!=delim
&& c
!=EOF
;
6990 c
= basic_istream_char_get(istream
)) {
6991 state
= IOSTATE_goodbit
;
6992 MSVCP_basic_string_char_append_ch(str
, c
);
6995 basic_istream_char_sentry_destroy(istream
);
6997 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
6998 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7002 /* ??$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 */
7003 /* ??$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 */
7004 basic_istream_char
* __cdecl
basic_istream_char_getline_bstr(
7005 basic_istream_char
*istream
, basic_string_char
*str
)
7007 return basic_istream_char_getline_bstr_delim(istream
, str
, '\n');
7010 /* ??$?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 */
7011 /* ??$?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 */
7012 basic_istream_char
* __cdecl
basic_istream_char_read_bstr(
7013 basic_istream_char
*istream
, basic_string_char
*str
)
7015 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7016 IOSB_iostate state
= IOSTATE_failbit
;
7019 TRACE("(%p %p)\n", istream
, str
);
7021 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7022 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
7023 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
7028 MSVCP_basic_string_char_clear(str
);
7030 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7031 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7032 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7033 state
= IOSTATE_goodbit
;
7034 MSVCP_basic_string_char_append_ch(str
, c
);
7037 ios_base_width_set(&base
->base
, 0);
7039 basic_istream_char_sentry_destroy(istream
);
7041 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7045 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7046 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7047 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7048 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7049 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7050 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7051 basic_istream_char
* __cdecl
basic_istream_char_read_str(basic_istream_char
*istream
, char *str
)
7053 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
7054 IOSB_iostate state
= IOSTATE_failbit
;
7057 TRACE("(%p %p)\n", istream
, str
);
7059 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7060 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
7061 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
7063 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
7064 c
!=EOF
&& !ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
7065 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
)), count
--) {
7066 state
= IOSTATE_goodbit
;
7071 ios_base_width_set(&base
->base
, 0);
7073 basic_istream_char_sentry_destroy(istream
);
7075 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7079 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7080 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7081 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7082 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7083 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7084 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7085 basic_istream_char
* __cdecl
basic_istream_char_read_ch(basic_istream_char
*istream
, char *ch
)
7087 IOSB_iostate state
= IOSTATE_failbit
;
7090 TRACE("(%p %p)\n", istream
, ch
);
7092 if(basic_istream_char_sentry_create(istream
, FALSE
)) {
7093 c
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7094 basic_istream_char_get_basic_ios(istream
)));
7096 state
= IOSTATE_goodbit
;
7100 basic_istream_char_sentry_destroy(istream
);
7102 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream
),
7103 state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7107 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7108 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7109 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
7110 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
7111 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
7113 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
7114 IOSB_iostate state
= IOSTATE_failbit
;
7117 TRACE("(%p %p)\n", this, streambuf
);
7119 if(basic_istream_char_sentry_create(this, FALSE
)) {
7120 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
7121 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
7122 state
= IOSTATE_goodbit
;
7123 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
7127 basic_istream_char_sentry_destroy(this);
7129 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7133 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7134 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7135 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
7136 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
7137 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
7139 TRACE("(%p %p)\n", this, pfunc
);
7144 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7145 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7146 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
7147 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
7148 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
7150 TRACE("(%p %p)\n", this, pfunc
);
7151 pfunc(basic_istream_char_get_basic_ios(this));
7155 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7156 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7157 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
7158 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
7159 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7161 TRACE("(%p %p)\n", this, pfunc
);
7162 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
7166 /* Caution: basic_istream uses virtual inheritance. */
7167 static inline basic_ios_wchar
* basic_istream_wchar_get_basic_ios(basic_istream_wchar
*this)
7169 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
7172 static inline basic_ios_wchar
* basic_istream_wchar_to_basic_ios(basic_istream_wchar
*ptr
)
7174 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_wchar_vbtable
[1]);
7177 static inline basic_istream_wchar
* basic_istream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
7179 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_wchar_vbtable
[1]);
7182 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7183 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7184 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init
, 20)
7185 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
)
7187 basic_ios_wchar
*base
;
7189 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
7192 this->vbtable
= basic_istream_wchar_vbtable
;
7193 base
= basic_istream_wchar_get_basic_ios(this);
7194 basic_ios_wchar_ctor(base
);
7196 base
= basic_istream_wchar_get_basic_ios(this);
7199 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
7202 basic_ios_wchar_init(base
, strbuf
, isstd
);
7206 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7207 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7208 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor
, 16)
7209 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
7211 return basic_istream_wchar_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
7214 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7215 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7216 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized
, 12)
7217 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_uninitialized(basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
7219 basic_ios_wchar
*base
;
7221 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
7224 this->vbtable
= basic_istream_wchar_vbtable
;
7225 base
= basic_istream_wchar_get_basic_ios(this);
7226 basic_ios_wchar_ctor(base
);
7228 base
= basic_istream_wchar_get_basic_ios(this);
7231 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
7232 ios_base_Addstd(&base
->base
);
7236 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7237 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7238 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor
, 4)
7239 void __thiscall
basic_istream_wchar_dtor(basic_ios_wchar
*base
)
7241 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
7243 /* don't destroy virtual base here */
7244 TRACE("(%p)\n", this);
7247 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7248 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7249 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor
, 4)
7250 void __thiscall
basic_istream_wchar_vbase_dtor(basic_istream_wchar
*this)
7252 TRACE("(%p)\n", this);
7253 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7254 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7257 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istream_wchar_vector_dtor
, 8)
7258 basic_istream_wchar
* __thiscall
MSVCP_basic_istream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7260 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
7262 TRACE("(%p %x)\n", this, flags
);
7265 /* we have an array, with the number of elements stored before the first object */
7266 int i
, *ptr
= (int *)this-1;
7268 for(i
=*ptr
-1; i
>=0; i
--)
7269 basic_istream_wchar_vbase_dtor(this+i
);
7270 MSVCRT_operator_delete(ptr
);
7272 basic_istream_wchar_vbase_dtor(this);
7274 MSVCRT_operator_delete(this);
7280 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7281 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7282 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx
, 8)
7283 MSVCP_bool __thiscall
basic_istream_wchar__Ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
7285 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7287 TRACE("(%p %d)\n", this, noskip
);
7289 if(!ios_base_good(&base
->base
)) {
7290 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7294 if(basic_ios_wchar_tie_get(base
))
7295 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base
));
7297 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
7298 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7299 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
7302 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
7303 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7305 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
7309 if(!ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
7317 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
7318 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
7319 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx
, 8)
7320 MSVCP_bool __thiscall
basic_istream_wchar_ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
7322 return basic_istream_wchar__Ipfx(this, noskip
);
7325 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7326 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7327 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx
, 4)
7328 void __thiscall
basic_istream_wchar_isfx(basic_istream_wchar
*this)
7330 TRACE("(%p)\n", this);
7333 static BOOL
basic_istream_wchar_sentry_create(basic_istream_wchar
*istr
, MSVCP_bool noskip
)
7335 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
7337 if(basic_ios_wchar_rdbuf_get(base
))
7338 basic_streambuf_wchar__Lock(base
->strbuf
);
7340 return basic_istream_wchar_ipfx(istr
, noskip
);
7343 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar
*istr
)
7345 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
7347 if(basic_ios_wchar_rdbuf_get(base
))
7348 basic_streambuf_wchar__Unlock(base
->strbuf
);
7351 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
7352 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
7353 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount
, 4)
7354 int __thiscall
basic_istream_wchar_gcount(const basic_istream_wchar
*this)
7356 TRACE("(%p)\n", this);
7360 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
7361 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
7362 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get
, 4)
7363 unsigned short __thiscall
basic_istream_wchar_get(basic_istream_wchar
*this)
7365 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7368 TRACE("(%p)\n", this);
7372 if(!basic_istream_wchar_sentry_create(this, TRUE
)) {
7373 basic_istream_wchar_sentry_destroy(this);
7377 ret
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base
));
7378 basic_istream_wchar_sentry_destroy(this);
7380 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
7387 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
7388 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
7389 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch
, 8)
7390 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
7394 TRACE("(%p %p)\n", this, ch
);
7396 ret
= basic_istream_wchar_get(this);
7402 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
7403 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
7404 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 16)
7405 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7407 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7408 unsigned short ch
= delim
;
7410 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
7414 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7415 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7417 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
7418 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
7419 if(ch
==WEOF
|| ch
==delim
)
7427 basic_istream_wchar_sentry_destroy(this);
7429 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7430 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7436 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7437 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7438 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 12)
7439 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7441 return basic_istream_wchar_get_str_delim(this, str
, count
, '\n');
7444 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
7445 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
7446 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim
, 12)
7447 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
7449 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7450 unsigned short ch
= delim
;
7452 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
7456 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7457 basic_streambuf_wchar
*strbuf_read
= basic_ios_wchar_rdbuf_get(base
);
7459 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
7460 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
7461 if(ch
==WEOF
|| ch
==delim
)
7464 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
7469 basic_istream_wchar_sentry_destroy(this);
7471 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
7472 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7476 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
7477 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
7478 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf
, 8)
7479 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
7481 return basic_istream_wchar_get_streambuf_delim(this, strbuf
, '\n');
7484 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
7485 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
7486 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 16)
7487 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
7489 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7490 unsigned short ch
= delim
;
7492 TRACE("(%p %p %ld %c)\n", this, str
, count
, delim
);
7496 if(basic_istream_wchar_sentry_create(this, TRUE
) && count
>0) {
7497 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7500 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7502 if(ch
==WEOF
|| ch
==delim
)
7512 else if(ch
!= WEOF
) {
7513 ch
= basic_streambuf_wchar_sgetc(strbuf
);
7516 basic_streambuf_wchar__Gninc(strbuf
);
7521 basic_istream_wchar_sentry_destroy(this);
7523 basic_ios_wchar_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
7524 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
7530 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7531 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7532 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 12)
7533 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7535 return basic_istream_wchar_getline_delim(this, str
, count
, '\n');
7538 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
7539 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
7540 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 12)
7541 basic_istream_wchar
* __thiscall
basic_istream_wchar_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
7543 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7544 unsigned short ch
= delim
;
7546 TRACE("(%p %ld %d)\n", this, count
, delim
);
7550 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7551 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7554 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
7556 if(ch
==WEOF
|| ch
==delim
)
7560 if(count
!= INT_MAX
)
7564 basic_istream_wchar_sentry_destroy(this);
7567 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
7571 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
7572 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
7573 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek
, 4)
7574 unsigned short __thiscall
basic_istream_wchar_peek(basic_istream_wchar
*this)
7576 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7577 unsigned short ret
= WEOF
;
7579 TRACE("(%p)\n", this);
7583 if(basic_istream_wchar_sentry_create(this, TRUE
))
7584 ret
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
7585 basic_istream_wchar_sentry_destroy(this);
7589 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
7590 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
7591 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Read_s
, 16)
7592 basic_istream_wchar
* __thiscall
basic_istream_wchar__Read_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7594 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7595 IOSB_iostate state
= IOSTATE_goodbit
;
7597 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
7599 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7600 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7602 this->count
= basic_streambuf_wchar__Sgetn_s(strbuf
, str
, size
, count
);
7603 if(this->count
!= count
)
7604 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
7608 basic_istream_wchar_sentry_destroy(this);
7610 basic_ios_wchar_setstate(base
, state
);
7614 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7615 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7616 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 12)
7617 basic_istream_wchar
* __thiscall
basic_istream_wchar_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7619 return basic_istream_wchar__Read_s(this, str
, count
, count
);
7622 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
7623 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
7624 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Readsome_s
, 16)
7625 streamsize __thiscall
basic_istream_wchar__Readsome_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7627 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7628 IOSB_iostate state
= IOSTATE_goodbit
;
7630 TRACE("(%p %p %lu %ld)\n", this, str
, size
, count
);
7634 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7635 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base
));
7640 state
|= IOSTATE_eofbit
;
7642 basic_istream_wchar__Read_s(this, str
, size
, avail
);
7644 state
|= IOSTATE_failbit
;
7646 basic_istream_wchar_sentry_destroy(this);
7648 basic_ios_wchar_setstate(base
, state
);
7652 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
7653 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
7654 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 12)
7655 streamsize __thiscall
basic_istream_wchar_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7657 return basic_istream_wchar__Readsome_s(this, str
, count
, count
);
7660 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
7661 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
7662 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback
, 8)
7663 basic_istream_wchar
* __thiscall
basic_istream_wchar_putback(basic_istream_wchar
*this, wchar_t ch
)
7665 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7666 IOSB_iostate state
= IOSTATE_goodbit
;
7668 TRACE("(%p %c)\n", this, ch
);
7672 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7673 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7675 if(!ios_base_good(&base
->base
))
7676 state
|= IOSTATE_failbit
;
7677 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7678 state
|= IOSTATE_badbit
;
7680 basic_istream_wchar_sentry_destroy(this);
7682 basic_ios_wchar_setstate(base
, state
);
7686 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
7687 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
7688 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget
, 4)
7689 basic_istream_wchar
* __thiscall
basic_istream_wchar_unget(basic_istream_wchar
*this)
7691 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7692 IOSB_iostate state
= IOSTATE_goodbit
;
7694 TRACE("(%p)\n", this);
7698 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7699 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7701 if(!ios_base_good(&base
->base
))
7702 state
|= IOSTATE_failbit
;
7703 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7704 state
|= IOSTATE_badbit
;
7706 basic_istream_wchar_sentry_destroy(this);
7708 basic_ios_wchar_setstate(base
, state
);
7712 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
7713 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
7714 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync
, 4)
7715 int __thiscall
basic_istream_wchar_sync(basic_istream_wchar
*this)
7717 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7718 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7720 TRACE("(%p)\n", this);
7725 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7726 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7727 basic_istream_wchar_sentry_destroy(this);
7731 basic_istream_wchar_sentry_destroy(this);
7733 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7737 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7738 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7739 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg
, 8)
7740 fpos_int
* __thiscall
basic_istream_wchar_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7742 TRACE("(%p %p)\n", this, ret
);
7744 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7745 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7746 if(!ios_base_fail(&base
->base
)) {
7747 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7748 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7749 basic_istream_wchar_sentry_destroy(this);
7751 if(ret
->off
==0 && ret
->pos
==-1 && ret
->state
==0)
7752 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7756 basic_istream_wchar_sentry_destroy(this);
7764 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
7765 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
7766 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 12)
7767 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7769 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7771 TRACE("(%p %ld %d)\n", this, off
, dir
);
7773 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7774 if(!ios_base_fail(&base
->base
)) {
7775 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7778 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7779 basic_istream_wchar_sentry_destroy(this);
7781 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
7782 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7784 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7788 basic_istream_wchar_sentry_destroy(this);
7790 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7794 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7795 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7796 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos
, 28)
7797 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7799 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7801 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7803 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7804 if(!ios_base_fail(&base
->base
)) {
7805 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7808 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7809 basic_istream_wchar_sentry_destroy(this);
7811 if(ret
.off
==0 && ret
.pos
==-1 && ret
.state
==0)
7812 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7814 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7818 basic_istream_wchar_sentry_destroy(this);
7820 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7824 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
7825 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
7826 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short
, 8)
7827 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_short(basic_istream_wchar
*this, short *v
)
7829 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7830 int state
= IOSTATE_goodbit
;
7832 TRACE("(%p %p)\n", this, v
);
7834 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7835 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7836 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7837 istreambuf_iterator_wchar first
={0}, last
={0};
7840 first
.strbuf
= strbuf
;
7841 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7843 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7846 state
|= IOSTATE_failbit
;
7848 basic_istream_wchar_sentry_destroy(this);
7850 basic_ios_wchar_setstate(base
, state
);
7854 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
7855 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
7856 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort
, 8)
7857 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ushort(basic_istream_wchar
*this, unsigned short *v
)
7859 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7860 int state
= IOSTATE_goodbit
;
7862 TRACE("(%p %p)\n", this, v
);
7864 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7865 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7866 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7867 istreambuf_iterator_wchar first
={0}, last
={0};
7869 first
.strbuf
= strbuf
;
7870 num_get_wchar_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7872 basic_istream_wchar_sentry_destroy(this);
7874 basic_ios_wchar_setstate(base
, state
);
7878 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
7879 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
7880 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int
, 8)
7881 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int(basic_istream_wchar
*this, int *v
)
7883 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7884 int state
= IOSTATE_goodbit
;
7886 TRACE("(%p %p)\n", this, v
);
7888 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7889 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7890 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7891 istreambuf_iterator_wchar first
={0}, last
={0};
7893 first
.strbuf
= strbuf
;
7894 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7896 basic_istream_wchar_sentry_destroy(this);
7898 basic_ios_wchar_setstate(base
, state
);
7902 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
7903 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
7904 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint
, 8)
7905 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7907 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7908 int state
= IOSTATE_goodbit
;
7910 TRACE("(%p %p)\n", this, v
);
7912 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7913 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7914 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7915 istreambuf_iterator_wchar first
={0}, last
={0};
7917 first
.strbuf
= strbuf
;
7918 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7920 basic_istream_wchar_sentry_destroy(this);
7922 basic_ios_wchar_setstate(base
, state
);
7926 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7927 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7928 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long
, 8)
7929 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_long(basic_istream_wchar
*this, LONG
*v
)
7931 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7932 int state
= IOSTATE_goodbit
;
7934 TRACE("(%p %p)\n", this, v
);
7936 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7937 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7938 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7939 istreambuf_iterator_wchar first
={0}, last
={0};
7941 first
.strbuf
= strbuf
;
7942 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7944 basic_istream_wchar_sentry_destroy(this);
7946 basic_ios_wchar_setstate(base
, state
);
7950 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
7951 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
7952 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong
, 8)
7953 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7955 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7956 int state
= IOSTATE_goodbit
;
7958 TRACE("(%p %p)\n", this, v
);
7960 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7961 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7962 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7963 istreambuf_iterator_wchar first
={0}, last
={0};
7965 first
.strbuf
= strbuf
;
7966 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7968 basic_istream_wchar_sentry_destroy(this);
7970 basic_ios_wchar_setstate(base
, state
);
7974 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
7975 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
7976 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float
, 8)
7977 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_float(basic_istream_wchar
*this, float *v
)
7979 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7980 int state
= IOSTATE_goodbit
;
7982 TRACE("(%p %p)\n", this, v
);
7984 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7985 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7986 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7987 istreambuf_iterator_wchar first
={0}, last
={0};
7989 first
.strbuf
= strbuf
;
7990 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7992 basic_istream_wchar_sentry_destroy(this);
7994 basic_ios_wchar_setstate(base
, state
);
7998 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
7999 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
8000 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double
, 8)
8001 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_double(basic_istream_wchar
*this, double *v
)
8003 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8004 int state
= IOSTATE_goodbit
;
8006 TRACE("(%p %p)\n", this, v
);
8008 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8009 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8010 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8011 istreambuf_iterator_wchar first
={0}, last
={0};
8013 first
.strbuf
= strbuf
;
8014 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8016 basic_istream_wchar_sentry_destroy(this);
8018 basic_ios_wchar_setstate(base
, state
);
8022 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
8023 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
8024 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble
, 8)
8025 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ldouble(basic_istream_wchar
*this, double *v
)
8027 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8028 int state
= IOSTATE_goodbit
;
8030 TRACE("(%p %p)\n", this, v
);
8032 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8033 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8034 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8035 istreambuf_iterator_wchar first
={0}, last
={0};
8037 first
.strbuf
= strbuf
;
8038 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8040 basic_istream_wchar_sentry_destroy(this);
8042 basic_ios_wchar_setstate(base
, state
);
8046 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
8047 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8048 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr
, 8)
8049 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ptr(basic_istream_wchar
*this, void **v
)
8051 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8052 int state
= IOSTATE_goodbit
;
8054 TRACE("(%p %p)\n", this, v
);
8056 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8057 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8058 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8059 istreambuf_iterator_wchar first
={0}, last
={0};
8061 first
.strbuf
= strbuf
;
8062 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8064 basic_istream_wchar_sentry_destroy(this);
8066 basic_ios_wchar_setstate(base
, state
);
8070 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
8071 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
8072 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64
, 8)
8073 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int64(basic_istream_wchar
*this, __int64
*v
)
8075 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8076 int state
= IOSTATE_goodbit
;
8078 TRACE("(%p %p)\n", this, v
);
8080 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8081 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8082 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8083 istreambuf_iterator_wchar first
={0}, last
={0};
8085 first
.strbuf
= strbuf
;
8086 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8088 basic_istream_wchar_sentry_destroy(this);
8090 basic_ios_wchar_setstate(base
, state
);
8094 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
8095 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
8096 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64
, 8)
8097 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
8099 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8100 int state
= IOSTATE_goodbit
;
8102 TRACE("(%p %p)\n", this, v
);
8104 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8105 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8106 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8107 istreambuf_iterator_wchar first
={0}, last
={0};
8109 first
.strbuf
= strbuf
;
8110 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8112 basic_istream_wchar_sentry_destroy(this);
8114 basic_ios_wchar_setstate(base
, state
);
8118 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
8119 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
8120 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool
, 8)
8121 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
8123 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8124 int state
= IOSTATE_goodbit
;
8126 TRACE("(%p %p)\n", this, v
);
8128 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8129 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
8130 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
8131 istreambuf_iterator_wchar first
={0}, last
={0};
8133 first
.strbuf
= strbuf
;
8134 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
8136 basic_istream_wchar_sentry_destroy(this);
8138 basic_ios_wchar_setstate(base
, state
);
8142 /* ??$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 */
8143 /* ??$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 */
8144 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr_delim(
8145 basic_istream_wchar
*istream
, basic_string_wchar
*str
, wchar_t delim
)
8147 IOSB_iostate state
= IOSTATE_failbit
;
8150 TRACE("(%p %p %c)\n", istream
, str
, delim
);
8152 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
8153 MSVCP_basic_string_wchar_clear(str
);
8155 for(c
= basic_istream_wchar_get(istream
); c
!=delim
&& c
!=WEOF
;
8156 c
= basic_istream_wchar_get(istream
)) {
8157 state
= IOSTATE_goodbit
;
8158 MSVCP_basic_string_wchar_append_ch(str
, c
);
8161 basic_istream_wchar_sentry_destroy(istream
);
8163 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
),
8164 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8168 /* ??$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 */
8169 /* ??$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 */
8170 basic_istream_wchar
* __cdecl
basic_istream_wchar_getline_bstr(
8171 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8173 return basic_istream_wchar_getline_bstr_delim(istream
, str
, '\n');
8176 /* ??$?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 */
8177 /* ??$?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 */
8178 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_bstr(
8179 basic_istream_wchar
*istream
, basic_string_wchar
*str
)
8181 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
8182 IOSB_iostate state
= IOSTATE_failbit
;
8185 TRACE("(%p %p)\n", istream
, str
);
8187 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8188 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
8189 MSVCP_size_t count
= ios_base_width_get(&base
->base
);
8194 MSVCP_basic_string_wchar_clear(str
);
8196 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
8197 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8198 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
8199 state
= IOSTATE_goodbit
;
8200 MSVCP_basic_string_wchar_append_ch(str
, c
);
8203 ios_base_width_set(&base
->base
, 0);
8205 basic_istream_wchar_sentry_destroy(istream
);
8207 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8211 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@PA_W@Z */
8212 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@PEA_W@Z */
8213 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_str(basic_istream_wchar
*istream
, wchar_t *str
)
8215 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
8216 IOSB_iostate state
= IOSTATE_failbit
;
8217 unsigned short c
= '\n';
8219 TRACE("(%p %p)\n", istream
, str
);
8221 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8222 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
8223 MSVCP_size_t count
= ios_base_width_get(&base
->base
)-1;
8225 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
8226 c
!=WEOF
&& !ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, c
) && count
>0;
8227 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
)), count
--) {
8228 state
= IOSTATE_goodbit
;
8233 ios_base_width_set(&base
->base
, 0);
8235 basic_istream_wchar_sentry_destroy(istream
);
8237 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8241 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
8242 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
8243 basic_istream_wchar
* __cdecl
basic_istream_wchar_read_ch(basic_istream_wchar
*istream
, wchar_t *ch
)
8245 IOSB_iostate state
= IOSTATE_failbit
;
8246 unsigned short c
= 0;
8248 TRACE("(%p %p)\n", istream
, ch
);
8250 if(basic_istream_wchar_sentry_create(istream
, FALSE
)) {
8251 c
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
8252 basic_istream_wchar_get_basic_ios(istream
)));
8254 state
= IOSTATE_goodbit
;
8258 basic_istream_wchar_sentry_destroy(istream
);
8260 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream
),
8261 state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8265 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8266 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8267 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf
, 8)
8268 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_streambuf(
8269 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
8271 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
8272 IOSB_iostate state
= IOSTATE_failbit
;
8273 unsigned short c
= '\n';
8275 TRACE("(%p %p)\n", this, streambuf
);
8277 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
8278 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
)); c
!=WEOF
;
8279 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
))) {
8280 state
= IOSTATE_goodbit
;
8281 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
8285 basic_istream_wchar_sentry_destroy(this);
8287 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
8291 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
8292 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
8293 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func
, 8)
8294 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func(basic_istream_wchar
*this,
8295 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
8297 TRACE("(%p %p)\n", this, pfunc
);
8302 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
8303 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
8304 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios
, 8)
8305 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_basic_ios(basic_istream_wchar
*this,
8306 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
8308 TRACE("(%p %p)\n", this, pfunc
);
8309 pfunc(basic_istream_wchar_get_basic_ios(this));
8313 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
8314 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
8315 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base
, 8)
8316 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_ios_base(
8317 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
8319 TRACE("(%p %p)\n", this, pfunc
);
8320 pfunc(&basic_istream_wchar_get_basic_ios(this)->base
);
8324 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
8326 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
8329 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
8331 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
8334 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8335 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
8336 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
8337 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
8339 basic_ios_char
*basic_ios
;
8341 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8344 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
8345 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
8346 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8347 basic_ios_char_ctor(basic_ios
);
8349 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
8352 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
8354 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8355 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
8359 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8360 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8361 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
8362 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
8364 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8366 TRACE("(%p)\n", this);
8367 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
8368 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
8371 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8372 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8373 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
8374 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
8376 TRACE("(%p)\n", this);
8377 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
8378 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
8381 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_char_vector_dtor
, 8)
8382 basic_iostream_char
* __thiscall
MSVCP_basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8384 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
8386 TRACE("(%p %x)\n", this, flags
);
8389 /* we have an array, with the number of elements stored before the first object */
8390 int i
, *ptr
= (int *)this-1;
8392 for(i
=*ptr
-1; i
>=0; i
--)
8393 basic_iostream_char_vbase_dtor(this+i
);
8394 MSVCRT_operator_delete(ptr
);
8396 basic_iostream_char_vbase_dtor(this);
8398 MSVCRT_operator_delete(this);
8404 static inline basic_ios_wchar
* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar
*ptr
)
8406 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_wchar_vbtable1
[1]);
8409 static inline basic_iostream_wchar
* basic_iostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
8411 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_wchar_vbtable1
[1]);
8414 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8415 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
8416 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor
, 12)
8417 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_ctor(basic_iostream_wchar
*this, basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
8419 basic_ios_wchar
*basic_ios
;
8421 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
8424 this->base1
.vbtable
= basic_iostream_wchar_vbtable1
;
8425 this->base2
.vbtable
= basic_iostream_wchar_vbtable2
;
8426 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
8427 basic_ios_wchar_ctor(basic_ios
);
8429 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
8432 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_wchar_vtable
;
8434 basic_istream_wchar_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
8435 basic_ostream_wchar_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
8439 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
8440 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
8441 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor
, 4)
8442 void __thiscall
basic_iostream_wchar_dtor(basic_ios_wchar
*base
)
8444 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
8446 TRACE("(%p)\n", this);
8447 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2
));
8448 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1
));
8451 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8452 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8453 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor
, 4)
8454 void __thiscall
basic_iostream_wchar_vbase_dtor(basic_iostream_wchar
*this)
8456 TRACE("(%p)\n", this);
8457 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
8458 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1
));
8461 DEFINE_THISCALL_WRAPPER(MSVCP_basic_iostream_wchar_vector_dtor
, 8)
8462 basic_iostream_wchar
* __thiscall
MSVCP_basic_iostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
8464 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
8466 TRACE("(%p %x)\n", this, flags
);
8469 /* we have an array, with the number of elements stored before the first object */
8470 int i
, *ptr
= (int *)this-1;
8472 for(i
=*ptr
-1; i
>=0; i
--)
8473 basic_iostream_wchar_vbase_dtor(this+i
);
8474 MSVCRT_operator_delete(ptr
);
8476 basic_iostream_wchar_vbase_dtor(this);
8478 MSVCRT_operator_delete(this);
8484 static inline basic_ios_char
* basic_ofstream_char_to_basic_ios(basic_ofstream_char
*ptr
)
8486 return (basic_ios_char
*)((char*)ptr
+basic_ofstream_char_vbtable
[1]);
8489 static inline basic_ofstream_char
* basic_ofstream_char_from_basic_ios(basic_ios_char
*ptr
)
8491 return (basic_ofstream_char
*)((char*)ptr
-basic_ofstream_char_vbtable
[1]);
8494 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8495 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8496 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor
, 8)
8497 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor(basic_ofstream_char
*this, MSVCP_bool virt_init
)
8499 basic_ios_char
*basic_ios
;
8501 TRACE("(%p %d)\n", this, virt_init
);
8504 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8505 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8506 basic_ios_char_ctor(basic_ios
);
8508 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8511 basic_filebuf_char_ctor(&this->filebuf
);
8512 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8513 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
8517 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8518 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8519 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_file
, 12)
8520 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_file(
8521 basic_ofstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
8523 basic_ios_char
*basic_ios
;
8525 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8528 this->base
.vbtable
= basic_ofstream_char_vbtable
;
8529 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8530 basic_ios_char_ctor(basic_ios
);
8532 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8535 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8536 basic_ostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8537 basic_ios
->base
.vtable
= &MSVCP_basic_ofstream_char_vtable
;
8541 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8542 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8543 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name
, 20)
8544 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name(basic_ofstream_char
*this,
8545 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8547 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8549 basic_ofstream_char_ctor(this, virt_init
);
8551 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8552 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8553 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8558 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
8559 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
8560 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
8561 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
8562 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name_wchar
, 20)
8563 basic_ofstream_char
* __thiscall
basic_ofstream_char_ctor_name_wchar(basic_ofstream_char
*this,
8564 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8566 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
8568 basic_ofstream_char_ctor(this, virt_init
);
8570 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8571 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8572 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8577 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8578 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8579 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor
, 4)
8580 void __thiscall
basic_ofstream_char_dtor(basic_ios_char
*base
)
8582 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8584 TRACE("(%p)\n", this);
8586 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
8587 basic_filebuf_char_dtor(&this->filebuf
);
8590 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8591 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8592 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor
, 4)
8593 void __thiscall
basic_ofstream_char_vbase_dtor(basic_ofstream_char
*this)
8595 TRACE("(%p)\n", this);
8597 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
8598 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
8601 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ofstream_char_vector_dtor
, 8)
8602 basic_ofstream_char
* __thiscall
MSVCP_basic_ofstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8604 basic_ofstream_char
*this = basic_ofstream_char_from_basic_ios(base
);
8606 TRACE("(%p %x)\n", this, flags
);
8609 /* we have an array, with the number of elements stored before the first object */
8610 int i
, *ptr
= (int *)this-1;
8612 for(i
=*ptr
-1; i
>=0; i
--)
8613 basic_ofstream_char_vbase_dtor(this+i
);
8614 MSVCRT_operator_delete(ptr
);
8616 basic_ofstream_char_vbase_dtor(this);
8618 MSVCRT_operator_delete(this);
8624 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8625 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8626 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close
, 4)
8627 void __thiscall
basic_ofstream_char_close(basic_ofstream_char
*this)
8629 TRACE("(%p)\n", this);
8631 if(!basic_filebuf_char_close(&this->filebuf
)) {
8632 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8633 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8637 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8638 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8639 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open
, 4)
8640 MSVCP_bool __thiscall
basic_ofstream_char_is_open(const basic_ofstream_char
*this)
8642 TRACE("(%p)\n", this);
8643 return basic_filebuf_char_is_open(&this->filebuf
);
8646 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
8647 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
8648 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open
, 16)
8649 void __thiscall
basic_ofstream_char_open(basic_ofstream_char
*this,
8650 const char *name
, int mode
, int prot
)
8652 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
8654 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8655 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8656 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8660 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
8661 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
8662 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old
, 12)
8663 void __thiscall
basic_ofstream_char_open_old(basic_ofstream_char
*this,
8664 const char *name
, unsigned int mode
)
8666 basic_ofstream_char_open(this, name
, mode
, _SH_DENYNO
);
8669 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
8670 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
8671 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
8672 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
8673 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar
, 16)
8674 void __thiscall
basic_ofstream_char_open_wchar(basic_ofstream_char
*this,
8675 const wchar_t *name
, int mode
, int prot
)
8677 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
8679 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_out
, prot
)) {
8680 basic_ios_char
*basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
8681 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8685 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
8686 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
8687 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
8688 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
8689 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_wchar_old
, 12)
8690 void __thiscall
basic_ofstream_char_open_wchar_old(basic_ofstream_char
*this,
8691 const wchar_t *name
, unsigned int mode
)
8693 basic_ofstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
8696 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8697 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8698 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf
, 4)
8699 basic_filebuf_char
* __thiscall
basic_ofstream_char_rdbuf(const basic_ofstream_char
*this)
8701 TRACE("(%p)\n", this);
8702 return (basic_filebuf_char
*)&this->filebuf
;
8705 static inline basic_ios_char
* basic_ifstream_char_to_basic_ios(basic_ifstream_char
*ptr
)
8707 return (basic_ios_char
*)((char*)ptr
+basic_ifstream_char_vbtable
[1]);
8710 static inline basic_ifstream_char
* basic_ifstream_char_from_basic_ios(basic_ios_char
*ptr
)
8712 return (basic_ifstream_char
*)((char*)ptr
-basic_ifstream_char_vbtable
[1]);
8715 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8716 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8717 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor
, 8)
8718 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor(basic_ifstream_char
*this, MSVCP_bool virt_init
)
8720 basic_ios_char
*basic_ios
;
8722 TRACE("(%p %d)\n", this, virt_init
);
8725 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8726 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8727 basic_ios_char_ctor(basic_ios
);
8729 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8732 basic_filebuf_char_ctor(&this->filebuf
);
8733 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8734 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
8738 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8739 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8740 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_file
, 12)
8741 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_file(
8742 basic_ifstream_char
*this, FILE *file
, MSVCP_bool virt_init
)
8744 basic_ios_char
*basic_ios
;
8746 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8749 this->base
.vbtable
= basic_ifstream_char_vbtable
;
8750 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8751 basic_ios_char_ctor(basic_ios
);
8753 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8756 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8757 basic_istream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
, FALSE
);
8758 basic_ios
->base
.vtable
= &MSVCP_basic_ifstream_char_vtable
;
8762 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8763 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8764 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name
, 20)
8765 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name(basic_ifstream_char
*this,
8766 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8768 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8770 basic_ifstream_char_ctor(this, virt_init
);
8772 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8773 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8774 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8779 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
8780 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
8781 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
8782 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
8783 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar
, 20)
8784 basic_ifstream_char
* __thiscall
basic_ifstream_char_ctor_name_wchar(basic_ifstream_char
*this,
8785 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8787 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
8789 basic_ifstream_char_ctor(this, virt_init
);
8791 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8792 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8793 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8798 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
8799 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
8800 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor
, 4)
8801 void __thiscall
basic_ifstream_char_dtor(basic_ios_char
*base
)
8803 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8805 TRACE("(%p)\n", this);
8807 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
8808 basic_filebuf_char_dtor(&this->filebuf
);
8811 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8812 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8813 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor
, 4)
8814 void __thiscall
basic_ifstream_char_vbase_dtor(basic_ifstream_char
*this)
8816 TRACE("(%p)\n", this);
8818 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
8819 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
8822 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ifstream_char_vector_dtor
, 8)
8823 basic_ifstream_char
* __thiscall
MSVCP_basic_ifstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
8825 basic_ifstream_char
*this = basic_ifstream_char_from_basic_ios(base
);
8827 TRACE("(%p %x)\n", this, flags
);
8830 /* we have an array, with the number of elements stored before the first object */
8831 int i
, *ptr
= (int *)this-1;
8833 for(i
=*ptr
-1; i
>=0; i
--)
8834 basic_ifstream_char_vbase_dtor(this+i
);
8835 MSVCRT_operator_delete(ptr
);
8837 basic_ifstream_char_vbase_dtor(this);
8839 MSVCRT_operator_delete(this);
8845 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
8846 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
8847 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close
, 4)
8848 void __thiscall
basic_ifstream_char_close(basic_ifstream_char
*this)
8850 TRACE("(%p)\n", this);
8852 if(!basic_filebuf_char_close(&this->filebuf
)) {
8853 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8854 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8858 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
8859 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
8860 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open
, 4)
8861 MSVCP_bool __thiscall
basic_ifstream_char_is_open(const basic_ifstream_char
*this)
8863 TRACE("(%p)\n", this);
8864 return basic_filebuf_char_is_open(&this->filebuf
);
8867 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
8868 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
8869 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open
, 16)
8870 void __thiscall
basic_ifstream_char_open(basic_ifstream_char
*this,
8871 const char *name
, int mode
, int prot
)
8873 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
8875 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8876 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8877 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8881 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
8882 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
8883 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old
, 12)
8884 void __thiscall
basic_ifstream_char_open_old(basic_ifstream_char
*this,
8885 const char *name
, unsigned int mode
)
8887 basic_ifstream_char_open(this, name
, mode
, _SH_DENYNO
);
8890 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
8891 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
8892 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
8893 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
8894 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar
, 16)
8895 void __thiscall
basic_ifstream_char_open_wchar(basic_ifstream_char
*this,
8896 const wchar_t *name
, int mode
, int prot
)
8898 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
8900 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
|OPENMODE_in
, prot
)) {
8901 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
8902 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
8906 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
8907 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
8908 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
8909 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
8910 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old
, 12)
8911 void __thiscall
basic_ifstream_char_open_wchar_old(basic_ifstream_char
*this,
8912 const wchar_t *name
, unsigned int mode
)
8914 basic_ifstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
8917 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8918 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
8919 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf
, 4)
8920 basic_filebuf_char
* __thiscall
basic_ifstream_char_rdbuf(const basic_ifstream_char
*this)
8922 TRACE("(%p)\n", this);
8923 return (basic_filebuf_char
*)&this->filebuf
;
8926 static inline basic_ios_char
* basic_fstream_char_to_basic_ios(basic_fstream_char
*ptr
)
8928 return (basic_ios_char
*)((char*)ptr
+basic_fstream_char_vbtable1
[1]);
8931 static inline basic_fstream_char
* basic_fstream_char_from_basic_ios(basic_ios_char
*ptr
)
8933 return (basic_fstream_char
*)((char*)ptr
-basic_fstream_char_vbtable1
[1]);
8936 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
8937 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
8938 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor
, 8)
8939 basic_fstream_char
* __thiscall
basic_fstream_char_ctor(basic_fstream_char
*this, MSVCP_bool virt_init
)
8941 basic_ios_char
*basic_ios
;
8943 TRACE("(%p %d)\n", this, virt_init
);
8946 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
8947 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
8948 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8949 basic_ios_char_ctor(basic_ios
);
8951 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8954 basic_filebuf_char_ctor(&this->filebuf
);
8955 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
8956 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
8960 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
8961 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
8962 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_file
, 12)
8963 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_file(basic_fstream_char
*this,
8964 FILE *file
, MSVCP_bool virt_init
)
8966 basic_ios_char
*basic_ios
;
8968 TRACE("(%p %p %d)\n", this, file
, virt_init
);
8971 this->base
.base1
.vbtable
= basic_fstream_char_vbtable1
;
8972 this->base
.base2
.vbtable
= basic_fstream_char_vbtable2
;
8973 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8974 basic_ios_char_ctor(basic_ios
);
8976 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8979 basic_filebuf_char_ctor_file(&this->filebuf
, file
);
8980 basic_iostream_char_ctor(&this->base
, &this->filebuf
.base
, FALSE
);
8981 basic_ios
->base
.vtable
= &MSVCP_basic_fstream_char_vtable
;
8985 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDHH@Z */
8986 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDHH@Z */
8987 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name
, 20)
8988 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name(basic_fstream_char
*this,
8989 const char *name
, int mode
, int prot
, MSVCP_bool virt_init
)
8991 TRACE("(%p %s %d %d %d)\n", this, name
, mode
, prot
, virt_init
);
8993 basic_fstream_char_ctor(this, virt_init
);
8995 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
8996 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
8997 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9002 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBGHH@Z */
9003 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBGHH@Z */
9004 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PB_WHH@Z */
9005 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEB_WHH@Z */
9006 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name_wchar
, 20)
9007 basic_fstream_char
* __thiscall
basic_fstream_char_ctor_name_wchar(basic_fstream_char
*this,
9008 const wchar_t *name
, int mode
, int prot
, MSVCP_bool virt_init
)
9010 TRACE("(%p %s %d %d %d)\n", this, debugstr_w(name
), mode
, prot
, virt_init
);
9012 basic_fstream_char_ctor(this, virt_init
);
9014 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
9015 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9016 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9021 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9022 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9023 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor
, 4)
9024 void __thiscall
basic_fstream_char_dtor(basic_ios_char
*base
)
9026 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9028 TRACE("(%p)\n", this);
9030 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9031 basic_filebuf_char_dtor(&this->filebuf
);
9034 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9035 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9036 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor
, 4)
9037 void __thiscall
basic_fstream_char_vbase_dtor(basic_fstream_char
*this)
9039 TRACE("(%p)\n", this);
9041 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
9042 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9045 DEFINE_THISCALL_WRAPPER(MSVCP_basic_fstream_char_vector_dtor
, 8)
9046 basic_fstream_char
* __thiscall
MSVCP_basic_fstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9048 basic_fstream_char
*this = basic_fstream_char_from_basic_ios(base
);
9050 TRACE("(%p %x)\n", this, flags
);
9053 /* we have an array, with the number of elements stored before the first object */
9054 int i
, *ptr
= (int *)this-1;
9056 for(i
=*ptr
-1; i
>=0; i
--)
9057 basic_fstream_char_vbase_dtor(this+i
);
9058 MSVCRT_operator_delete(ptr
);
9060 basic_fstream_char_vbase_dtor(this);
9062 MSVCRT_operator_delete(this);
9068 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9069 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9070 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close
, 4)
9071 void __thiscall
basic_fstream_char_close(basic_fstream_char
*this)
9073 TRACE("(%p)\n", this);
9075 if(!basic_filebuf_char_close(&this->filebuf
)) {
9076 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9077 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9081 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9082 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9083 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open
, 4)
9084 MSVCP_bool __thiscall
basic_fstream_char_is_open(const basic_fstream_char
*this)
9086 TRACE("(%p)\n", this);
9087 return basic_filebuf_char_is_open(&this->filebuf
);
9090 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z */
9091 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDHH@Z */
9092 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open
, 16)
9093 void __thiscall
basic_fstream_char_open(basic_fstream_char
*this,
9094 const char *name
, int mode
, int prot
)
9096 TRACE("(%p %s %d %d)\n", this, name
, mode
, prot
);
9098 if(!basic_filebuf_char_open(&this->filebuf
, name
, mode
, prot
)) {
9099 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9100 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9104 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDI@Z */
9105 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDI@Z */
9106 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old
, 12)
9107 void __thiscall
basic_fstream_char_open_old(basic_fstream_char
*this,
9108 const char *name
, unsigned int mode
)
9110 basic_fstream_char_open(this, name
, mode
, _SH_DENYNO
);
9113 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGHH@Z */
9114 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGHH@Z */
9115 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WHH@Z */
9116 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WHH@Z */
9117 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar
, 16)
9118 void __thiscall
basic_fstream_char_open_wchar(basic_fstream_char
*this,
9119 const wchar_t *name
, int mode
, int prot
)
9121 TRACE("(%p %s %d %d)\n", this, debugstr_w(name
), mode
, prot
);
9123 if(!basic_filebuf_char_open_wchar(&this->filebuf
, name
, mode
, prot
)) {
9124 basic_ios_char
*basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9125 basic_ios_char_setstate(basic_ios
, IOSTATE_failbit
);
9129 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBGI@Z */
9130 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBGI@Z */
9131 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPB_WI@Z */
9132 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEB_WI@Z */
9133 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_wchar_old
, 12)
9134 void __thiscall
basic_fstream_char_open_wchar_old(basic_fstream_char
*this,
9135 const wchar_t *name
, unsigned int mode
)
9137 basic_fstream_char_open_wchar(this, name
, mode
, _SH_DENYNO
);
9140 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9141 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9142 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf
, 4)
9143 basic_filebuf_char
* __thiscall
basic_fstream_char_rdbuf(const basic_fstream_char
*this)
9145 TRACE("(%p)\n", this);
9146 return (basic_filebuf_char
*)&this->filebuf
;
9149 static inline basic_ios_char
* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char
*ptr
)
9151 return (basic_ios_char
*)((char*)ptr
+basic_ostringstream_char_vbtable
[1]);
9154 static inline basic_ostringstream_char
* basic_ostringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9156 return (basic_ostringstream_char
*)((char*)ptr
-basic_ostringstream_char_vbtable
[1]);
9159 /* ??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 */
9160 /* ??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 */
9161 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str
, 16)
9162 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_str(basic_ostringstream_char
*this,
9163 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9165 basic_ios_char
*basic_ios
;
9167 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9170 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9171 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9172 basic_ios_char_ctor(basic_ios
);
9174 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9177 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9178 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9179 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
9183 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9184 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9185 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode
, 12)
9186 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor_mode(
9187 basic_ostringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9189 basic_ios_char
*basic_ios
;
9191 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9194 this->base
.vbtable
= basic_ostringstream_char_vbtable
;
9195 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9196 basic_ios_char_ctor(basic_ios
);
9198 basic_ios
= basic_ostream_char_get_basic_ios(&this->base
);
9201 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9202 basic_ostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9203 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_char_vtable
;
9207 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9208 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9209 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor
, 8)
9210 basic_ostringstream_char
* __thiscall
basic_ostringstream_char_ctor(
9211 basic_ostringstream_char
*this, MSVCP_bool virt_init
)
9213 return basic_ostringstream_char_ctor_mode(this, 0, virt_init
);
9216 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9217 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9218 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor
, 4)
9219 void __thiscall
basic_ostringstream_char_dtor(basic_ios_char
*base
)
9221 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9223 TRACE("(%p)\n", this);
9225 basic_stringbuf_char_dtor(&this->strbuf
);
9226 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base
));
9229 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9230 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9231 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor
, 4)
9232 void __thiscall
basic_ostringstream_char_vbase_dtor(basic_ostringstream_char
*this)
9234 TRACE("(%p)\n", this);
9236 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
9237 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base
));
9240 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostringstream_char_vector_dtor
, 8)
9241 basic_ostringstream_char
* __thiscall
MSVCP_basic_ostringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9243 basic_ostringstream_char
*this = basic_ostringstream_char_from_basic_ios(base
);
9245 TRACE("(%p %x)\n", this, flags
);
9248 /* we have an array, with the number of elements stored before the first object */
9249 int i
, *ptr
= (int *)this-1;
9251 for(i
=*ptr
-1; i
>=0; i
--)
9252 basic_ostringstream_char_vbase_dtor(this+i
);
9253 MSVCRT_operator_delete(ptr
);
9255 basic_ostringstream_char_vbase_dtor(this);
9257 MSVCRT_operator_delete(this);
9263 /* ?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 */
9264 /* ?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 */
9265 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf
, 4)
9266 basic_stringbuf_char
* __thiscall
basic_ostringstream_char_rdbuf(const basic_ostringstream_char
*this)
9268 TRACE("(%p)\n", this);
9269 return (basic_stringbuf_char
*)&this->strbuf
;
9272 /* ?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 */
9273 /* ?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 */
9274 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set
, 8)
9275 void __thiscall
basic_ostringstream_char_str_set(basic_ostringstream_char
*this, const basic_string_char
*str
)
9277 TRACE("(%p %p)\n", this, str
);
9278 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9281 /* ?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 */
9282 /* ?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 */
9283 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get
, 8)
9284 basic_string_char
* __thiscall
basic_ostringstream_char_str_get(const basic_ostringstream_char
*this, basic_string_char
*ret
)
9286 TRACE("(%p %p)\n", this, ret
);
9287 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9290 static inline basic_ios_wchar
* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar
*ptr
)
9292 return (basic_ios_wchar
*)((char*)ptr
+basic_ostringstream_wchar_vbtable
[1]);
9295 static inline basic_ostringstream_wchar
* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9297 return (basic_ostringstream_wchar
*)((char*)ptr
-basic_ostringstream_wchar_vbtable
[1]);
9300 /* ??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 */
9301 /* ??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 */
9302 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_str
, 16)
9303 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar
*this,
9304 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9306 basic_ios_wchar
*basic_ios
;
9308 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9311 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
9312 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9313 basic_ios_wchar_ctor(basic_ios
);
9315 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9318 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_out
);
9319 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9320 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
9324 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9325 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9326 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor_mode
, 12)
9327 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor_mode(
9328 basic_ostringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9330 basic_ios_wchar
*basic_ios
;
9332 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9335 this->base
.vbtable
= basic_ostringstream_wchar_vbtable
;
9336 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9337 basic_ios_wchar_ctor(basic_ios
);
9339 basic_ios
= basic_ostream_wchar_get_basic_ios(&this->base
);
9342 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_out
);
9343 basic_ostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9344 basic_ios
->base
.vtable
= &MSVCP_basic_ostringstream_wchar_vtable
;
9348 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9349 /* ??_F?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9350 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_ctor
, 8)
9351 basic_ostringstream_wchar
* __thiscall
basic_ostringstream_wchar_ctor(
9352 basic_ostringstream_wchar
*this, MSVCP_bool virt_init
)
9354 return basic_ostringstream_wchar_ctor_mode(this, 0, virt_init
);
9357 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9358 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9359 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor
, 4)
9360 void __thiscall
basic_ostringstream_wchar_dtor(basic_ios_wchar
*base
)
9362 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
9364 TRACE("(%p)\n", this);
9366 basic_stringbuf_wchar_dtor(&this->strbuf
);
9367 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base
));
9370 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9371 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9372 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor
, 4)
9373 void __thiscall
basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar
*this)
9375 TRACE("(%p)\n", this);
9377 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
9378 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base
));
9381 DEFINE_THISCALL_WRAPPER(MSVCP_basic_ostringstream_wchar_vector_dtor
, 8)
9382 basic_ostringstream_wchar
* __thiscall
MSVCP_basic_ostringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9384 basic_ostringstream_wchar
*this = basic_ostringstream_wchar_from_basic_ios(base
);
9386 TRACE("(%p %x)\n", this, flags
);
9389 /* we have an array, with the number of elements stored before the first object */
9390 int i
, *ptr
= (int *)this-1;
9392 for(i
=*ptr
-1; i
>=0; i
--)
9393 basic_ostringstream_wchar_vbase_dtor(this+i
);
9394 MSVCRT_operator_delete(ptr
);
9396 basic_ostringstream_wchar_vbase_dtor(this);
9398 MSVCRT_operator_delete(this);
9404 /* ?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 */
9405 /* ?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 */
9406 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf
, 4)
9407 basic_stringbuf_wchar
* __thiscall
basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar
*this)
9409 TRACE("(%p)\n", this);
9410 return (basic_stringbuf_wchar
*)&this->strbuf
;
9413 /* ?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 */
9414 /* ?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 */
9415 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set
, 8)
9416 void __thiscall
basic_ostringstream_wchar_str_set(basic_ostringstream_wchar
*this, const basic_string_wchar
*str
)
9418 TRACE("(%p %p)\n", this, str
);
9419 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9422 /* ?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 */
9423 /* ?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 */
9424 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get
, 8)
9425 basic_string_wchar
* __thiscall
basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar
*this, basic_string_wchar
*ret
)
9427 TRACE("(%p %p)\n", this, ret
);
9428 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
9431 static inline basic_ios_char
* basic_istringstream_char_to_basic_ios(basic_istringstream_char
*ptr
)
9433 return (basic_ios_char
*)((char*)ptr
+basic_istringstream_char_vbtable
[1]);
9436 static inline basic_istringstream_char
* basic_istringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9438 return (basic_istringstream_char
*)((char*)ptr
-basic_istringstream_char_vbtable
[1]);
9441 /* ??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 */
9442 /* ??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 */
9443 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str
, 16)
9444 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_str(basic_istringstream_char
*this,
9445 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9447 basic_ios_char
*basic_ios
;
9449 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9452 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9453 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9454 basic_ios_char_ctor(basic_ios
);
9456 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9459 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9460 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9461 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
9465 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9466 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9467 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode
, 12)
9468 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor_mode(
9469 basic_istringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9471 basic_ios_char
*basic_ios
;
9473 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9476 this->base
.vbtable
= basic_istringstream_char_vbtable
;
9477 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9478 basic_ios_char_ctor(basic_ios
);
9480 basic_ios
= basic_istream_char_get_basic_ios(&this->base
);
9483 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9484 basic_istream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9485 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_char_vtable
;
9489 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9490 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9491 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor
, 8)
9492 basic_istringstream_char
* __thiscall
basic_istringstream_char_ctor(
9493 basic_istringstream_char
*this, MSVCP_bool virt_init
)
9495 return basic_istringstream_char_ctor_mode(this, 0, virt_init
);
9498 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9499 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9500 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor
, 4)
9501 void __thiscall
basic_istringstream_char_dtor(basic_ios_char
*base
)
9503 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9505 TRACE("(%p)\n", this);
9507 basic_stringbuf_char_dtor(&this->strbuf
);
9508 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base
));
9511 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9512 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9513 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor
, 4)
9514 void __thiscall
basic_istringstream_char_vbase_dtor(basic_istringstream_char
*this)
9516 TRACE("(%p)\n", this);
9518 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
9519 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
));
9522 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istringstream_char_vector_dtor
, 8)
9523 basic_istringstream_char
* __thiscall
MSVCP_basic_istringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9525 basic_istringstream_char
*this = basic_istringstream_char_from_basic_ios(base
);
9527 TRACE("(%p %x)\n", this, flags
);
9530 /* we have an array, with the number of elements stored before the first object */
9531 int i
, *ptr
= (int *)this-1;
9533 for(i
=*ptr
-1; i
>=0; i
--)
9534 basic_istringstream_char_vbase_dtor(this+i
);
9535 MSVCRT_operator_delete(ptr
);
9537 basic_istringstream_char_vbase_dtor(this);
9539 MSVCRT_operator_delete(this);
9545 /* ?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 */
9546 /* ?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 */
9547 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf
, 4)
9548 basic_stringbuf_char
* __thiscall
basic_istringstream_char_rdbuf(const basic_istringstream_char
*this)
9550 TRACE("(%p)\n", this);
9551 return (basic_stringbuf_char
*)&this->strbuf
;
9554 /* ?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 */
9555 /* ?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 */
9556 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set
, 8)
9557 void __thiscall
basic_istringstream_char_str_set(basic_istringstream_char
*this, const basic_string_char
*str
)
9559 TRACE("(%p %p)\n", this, str
);
9560 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9563 /* ?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 */
9564 /* ?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 */
9565 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get
, 8)
9566 basic_string_char
* __thiscall
basic_istringstream_char_str_get(const basic_istringstream_char
*this, basic_string_char
*ret
)
9568 TRACE("(%p %p)\n", this, ret
);
9569 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9572 static inline basic_ios_wchar
* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar
*ptr
)
9574 return (basic_ios_wchar
*)((char*)ptr
+basic_istringstream_wchar_vbtable
[1]);
9577 static inline basic_istringstream_wchar
* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9579 return (basic_istringstream_wchar
*)((char*)ptr
-basic_istringstream_wchar_vbtable
[1]);
9582 /* ??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 */
9583 /* ??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 */
9584 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_str
, 16)
9585 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_str(basic_istringstream_wchar
*this,
9586 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9588 basic_ios_wchar
*basic_ios
;
9590 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9593 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
9594 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9595 basic_ios_wchar_ctor(basic_ios
);
9597 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9600 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
|OPENMODE_in
);
9601 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9602 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
9606 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9607 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9608 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor_mode
, 12)
9609 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor_mode(
9610 basic_istringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9612 basic_ios_wchar
*basic_ios
;
9614 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9617 this->base
.vbtable
= basic_istringstream_wchar_vbtable
;
9618 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9619 basic_ios_wchar_ctor(basic_ios
);
9621 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
);
9624 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
|OPENMODE_in
);
9625 basic_istream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
, FALSE
);
9626 basic_ios
->base
.vtable
= &MSVCP_basic_istringstream_wchar_vtable
;
9630 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9631 /* ??_F?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9632 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_ctor
, 8)
9633 basic_istringstream_wchar
* __thiscall
basic_istringstream_wchar_ctor(
9634 basic_istringstream_wchar
*this, MSVCP_bool virt_init
)
9636 return basic_istringstream_wchar_ctor_mode(this, 0, virt_init
);
9639 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9640 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9641 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor
, 4)
9642 void __thiscall
basic_istringstream_wchar_dtor(basic_ios_wchar
*base
)
9644 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
9646 TRACE("(%p)\n", this);
9648 basic_stringbuf_wchar_dtor(&this->strbuf
);
9649 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base
));
9652 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9653 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9654 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor
, 4)
9655 void __thiscall
basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar
*this)
9657 TRACE("(%p)\n", this);
9659 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
9660 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base
));
9663 DEFINE_THISCALL_WRAPPER(MSVCP_basic_istringstream_wchar_vector_dtor
, 8)
9664 basic_istringstream_wchar
* __thiscall
MSVCP_basic_istringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9666 basic_istringstream_wchar
*this = basic_istringstream_wchar_from_basic_ios(base
);
9668 TRACE("(%p %x)\n", this, flags
);
9671 /* we have an array, with the number of elements stored before the first object */
9672 int i
, *ptr
= (int *)this-1;
9674 for(i
=*ptr
-1; i
>=0; i
--)
9675 basic_istringstream_wchar_vbase_dtor(this+i
);
9676 MSVCRT_operator_delete(ptr
);
9678 basic_istringstream_wchar_vbase_dtor(this);
9680 MSVCRT_operator_delete(this);
9686 /* ?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 */
9687 /* ?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 */
9688 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf
, 4)
9689 basic_stringbuf_wchar
* __thiscall
basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar
*this)
9691 TRACE("(%p)\n", this);
9692 return (basic_stringbuf_wchar
*)&this->strbuf
;
9695 /* ?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 */
9696 /* ?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 */
9697 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set
, 8)
9698 void __thiscall
basic_istringstream_wchar_str_set(basic_istringstream_wchar
*this, const basic_string_wchar
*str
)
9700 TRACE("(%p %p)\n", this, str
);
9701 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9704 /* ?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 */
9705 /* ?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 */
9706 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get
, 8)
9707 basic_string_wchar
* __thiscall
basic_istringstream_wchar_str_get(const basic_istringstream_wchar
*this, basic_string_wchar
*ret
)
9709 TRACE("(%p %p)\n", this, ret
);
9710 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
9713 static inline basic_ios_char
* basic_stringstream_char_to_basic_ios(basic_stringstream_char
*ptr
)
9715 return (basic_ios_char
*)((char*)ptr
+basic_stringstream_char_vbtable1
[1]);
9718 static inline basic_stringstream_char
* basic_stringstream_char_from_basic_ios(basic_ios_char
*ptr
)
9720 return (basic_stringstream_char
*)((char*)ptr
-basic_stringstream_char_vbtable1
[1]);
9723 /* ??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 */
9724 /* ??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 */
9725 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str
, 16)
9726 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_str(basic_stringstream_char
*this,
9727 const basic_string_char
*str
, int mode
, MSVCP_bool virt_init
)
9729 basic_ios_char
*basic_ios
;
9731 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9734 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
9735 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
9736 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9737 basic_ios_char_ctor(basic_ios
);
9739 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9742 basic_stringbuf_char_ctor_str(&this->strbuf
, str
, mode
);
9743 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9744 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
9748 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
9749 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
9750 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode
, 12)
9751 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor_mode(
9752 basic_stringstream_char
*this, int mode
, MSVCP_bool virt_init
)
9754 basic_ios_char
*basic_ios
;
9756 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9759 this->base
.base1
.vbtable
= basic_stringstream_char_vbtable1
;
9760 this->base
.base2
.vbtable
= basic_stringstream_char_vbtable2
;
9761 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9762 basic_ios_char_ctor(basic_ios
);
9764 basic_ios
= basic_istream_char_get_basic_ios(&this->base
.base1
);
9767 basic_stringbuf_char_ctor_mode(&this->strbuf
, mode
);
9768 basic_iostream_char_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9769 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_char_vtable
;
9773 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9774 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9775 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor
, 8)
9776 basic_stringstream_char
* __thiscall
basic_stringstream_char_ctor(
9777 basic_stringstream_char
*this, MSVCP_bool virt_init
)
9779 return basic_stringstream_char_ctor_mode(
9780 this, OPENMODE_out
|OPENMODE_in
, virt_init
);
9783 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
9784 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
9785 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor
, 4)
9786 void __thiscall
basic_stringstream_char_dtor(basic_ios_char
*base
)
9788 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
9790 TRACE("(%p)\n", this);
9792 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base
));
9793 basic_stringbuf_char_dtor(&this->strbuf
);
9796 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
9797 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
9798 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor
, 4)
9799 void __thiscall
basic_stringstream_char_vbase_dtor(basic_stringstream_char
*this)
9801 TRACE("(%p)\n", this);
9803 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
9804 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base
.base1
));
9807 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringstream_char_vector_dtor
, 8)
9808 basic_stringstream_char
* __thiscall
MSVCP_basic_stringstream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
9810 basic_stringstream_char
*this = basic_stringstream_char_from_basic_ios(base
);
9812 TRACE("(%p %x)\n", this, flags
);
9815 /* we have an array, with the number of elements stored before the first object */
9816 int i
, *ptr
= (int *)this-1;
9818 for(i
=*ptr
-1; i
>=0; i
--)
9819 basic_stringstream_char_vbase_dtor(this+i
);
9820 MSVCRT_operator_delete(ptr
);
9822 basic_stringstream_char_vbase_dtor(this);
9824 MSVCRT_operator_delete(this);
9830 /* ?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 */
9831 /* ?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 */
9832 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf
, 4)
9833 basic_stringbuf_char
* __thiscall
basic_stringstream_char_rdbuf(const basic_stringstream_char
*this)
9835 TRACE("(%p)\n", this);
9836 return (basic_stringbuf_char
*)&this->strbuf
;
9839 /* ?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 */
9840 /* ?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 */
9841 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set
, 8)
9842 void __thiscall
basic_stringstream_char_str_set(basic_stringstream_char
*this, const basic_string_char
*str
)
9844 TRACE("(%p %p)\n", this, str
);
9845 basic_stringbuf_char_str_set(&this->strbuf
, str
);
9848 /* ?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 */
9849 /* ?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 */
9850 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get
, 8)
9851 basic_string_char
* __thiscall
basic_stringstream_char_str_get(const basic_stringstream_char
*this, basic_string_char
*ret
)
9853 TRACE("(%p %p)\n", this, ret
);
9854 return basic_stringbuf_char_str_get(&this->strbuf
, ret
);
9857 static inline basic_ios_wchar
* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar
*ptr
)
9859 return (basic_ios_wchar
*)((char*)ptr
+basic_stringstream_wchar_vbtable1
[1]);
9862 static inline basic_stringstream_wchar
* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
9864 return (basic_stringstream_wchar
*)((char*)ptr
-basic_stringstream_wchar_vbtable1
[1]);
9867 /* ??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 */
9868 /* ??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 */
9869 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_str
, 16)
9870 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_str(basic_stringstream_wchar
*this,
9871 const basic_string_wchar
*str
, int mode
, MSVCP_bool virt_init
)
9873 basic_ios_wchar
*basic_ios
;
9875 TRACE("(%p %p %d %d)\n", this, str
, mode
, virt_init
);
9878 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
9879 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
9880 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9881 basic_ios_wchar_ctor(basic_ios
);
9883 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9886 basic_stringbuf_wchar_ctor_str(&this->strbuf
, str
, mode
);
9887 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9888 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
9892 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
9893 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
9894 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor_mode
, 12)
9895 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor_mode(
9896 basic_stringstream_wchar
*this, int mode
, MSVCP_bool virt_init
)
9898 basic_ios_wchar
*basic_ios
;
9900 TRACE("(%p %d %d)\n", this, mode
, virt_init
);
9903 this->base
.base1
.vbtable
= basic_stringstream_wchar_vbtable1
;
9904 this->base
.base2
.vbtable
= basic_stringstream_wchar_vbtable2
;
9905 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9906 basic_ios_wchar_ctor(basic_ios
);
9908 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base
.base1
);
9911 basic_stringbuf_wchar_ctor_mode(&this->strbuf
, mode
);
9912 basic_iostream_wchar_ctor(&this->base
, &this->strbuf
.base
, FALSE
);
9913 basic_ios
->base
.vtable
= &MSVCP_basic_stringstream_wchar_vtable
;
9917 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9918 /* ??_F?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9919 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_ctor
, 8)
9920 basic_stringstream_wchar
* __thiscall
basic_stringstream_wchar_ctor(
9921 basic_stringstream_wchar
*this, MSVCP_bool virt_init
)
9923 return basic_stringstream_wchar_ctor_mode(
9924 this, OPENMODE_out
|OPENMODE_in
, virt_init
);
9927 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
9928 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
9929 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor
, 4)
9930 void __thiscall
basic_stringstream_wchar_dtor(basic_ios_wchar
*base
)
9932 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
9934 TRACE("(%p)\n", this);
9936 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base
));
9937 basic_stringbuf_wchar_dtor(&this->strbuf
);
9940 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
9941 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
9942 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor
, 4)
9943 void __thiscall
basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar
*this)
9945 TRACE("(%p)\n", this);
9947 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
9948 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base
.base1
));
9951 DEFINE_THISCALL_WRAPPER(MSVCP_basic_stringstream_wchar_vector_dtor
, 8)
9952 basic_stringstream_wchar
* __thiscall
MSVCP_basic_stringstream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
9954 basic_stringstream_wchar
*this = basic_stringstream_wchar_from_basic_ios(base
);
9956 TRACE("(%p %x)\n", this, flags
);
9959 /* we have an array, with the number of elements stored before the first object */
9960 int i
, *ptr
= (int *)this-1;
9962 for(i
=*ptr
-1; i
>=0; i
--)
9963 basic_stringstream_wchar_vbase_dtor(this+i
);
9964 MSVCRT_operator_delete(ptr
);
9966 basic_stringstream_wchar_vbase_dtor(this);
9968 MSVCRT_operator_delete(this);
9974 /* ?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 */
9975 /* ?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 */
9976 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf
, 4)
9977 basic_stringbuf_wchar
* __thiscall
basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar
*this)
9979 TRACE("(%p)\n", this);
9980 return (basic_stringbuf_wchar
*)&this->strbuf
;
9983 /* ?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 */
9984 /* ?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 */
9985 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set
, 8)
9986 void __thiscall
basic_stringstream_wchar_str_set(basic_stringstream_wchar
*this, const basic_string_wchar
*str
)
9988 TRACE("(%p %p)\n", this, str
);
9989 basic_stringbuf_wchar_str_set(&this->strbuf
, str
);
9992 /* ?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 */
9993 /* ?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 */
9994 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get
, 8)
9995 basic_string_wchar
* __thiscall
basic_stringstream_wchar_str_get(const basic_stringstream_wchar
*this, basic_string_wchar
*ret
)
9997 TRACE("(%p %p)\n", this, ret
);
9998 return basic_stringbuf_wchar_str_get(&this->strbuf
, ret
);
10001 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
10003 ios_base_precision_set(base
, prec
);
10006 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
10007 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10008 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
10010 TRACE("(%p %ld)\n", ret
, prec
);
10012 ret
->pfunc
= setprecision_func
;
10017 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
10019 ios_base_width_set(base
, width
);
10022 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
10023 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
10024 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
10026 TRACE("(%p %ld)\n", ret
, width
);
10028 ret
->pfunc
= setw_func
;
10033 static basic_filebuf_char filebuf_stdin
;
10034 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
10036 basic_istream_char obj
;
10037 basic_ios_char vbase
;
10039 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
10040 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
10041 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
10043 static basic_filebuf_char filebuf_stdout
;
10044 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10046 basic_ostream_char obj
;
10047 basic_ios_char vbase
;
10048 } cout
= { { 0 } };
10049 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10050 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10051 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
10053 static basic_filebuf_char filebuf_stderr
;
10054 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10056 basic_ostream_char obj
;
10057 basic_ios_char vbase
;
10058 } cerr
= { { 0 } };
10059 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10060 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10061 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
10063 static basic_filebuf_char filebuf_log
;
10064 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10066 basic_ostream_char obj
;
10067 basic_ios_char vbase
;
10068 } clog
= { { 0 } };
10069 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
10070 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
10071 basic_ostream_char
*_Ptr_clog
= &clog
.obj
;
10075 basic_filebuf_char_ctor_file(&filebuf_stdin
, stdin
);
10076 basic_istream_char_ctor(&cin
.obj
, &filebuf_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
10078 basic_filebuf_char_ctor_file(&filebuf_stdout
, stdout
);
10079 basic_ostream_char_ctor(&cout
.obj
, &filebuf_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
10081 basic_filebuf_char_ctor_file(&filebuf_stderr
, stderr
);
10082 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
10084 basic_filebuf_char_ctor_file(&filebuf_log
, stderr
);
10085 basic_ostream_char_ctor(&clog
.obj
, &filebuf_log
.base
, FALSE
/*FIXME*/, TRUE
);
10090 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&cin
.obj
));
10091 basic_filebuf_char_dtor(&filebuf_stdin
);
10093 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cout
.obj
));
10094 basic_filebuf_char_dtor(&filebuf_stdout
);
10096 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&cerr
.obj
));
10097 basic_filebuf_char_dtor(&filebuf_stderr
);
10099 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&clog
.obj
));
10100 basic_filebuf_char_dtor(&filebuf_log
);