2 * Copyright 2011 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "wine/debug.h"
30 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
32 /* ?_Index@ios_base@std@@0HA */
33 int ios_base_Index
= 0;
34 /* ?_Sync@ios_base@std@@0_NA */
35 MSVCP_bool ios_base_Sync
= FALSE
;
39 __int64
DECLSPEC_ALIGN(8) pos
;
43 static inline const char* debugstr_fpos_int(fpos_int
*fpos
)
45 return wine_dbg_sprintf("fpos(%s %s %d)", wine_dbgstr_longlong(fpos
->off
), wine_dbgstr_longlong(fpos
->pos
), fpos
->state
);
49 void (__cdecl
*pfunc
)(ios_base
*, streamsize
);
54 void (__cdecl
*pfunc
)(ios_base
*, int);
62 } basic_filebuf__Initfl
;
65 basic_streambuf_char base
;
75 basic_streambuf_wchar base
;
82 } basic_filebuf_wchar
;
86 basic_streambuf_char
*strbuf
;
87 struct _basic_ostream_char
*stream
;
93 basic_streambuf_wchar
*strbuf
;
94 struct _basic_ostream_wchar
*stream
;
98 typedef struct _basic_ostream_char
{
100 /* virtual inheritance
101 * basic_ios_char basic_ios;
103 } basic_ostream_char
;
105 typedef struct _basic_ostream_wchar
{
107 /* virtual inheritance
108 * basic_ios_wchar basic_ios;
110 } basic_ostream_wchar
;
115 /* virtual inheritance
116 * basic_ios_char basic_ios;
118 } basic_istream_char
;
123 /* virtual inheritance
124 * basic_ios_wchar basic_ios;
126 } basic_istream_wchar
;
129 basic_istream_char base1
;
130 basic_ostream_char base2
;
131 /* virtual inheritance
132 * basic_ios_char basic_ios;
134 } basic_iostream_char
;
137 basic_istream_wchar base1
;
138 basic_ostream_wchar base2
;
139 /* virtual inheritance
140 * basic_ios_wchar basic_ios;
142 } basic_iostream_wchar
;
144 extern const vtable_ptr MSVCP_iosb_vtable
;
146 /* ??_7ios_base@std@@6B@ */
147 extern const vtable_ptr MSVCP_ios_base_vtable
;
149 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
150 extern const vtable_ptr MSVCP_basic_ios_char_vtable
;
152 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
153 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable
;
155 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
156 extern const vtable_ptr MSVCP_basic_ios_short_vtable
;
158 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
159 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable
;
161 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
162 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable
;
164 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
165 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable
;
167 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
168 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable
;
170 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
171 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable
;
173 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
174 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable
;
176 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
177 const int basic_ostream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_char
), 8)};
178 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
179 extern const vtable_ptr MSVCP_basic_ostream_char_vtable
;
181 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
182 const int basic_ostream_wchar_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar
), 8)};
183 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
184 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable
;
186 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
187 const int basic_ostream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_ostream_wchar
), 8)};
188 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
189 extern const vtable_ptr MSVCP_basic_ostream_short_vtable
;
191 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
192 const int basic_istream_char_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_char
), 8)};
193 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
194 extern const vtable_ptr MSVCP_basic_istream_char_vtable
;
196 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
197 const int basic_istream_wchar_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar
), 8)};
198 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
199 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable
;
201 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
202 const int basic_istream_short_vbtable
[] = {0, ALIGNED_SIZE(sizeof(basic_istream_wchar
), 8)};
203 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
204 extern const vtable_ptr MSVCP_basic_istream_short_vtable
;
206 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
207 const int basic_iostream_char_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), 8)};
208 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
209 const int basic_iostream_char_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_char
), 8)-FIELD_OFFSET(basic_iostream_char
, base2
)};
210 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
211 extern const vtable_ptr MSVCP_basic_iostream_char_vtable
;
213 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
214 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
215 const int basic_iostream_wchar_vbtable1
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), 8)};
216 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
217 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
218 const int basic_iostream_wchar_vbtable2
[] = {0, ALIGNED_SIZE(sizeof(basic_iostream_wchar
), 8)-FIELD_OFFSET(basic_iostream_wchar
, base2
)};
219 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
220 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable
;
221 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
222 extern const vtable_ptr MSVCP_basic_iostream_short_vtable
;
224 DEFINE_RTTI_DATA0(iosb
, 0, ".?AV?$_Iosb@H@std@@")
225 DEFINE_RTTI_DATA1(ios_base
, 0, &iosb_rtti_base_descriptor
, ".?AV?$_Iosb@H@std@@")
226 DEFINE_RTTI_DATA2(basic_ios_char
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
227 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
228 DEFINE_RTTI_DATA2(basic_ios_wchar
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
229 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@")
230 DEFINE_RTTI_DATA2(basic_ios_short
, 0, &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
231 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
232 DEFINE_RTTI_DATA0(basic_streambuf_char
, 0,
233 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
234 DEFINE_RTTI_DATA0(basic_streambuf_wchar
, 0,
235 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@")
236 DEFINE_RTTI_DATA0(basic_streambuf_short
, 0,
237 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
238 DEFINE_RTTI_DATA1(basic_filebuf_char
, 0, &basic_streambuf_char_rtti_base_descriptor
,
239 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@")
240 DEFINE_RTTI_DATA1(basic_filebuf_wchar
, 0, &basic_streambuf_wchar_rtti_base_descriptor
,
241 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
242 DEFINE_RTTI_DATA1(basic_filebuf_short
, 0, &basic_streambuf_short_rtti_base_descriptor
,
243 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
244 DEFINE_RTTI_DATA3(basic_ostream_char
, sizeof(basic_ostream_char
), &basic_ios_char_rtti_base_descriptor
,
245 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
246 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
247 DEFINE_RTTI_DATA3(basic_ostream_wchar
, sizeof(basic_ostream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
248 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
249 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@")
250 DEFINE_RTTI_DATA3(basic_ostream_short
, sizeof(basic_ostream_wchar
), &basic_ios_short_rtti_base_descriptor
,
251 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
252 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
253 DEFINE_RTTI_DATA3(basic_istream_char
, sizeof(basic_istream_char
), &basic_ios_char_rtti_base_descriptor
,
254 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
255 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
256 DEFINE_RTTI_DATA3(basic_istream_wchar
, sizeof(basic_istream_wchar
), &basic_ios_wchar_rtti_base_descriptor
,
257 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
258 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@")
259 DEFINE_RTTI_DATA3(basic_istream_short
, sizeof(basic_istream_wchar
), &basic_ios_short_rtti_base_descriptor
,
260 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
261 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
262 DEFINE_RTTI_DATA8(basic_iostream_char
, sizeof(basic_iostream_char
),
263 &basic_istream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
264 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
265 &basic_ostream_char_rtti_base_descriptor
, &basic_ios_char_rtti_base_descriptor
,
266 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
267 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
268 DEFINE_RTTI_DATA8(basic_iostream_wchar
, sizeof(basic_iostream_wchar
),
269 &basic_istream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
270 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
271 &basic_ostream_wchar_rtti_base_descriptor
, &basic_ios_wchar_rtti_base_descriptor
,
272 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
273 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@")
274 DEFINE_RTTI_DATA8(basic_iostream_short
, sizeof(basic_iostream_wchar
),
275 &basic_istream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
276 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
277 &basic_ostream_short_rtti_base_descriptor
, &basic_ios_short_rtti_base_descriptor
,
278 &ios_base_rtti_base_descriptor
, &iosb_rtti_base_descriptor
,
279 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
282 void __asm_dummy_vtables(void) {
285 VTABLE_ADD_FUNC(iosb_vector_dtor
));
286 __ASM_VTABLE(ios_base
,
287 VTABLE_ADD_FUNC(ios_base_vector_dtor
));
288 __ASM_VTABLE(basic_ios_char
,
289 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor
));
290 __ASM_VTABLE(basic_ios_wchar
,
291 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor
));
292 __ASM_VTABLE(basic_ios_short
,
293 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor
));
294 __ASM_VTABLE(basic_streambuf_char
,
295 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor
)
296 VTABLE_ADD_FUNC(basic_streambuf_char__Lock
)
297 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock
)
298 VTABLE_ADD_FUNC(basic_streambuf_char_overflow
)
299 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail
)
300 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
301 VTABLE_ADD_FUNC(basic_streambuf_char_underflow
)
302 VTABLE_ADD_FUNC(basic_streambuf_char_uflow
)
303 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
304 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
305 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff
)
306 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos
)
307 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf
)
308 VTABLE_ADD_FUNC(basic_streambuf_char_sync
)
309 VTABLE_ADD_FUNC(basic_streambuf_char_imbue
));
310 __ASM_VTABLE(basic_streambuf_wchar
,
311 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
312 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
313 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
314 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
315 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
316 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
317 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
318 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
319 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
320 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
321 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
322 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
323 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
324 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
325 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
326 __ASM_VTABLE(basic_streambuf_short
,
327 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor
)
328 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
329 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
330 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow
)
331 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail
)
332 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
333 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow
)
334 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow
)
335 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
336 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
337 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff
)
338 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos
)
339 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf
)
340 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync
)
341 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue
));
342 __ASM_VTABLE(basic_filebuf_char
,
343 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor
)
344 VTABLE_ADD_FUNC(basic_streambuf_char__Lock
)
345 VTABLE_ADD_FUNC(basic_streambuf_char__Unlock
)
346 VTABLE_ADD_FUNC(basic_filebuf_char_overflow
)
347 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail
)
348 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc
)
349 VTABLE_ADD_FUNC(basic_filebuf_char_underflow
)
350 VTABLE_ADD_FUNC(basic_filebuf_char_uflow
)
351 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn
)
352 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn
)
353 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff
)
354 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos
)
355 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf
)
356 VTABLE_ADD_FUNC(basic_filebuf_char_sync
)
357 VTABLE_ADD_FUNC(basic_filebuf_char_imbue
));
358 __ASM_VTABLE(basic_filebuf_wchar
,
359 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor
)
360 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
361 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
362 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow
)
363 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail
)
364 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
365 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow
)
366 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow
)
367 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
368 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
369 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff
)
370 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos
)
371 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf
)
372 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync
)
373 VTABLE_ADD_FUNC(basic_filebuf_wchar_imbue
));
374 __ASM_VTABLE(basic_filebuf_short
,
375 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor
)
376 VTABLE_ADD_FUNC(basic_streambuf_wchar__Lock
)
377 VTABLE_ADD_FUNC(basic_streambuf_wchar__Unlock
)
378 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow
)
379 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail
)
380 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc
)
381 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow
)
382 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow
)
383 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn
)
384 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn
)
385 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff
)
386 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos
)
387 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf
)
388 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync
)
389 VTABLE_ADD_FUNC(basic_filebuf_short_imbue
));
390 __ASM_VTABLE(basic_ostream_char
,
391 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor
));
392 __ASM_VTABLE(basic_ostream_wchar
,
393 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor
));
394 __ASM_VTABLE(basic_ostream_short
,
395 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor
));
396 __ASM_VTABLE(basic_istream_char
,
397 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor
));
398 __ASM_VTABLE(basic_istream_wchar
,
399 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor
));
400 __ASM_VTABLE(basic_istream_short
,
401 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor
));
402 __ASM_VTABLE(basic_iostream_char
,
403 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor
));
404 __ASM_VTABLE(basic_iostream_wchar
,
405 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor
));
406 __ASM_VTABLE(basic_iostream_short
,
407 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor
));
412 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
413 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
414 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next
, 16)
415 void __thiscall
basic_streambuf_char_setp_next(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
417 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
421 this->wsize
= last
-next
;
424 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
425 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
426 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp
, 12)
427 void __thiscall
basic_streambuf_char_setp(basic_streambuf_char
*this, char *first
, char *last
)
429 basic_streambuf_char_setp_next(this, first
, first
, last
);
432 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
433 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
434 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg
, 16)
435 void __thiscall
basic_streambuf_char_setg(basic_streambuf_char
*this, char *first
, char *next
, char *last
)
437 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
441 this->rsize
= last
-next
;
444 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
445 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
446 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty
, 4)
447 void __thiscall
basic_streambuf_char__Init_empty(basic_streambuf_char
*this)
449 TRACE("(%p)\n", this);
451 this->prbuf
= &this->rbuf
;
452 this->pwbuf
= &this->wbuf
;
453 this->prpos
= &this->rpos
;
454 this->pwpos
= &this->wpos
;
455 this->prsize
= &this->rsize
;
456 this->pwsize
= &this->wsize
;
458 basic_streambuf_char_setp(this, NULL
, NULL
);
459 basic_streambuf_char_setg(this, NULL
, NULL
, NULL
);
462 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
463 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
464 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized
, 8)
465 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor_uninitialized(basic_streambuf_char
*this, int uninitialized
)
467 TRACE("(%p %d)\n", this, uninitialized
);
468 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
469 mutex_ctor(&this->lock
);
473 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
474 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
475 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor
, 4)
476 basic_streambuf_char
* __thiscall
basic_streambuf_char_ctor(basic_streambuf_char
*this)
478 TRACE("(%p)\n", this);
480 this->vtable
= &MSVCP_basic_streambuf_char_vtable
;
481 mutex_ctor(&this->lock
);
482 this->loc
= MSVCRT_operator_new(sizeof(locale
));
483 locale_ctor(this->loc
);
484 basic_streambuf_char__Init_empty(this);
489 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
490 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
491 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor
, 4)
492 void __thiscall
basic_streambuf_char_dtor(basic_streambuf_char
*this)
494 TRACE("(%p)\n", this);
496 mutex_dtor(&this->lock
);
497 locale_dtor(this->loc
);
498 MSVCRT_operator_delete(this->loc
);
501 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor
, 8)
502 basic_streambuf_char
* __thiscall
basic_streambuf_char_vector_dtor(basic_streambuf_char
*this, unsigned int flags
)
504 TRACE("(%p %x)\n", this, flags
);
506 /* we have an array, with the number of elements stored before the first object */
507 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
509 for(i
=*ptr
-1; i
>=0; i
--)
510 basic_streambuf_char_dtor(this+i
);
511 MSVCRT_operator_delete(ptr
);
513 basic_streambuf_char_dtor(this);
515 MSVCRT_operator_delete(this);
521 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
522 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
523 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail
, 4)
524 streamsize __thiscall
basic_streambuf_char__Gnavail(const basic_streambuf_char
*this)
526 TRACE("(%p)\n", this);
527 return *this->prpos
? *this->prsize
: 0;
530 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
531 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
532 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec
, 4)
533 char* __thiscall
basic_streambuf_char__Gndec(basic_streambuf_char
*this)
535 TRACE("(%p)\n", this);
541 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
542 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
543 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc
, 4)
544 char* __thiscall
basic_streambuf_char__Gninc(basic_streambuf_char
*this)
546 TRACE("(%p)\n", this);
548 return (*this->prpos
)++;
551 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
552 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
553 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc
, 4)
554 char* __thiscall
basic_streambuf_char__Gnpreinc(basic_streambuf_char
*this)
556 TRACE("(%p)\n", this);
562 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
563 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
564 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init
, 28)
565 void __thiscall
basic_streambuf_char__Init(basic_streambuf_char
*this, char **gf
, char **gn
, int *gc
, char **pf
, char **pn
, int *pc
)
567 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
577 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
578 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
579 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock
, 4)
580 #define call_basic_streambuf_char__Lock(this) CALL_VTBL_FUNC(this, 4, \
581 void, (basic_streambuf_char*), (this))
582 void __thiscall
basic_streambuf_char__Lock(basic_streambuf_char
*this)
584 TRACE("(%p)\n", this);
585 mutex_lock(&this->lock
);
588 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
589 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
590 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail
, 4)
591 streamsize __thiscall
basic_streambuf_char__Pnavail(const basic_streambuf_char
*this)
593 TRACE("(%p)\n", this);
594 return *this->pwpos
? *this->pwsize
: 0;
597 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
598 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
599 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc
, 4)
600 char* __thiscall
basic_streambuf_char__Pninc(basic_streambuf_char
*this)
602 TRACE("(%p)\n", this);
604 return (*this->pwpos
)++;
607 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
608 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
609 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow
, 4)
610 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 24, \
611 int, (basic_streambuf_char*), (this))
612 int __thiscall
basic_streambuf_char_underflow(basic_streambuf_char
*this)
614 TRACE("(%p)\n", this);
618 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
619 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
620 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow
, 4)
621 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 28, \
622 int, (basic_streambuf_char*), (this))
623 int __thiscall
basic_streambuf_char_uflow(basic_streambuf_char
*this)
627 TRACE("(%p)\n", this);
629 if(call_basic_streambuf_char_underflow(this)==EOF
)
632 ret
= (unsigned char)**this->prpos
;
638 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
639 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
640 static streamsize
basic_streambuf_char__Xsgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
642 streamsize copied
, chunk
;
645 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
647 for(copied
=0; copied
<count
&& size
;) {
648 chunk
= basic_streambuf_char__Gnavail(this);
649 if(chunk
> count
-copied
)
650 chunk
= count
-copied
;
653 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
);
654 *this->prpos
+= chunk
;
655 *this->prsize
-= chunk
;
658 }else if((c
= call_basic_streambuf_char_uflow(this)) != EOF
) {
670 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
671 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
672 static streamsize
basic_streambuf_char__Sgetn_s(basic_streambuf_char
*this, char *ptr
, MSVCP_size_t size
, streamsize count
)
674 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
675 return basic_streambuf_char__Xsgetn_s(this, ptr
, size
, count
);
678 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
679 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
680 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock
, 4)
681 #define call_basic_streambuf_char__Unlock(this) CALL_VTBL_FUNC(this, 8, \
682 void, (basic_streambuf_char*), (this))
683 void __thiscall
basic_streambuf_char__Unlock(basic_streambuf_char
*this)
685 TRACE("(%p)\n", this);
686 mutex_unlock(&this->lock
);
689 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
690 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
691 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback
, 4)
692 char* __thiscall
basic_streambuf_char_eback(const basic_streambuf_char
*this)
694 TRACE("(%p)\n", this);
698 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
699 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
700 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr
, 4)
701 char* __thiscall
basic_streambuf_char_gptr(const basic_streambuf_char
*this)
703 TRACE("(%p)\n", this);
707 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
708 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
709 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr
, 4)
710 char* __thiscall
basic_streambuf_char_egptr(const basic_streambuf_char
*this)
712 TRACE("(%p)\n", this);
713 return *this->prpos
+*this->prsize
;
716 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
717 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
718 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr
, 4)
719 char* __thiscall
basic_streambuf_char_epptr(const basic_streambuf_char
*this)
721 TRACE("(%p)\n", this);
722 return *this->pwpos
+*this->pwsize
;
725 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
726 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
727 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump
, 8)
728 void __thiscall
basic_streambuf_char_gbump(basic_streambuf_char
*this, int off
)
730 TRACE("(%p %d)\n", this, off
);
732 *this->prsize
-= off
;
735 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QBE?AVlocale@2@XZ */
736 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEBA?AVlocale@2@XZ */
737 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc
, 8)
738 locale
* __thiscall
basic_streambuf_char_getloc(const basic_streambuf_char
*this, locale
*ret
)
740 TRACE("(%p)\n", this);
741 return locale_copy_ctor(ret
, this->loc
);
744 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
745 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
746 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue
, 8)
747 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 56, \
748 void, (basic_streambuf_char*, const locale*), (this, loc))
749 void __thiscall
basic_streambuf_char_imbue(basic_streambuf_char
*this, const locale
*loc
)
751 TRACE("(%p %p)\n", this, loc
);
754 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
755 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
756 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow
, 8)
757 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 12, \
758 int, (basic_streambuf_char*, int), (this, ch))
759 int __thiscall
basic_streambuf_char_overflow(basic_streambuf_char
*this, int ch
)
761 TRACE("(%p %d)\n", this, ch
);
765 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
766 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
767 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail
, 8)
768 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, \
769 int, (basic_streambuf_char*, int), (this, ch))
770 int __thiscall
basic_streambuf_char_pbackfail(basic_streambuf_char
*this, int ch
)
772 TRACE("(%p %d)\n", this, ch
);
776 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
777 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
778 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase
, 4)
779 char* __thiscall
basic_streambuf_char_pbase(const basic_streambuf_char
*this)
781 TRACE("(%p)\n", this);
785 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
786 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
787 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump
, 8)
788 void __thiscall
basic_streambuf_char_pbump(basic_streambuf_char
*this, int off
)
790 TRACE("(%p %d)\n", this, off
);
792 *this->pwsize
-= off
;
795 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
796 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
797 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr
, 4)
798 char* __thiscall
basic_streambuf_char_pptr(const basic_streambuf_char
*this)
800 TRACE("(%p)\n", this);
804 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
805 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
806 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue
, 12)
807 locale
* __thiscall
basic_streambuf_char_pubimbue(basic_streambuf_char
*this, locale
*ret
, const locale
*loc
)
809 TRACE("(%p %p)\n", this, loc
);
810 memcpy(ret
, this->loc
, sizeof(locale
));
811 call_basic_streambuf_char_imbue(this, loc
);
812 locale_copy_ctor(this->loc
, loc
);
816 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
817 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
818 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff
, 24)
819 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, \
820 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
821 fpos_int
* __thiscall
basic_streambuf_char_seekoff(basic_streambuf_char
*this,
822 fpos_int
*ret
, streamoff off
, int way
, int mode
)
824 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
831 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
832 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
833 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff
, 24)
834 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff(basic_streambuf_char
*this,
835 fpos_int
*ret
, streamoff off
, int way
, int mode
)
837 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
838 return call_basic_streambuf_char_seekoff(this, ret
, off
, way
, mode
);
841 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
842 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
843 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff_old
, 24)
844 fpos_int
* __thiscall
basic_streambuf_char_pubseekoff_old(basic_streambuf_char
*this,
845 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
847 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
848 return basic_streambuf_char_pubseekoff(this, ret
, off
, way
, mode
);
851 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
852 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
853 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos
, 36)
854 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, \
855 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
856 fpos_int
* __thiscall
basic_streambuf_char_seekpos(basic_streambuf_char
*this,
857 fpos_int
*ret
, fpos_int pos
, int mode
)
859 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
866 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
867 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
868 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos
, 36)
869 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos(basic_streambuf_char
*this,
870 fpos_int
*ret
, fpos_int pos
, int mode
)
872 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
873 return call_basic_streambuf_char_seekpos(this, ret
, pos
, mode
);
876 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
877 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
878 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos_old
, 36)
879 fpos_int
* __thiscall
basic_streambuf_char_pubseekpos_old(basic_streambuf_char
*this,
880 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
882 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
883 return basic_streambuf_char_pubseekpos(this, ret
, pos
, mode
);
886 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
887 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
888 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf
, 16)
889 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, \
890 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
891 basic_streambuf_char
* __thiscall
basic_streambuf_char_setbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
893 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
897 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
898 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
899 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf
, 16)
900 basic_streambuf_char
* __thiscall
basic_streambuf_char_pubsetbuf(basic_streambuf_char
*this, char *buf
, streamsize count
)
902 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
903 return call_basic_streambuf_char_setbuf(this, buf
, count
);
906 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
907 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
908 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync
, 4)
909 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 52, \
910 int, (basic_streambuf_char*), (this))
911 int __thiscall
basic_streambuf_char_sync(basic_streambuf_char
*this)
913 TRACE("(%p)\n", this);
917 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
918 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
919 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync
, 4)
920 int __thiscall
basic_streambuf_char_pubsync(basic_streambuf_char
*this)
922 TRACE("(%p)\n", this);
923 return call_basic_streambuf_char_sync(this);
926 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
927 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
928 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn
, 16)
929 streamsize __thiscall
basic_streambuf_char_sgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
931 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
932 return basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
935 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
936 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
937 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc
, 4)
938 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 20, \
939 streamsize, (basic_streambuf_char*), (this))
940 streamsize __thiscall
basic_streambuf_char_showmanyc(basic_streambuf_char
*this)
942 TRACE("(%p)\n", this);
946 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
947 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
948 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail
, 4)
949 streamsize __thiscall
basic_streambuf_char_in_avail(basic_streambuf_char
*this)
953 TRACE("(%p)\n", this);
955 ret
= basic_streambuf_char__Gnavail(this);
956 return ret
? ret
: call_basic_streambuf_char_showmanyc(this);
959 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
960 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
961 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc
, 8)
962 int __thiscall
basic_streambuf_char_sputbackc(basic_streambuf_char
*this, char ch
)
964 TRACE("(%p %d)\n", this, ch
);
965 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
968 return (unsigned char)ch
;
971 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch
);
974 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
975 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
976 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc
, 8)
977 int __thiscall
basic_streambuf_char_sputc(basic_streambuf_char
*this, char ch
)
979 TRACE("(%p %d)\n", this, ch
);
980 return basic_streambuf_char__Pnavail(this) ?
981 (*basic_streambuf_char__Pninc(this) = ch
) :
982 call_basic_streambuf_char_overflow(this, (unsigned char)ch
);
985 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
986 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
987 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc
, 4)
988 int __thiscall
basic_streambuf_char_sungetc(basic_streambuf_char
*this)
990 TRACE("(%p)\n", this);
991 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
994 return (unsigned char)**this->prpos
;
997 return call_basic_streambuf_char_pbackfail(this, EOF
);
1000 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1001 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1002 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc
, 4)
1003 void __thiscall
basic_streambuf_char_stossc(basic_streambuf_char
*this)
1005 TRACE("(%p)\n", this);
1006 if(basic_streambuf_char__Gnavail(this))
1007 basic_streambuf_char__Gninc(this);
1009 call_basic_streambuf_char_uflow(this);
1012 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1013 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1014 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc
, 4)
1015 int __thiscall
basic_streambuf_char_sbumpc(basic_streambuf_char
*this)
1017 TRACE("(%p)\n", this);
1018 return basic_streambuf_char__Gnavail(this) ?
1019 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1022 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1023 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1024 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc
, 4)
1025 int __thiscall
basic_streambuf_char_sgetc(basic_streambuf_char
*this)
1027 TRACE("(%p)\n", this);
1028 return basic_streambuf_char__Gnavail(this) ?
1029 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1032 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1033 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1034 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc
, 4)
1035 int __thiscall
basic_streambuf_char_snextc(basic_streambuf_char
*this)
1037 TRACE("(%p)\n", this);
1039 if(basic_streambuf_char__Gnavail(this) > 1)
1040 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1041 return basic_streambuf_char_sbumpc(this)==EOF
?
1042 EOF
: basic_streambuf_char_sgetc(this);
1045 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1046 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1047 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn
, 16)
1048 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1049 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1050 streamsize __thiscall
basic_streambuf_char_xsgetn(basic_streambuf_char
*this, char *ptr
, streamsize count
)
1052 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1053 return basic_streambuf_char__Xsgetn_s(this, ptr
, -1, count
);
1056 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1057 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1058 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn
, 16)
1059 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, \
1060 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1061 streamsize __thiscall
basic_streambuf_char_xsputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1063 streamsize copied
, chunk
;
1065 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1067 for(copied
=0; copied
<count
;) {
1068 chunk
= basic_streambuf_char__Pnavail(this);
1069 if(chunk
> count
-copied
)
1070 chunk
= count
-copied
;
1073 memcpy(*this->pwpos
, ptr
+copied
, chunk
);
1074 *this->pwpos
+= chunk
;
1075 *this->pwsize
-= chunk
;
1077 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr
[copied
]) != EOF
) {
1087 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1088 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1089 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn
, 16)
1090 streamsize __thiscall
basic_streambuf_char_sputn(basic_streambuf_char
*this, const char *ptr
, streamsize count
)
1092 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1093 return call_basic_streambuf_char_xsputn(this, ptr
, count
);
1096 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1097 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1098 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1099 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1100 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next
, 16)
1101 void __thiscall
basic_streambuf_wchar_setp_next(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1103 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1107 this->wsize
= last
-next
;
1110 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1111 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1112 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1113 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1114 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp
, 12)
1115 void __thiscall
basic_streambuf_wchar_setp(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *last
)
1117 basic_streambuf_wchar_setp_next(this, first
, first
, last
);
1120 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1121 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1122 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1123 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1124 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg
, 16)
1125 void __thiscall
basic_streambuf_wchar_setg(basic_streambuf_wchar
*this, wchar_t *first
, wchar_t *next
, wchar_t *last
)
1127 TRACE("(%p %p %p %p)\n", this, first
, next
, last
);
1131 this->rsize
= last
-next
;
1134 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1135 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1136 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1137 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1138 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty
, 4)
1139 void __thiscall
basic_streambuf_wchar__Init_empty(basic_streambuf_wchar
*this)
1141 TRACE("(%p)\n", this);
1143 this->prbuf
= &this->rbuf
;
1144 this->pwbuf
= &this->wbuf
;
1145 this->prpos
= &this->rpos
;
1146 this->pwpos
= &this->wpos
;
1147 this->prsize
= &this->rsize
;
1148 this->pwsize
= &this->wsize
;
1150 basic_streambuf_wchar_setp(this, NULL
, NULL
);
1151 basic_streambuf_wchar_setg(this, NULL
, NULL
, NULL
);
1154 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1155 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1156 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor_uninitialized
, 8)
1157 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1159 TRACE("(%p %d)\n", this, uninitialized
);
1160 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1161 mutex_ctor(&this->lock
);
1165 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1166 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1167 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized
, 8)
1168 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar
*this, int uninitialized
)
1170 TRACE("(%p %d)\n", this, uninitialized
);
1171 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized
);
1172 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1176 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1177 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1178 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_ctor
, 4)
1179 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_ctor(basic_streambuf_wchar
*this)
1181 TRACE("(%p)\n", this);
1183 this->vtable
= &MSVCP_basic_streambuf_wchar_vtable
;
1184 mutex_ctor(&this->lock
);
1185 this->loc
= MSVCRT_operator_new(sizeof(locale
));
1186 locale_ctor(this->loc
);
1187 basic_streambuf_wchar__Init_empty(this);
1192 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1193 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1194 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor
, 4)
1195 basic_streambuf_wchar
* __thiscall
basic_streambuf_short_ctor(basic_streambuf_wchar
*this)
1197 TRACE("(%p)\n", this);
1198 basic_streambuf_wchar_ctor(this);
1199 this->vtable
= &MSVCP_basic_streambuf_short_vtable
;
1203 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1204 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1205 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1206 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1207 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor
, 4)
1208 void __thiscall
basic_streambuf_wchar_dtor(basic_streambuf_wchar
*this)
1210 TRACE("(%p)\n", this);
1212 mutex_dtor(&this->lock
);
1213 locale_dtor(this->loc
);
1214 MSVCRT_operator_delete(this->loc
);
1217 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor
, 8)
1218 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar
*this, unsigned int flags
)
1220 TRACE("(%p %x)\n", this, flags
);
1222 /* we have an array, with the number of elements stored before the first object */
1223 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1225 for(i
=*ptr
-1; i
>=0; i
--)
1226 basic_streambuf_wchar_dtor(this+i
);
1227 MSVCRT_operator_delete(ptr
);
1229 basic_streambuf_wchar_dtor(this);
1231 MSVCRT_operator_delete(this);
1237 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1238 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1239 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1240 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1241 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnavail
, 4)
1242 streamsize __thiscall
basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar
*this)
1244 TRACE("(%p)\n", this);
1245 return *this->prpos
? *this->prsize
: 0;
1248 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1249 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1250 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1251 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1252 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec
, 4)
1253 wchar_t* __thiscall
basic_streambuf_wchar__Gndec(basic_streambuf_wchar
*this)
1255 TRACE("(%p)\n", this);
1258 return *this->prpos
;
1261 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1262 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1263 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1264 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1265 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc
, 4)
1266 wchar_t* __thiscall
basic_streambuf_wchar__Gninc(basic_streambuf_wchar
*this)
1268 TRACE("(%p)\n", this);
1270 return (*this->prpos
)++;
1273 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1274 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1275 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1276 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1277 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gnpreinc
, 4)
1278 wchar_t* __thiscall
basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar
*this)
1280 TRACE("(%p)\n", this);
1283 return *this->prpos
;
1286 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1287 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1288 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1289 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1290 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init
, 28)
1291 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
)
1293 TRACE("(%p %p %p %p %p %p %p)\n", this, gf
, gn
, gc
, pf
, pn
, pc
);
1303 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1304 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1305 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1306 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1307 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock
, 4)
1308 void __thiscall
basic_streambuf_wchar__Lock(basic_streambuf_wchar
*this)
1310 TRACE("(%p)\n", this);
1311 mutex_lock(&this->lock
);
1314 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1315 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1316 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1317 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1318 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pnavail
, 4)
1319 streamsize __thiscall
basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar
*this)
1321 TRACE("(%p)\n", this);
1322 return *this->pwpos
? *this->pwsize
: 0;
1325 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1326 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1327 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1328 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1329 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc
, 4)
1330 wchar_t* __thiscall
basic_streambuf_wchar__Pninc(basic_streambuf_wchar
*this)
1332 TRACE("(%p)\n", this);
1334 return (*this->pwpos
)++;
1337 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1338 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1339 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1340 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1341 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow
, 4)
1342 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 24, \
1343 unsigned short, (basic_streambuf_wchar*), (this))
1344 unsigned short __thiscall
basic_streambuf_wchar_underflow(basic_streambuf_wchar
*this)
1346 TRACE("(%p)\n", this);
1350 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1351 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1352 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1353 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1354 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow
, 4)
1355 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 28, \
1356 unsigned short, (basic_streambuf_wchar*), (this))
1357 unsigned short __thiscall
basic_streambuf_wchar_uflow(basic_streambuf_wchar
*this)
1361 TRACE("(%p)\n", this);
1363 if(call_basic_streambuf_wchar_underflow(this)==WEOF
)
1366 ret
= **this->prpos
;
1372 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1373 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1374 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1375 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1376 static streamsize
basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1378 streamsize copied
, chunk
;
1381 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
1383 for(copied
=0; copied
<count
&& size
;) {
1384 chunk
= basic_streambuf_wchar__Gnavail(this);
1385 if(chunk
> count
-copied
)
1386 chunk
= count
-copied
;
1389 memcpy_s(ptr
+copied
, size
, *this->prpos
, chunk
*sizeof(wchar_t));
1390 *this->prpos
+= chunk
;
1391 *this->prsize
-= chunk
;
1393 size
-= chunk
*sizeof(wchar_t);
1394 }else if((c
= call_basic_streambuf_wchar_uflow(this)) != WEOF
) {
1406 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1407 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1408 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1409 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1410 static streamsize
basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar
*this, wchar_t *ptr
, MSVCP_size_t size
, streamsize count
)
1412 TRACE("(%p %p %lu %s)\n", this, ptr
, size
, wine_dbgstr_longlong(count
));
1413 return basic_streambuf_wchar__Xsgetn_s(this, ptr
, size
, count
);
1416 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1417 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1418 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1419 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1420 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock
, 4)
1421 void __thiscall
basic_streambuf_wchar__Unlock(basic_streambuf_wchar
*this)
1423 TRACE("(%p)\n", this);
1424 mutex_unlock(&this->lock
);
1427 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1428 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1429 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1430 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1431 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback
, 4)
1432 wchar_t* __thiscall
basic_streambuf_wchar_eback(const basic_streambuf_wchar
*this)
1434 TRACE("(%p)\n", this);
1435 return *this->prbuf
;
1438 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1439 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1440 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1441 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1442 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr
, 4)
1443 wchar_t* __thiscall
basic_streambuf_wchar_gptr(const basic_streambuf_wchar
*this)
1445 TRACE("(%p)\n", this);
1446 return *this->prpos
;
1449 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1450 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1451 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1452 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1453 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr
, 4)
1454 wchar_t* __thiscall
basic_streambuf_wchar_egptr(const basic_streambuf_wchar
*this)
1456 TRACE("(%p)\n", this);
1457 return *this->prpos
+*this->prsize
;
1460 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1461 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1462 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1463 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1464 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr
, 4)
1465 wchar_t* __thiscall
basic_streambuf_wchar_epptr(const basic_streambuf_wchar
*this)
1467 TRACE("(%p)\n", this);
1468 return *this->pwpos
+*this->pwsize
;
1471 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1472 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1473 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1474 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1475 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump
, 8)
1476 void __thiscall
basic_streambuf_wchar_gbump(basic_streambuf_wchar
*this, int off
)
1478 TRACE("(%p %d)\n", this, off
);
1479 *this->prpos
+= off
;
1480 *this->prsize
-= off
;
1483 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QBE?AVlocale@2@XZ */
1484 /* ?getloc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEBA?AVlocale@2@XZ */
1485 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QBE?AVlocale@2@XZ */
1486 /* ?getloc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEBA?AVlocale@2@XZ */
1487 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_getloc
, 8)
1488 locale
* __thiscall
basic_streambuf_wchar_getloc(const basic_streambuf_wchar
*this, locale
*ret
)
1490 TRACE("(%p)\n", this);
1491 return locale_copy_ctor(ret
, this->loc
);
1494 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1495 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1496 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1497 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1498 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue
, 8)
1499 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 56, \
1500 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1501 void __thiscall
basic_streambuf_wchar_imbue(basic_streambuf_wchar
*this, const locale
*loc
)
1503 TRACE("(%p %p)\n", this, loc
);
1506 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1507 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1508 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1509 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1510 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow
, 8)
1511 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 12, \
1512 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1513 unsigned short __thiscall
basic_streambuf_wchar_overflow(basic_streambuf_wchar
*this, unsigned short ch
)
1515 TRACE("(%p %d)\n", this, ch
);
1519 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1520 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1521 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1522 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1523 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail
, 8)
1524 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 16, \
1525 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1526 unsigned short __thiscall
basic_streambuf_wchar_pbackfail(basic_streambuf_wchar
*this, unsigned short ch
)
1528 TRACE("(%p %d)\n", this, ch
);
1532 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1533 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1534 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1535 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1536 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase
, 4)
1537 wchar_t* __thiscall
basic_streambuf_wchar_pbase(const basic_streambuf_wchar
*this)
1539 TRACE("(%p)\n", this);
1540 return *this->pwbuf
;
1543 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1544 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1545 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1546 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1547 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump
, 8)
1548 void __thiscall
basic_streambuf_wchar_pbump(basic_streambuf_wchar
*this, int off
)
1550 TRACE("(%p %d)\n", this, off
);
1551 *this->pwpos
+= off
;
1552 *this->pwsize
-= off
;
1555 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1556 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1557 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1558 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1559 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr
, 4)
1560 wchar_t* __thiscall
basic_streambuf_wchar_pptr(const basic_streambuf_wchar
*this)
1562 TRACE("(%p)\n", this);
1563 return *this->pwpos
;
1566 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1567 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1568 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1569 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1570 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue
, 12)
1571 locale
* __thiscall
basic_streambuf_wchar_pubimbue(basic_streambuf_wchar
*this, locale
*ret
, const locale
*loc
)
1573 TRACE("(%p %p)\n", this, loc
);
1574 memcpy(ret
, this->loc
, sizeof(locale
));
1575 call_basic_streambuf_wchar_imbue(this, loc
);
1576 locale_copy_ctor(this->loc
, loc
);
1580 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1581 /* ?seekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1582 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
1583 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
1584 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff
, 24)
1585 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 40, \
1586 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1587 fpos_int
* __thiscall
basic_streambuf_wchar_seekoff(basic_streambuf_wchar
*this,
1588 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1590 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1597 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1598 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1599 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1600 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1601 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff
, 24)
1602 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar
*this,
1603 fpos_int
*ret
, streamoff off
, int way
, int mode
)
1605 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1606 return call_basic_streambuf_wchar_seekoff(this, ret
, off
, way
, mode
);
1609 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1610 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1611 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JII@Z */
1612 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JII@Z */
1613 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff_old
, 24)
1614 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekoff_old(basic_streambuf_wchar
*this,
1615 fpos_int
*ret
, streamoff off
, unsigned int way
, unsigned int mode
)
1617 TRACE("(%p %s %d %d)\n", this, wine_dbgstr_longlong(off
), way
, mode
);
1618 return basic_streambuf_wchar_pubseekoff(this, ret
, off
, way
, mode
);
1621 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1622 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1623 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1624 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1625 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos
, 36)
1626 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 44, \
1627 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1628 fpos_int
* __thiscall
basic_streambuf_wchar_seekpos(basic_streambuf_wchar
*this,
1629 fpos_int
*ret
, fpos_int pos
, int mode
)
1631 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1638 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1639 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1640 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1641 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1642 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos
, 36)
1643 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar
*this,
1644 fpos_int
*ret
, fpos_int pos
, int mode
)
1646 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1647 return call_basic_streambuf_wchar_seekpos(this, ret
, pos
, mode
);
1650 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1651 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1652 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@I@Z */
1653 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@I@Z */
1654 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos_old
, 36)
1655 fpos_int
* __thiscall
basic_streambuf_wchar_pubseekpos_old(basic_streambuf_wchar
*this,
1656 fpos_int
*ret
, fpos_int pos
, unsigned int mode
)
1658 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos
), mode
);
1659 return basic_streambuf_wchar_pubseekpos(this, ret
, pos
, mode
);
1662 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
1663 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
1664 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
1665 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
1666 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf
, 16)
1667 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 48, \
1668 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
1669 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_setbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1671 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
1675 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
1676 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
1677 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
1678 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
1679 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf
, 16)
1680 basic_streambuf_wchar
* __thiscall
basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar
*this, wchar_t *buf
, streamsize count
)
1682 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
1683 return call_basic_streambuf_wchar_setbuf(this, buf
, count
);
1686 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1687 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
1688 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1689 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
1690 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync
, 4)
1691 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 52, \
1692 int, (basic_streambuf_wchar*), (this))
1693 int __thiscall
basic_streambuf_wchar_sync(basic_streambuf_wchar
*this)
1695 TRACE("(%p)\n", this);
1699 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1700 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
1701 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1702 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
1703 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync
, 4)
1704 int __thiscall
basic_streambuf_wchar_pubsync(basic_streambuf_wchar
*this)
1706 TRACE("(%p)\n", this);
1707 return call_basic_streambuf_wchar_sync(this);
1710 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
1711 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
1712 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
1713 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
1714 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn
, 16)
1715 streamsize __thiscall
basic_streambuf_wchar_sgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1717 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1718 return basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1721 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
1722 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
1723 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
1724 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
1725 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc
, 4)
1726 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 20, \
1727 streamsize, (basic_streambuf_wchar*), (this))
1728 streamsize __thiscall
basic_streambuf_wchar_showmanyc(basic_streambuf_wchar
*this)
1730 TRACE("(%p)\n", this);
1734 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
1735 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
1736 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
1737 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
1738 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail
, 4)
1739 streamsize __thiscall
basic_streambuf_wchar_in_avail(basic_streambuf_wchar
*this)
1743 TRACE("(%p)\n", this);
1745 ret
= basic_streambuf_wchar__Gnavail(this);
1746 return ret
? ret
: call_basic_streambuf_wchar_showmanyc(this);
1749 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1750 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1751 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1752 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
1753 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc
, 8)
1754 unsigned short __thiscall
basic_streambuf_wchar_sputbackc(basic_streambuf_wchar
*this, wchar_t ch
)
1756 TRACE("(%p %d)\n", this, ch
);
1757 if(*this->prpos
&& *this->prpos
>*this->prbuf
&& (*this->prpos
)[-1]==ch
) {
1763 return call_basic_streambuf_wchar_pbackfail(this, ch
);
1766 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
1767 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
1768 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
1769 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
1770 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc
, 8)
1771 unsigned short __thiscall
basic_streambuf_wchar_sputc(basic_streambuf_wchar
*this, wchar_t ch
)
1773 TRACE("(%p %d)\n", this, ch
);
1774 return basic_streambuf_wchar__Pnavail(this) ?
1775 (*basic_streambuf_wchar__Pninc(this) = ch
) :
1776 call_basic_streambuf_wchar_overflow(this, ch
);
1779 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1780 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1781 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1782 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1783 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc
, 4)
1784 unsigned short __thiscall
basic_streambuf_wchar_sungetc(basic_streambuf_wchar
*this)
1786 TRACE("(%p)\n", this);
1787 if(*this->prpos
&& *this->prpos
>*this->prbuf
) {
1790 return **this->prpos
;
1793 return call_basic_streambuf_wchar_pbackfail(this, WEOF
);
1796 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1797 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1798 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1799 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1800 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc
, 4)
1801 void __thiscall
basic_streambuf_wchar_stossc(basic_streambuf_wchar
*this)
1803 TRACE("(%p)\n", this);
1804 if(basic_streambuf_wchar__Gnavail(this))
1805 basic_streambuf_wchar__Gninc(this);
1807 call_basic_streambuf_wchar_uflow(this);
1810 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1811 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1812 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1813 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1814 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc
, 4)
1815 unsigned short __thiscall
basic_streambuf_wchar_sbumpc(basic_streambuf_wchar
*this)
1817 TRACE("(%p)\n", this);
1818 return basic_streambuf_wchar__Gnavail(this) ?
1819 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
1822 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1823 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1824 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1825 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1826 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc
, 4)
1827 unsigned short __thiscall
basic_streambuf_wchar_sgetc(basic_streambuf_wchar
*this)
1829 TRACE("(%p)\n", this);
1830 return basic_streambuf_wchar__Gnavail(this) ?
1831 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
1834 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
1835 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
1836 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
1837 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
1838 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc
, 4)
1839 unsigned short __thiscall
basic_streambuf_wchar_snextc(basic_streambuf_wchar
*this)
1841 TRACE("(%p)\n", this);
1843 if(basic_streambuf_wchar__Gnavail(this) > 1)
1844 return *basic_streambuf_wchar__Gnpreinc(this);
1845 return basic_streambuf_wchar_sbumpc(this)==WEOF
?
1846 WEOF
: basic_streambuf_wchar_sgetc(this);
1849 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
1850 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
1851 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
1852 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
1853 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn
, 16)
1854 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 32, \
1855 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
1856 streamsize __thiscall
basic_streambuf_wchar_xsgetn(basic_streambuf_wchar
*this, wchar_t *ptr
, streamsize count
)
1858 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1859 return basic_streambuf_wchar__Xsgetn_s(this, ptr
, -1, count
);
1862 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
1863 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
1864 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
1865 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
1866 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn
, 16)
1867 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 36, \
1868 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
1869 streamsize __thiscall
basic_streambuf_wchar_xsputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1871 streamsize copied
, chunk
;
1873 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1875 for(copied
=0; copied
<count
;) {
1876 chunk
= basic_streambuf_wchar__Pnavail(this);
1877 if(chunk
> count
-copied
)
1878 chunk
= count
-copied
;
1881 memcpy(*this->pwpos
, ptr
+copied
, chunk
*sizeof(wchar_t));
1882 *this->pwpos
+= chunk
;
1883 *this->pwsize
-= chunk
;
1885 }else if(call_basic_streambuf_wchar_overflow(this, ptr
[copied
]) != WEOF
) {
1895 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
1896 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
1897 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
1898 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
1899 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn
, 16)
1900 streamsize __thiscall
basic_streambuf_wchar_sputn(basic_streambuf_wchar
*this, const wchar_t *ptr
, streamsize count
)
1902 TRACE("(%p %p %s)\n", this, ptr
, wine_dbgstr_longlong(count
));
1903 return call_basic_streambuf_wchar_xsputn(this, ptr
, count
);
1906 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
1907 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
1908 static int basic_filebuf_char__Init__Stinit
= 0;
1910 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
1911 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
1912 static void basic_filebuf_char__Init(basic_filebuf_char
*this, FILE *file
, basic_filebuf__Initfl which
)
1914 TRACE("(%p %p %d)\n", this, file
, which
);
1917 this->wrotesome
= FALSE
;
1918 this->state
= basic_filebuf_char__Init__Stinit
;
1919 this->close
= (which
== INITFL_open
);
1922 basic_streambuf_char__Init_empty(&this->base
);
1924 basic_streambuf_char__Init(&this->base
, &file
->_base
, &file
->_ptr
,
1925 &file
->_cnt
, &file
->_base
, &file
->_ptr
, &file
->_cnt
);
1928 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z */
1929 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z */
1930 static void basic_filebuf_char__Initcvt(basic_filebuf_char
*this, codecvt_char
*cvt
)
1932 TRACE("(%p %p)\n", this, cvt
);
1934 if(codecvt_base_always_noconv(&cvt
->base
)) {
1937 basic_streambuf_char__Init_empty(&this->base
);
1942 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAE_NXZ */
1943 /* ?_Endwrite@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAA_NXZ */
1944 static MSVCP_bool
basic_filebuf_char__Endwrite(basic_filebuf_char
*this)
1946 TRACE("(%p)\n", this);
1948 if(!this->wrotesome
|| !this->cvt
)
1952 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
1956 /* TODO: check if we need a dynamic buffer here */
1961 ret
= codecvt_char_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
1964 this->wrotesome
= FALSE
;
1966 case CODECVT_partial
:
1967 if(!fwrite(buf
, next
-buf
, 1, this->file
))
1972 case CODECVT_noconv
:
1973 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
1982 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
1983 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
1984 static basic_filebuf_char
* basic_filebuf_char_close(basic_filebuf_char
*this)
1986 basic_filebuf_char
*ret
= this;
1988 TRACE("(%p)\n", this);
1993 /* TODO: handle exceptions */
1994 if(!basic_filebuf_char__Endwrite(this))
1996 if(fclose(this->file
))
1999 basic_filebuf_char__Init(this, NULL
, INITFL_close
);
2003 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2004 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2005 static basic_filebuf_char
* basic_filebuf_char_ctor_file(basic_filebuf_char
*this, FILE *file
)
2007 TRACE("(%p %p)\n", this, file
);
2009 basic_streambuf_char_ctor(&this->base
);
2010 this->base
.vtable
= &MSVCP_basic_filebuf_char_vtable
;
2012 basic_filebuf_char__Init(this, file
, INITFL_new
);
2016 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2017 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2018 static void basic_filebuf_char_dtor(basic_filebuf_char
*this)
2020 TRACE("(%p)\n", this);
2023 basic_filebuf_char_close(this);
2024 basic_streambuf_char_dtor(&this->base
);
2027 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor
, 8)
2028 basic_filebuf_char
* __thiscall
basic_filebuf_char_vector_dtor(basic_filebuf_char
*this, unsigned int flags
)
2030 TRACE("(%p %x)\n", this, flags
);
2032 /* we have an array, with the number of elements stored before the first object */
2033 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2035 for(i
=*ptr
-1; i
>=0; i
--)
2036 basic_filebuf_char_dtor(this+i
);
2037 MSVCRT_operator_delete(ptr
);
2039 basic_filebuf_char_dtor(this);
2041 MSVCRT_operator_delete(this);
2047 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2048 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2049 static MSVCP_bool
basic_filebuf_char_is_open(const basic_filebuf_char
*this)
2051 TRACE("(%p)\n", this);
2052 return this->file
!= NULL
;
2055 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2056 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2057 FILE* __cdecl
_Fiopen_wchar(const wchar_t *name
, int mode
, int prot
)
2059 static const wchar_t rW
[] = {'r',0};
2060 static const struct {
2062 const wchar_t str
[4];
2063 const wchar_t str_bin
[4];
2065 {OPENMODE_out
, {'w',0}, {'w','b',0}},
2066 {OPENMODE_out
|OPENMODE_app
, {'a',0}, {'a','b',0}},
2067 {OPENMODE_app
, {'a',0}, {'a','b',0}},
2068 {OPENMODE_out
|OPENMODE_trunc
, {'w',0}, {'w','b',0}},
2069 {OPENMODE_in
, {'r',0}, {'r','b',0}},
2070 {OPENMODE_in
|OPENMODE_out
, {'r','+',0}, {'r','+','b',0}},
2071 {OPENMODE_in
|OPENMODE_out
|OPENMODE_trunc
, {'w','+',0}, {'w','+','b',0}},
2072 {OPENMODE_in
|OPENMODE_out
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}},
2073 {OPENMODE_in
|OPENMODE_app
, {'a','+',0}, {'a','+','b',0}}
2076 int real_mode
= mode
& ~(OPENMODE_ate
|OPENMODE__Nocreate
|OPENMODE__Noreplace
|OPENMODE_binary
);
2080 TRACE("(%s %d %d)\n", debugstr_w(name
), mode
, prot
);
2082 for(mode_idx
=0; mode_idx
<sizeof(str_mode
)/sizeof(str_mode
[0]); mode_idx
++)
2083 if(str_mode
[mode_idx
].mode
== real_mode
)
2085 if(mode_idx
== sizeof(str_mode
)/sizeof(str_mode
[0]))
2088 if((mode
& OPENMODE__Nocreate
) && !(f
= _wfopen(name
, rW
)))
2093 if((mode
& OPENMODE__Noreplace
) && (mode
& (OPENMODE_out
|OPENMODE_app
))
2094 && (f
= _wfopen(name
, rW
))) {
2099 f
= _wfsopen(name
, (mode
& OPENMODE_binary
) ? str_mode
[mode_idx
].str_bin
2100 : str_mode
[mode_idx
].str
, prot
);
2104 if((mode
& OPENMODE_ate
) && fseek(f
, 0, SEEK_END
)) {
2112 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2113 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2114 FILE* __cdecl
_Fiopen(const char *name
, int mode
, int prot
)
2116 wchar_t nameW
[FILENAME_MAX
];
2118 TRACE("(%s %d %d)\n", name
, mode
, prot
);
2120 if(mbstowcs_s(NULL
, nameW
, FILENAME_MAX
, name
, FILENAME_MAX
-1) != 0)
2122 return _Fiopen_wchar(nameW
, mode
, prot
);
2125 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2126 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2127 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow
, 8)
2128 int __thiscall
basic_filebuf_char_overflow(basic_filebuf_char
*this, int c
)
2130 char buf
[8], *dyn_buf
;
2131 char ch
= c
, *to_next
;
2132 const char *from_next
;
2136 TRACE("(%p %d)\n", this, c
);
2138 if(!basic_filebuf_char_is_open(this))
2144 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2148 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2149 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2152 case CODECVT_partial
:
2157 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2159 if(ret
== CODECVT_partial
)
2162 case CODECVT_noconv
:
2163 return fwrite(&ch
, sizeof(char), 1, this->file
) ? c
: EOF
;
2171 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2172 dyn_buf
= malloc(max_size
);
2176 ret
= codecvt_char_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2177 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2181 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2183 return ret
? c
: EOF
;
2184 case CODECVT_partial
:
2185 ERR("buffer should be big enough to store all output\n");
2193 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2194 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2195 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail
, 8)
2196 int __thiscall
basic_filebuf_char_pbackfail(basic_filebuf_char
*this, int c
)
2198 TRACE("(%p %d)\n", this, c
);
2200 if(!basic_filebuf_char_is_open(this))
2203 if(basic_streambuf_char_gptr(&this->base
)>basic_streambuf_char_eback(&this->base
)
2204 && (c
==EOF
|| (int)(unsigned char)basic_streambuf_char_gptr(&this->base
)[-1]==c
)) {
2205 basic_streambuf_char__Gndec(&this->base
);
2206 return c
==EOF
? !c
: c
;
2207 }else if(c
!=EOF
&& !this->cvt
) {
2208 return ungetc(c
, this->file
);
2214 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2215 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2216 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow
, 4)
2217 int __thiscall
basic_filebuf_char_uflow(basic_filebuf_char
*this)
2219 char ch
, buf
[128], *to_next
;
2220 const char *buf_next
;
2224 TRACE("(%p)\n", this);
2226 if(!basic_filebuf_char_is_open(this))
2229 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2230 return (unsigned char)*basic_streambuf_char__Gninc(&this->base
);
2232 c
= fgetc(this->file
);
2233 if(!this->cvt
|| c
==EOF
)
2237 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
2240 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
2241 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2242 case CODECVT_partial
:
2244 if(to_next
== &ch
) {
2245 c
= fgetc(this->file
);
2254 for(j
= --i
; j
>= buf_next
-buf
; j
--)
2255 ungetc(buf
[j
], this->file
);
2258 case CODECVT_noconv
:
2259 return (unsigned char)buf
[0];
2265 FIXME("buffer is too small\n");
2269 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2270 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2271 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2272 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2276 TRACE("(%p)\n", this);
2278 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2279 return (unsigned char)*basic_streambuf_char_gptr(&this->base
);
2281 ret
= call_basic_streambuf_char_uflow(&this->base
);
2283 ret
= call_basic_streambuf_char_pbackfail(&this->base
, ret
);
2287 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2288 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2289 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 24)
2290 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2291 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2295 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
2297 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2298 || fseek(this->file
, off
, way
)) {
2305 fgetpos(this->file
, &pos
);
2308 ret
->state
= this->state
;
2312 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2313 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2314 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2315 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2316 fpos_int
*ret
, fpos_int pos
, int mode
)
2320 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2322 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2323 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2324 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2331 fgetpos(this->file
, &fpos
);
2334 ret
->state
= this->state
;
2338 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2339 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2340 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 16)
2341 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2343 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2345 if(!basic_filebuf_char_is_open(this))
2348 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2351 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2355 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2356 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2357 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2358 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2360 TRACE("(%p)\n", this);
2362 if(!basic_filebuf_char_is_open(this))
2365 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2367 return fflush(this->file
);
2370 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2371 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2372 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
2373 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
2375 TRACE("(%p %p)\n", this, loc
);
2376 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc
));
2379 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2380 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2381 static int basic_filebuf_wchar__Init__Stinit
= 0;
2383 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2384 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2385 static int basic_filebuf_short__Init__Stinit
= 0;
2387 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2388 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2389 static void basic_filebuf_wchar__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2391 TRACE("(%p %p %d)\n", this, file
, which
);
2394 this->wrotesome
= FALSE
;
2395 this->state
= basic_filebuf_wchar__Init__Stinit
;
2396 this->close
= (which
== INITFL_open
);
2399 basic_streambuf_wchar__Init_empty(&this->base
);
2402 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2403 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2404 static void basic_filebuf_short__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2406 TRACE("(%p %p %d)\n", this, file
, which
);
2409 this->wrotesome
= FALSE
;
2410 this->state
= basic_filebuf_short__Init__Stinit
;
2411 this->close
= (which
== INITFL_open
);
2414 basic_streambuf_wchar__Init_empty(&this->base
);
2417 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2418 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2419 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2420 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2421 static void basic_filebuf_wchar__Initcvt(basic_filebuf_wchar
*this, codecvt_wchar
*cvt
)
2423 TRACE("(%p %p)\n", this, cvt
);
2425 if(codecvt_base_always_noconv(&cvt
->base
)) {
2428 basic_streambuf_wchar__Init_empty(&this->base
);
2433 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2434 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2435 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2436 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2437 static MSVCP_bool
basic_filebuf_wchar__Endwrite(basic_filebuf_wchar
*this)
2439 TRACE("(%p)\n", this);
2441 if(!this->wrotesome
|| !this->cvt
)
2444 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2448 /* TODO: check if we need a dynamic buffer here */
2453 ret
= codecvt_wchar_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
2456 this->wrotesome
= FALSE
;
2458 case CODECVT_partial
:
2459 if(!fwrite(buf
, next
-buf
, 1, this->file
))
2464 case CODECVT_noconv
:
2465 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2474 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2475 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2476 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2477 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2478 static basic_filebuf_wchar
* basic_filebuf_wchar_close(basic_filebuf_wchar
*this)
2480 basic_filebuf_wchar
*ret
= this;
2482 TRACE("(%p)\n", this);
2487 /* TODO: handle exceptions */
2488 if(!basic_filebuf_wchar__Endwrite(this))
2490 if(fclose(this->file
))
2493 basic_filebuf_wchar__Init(this, NULL
, INITFL_close
);
2497 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2498 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2499 static basic_filebuf_wchar
* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2501 TRACE("(%p %p)\n", this, file
);
2503 basic_streambuf_wchar_ctor(&this->base
);
2504 this->base
.vtable
= &MSVCP_basic_filebuf_wchar_vtable
;
2506 basic_filebuf_wchar__Init(this, file
, INITFL_new
);
2510 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2511 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2512 static basic_filebuf_wchar
* basic_filebuf_short_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2514 TRACE("(%p %p)\n", this, file
);
2516 basic_streambuf_short_ctor(&this->base
);
2517 this->base
.vtable
= &MSVCP_basic_filebuf_short_vtable
;
2519 basic_filebuf_short__Init(this, file
, INITFL_new
);
2523 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2524 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2525 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2526 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2527 static void basic_filebuf_wchar_dtor(basic_filebuf_wchar
*this)
2529 TRACE("(%p)\n", this);
2532 basic_filebuf_wchar_close(this);
2533 basic_streambuf_wchar_dtor(&this->base
);
2536 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor
, 8)
2537 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar
*this, unsigned int flags
)
2539 TRACE("(%p %x)\n", this, flags
);
2541 /* we have an array, with the number of elements stored before the first object */
2542 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2544 for(i
=*ptr
-1; i
>=0; i
--)
2545 basic_filebuf_wchar_dtor(this+i
);
2546 MSVCRT_operator_delete(ptr
);
2548 basic_filebuf_wchar_dtor(this);
2550 MSVCRT_operator_delete(this);
2556 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
2557 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
2558 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2559 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2560 static MSVCP_bool
basic_filebuf_wchar_is_open(const basic_filebuf_wchar
*this)
2562 TRACE("(%p)\n", this);
2563 return this->file
!= NULL
;
2566 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2567 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2568 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2569 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2570 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow
, 8)
2571 unsigned short __thiscall
basic_filebuf_wchar_overflow(basic_filebuf_wchar
*this, unsigned short c
)
2573 char buf
[8], *dyn_buf
, *to_next
;
2575 const wchar_t *from_next
;
2580 TRACE("(%p %d)\n", this, c
);
2582 if(!basic_filebuf_wchar_is_open(this))
2588 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2592 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2593 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2596 case CODECVT_partial
:
2601 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2603 if(ret
== CODECVT_partial
)
2606 case CODECVT_noconv
:
2607 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2615 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2616 dyn_buf
= malloc(max_size
);
2620 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2621 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2625 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2627 return ret
? c
: WEOF
;
2628 case CODECVT_partial
:
2629 ERR("buffer should be big enough to store all output\n");
2637 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2638 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2639 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2640 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2641 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail
, 8)
2642 unsigned short __thiscall
basic_filebuf_wchar_pbackfail(basic_filebuf_wchar
*this, unsigned short c
)
2644 TRACE("(%p %d)\n", this, c
);
2646 if(!basic_filebuf_wchar_is_open(this))
2649 if(basic_streambuf_wchar_gptr(&this->base
)>basic_streambuf_wchar_eback(&this->base
)
2650 && (c
==WEOF
|| basic_streambuf_wchar_gptr(&this->base
)[-1]==c
)) {
2651 basic_streambuf_wchar__Gndec(&this->base
);
2652 return c
==WEOF
? !c
: c
;
2653 }else if(c
!=WEOF
&& !this->cvt
) {
2654 return ungetwc(c
, this->file
);
2655 }else if(c
!=WEOF
&& basic_streambuf_wchar_gptr(&this->base
)!=&this->putback
) {
2657 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
, &this->putback
+1);
2664 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2665 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2666 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2667 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2668 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow
, 4)
2669 unsigned short __thiscall
basic_filebuf_wchar_uflow(basic_filebuf_wchar
*this)
2671 wchar_t ch
, *to_next
;
2673 const char *buf_next
;
2677 TRACE("(%p)\n", this);
2679 if(!basic_filebuf_wchar_is_open(this))
2682 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2683 return *basic_streambuf_wchar__Gninc(&this->base
);
2686 return fgetwc(this->file
);
2689 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
2690 if((c
= fgetc(this->file
)) == EOF
)
2694 switch(codecvt_wchar_in(this->cvt
, &this->state
, buf_next
,
2695 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2696 case CODECVT_partial
:
2704 for(j
= --i
; j
>= buf_next
-buf
; j
--)
2705 ungetc(buf
[j
], this->file
);
2708 case CODECVT_noconv
:
2709 if(i
+1 < sizeof(wchar_t))
2712 memcpy(&ch
, buf
, sizeof(wchar_t));
2719 FIXME("buffer is too small\n");
2723 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2724 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2725 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2726 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2727 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow
, 4)
2728 unsigned short __thiscall
basic_filebuf_wchar_underflow(basic_filebuf_wchar
*this)
2732 TRACE("(%p)\n", this);
2734 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2735 return *basic_streambuf_wchar_gptr(&this->base
);
2737 ret
= call_basic_streambuf_wchar_uflow(&this->base
);
2739 ret
= call_basic_streambuf_wchar_pbackfail(&this->base
, ret
);
2743 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2744 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2745 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2746 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2747 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff
, 24)
2748 fpos_int
* __thiscall
basic_filebuf_wchar_seekoff(basic_filebuf_wchar
*this,
2749 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2753 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
2755 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
) {
2756 if(way
== SEEKDIR_cur
)
2757 off
-= sizeof(wchar_t);
2759 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
2762 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
2763 || fseek(this->file
, off
, way
)) {
2770 fgetpos(this->file
, &pos
);
2773 ret
->state
= this->state
;
2777 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2778 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2779 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2780 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2781 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos
, 36)
2782 fpos_int
* __thiscall
basic_filebuf_wchar_seekpos(basic_filebuf_wchar
*this,
2783 fpos_int
*ret
, fpos_int pos
, int mode
)
2787 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2789 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
2790 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2791 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2798 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
)
2799 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
2801 fgetpos(this->file
, &fpos
);
2804 ret
->state
= this->state
;
2808 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
2809 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
2810 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf
, 16)
2811 basic_streambuf_wchar
* __thiscall
basic_filebuf_wchar_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2813 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2815 if(!basic_filebuf_wchar_is_open(this))
2818 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2821 basic_filebuf_wchar__Init(this, this->file
, INITFL_open
);
2825 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
2826 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
2827 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 16)
2828 basic_streambuf_wchar
* __thiscall
basic_filebuf_short_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2830 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2832 if(!basic_filebuf_wchar_is_open(this))
2835 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2838 basic_filebuf_short__Init(this, this->file
, INITFL_open
);
2842 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2843 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2844 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2845 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2846 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync
, 4)
2847 int __thiscall
basic_filebuf_wchar_sync(basic_filebuf_wchar
*this)
2849 TRACE("(%p)\n", this);
2851 if(!basic_filebuf_wchar_is_open(this))
2854 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2856 return fflush(this->file
);
2859 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
2860 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
2861 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue
, 8)
2862 void __thiscall
basic_filebuf_wchar_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
2864 TRACE("(%p %p)\n", this, loc
);
2865 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc
));
2868 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
2869 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
2870 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue
, 8)
2871 void __thiscall
basic_filebuf_short_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
2873 TRACE("(%p %p)\n", this, loc
);
2874 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc
));
2877 /* ??0ios_base@std@@IAE@XZ */
2878 /* ??0ios_base@std@@IEAA@XZ */
2879 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
2880 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
2882 TRACE("(%p)\n", this);
2883 this->vtable
= &MSVCP_ios_base_vtable
;
2887 /* ??0ios_base@std@@QAE@ABV01@@Z */
2888 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
2889 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
2890 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
2892 TRACE("(%p %p)\n", this, copy
);
2894 this->vtable
= &MSVCP_ios_base_vtable
;
2898 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
2899 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
2900 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
2901 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
2903 IOS_BASE_fnarray
*cur
;
2905 TRACE("(%p %x)\n", this, event
);
2907 for(cur
=this->calls
; cur
; cur
=cur
->next
)
2908 cur
->event_handler(event
, this, cur
->index
);
2911 /* ?_Tidy@ios_base@std@@AAAXXZ */
2912 /* ?_Tidy@ios_base@std@@AEAAXXZ */
2913 void CDECL
ios_base_Tidy(ios_base
*this)
2915 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
2916 IOS_BASE_fnarray
*event_cur
, *event_next
;
2918 TRACE("(%p)\n", this);
2920 ios_base_Callfns(this, EVENT_erase_event
);
2922 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
2923 arr_next
= arr_cur
->next
;
2924 MSVCRT_operator_delete(arr_cur
);
2928 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
2929 event_next
= event_cur
->next
;
2930 MSVCRT_operator_delete(event_cur
);
2935 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
2936 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
2937 void CDECL
ios_base_Ios_base_dtor(ios_base
*obj
)
2939 TRACE("(%p)\n", obj
);
2941 locale_dtor(obj
->loc
);
2942 MSVCRT_operator_delete(obj
->loc
);
2947 /* ??1ios_base@std@@UAE@XZ */
2948 /* ??1ios_base@std@@UEAA@XZ */
2949 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
2950 void __thiscall
ios_base_dtor(ios_base
*this)
2952 ios_base_Ios_base_dtor(this);
2955 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor
, 8)
2956 ios_base
* __thiscall
ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
2958 TRACE("(%p %x)\n", this, flags
);
2960 /* we have an array, with the number of elements stored before the first object */
2961 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2963 for(i
=*ptr
-1; i
>=0; i
--)
2964 ios_base_dtor(this+i
);
2965 MSVCRT_operator_delete(ptr
);
2967 ios_base_dtor(this);
2969 MSVCRT_operator_delete(this);
2975 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor
, 8)
2976 void* __thiscall
iosb_vector_dtor(void *this, unsigned int flags
)
2978 TRACE("(%p %x)\n", this, flags
);
2980 INT_PTR
*ptr
= (INT_PTR
*)this-1;
2981 MSVCRT_operator_delete(ptr
);
2984 MSVCRT_operator_delete(this);
2990 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
2991 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
2992 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
2993 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
2995 IOS_BASE_iosarray
*p
;
2997 TRACE("(%p %d)\n", this, index
);
2999 for(p
=this->arr
; p
; p
=p
->next
) {
3000 if(p
->index
== index
)
3004 for(p
=this->arr
; p
; p
=p
->next
) {
3005 if(!p
->long_val
&& !p
->ptr_val
) {
3011 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
3012 p
->next
= this->arr
;
3020 /* ?iword@ios_base@std@@QAEAAJH@Z */
3021 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3022 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3023 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3025 TRACE("(%p %d)\n", this, index
);
3026 return &ios_base_Findarr(this, index
)->long_val
;
3029 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3030 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3031 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3032 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3034 TRACE("(%p %d)\n", this, index
);
3035 return &ios_base_Findarr(this, index
)->ptr_val
;
3038 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3039 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3040 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3041 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3043 IOS_BASE_fnarray
*event
;
3045 TRACE("(%p %p %d)\n", this, callback
, index
);
3047 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
3048 event
->next
= this->calls
;
3049 event
->index
= index
;
3050 event
->event_handler
= callback
;
3051 this->calls
= event
;
3054 /* ?clear@ios_base@std@@QAEXH_N@Z */
3055 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3056 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3057 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3059 TRACE("(%p %x %x)\n", this, state
, reraise
);
3061 this->state
= state
& IOSTATE_mask
;
3062 if(!(this->state
& this->except
))
3066 throw_exception(EXCEPTION_RERAISE
, NULL
);
3067 else if(this->state
& this->except
& IOSTATE_eofbit
)
3068 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
3069 else if(this->state
& this->except
& IOSTATE_failbit
)
3070 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
3071 else if(this->state
& this->except
& IOSTATE_badbit
)
3072 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
3073 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3074 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
3077 /* ?clear@ios_base@std@@QAEXH@Z */
3078 /* ?clear@ios_base@std@@QEAAXH@Z */
3079 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3080 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3082 ios_base_clear_reraise(this, state
, FALSE
);
3085 /* ?clear@ios_base@std@@QAEXI@Z */
3086 /* ?clear@ios_base@std@@QEAAXI@Z */
3087 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
3088 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
3090 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3093 /* ?exceptions@ios_base@std@@QAEXH@Z */
3094 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3095 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3096 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3098 TRACE("(%p %x)\n", this, state
);
3099 this->except
= state
& IOSTATE_mask
;
3100 ios_base_clear(this, this->state
);
3103 /* ?exceptions@ios_base@std@@QAEXI@Z */
3104 /* ?exceptions@ios_base@std@@QEAAXI@Z */
3105 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
3106 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
3108 TRACE("(%p %x)\n", this, state
);
3109 ios_base_exceptions_set(this, state
);
3112 /* ?exceptions@ios_base@std@@QBEHXZ */
3113 /* ?exceptions@ios_base@std@@QEBAHXZ */
3114 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3115 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3117 TRACE("(%p)\n", this);
3118 return this->except
;
3121 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3122 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3123 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3124 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3126 TRACE("(%p %p)\n", this, rhs
);
3129 IOS_BASE_iosarray
*arr_cur
;
3130 IOS_BASE_fnarray
*event_cur
;
3132 ios_base_Tidy(this);
3134 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3135 if(arr_cur
->long_val
)
3136 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3137 if(arr_cur
->ptr_val
)
3138 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3140 this->stdstr
= rhs
->stdstr
;
3141 this->fmtfl
= rhs
->fmtfl
;
3142 this->prec
= rhs
->prec
;
3143 this->wide
= rhs
->wide
;
3144 locale_operator_assign(this->loc
, rhs
->loc
);
3146 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3147 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3149 ios_base_Callfns(this, EVENT_copyfmt_event
);
3150 ios_base_exceptions_set(this, rhs
->except
);
3156 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3157 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3158 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3159 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3161 TRACE("(%p %p)\n", this, right
);
3164 this->state
= right
->state
;
3165 ios_base_copyfmt(this, right
);
3171 /* ?fail@ios_base@std@@QBE_NXZ */
3172 /* ?fail@ios_base@std@@QEBA_NXZ */
3173 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3174 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
3176 TRACE("(%p)\n", this);
3177 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3180 /* ??7ios_base@std@@QBE_NXZ */
3181 /* ??7ios_base@std@@QEBA_NXZ */
3182 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3183 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
3185 TRACE("(%p)\n", this);
3186 return ios_base_fail(this);
3189 /* ??Bios_base@std@@QBEPAXXZ */
3190 /* ??Bios_base@std@@QEBAPEAXXZ */
3191 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3192 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3194 TRACE("(%p)\n", this);
3195 return ios_base_fail(this) ? NULL
: (void*)this;
3198 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
3199 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
3200 void CDECL
ios_base_Addstd(ios_base
*add
)
3202 FIXME("(%p) stub\n", add
);
3205 /* ?_Init@ios_base@std@@IAEXXZ */
3206 /* ?_Init@ios_base@std@@IEAAXXZ */
3207 DEFINE_THISCALL_WRAPPER(ios_base__Init
, 4)
3208 void __thiscall
ios_base__Init(ios_base
*this)
3210 TRACE("(%p)\n", this);
3213 this->state
= this->except
= IOSTATE_goodbit
;
3214 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3219 this->loc
= MSVCRT_operator_new(sizeof(locale
));
3220 locale_ctor(this->loc
);
3223 /* ?bad@ios_base@std@@QBE_NXZ */
3224 /* ?bad@ios_base@std@@QEBA_NXZ */
3225 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3226 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
3228 TRACE("(%p)\n", this);
3229 return (this->state
& IOSTATE_badbit
) != 0;
3232 /* ?eof@ios_base@std@@QBE_NXZ */
3233 /* ?eof@ios_base@std@@QEBA_NXZ */
3234 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3235 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
3237 TRACE("(%p)\n", this);
3238 return (this->state
& IOSTATE_eofbit
) != 0;
3241 /* ?flags@ios_base@std@@QAEHH@Z */
3242 /* ?flags@ios_base@std@@QEAAHH@Z */
3243 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3244 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3246 IOSB_fmtflags ret
= this->fmtfl
;
3248 TRACE("(%p %x)\n", this, flags
);
3250 this->fmtfl
= flags
& FMTFLAG_mask
;
3254 /* ?flags@ios_base@std@@QBEHXZ */
3255 /* ?flags@ios_base@std@@QEBAHXZ */
3256 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3257 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3259 TRACE("(%p)\n", this);
3263 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3264 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3265 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3266 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3268 TRACE("(%p)\n", this);
3269 return locale_copy_ctor(ret
, this->loc
);
3272 /* ?good@ios_base@std@@QBE_NXZ */
3273 /* ?good@ios_base@std@@QEBA_NXZ */
3274 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3275 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
3277 TRACE("(%p)\n", this);
3278 return this->state
== IOSTATE_goodbit
;
3281 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3282 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3283 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3284 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3286 TRACE("(%p %p)\n", this, loc
);
3288 locale_copy_ctor(this->loc
, loc
);
3292 /* ?precision@ios_base@std@@QAEHH@Z */
3293 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3294 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 12)
3295 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3297 streamsize ret
= this->prec
;
3299 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(precision
));
3301 this->prec
= precision
;
3305 /* ?precision@ios_base@std@@QBEHXZ */
3306 /* ?precision@ios_base@std@@QEBA_JXZ */
3307 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3308 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3310 TRACE("(%p)\n", this);
3314 /* ?rdstate@ios_base@std@@QBEHXZ */
3315 /* ?rdstate@ios_base@std@@QEBAHXZ */
3316 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3317 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3319 TRACE("(%p)\n", this);
3323 /* ?setf@ios_base@std@@QAEHHH@Z */
3324 /* ?setf@ios_base@std@@QEAAHHH@Z */
3325 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3326 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3328 IOSB_fmtflags ret
= this->fmtfl
;
3330 TRACE("(%p %x %x)\n", this, flags
, mask
);
3332 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3336 /* ?setf@ios_base@std@@QAEHH@Z */
3337 /* ?setf@ios_base@std@@QEAAHH@Z */
3338 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3339 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3341 return ios_base_setf_mask(this, flags
, ~0);
3344 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3345 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3346 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3347 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3349 TRACE("(%p %x %x)\n", this, state
, reraise
);
3351 if(state
!= IOSTATE_goodbit
)
3352 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3355 /* ?setstate@ios_base@std@@QAEXH@Z */
3356 /* ?setstate@ios_base@std@@QEAAXH@Z */
3357 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3358 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3360 ios_base_setstate_reraise(this, state
, FALSE
);
3363 /* ?setstate@ios_base@std@@QAEXI@Z */
3364 /* ?setstate@ios_base@std@@QEAAXI@Z */
3365 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
3366 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
3368 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3371 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3372 MSVCP_bool CDECL
ios_base_sync_with_stdio(MSVCP_bool sync
)
3377 TRACE("(%x)\n", sync
);
3379 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3380 ret
= ios_base_Sync
;
3381 ios_base_Sync
= sync
;
3382 _Lockit_dtor(&lock
);
3386 /* ?unsetf@ios_base@std@@QAEXH@Z */
3387 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3388 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3389 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3391 TRACE("(%p %x)\n", this, flags
);
3392 this->fmtfl
&= ~flags
;
3395 /* ?width@ios_base@std@@QAEHH@Z */
3396 /* ?width@ios_base@std@@QEAA_J_J@Z */
3397 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 12)
3398 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
3400 streamsize ret
= this->wide
;
3402 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(width
));
3408 /* ?width@ios_base@std@@QBEHXZ */
3409 /* ?width@ios_base@std@@QEBA_JXZ */
3410 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
3411 streamsize __thiscall
ios_base_width_get(ios_base
*this)
3413 TRACE("(%p)\n", this);
3417 /* ?xalloc@ios_base@std@@SAHXZ */
3418 int CDECL
ios_base_xalloc(void)
3425 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3426 ret
= ios_base_Index
++;
3427 _Lockit_dtor(&lock
);
3431 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3432 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3433 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
3434 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
3436 TRACE("(%p)\n", this);
3438 ios_base_ctor(&this->base
);
3439 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
3443 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3444 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3445 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
3446 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
3448 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3449 ios_base__Init(&this->base
);
3450 this->strbuf
= streambuf
;
3451 this->stream
= NULL
;
3455 ios_base_setstate(&this->base
, IOSTATE_badbit
);
3458 FIXME("standard streams not handled yet\n");
3461 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3462 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3463 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
3464 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
3466 TRACE("(%p %p)\n", this, strbuf
);
3468 basic_ios_char_ctor(this);
3469 basic_ios_char_init(this, strbuf
, FALSE
);
3473 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
3474 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3475 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
3476 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
3478 TRACE("(%p)\n", this);
3479 ios_base_dtor(&this->base
);
3482 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor
, 8)
3483 basic_ios_char
* __thiscall
basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
3485 TRACE("(%p %x)\n", this, flags
);
3487 /* we have an array, with the number of elements stored before the first object */
3488 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3490 for(i
=*ptr
-1; i
>=0; i
--)
3491 basic_ios_char_dtor(this+i
);
3492 MSVCRT_operator_delete(ptr
);
3494 basic_ios_char_dtor(this);
3496 MSVCRT_operator_delete(this);
3502 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3503 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3504 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
3505 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3507 TRACE("(%p %x %x)\n", this, state
, reraise
);
3508 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3511 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3512 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3513 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
3514 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
3516 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3519 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
3520 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3521 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
3522 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
3524 TRACE("(%p %p)\n", this, copy
);
3528 this->stream
= copy
->stream
;
3529 this->fillch
= copy
->fillch
;
3530 ios_base_copyfmt(&this->base
, ©
->base
);
3534 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
3535 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
3536 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
3537 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
3539 char ret
= this->fillch
;
3541 TRACE("(%p %c)\n", this, fill
);
3543 this->fillch
= fill
;
3547 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
3548 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
3549 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
3550 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
3552 TRACE("(%p)\n", this);
3553 return this->fillch
;
3556 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3557 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3558 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
3559 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
3561 TRACE("(%p %p %p)\n", this, ret
, loc
);
3564 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
3568 return ios_base_imbue(&this->base
, ret
, loc
);
3571 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
3572 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
3573 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
3574 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
3576 TRACE("(%p %c %c)\n", this, ch
, def
);
3577 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
, def
);
3580 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
3581 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3582 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
3583 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
3585 basic_streambuf_char
*ret
= this->strbuf
;
3587 TRACE("(%p %p)\n", this, streambuf
);
3589 this->strbuf
= streambuf
;
3590 basic_ios_char_clear(this, IOSTATE_goodbit
);
3594 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3595 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3596 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
3597 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
3599 TRACE("(%p)\n", this);
3600 return this->strbuf
;
3603 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3604 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3605 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
3606 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3608 TRACE("(%p %x %x)\n", this, state
, reraise
);
3610 if(state
!= IOSTATE_goodbit
)
3611 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
3614 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3615 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3616 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
3617 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
3619 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3622 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
3623 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3624 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
3625 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
3627 basic_ostream_char
*ret
= this->stream
;
3629 TRACE("(%p %p)\n", this, ostream
);
3631 this->stream
= ostream
;
3635 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3636 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3637 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
3638 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
3640 TRACE("(%p)\n", this);
3641 return this->stream
;
3644 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
3645 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
3646 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
3647 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
3649 TRACE("(%p %c)\n", this, ch
);
3650 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
);
3654 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
3655 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
3656 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
3657 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
3659 TRACE("(%p)\n", this);
3661 ios_base_ctor(&this->base
);
3662 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
3666 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
3667 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
3668 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
3669 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
3671 basic_ios_wchar_ctor(this);
3672 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3676 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3677 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3678 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3679 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3680 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
3681 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
3683 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3684 ios_base__Init(&this->base
);
3685 this->strbuf
= streambuf
;
3686 this->stream
= NULL
;
3690 ios_base_setstate(&this->base
, IOSTATE_badbit
);
3693 FIXME("standard streams not handled yet\n");
3696 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3697 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3698 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
3699 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3701 TRACE("(%p %p)\n", this, strbuf
);
3703 basic_ios_wchar_ctor(this);
3704 basic_ios_wchar_init(this, strbuf
, FALSE
);
3708 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3709 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3710 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
3711 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3713 basic_ios_wchar_ctor_streambuf(this, strbuf
);
3714 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3718 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3719 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3720 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
3721 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3722 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
3723 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
3725 TRACE("(%p)\n", this);
3726 ios_base_dtor(&this->base
);
3729 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor
, 8)
3730 basic_ios_wchar
* __thiscall
basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
3732 TRACE("(%p %x)\n", this, flags
);
3734 /* we have an array, with the number of elements stored before the first object */
3735 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3737 for(i
=*ptr
-1; i
>=0; i
--)
3738 basic_ios_wchar_dtor(this+i
);
3739 MSVCRT_operator_delete(ptr
);
3741 basic_ios_wchar_dtor(this);
3743 MSVCRT_operator_delete(this);
3749 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3750 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3751 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3752 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3753 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
3754 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3756 TRACE("(%p %x %x)\n", this, state
, reraise
);
3757 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3760 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3761 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3762 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3763 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3764 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
3765 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
3767 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3770 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
3771 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3772 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
3773 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3774 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
3775 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
3777 TRACE("(%p %p)\n", this, copy
);
3781 this->stream
= copy
->stream
;
3782 this->fillch
= copy
->fillch
;
3783 ios_base_copyfmt(&this->base
, ©
->base
);
3787 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
3788 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
3789 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
3790 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
3791 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
3792 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
3794 wchar_t ret
= this->fillch
;
3796 TRACE("(%p %c)\n", this, fill
);
3798 this->fillch
= fill
;
3802 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
3803 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
3804 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
3805 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
3806 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
3807 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
3809 TRACE("(%p)\n", this);
3810 return this->fillch
;
3813 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3814 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3815 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3816 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3817 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
3818 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
3820 TRACE("(%p %p %p)\n", this, ret
, loc
);
3823 basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
3827 return ios_base_imbue(&this->base
, ret
, loc
);
3830 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
3831 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
3832 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
3833 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
3834 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
3835 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
3837 TRACE("(%p %c %c)\n", this, ch
, def
);
3838 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
, def
);
3841 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3842 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3843 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
3844 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3845 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
3846 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
3848 basic_streambuf_wchar
*ret
= this->strbuf
;
3850 TRACE("(%p %p)\n", this, streambuf
);
3852 this->strbuf
= streambuf
;
3853 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
3857 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3858 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3859 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3860 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3861 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
3862 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
3864 TRACE("(%p)\n", this);
3865 return this->strbuf
;
3868 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3869 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3870 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3871 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3872 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
3873 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3875 TRACE("(%p %x %x)\n", this, state
, reraise
);
3877 if(state
!= IOSTATE_goodbit
)
3878 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
3881 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3882 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3883 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3884 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3885 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
3886 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
3888 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
3891 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3892 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3893 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
3894 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3895 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
3896 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
3898 basic_ostream_wchar
*ret
= this->stream
;
3900 TRACE("(%p %p)\n", this, ostream
);
3902 this->stream
= ostream
;
3906 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3907 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3908 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3909 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3910 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
3911 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
3913 TRACE("(%p)\n", this);
3914 return this->stream
;
3917 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
3918 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
3919 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
3920 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
3921 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
3922 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
3924 TRACE("(%p %c)\n", this, ch
);
3925 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
);
3928 /* Caution: basic_ostream uses virtual inheritance.
3929 * All constructors have additional parameter that says if base class should be initialized.
3930 * Base class needs to be accessed using vbtable.
3932 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
3934 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
3937 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
3939 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
3942 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
3944 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
3947 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3948 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3949 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
3950 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
3951 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
3953 basic_ios_char
*base
;
3955 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
3958 this->vbtable
= basic_ostream_char_vbtable
;
3959 base
= basic_ostream_char_get_basic_ios(this);
3960 basic_ios_char_ctor(base
);
3962 base
= basic_ostream_char_get_basic_ios(this);
3965 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3966 basic_ios_char_init(base
, strbuf
, isstd
);
3970 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
3971 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
3972 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
3973 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
3974 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
3976 basic_ios_char
*base
;
3978 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
3981 this->vbtable
= basic_ostream_char_vbtable
;
3982 base
= basic_ostream_char_get_basic_ios(this);
3983 basic_ios_char_ctor(base
);
3985 base
= basic_ostream_char_get_basic_ios(this);
3988 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3990 ios_base_Addstd(&base
->base
);
3994 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3995 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3996 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
3997 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
3999 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4001 /* don't destroy virtual base here */
4002 TRACE("(%p)\n", this);
4005 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4006 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4007 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
4008 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4010 TRACE("(%p)\n", this);
4011 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4012 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4015 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor
, 8)
4016 basic_ostream_char
* __thiscall
basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4018 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4020 TRACE("(%p %x)\n", this, flags
);
4023 /* we have an array, with the number of elements stored before the first object */
4024 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4026 for(i
=*ptr
-1; i
>=0; i
--)
4027 basic_ostream_char_vbase_dtor(this+i
);
4028 MSVCRT_operator_delete(ptr
);
4030 basic_ostream_char_vbase_dtor(this);
4032 MSVCRT_operator_delete(this);
4038 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4039 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4040 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4041 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4043 /* this function is not matching C++ specification */
4044 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4046 TRACE("(%p)\n", this);
4048 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4049 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4050 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4054 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4055 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4056 basic_ostream_char
* __cdecl
flush_ostream_char(basic_ostream_char
*ostream
)
4058 return basic_ostream_char_flush(ostream
);
4061 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4062 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4063 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
4064 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
4066 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4068 TRACE("(%p)\n", this);
4070 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4071 basic_ostream_char_flush(this);
4074 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4075 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4076 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4077 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4079 TRACE("(%p)\n", this);
4080 basic_ostream_char__Osfx(this);
4083 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4085 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4087 if(basic_ios_char_rdbuf_get(base
))
4088 call_basic_streambuf_char__Lock(base
->strbuf
);
4090 if(ios_base_good(&base
->base
) && base
->stream
)
4091 basic_ostream_char_flush(base
->stream
);
4093 return ios_base_good(&base
->base
);
4096 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4098 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4100 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4101 basic_ostream_char_osfx(ostr
);
4103 if(basic_ios_char_rdbuf_get(base
))
4104 call_basic_streambuf_char__Unlock(base
->strbuf
);
4107 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4108 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4109 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4110 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4112 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4114 TRACE("(%p)\n", this);
4116 if(ios_base_good(&base
->base
) && base
->stream
)
4117 basic_ostream_char_flush(base
->stream
);
4118 return ios_base_good(&base
->base
);
4121 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4122 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4123 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4124 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4126 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4128 TRACE("(%p %c)\n", this, ch
);
4130 if(!basic_ostream_char_sentry_create(this)
4131 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4132 basic_ostream_char_sentry_destroy(this);
4133 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4137 basic_ostream_char_sentry_destroy(this);
4141 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4142 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4143 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 16)
4144 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4146 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4148 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
4150 if(!ios_base_fail(&base
->base
)) {
4153 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4154 &seek
, off
, way
, OPENMODE_out
);
4155 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4156 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4161 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4162 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4163 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4164 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4166 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4168 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4170 if(!ios_base_fail(&base
->base
)) {
4173 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4174 &seek
, pos
, OPENMODE_out
);
4175 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4176 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4181 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4182 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4183 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4184 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4186 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4188 TRACE("(%p)\n", this);
4190 if(!ios_base_fail(&base
->base
)) {
4191 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4192 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4201 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4202 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4203 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 16)
4204 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4206 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4208 TRACE("(%p %s %s)\n", this, debugstr_a(str
), wine_dbgstr_longlong(count
));
4210 if(!basic_ostream_char_sentry_create(this)
4211 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4212 basic_ostream_char_sentry_destroy(this);
4213 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4217 basic_ostream_char_sentry_destroy(this);
4221 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4222 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4223 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4224 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4226 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4227 int state
= IOSTATE_goodbit
;
4229 TRACE("(%p %d)\n", this, val
);
4231 if(basic_ostream_char_sentry_create(this)) {
4232 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4233 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4234 ostreambuf_iterator_char dest
= {0, strbuf
};
4236 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4237 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4238 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4240 basic_ostream_char_sentry_destroy(this);
4242 basic_ios_char_setstate(base
, state
);
4246 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4247 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4248 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4249 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4251 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4252 int state
= IOSTATE_goodbit
;
4254 TRACE("(%p %u)\n", this, val
);
4256 if(basic_ostream_char_sentry_create(this)) {
4257 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4258 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4259 ostreambuf_iterator_char dest
= {0, strbuf
};
4261 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4263 basic_ostream_char_sentry_destroy(this);
4265 basic_ios_char_setstate(base
, state
);
4269 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4270 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4271 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4272 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4273 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4274 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4276 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4277 int state
= IOSTATE_goodbit
;
4279 TRACE("(%p %d)\n", this, val
);
4281 if(basic_ostream_char_sentry_create(this)) {
4282 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4283 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4284 ostreambuf_iterator_char dest
= {0, strbuf
};
4286 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4288 basic_ostream_char_sentry_destroy(this);
4290 basic_ios_char_setstate(base
, state
);
4294 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4295 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4296 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4297 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4298 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4299 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4301 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4302 int state
= IOSTATE_goodbit
;
4304 TRACE("(%p %u)\n", this, val
);
4306 if(basic_ostream_char_sentry_create(this)) {
4307 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4308 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4309 ostreambuf_iterator_char dest
= {0, strbuf
};
4311 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4313 basic_ostream_char_sentry_destroy(this);
4315 basic_ios_char_setstate(base
, state
);
4319 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4320 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4321 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4322 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4324 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4325 int state
= IOSTATE_goodbit
;
4327 TRACE("(%p %f)\n", this, val
);
4329 if(basic_ostream_char_sentry_create(this)) {
4330 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4331 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4332 ostreambuf_iterator_char dest
= {0, strbuf
};
4334 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4336 basic_ostream_char_sentry_destroy(this);
4338 basic_ios_char_setstate(base
, state
);
4342 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4343 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4344 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4345 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4347 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4348 int state
= IOSTATE_goodbit
;
4350 TRACE("(%p %lf)\n", this, val
);
4352 if(basic_ostream_char_sentry_create(this)) {
4353 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4354 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4355 ostreambuf_iterator_char dest
= {0, strbuf
};
4357 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4359 basic_ostream_char_sentry_destroy(this);
4361 basic_ios_char_setstate(base
, state
);
4365 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4366 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4367 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4368 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4370 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4371 int state
= IOSTATE_goodbit
;
4373 TRACE("(%p %lf)\n", this, val
);
4375 if(basic_ostream_char_sentry_create(this)) {
4376 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4377 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4378 ostreambuf_iterator_char dest
= {0, strbuf
};
4380 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4382 basic_ostream_char_sentry_destroy(this);
4384 basic_ios_char_setstate(base
, state
);
4388 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4389 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4390 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4391 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4393 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4394 IOSB_iostate state
= IOSTATE_badbit
;
4397 TRACE("(%p %p)\n", this, val
);
4399 if(basic_ostream_char_sentry_create(this)) {
4400 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4401 c
= basic_streambuf_char_snextc(val
)) {
4402 state
= IOSTATE_goodbit
;
4404 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4405 state
= IOSTATE_badbit
;
4410 state
= IOSTATE_badbit
;
4412 basic_ostream_char_sentry_destroy(this);
4414 ios_base_width_set(&base
->base
, 0);
4415 basic_ios_char_setstate(base
, state
);
4419 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4420 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4421 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4422 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4424 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4425 int state
= IOSTATE_goodbit
;
4427 TRACE("(%p %p)\n", this, val
);
4429 if(basic_ostream_char_sentry_create(this)) {
4430 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4431 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4432 ostreambuf_iterator_char dest
= {0, strbuf
};
4434 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4436 basic_ostream_char_sentry_destroy(this);
4438 basic_ios_char_setstate(base
, state
);
4442 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4443 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4444 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4445 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
4447 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4448 int state
= IOSTATE_goodbit
;
4450 TRACE("(%p)\n", this);
4452 if(basic_ostream_char_sentry_create(this)) {
4453 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4454 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4455 ostreambuf_iterator_char dest
= {0, strbuf
};
4457 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4459 basic_ostream_char_sentry_destroy(this);
4461 basic_ios_char_setstate(base
, state
);
4465 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
4466 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
4467 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
4468 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
4470 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4471 int state
= IOSTATE_goodbit
;
4473 TRACE("(%p)\n", this);
4475 if(basic_ostream_char_sentry_create(this)) {
4476 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4477 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4478 ostreambuf_iterator_char dest
= {0, strbuf
};
4480 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4482 basic_ostream_char_sentry_destroy(this);
4484 basic_ios_char_setstate(base
, state
);
4488 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
4489 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
4490 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
4491 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
4493 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4494 int state
= IOSTATE_goodbit
;
4496 TRACE("(%p %x)\n", this, val
);
4498 if(basic_ostream_char_sentry_create(this)) {
4499 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4500 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4501 ostreambuf_iterator_char dest
= {0, strbuf
};
4503 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4505 basic_ostream_char_sentry_destroy(this);
4507 basic_ios_char_setstate(base
, state
);
4511 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4512 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4513 basic_ostream_char
* __cdecl
basic_ostream_char_ends(basic_ostream_char
*ostr
)
4515 TRACE("(%p)\n", ostr
);
4517 basic_ostream_char_put(ostr
, 0);
4521 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4522 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4523 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
4525 TRACE("(%p)\n", ostr
);
4527 basic_ostream_char_put(ostr
, '\n');
4528 basic_ostream_char_flush(ostr
);
4532 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
4533 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
4534 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
4535 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
4536 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
4538 TRACE("(%p %p)\n", this, pfunc
);
4543 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
4544 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
4545 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
4546 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
4547 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
4549 TRACE("(%p %p)\n", this, pfunc
);
4550 pfunc(basic_ostream_char_get_basic_ios(this));
4554 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
4555 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
4556 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
4557 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
4558 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
4560 TRACE("(%p %p)\n", this, pfunc
);
4561 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
4565 /* Caution: basic_ostream uses virtual inheritance. */
4566 static inline basic_ios_wchar
* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar
*this)
4568 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
4571 static inline basic_ios_wchar
* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar
*ptr
)
4573 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_wchar_vbtable
[1]);
4576 static inline basic_ostream_wchar
* basic_ostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
4578 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_wchar_vbtable
[1]);
4581 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
4582 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
4583 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor
, 16)
4584 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor(basic_ostream_wchar
*this,
4585 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4587 basic_ios_wchar
*base
;
4589 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
4592 this->vbtable
= basic_ostream_wchar_vbtable
;
4593 base
= basic_ostream_wchar_get_basic_ios(this);
4594 basic_ios_wchar_ctor(base
);
4596 base
= basic_ostream_wchar_get_basic_ios(this);
4599 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
4600 basic_ios_wchar_init(base
, strbuf
, isstd
);
4604 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
4605 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
4606 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor
, 16)
4607 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor(basic_ostream_wchar
*this,
4608 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4610 basic_ostream_wchar_ctor(this, strbuf
, isstd
, virt_init
);
4611 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
4615 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4616 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4617 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized
, 16)
4618 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar
*this,
4619 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4621 basic_ios_wchar
*base
;
4623 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
4626 this->vbtable
= basic_ostream_wchar_vbtable
;
4627 base
= basic_ostream_wchar_get_basic_ios(this);
4628 basic_ios_wchar_ctor(base
);
4630 base
= basic_ostream_wchar_get_basic_ios(this);
4633 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
4635 ios_base_Addstd(&base
->base
);
4639 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4640 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4641 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized
, 16)
4642 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor_uninitialized(basic_ostream_wchar
*this,
4643 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4645 basic_ostream_wchar_ctor_uninitialized(this, uninitialized
, addstd
, virt_init
);
4646 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
4650 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4651 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4652 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
4653 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4654 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor
, 4)
4655 void __thiscall
basic_ostream_wchar_dtor(basic_ios_wchar
*base
)
4657 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
4659 /* don't destroy virtual base here */
4660 TRACE("(%p)\n", this);
4663 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4664 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4665 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4666 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4667 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor
, 4)
4668 void __thiscall
basic_ostream_wchar_vbase_dtor(basic_ostream_wchar
*this)
4670 TRACE("(%p)\n", this);
4671 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
4672 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
4675 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor
, 8)
4676 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
4678 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
4680 TRACE("(%p %x)\n", this, flags
);
4683 /* we have an array, with the number of elements stored before the first object */
4684 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4686 for(i
=*ptr
-1; i
>=0; i
--)
4687 basic_ostream_wchar_vbase_dtor(this+i
);
4688 MSVCRT_operator_delete(ptr
);
4690 basic_ostream_wchar_vbase_dtor(this);
4692 MSVCRT_operator_delete(this);
4698 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
4699 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
4700 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
4701 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
4702 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush
, 4)
4703 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_flush(basic_ostream_wchar
*this)
4705 /* this function is not matching C++ specification */
4706 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4708 TRACE("(%p)\n", this);
4710 if(basic_ios_wchar_rdbuf_get(base
) && ios_base_good(&base
->base
)
4711 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base
))==-1)
4712 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4716 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
4717 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
4718 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
4719 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
4720 basic_ostream_wchar
* __cdecl
flush_ostream_wchar(basic_ostream_wchar
*ostream
)
4722 return basic_ostream_wchar_flush(ostream
);
4725 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4726 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4727 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4728 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4729 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx
, 4)
4730 void __thiscall
basic_ostream_wchar__Osfx(basic_ostream_wchar
*this)
4732 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4734 TRACE("(%p)\n", this);
4736 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4737 basic_ostream_wchar_flush(this);
4740 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4741 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4742 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4743 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4744 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx
, 4)
4745 void __thiscall
basic_ostream_wchar_osfx(basic_ostream_wchar
*this)
4747 TRACE("(%p)\n", this);
4748 basic_ostream_wchar__Osfx(this);
4751 static BOOL
basic_ostream_wchar_sentry_create(basic_ostream_wchar
*ostr
)
4753 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
4755 if(basic_ios_wchar_rdbuf_get(base
))
4756 basic_streambuf_wchar__Lock(base
->strbuf
);
4758 if(ios_base_good(&base
->base
) && base
->stream
)
4759 basic_ostream_wchar_flush(base
->stream
);
4761 return ios_base_good(&base
->base
);
4764 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar
*ostr
)
4766 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
4768 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4769 basic_ostream_wchar_osfx(ostr
);
4771 if(basic_ios_wchar_rdbuf_get(base
))
4772 basic_streambuf_wchar__Unlock(base
->strbuf
);
4775 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
4776 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
4777 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
4778 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
4779 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx
, 4)
4780 MSVCP_bool __thiscall
basic_ostream_wchar_opfx(basic_ostream_wchar
*this)
4782 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4784 TRACE("(%p)\n", this);
4786 if(ios_base_good(&base
->base
) && base
->stream
)
4787 basic_ostream_wchar_flush(base
->stream
);
4788 return ios_base_good(&base
->base
);
4791 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
4792 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
4793 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
4794 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
4795 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put
, 8)
4796 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_put(basic_ostream_wchar
*this, wchar_t ch
)
4798 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4800 TRACE("(%p %c)\n", this, ch
);
4802 if(!basic_ostream_wchar_sentry_create(this)
4803 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
4804 basic_ostream_wchar_sentry_destroy(this);
4805 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4809 basic_ostream_wchar_sentry_destroy(this);
4813 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
4814 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
4815 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
4816 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
4817 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 16)
4818 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
4820 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4822 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
4824 if(!ios_base_fail(&base
->base
)) {
4827 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
4828 &seek
, off
, way
, OPENMODE_out
);
4829 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4830 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
4835 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4836 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4837 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4838 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4839 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos
, 28)
4840 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
4842 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4844 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4846 if(!ios_base_fail(&base
->base
)) {
4849 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base
),
4850 &seek
, pos
, OPENMODE_out
);
4851 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4852 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
4857 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4858 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4859 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4860 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4861 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp
, 8)
4862 fpos_int
* __thiscall
basic_ostream_wchar_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
4864 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4866 TRACE("(%p)\n", this);
4868 if(!ios_base_fail(&base
->base
)) {
4869 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
4870 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4879 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
4880 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
4881 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
4882 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
4883 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 16)
4884 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
4886 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4888 TRACE("(%p %s %s)\n", this, debugstr_w(str
), wine_dbgstr_longlong(count
));
4890 if(!basic_ostream_wchar_sentry_create(this)
4891 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
4892 basic_ostream_wchar_sentry_destroy(this);
4893 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4897 basic_ostream_wchar_sentry_destroy(this);
4901 static basic_ostream_wchar
* basic_ostream_print_short(basic_ostream_wchar
*this, short val
, const num_put
*numput
)
4903 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4904 int state
= IOSTATE_goodbit
;
4906 TRACE("(%p %d)\n", this, val
);
4908 if(basic_ostream_wchar_sentry_create(this)) {
4909 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4910 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4912 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
),
4913 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4914 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4916 basic_ostream_wchar_sentry_destroy(this);
4918 basic_ios_wchar_setstate(base
, state
);
4922 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
4923 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
4924 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short
, 8)
4925 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_short(basic_ostream_wchar
*this, short val
)
4927 return basic_ostream_print_short(this, val
, num_put_wchar_use_facet(
4928 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4931 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
4932 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
4933 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short
, 8)
4934 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_short(basic_ostream_wchar
*this, short val
)
4936 return basic_ostream_print_short(this, val
, num_put_short_use_facet(
4937 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4940 static basic_ostream_wchar
* basic_ostream_print_ushort(basic_ostream_wchar
*this, unsigned short val
, const num_put
*numput
)
4942 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4943 int state
= IOSTATE_goodbit
;
4945 TRACE("(%p %d)\n", this, val
);
4947 if(basic_ostream_wchar_sentry_create(this)) {
4948 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4949 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4951 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
4953 basic_ostream_wchar_sentry_destroy(this);
4955 basic_ios_wchar_setstate(base
, state
);
4959 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
4960 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
4961 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort
, 8)
4962 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
4964 return basic_ostream_print_ushort(this, val
, num_put_wchar_use_facet(
4965 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4968 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */
4969 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */
4970 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort
, 8)
4971 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
4973 return basic_ostream_print_ushort(this, val
, num_put_short_use_facet(
4974 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4977 static basic_ostream_wchar
* basic_ostream_print_int(basic_ostream_wchar
*this, int val
, const num_put
*numput
)
4979 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4980 int state
= IOSTATE_goodbit
;
4982 TRACE("(%p %d)\n", this, val
);
4984 if(basic_ostream_wchar_sentry_create(this)) {
4985 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4986 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4988 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
4990 basic_ostream_wchar_sentry_destroy(this);
4992 basic_ios_wchar_setstate(base
, state
);
4996 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
4997 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
4998 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
4999 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
5000 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int
, 8)
5001 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int(basic_ostream_wchar
*this, int val
)
5003 return basic_ostream_print_int(this, val
, num_put_wchar_use_facet(
5004 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5007 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
5008 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
5009 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
5010 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
5011 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int
, 8)
5012 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int(basic_ostream_wchar
*this, int val
)
5014 return basic_ostream_print_int(this, val
, num_put_short_use_facet(
5015 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5018 static basic_ostream_wchar
* basic_ostream_print_uint(basic_ostream_wchar
*this, unsigned int val
, const num_put
*numput
)
5020 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5021 int state
= IOSTATE_goodbit
;
5023 TRACE("(%p %u)\n", this, val
);
5025 if(basic_ostream_wchar_sentry_create(this)) {
5026 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5027 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5029 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5031 basic_ostream_wchar_sentry_destroy(this);
5033 basic_ios_wchar_setstate(base
, state
);
5037 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
5038 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
5039 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
5040 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
5041 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint
, 8)
5042 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5044 return basic_ostream_print_uint(this, val
, num_put_wchar_use_facet(
5045 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5048 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
5049 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
5050 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
5051 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
5052 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint
, 8)
5053 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5055 return basic_ostream_print_uint(this, val
, num_put_short_use_facet(
5056 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5059 static basic_ostream_wchar
* basic_ostream_print_float(basic_ostream_wchar
*this, float val
, const num_put
*numput
)
5061 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5062 int state
= IOSTATE_goodbit
;
5064 TRACE("(%p %f)\n", this, val
);
5066 if(basic_ostream_wchar_sentry_create(this)) {
5067 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5068 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5070 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5072 basic_ostream_wchar_sentry_destroy(this);
5074 basic_ios_wchar_setstate(base
, state
);
5078 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
5079 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
5080 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float
, 8)
5081 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_float(basic_ostream_wchar
*this, float val
)
5083 return basic_ostream_print_float(this, val
, num_put_wchar_use_facet(
5084 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5087 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
5088 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
5089 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float
, 8)
5090 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_float(basic_ostream_wchar
*this, float val
)
5092 return basic_ostream_print_float(this, val
, num_put_short_use_facet(
5093 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5096 static basic_ostream_wchar
* basic_ostream_print_double(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
5098 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5099 int state
= IOSTATE_goodbit
;
5101 TRACE("(%p %lf)\n", this, val
);
5103 if(basic_ostream_wchar_sentry_create(this)) {
5104 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5105 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5107 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5109 basic_ostream_wchar_sentry_destroy(this);
5111 basic_ios_wchar_setstate(base
, state
);
5115 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
5116 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
5117 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double
, 12)
5118 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_double(basic_ostream_wchar
*this, double val
)
5120 return basic_ostream_print_double(this, val
, num_put_wchar_use_facet(
5121 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5124 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
5125 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
5126 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double
, 12)
5127 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_double(basic_ostream_wchar
*this, double val
)
5129 return basic_ostream_print_double(this, val
, num_put_short_use_facet(
5130 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5133 static basic_ostream_wchar
* basic_ostream_print_ldouble(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
5135 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5136 int state
= IOSTATE_goodbit
;
5138 TRACE("(%p %lf)\n", this, val
);
5140 if(basic_ostream_wchar_sentry_create(this)) {
5141 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5142 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5144 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5146 basic_ostream_wchar_sentry_destroy(this);
5148 basic_ios_wchar_setstate(base
, state
);
5152 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
5153 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
5154 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble
, 12)
5155 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ldouble(basic_ostream_wchar
*this, double val
)
5157 return basic_ostream_print_ldouble(this, val
, num_put_wchar_use_facet(
5158 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5161 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
5162 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
5163 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble
, 12)
5164 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ldouble(basic_ostream_wchar
*this, double val
)
5166 return basic_ostream_print_ldouble(this, val
, num_put_short_use_facet(
5167 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5170 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5171 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5172 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5173 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5174 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf
, 8)
5175 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5177 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5178 IOSB_iostate state
= IOSTATE_badbit
;
5179 unsigned short c
= '\n';
5181 TRACE("(%p %p)\n", this, val
);
5183 if(basic_ostream_wchar_sentry_create(this)) {
5184 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5185 c
= basic_streambuf_wchar_snextc(val
)) {
5186 state
= IOSTATE_goodbit
;
5188 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5189 state
= IOSTATE_badbit
;
5194 state
= IOSTATE_badbit
;
5196 basic_ostream_wchar_sentry_destroy(this);
5198 ios_base_width_set(&base
->base
, 0);
5199 basic_ios_wchar_setstate(base
, state
);
5203 static basic_ostream_wchar
* basic_ostream_print_ptr(basic_ostream_wchar
*this, const void *val
, const num_put
*numput
)
5205 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5206 int state
= IOSTATE_goodbit
;
5208 TRACE("(%p %p)\n", this, val
);
5210 if(basic_ostream_wchar_sentry_create(this)) {
5211 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5212 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5214 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5216 basic_ostream_wchar_sentry_destroy(this);
5218 basic_ios_wchar_setstate(base
, state
);
5222 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
5223 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
5224 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr
, 8)
5225 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ptr(basic_ostream_wchar
*this, const void *val
)
5227 return basic_ostream_print_ptr(this, val
, num_put_wchar_use_facet(
5228 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5231 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
5232 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
5233 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr
, 8)
5234 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ptr(basic_ostream_wchar
*this, const void *val
)
5236 return basic_ostream_print_ptr(this, val
, num_put_short_use_facet(
5237 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5240 static basic_ostream_wchar
* basic_ostream_print_int64(basic_ostream_wchar
*this, __int64 val
, const num_put
*numput
)
5242 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5243 int state
= IOSTATE_goodbit
;
5245 TRACE("(%p)\n", this);
5247 if(basic_ostream_wchar_sentry_create(this)) {
5248 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5249 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5251 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5253 basic_ostream_wchar_sentry_destroy(this);
5255 basic_ios_wchar_setstate(base
, state
);
5259 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
5260 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
5261 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64
, 12)
5262 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int64(basic_ostream_wchar
*this, __int64 val
)
5264 return basic_ostream_print_int64(this, val
, num_put_wchar_use_facet(
5265 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5268 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
5269 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
5270 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64
, 12)
5271 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int64(basic_ostream_wchar
*this, __int64 val
)
5273 return basic_ostream_print_int64(this, val
, num_put_short_use_facet(
5274 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5277 static basic_ostream_wchar
* basic_ostream_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
, const num_put
*numput
)
5279 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5280 int state
= IOSTATE_goodbit
;
5282 TRACE("(%p)\n", this);
5284 if(basic_ostream_wchar_sentry_create(this)) {
5285 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5286 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5288 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5290 basic_ostream_wchar_sentry_destroy(this);
5292 basic_ios_wchar_setstate(base
, state
);
5296 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
5297 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
5298 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64
, 12)
5299 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5301 return basic_ostream_print_uint64(this, val
, num_put_wchar_use_facet(
5302 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5305 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
5306 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
5307 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64
, 12)
5308 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5310 return basic_ostream_print_uint64(this, val
, num_put_short_use_facet(
5311 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5314 static basic_ostream_wchar
* basic_ostream_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
, const num_put
*numput
)
5316 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5317 int state
= IOSTATE_goodbit
;
5319 TRACE("(%p %x)\n", this, val
);
5321 if(basic_ostream_wchar_sentry_create(this)) {
5322 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5323 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5325 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5327 basic_ostream_wchar_sentry_destroy(this);
5329 basic_ios_wchar_setstate(base
, state
);
5333 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
5334 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
5335 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool
, 8)
5336 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5338 return basic_ostream_print_bool(this, val
, num_put_wchar_use_facet(
5339 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5342 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
5343 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
5344 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool
, 8)
5345 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5347 return basic_ostream_print_bool(this, val
, num_put_short_use_facet(
5348 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5351 /* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5352 /* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5353 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5354 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5355 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_ends(basic_ostream_wchar
*ostr
)
5357 TRACE("(%p)\n", ostr
);
5359 basic_ostream_wchar_put(ostr
, 0);
5363 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5364 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5365 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5366 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5367 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_endl(basic_ostream_wchar
*ostr
)
5369 TRACE("(%p)\n", ostr
);
5371 basic_ostream_wchar_put(ostr
, '\n');
5372 basic_ostream_wchar_flush(ostr
);
5376 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5377 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5378 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5379 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5380 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func
, 8)
5381 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func(basic_ostream_wchar
*this,
5382 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
5384 TRACE("(%p %p)\n", this, pfunc
);
5389 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
5390 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
5391 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
5392 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
5393 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios
, 8)
5394 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar
*this,
5395 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
5397 TRACE("(%p %p)\n", this, pfunc
);
5398 pfunc(basic_ostream_wchar_get_basic_ios(this));
5402 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5403 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5404 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5405 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5406 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base
, 8)
5407 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_ios_base(
5408 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5410 TRACE("(%p %p)\n", this, pfunc
);
5411 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base
);
5415 /* Caution: basic_istream uses virtual inheritance. */
5416 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
5418 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
5421 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
5423 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
5426 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
5428 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
5431 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5432 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5433 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
5434 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
)
5436 basic_ios_char
*base
;
5438 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
5441 this->vbtable
= basic_istream_char_vbtable
;
5442 base
= basic_istream_char_get_basic_ios(this);
5443 basic_ios_char_ctor(base
);
5445 base
= basic_istream_char_get_basic_ios(this);
5448 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
5451 basic_ios_char_init(base
, strbuf
, isstd
);
5455 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5456 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5457 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
5458 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
5460 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
5463 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5464 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5465 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
5466 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
5468 basic_ios_char
*base
;
5470 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
5473 this->vbtable
= basic_istream_char_vbtable
;
5474 base
= basic_istream_char_get_basic_ios(this);
5475 basic_ios_char_ctor(base
);
5477 base
= basic_istream_char_get_basic_ios(this);
5480 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
5481 ios_base_Addstd(&base
->base
);
5485 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5486 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5487 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
5488 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
5490 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
5492 /* don't destroy virtual base here */
5493 TRACE("(%p)\n", this);
5496 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5497 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5498 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
5499 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
5501 TRACE("(%p)\n", this);
5502 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
5503 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
5506 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor
, 8)
5507 basic_istream_char
* __thiscall
basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
5509 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
5511 TRACE("(%p %x)\n", this, flags
);
5514 /* we have an array, with the number of elements stored before the first object */
5515 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5517 for(i
=*ptr
-1; i
>=0; i
--)
5518 basic_istream_char_vbase_dtor(this+i
);
5519 MSVCRT_operator_delete(ptr
);
5521 basic_istream_char_vbase_dtor(this);
5523 MSVCRT_operator_delete(this);
5529 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
5530 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
5531 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
5532 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
5534 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5536 TRACE("(%p %d)\n", this, noskip
);
5538 if(ios_base_good(&base
->base
)) {
5539 if(basic_ios_char_tie_get(base
))
5540 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
5542 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
5543 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5544 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
5547 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
5548 ch
= basic_streambuf_char_snextc(strbuf
)) {
5550 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5554 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
5560 if(!ios_base_good(&base
->base
)) {
5561 basic_ios_char_setstate(base
, IOSTATE_failbit
);
5568 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
5569 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
5570 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
5571 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
5573 return basic_istream_char__Ipfx(this, noskip
);
5576 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5577 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5578 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
5579 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
5581 TRACE("(%p)\n", this);
5584 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
5586 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
5588 if(basic_ios_char_rdbuf_get(base
))
5589 call_basic_streambuf_char__Lock(base
->strbuf
);
5591 return basic_istream_char_ipfx(istr
, noskip
);
5594 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
5596 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
5598 if(basic_ios_char_rdbuf_get(base
))
5599 call_basic_streambuf_char__Unlock(base
->strbuf
);
5602 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
5603 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
5604 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
5605 int __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
5607 TRACE("(%p)\n", this);
5611 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5612 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
5613 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
5614 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
5616 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5619 TRACE("(%p)\n", this);
5623 if(!basic_istream_char_sentry_create(this, TRUE
)) {
5624 basic_istream_char_sentry_destroy(this);
5628 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
5629 basic_istream_char_sentry_destroy(this);
5631 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
5638 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
5639 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
5640 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
5641 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
5645 TRACE("(%p %p)\n", this, ch
);
5647 ret
= basic_istream_char_get(this);
5653 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
5654 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
5655 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 20)
5656 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
5658 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5661 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
5665 if(basic_istream_char_sentry_create(this, TRUE
)) {
5666 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5668 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
5669 ch
= basic_streambuf_char_snextc(strbuf
)) {
5670 if(ch
==EOF
|| ch
==delim
)
5678 basic_istream_char_sentry_destroy(this);
5680 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
5681 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
5687 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5688 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5689 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 16)
5690 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
5692 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
5695 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
5696 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
5697 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
5698 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
5700 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5703 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
5707 if(basic_istream_char_sentry_create(this, TRUE
)) {
5708 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
5710 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
5711 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
5712 if(ch
==EOF
|| ch
==delim
)
5715 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
5720 basic_istream_char_sentry_destroy(this);
5722 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
5723 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
5727 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
5728 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
5729 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
5730 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
5732 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
5735 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
5736 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
5737 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 20)
5738 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
5740 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5741 int ch
= (unsigned char)delim
;
5743 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
5747 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
5748 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5751 ch
= basic_streambuf_char_sbumpc(strbuf
);
5753 if(ch
==EOF
|| ch
==(unsigned char)delim
)
5761 if(ch
== (unsigned char)delim
)
5763 else if(ch
!= EOF
) {
5764 ch
= basic_streambuf_char_sgetc(strbuf
);
5766 if(ch
== (unsigned char)delim
) {
5767 basic_streambuf_char__Gninc(strbuf
);
5772 basic_istream_char_sentry_destroy(this);
5774 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
5775 (!this->count
|| (ch
!=(unsigned char)delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
5781 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5782 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5783 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 16)
5784 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
5786 return basic_istream_char_getline_delim(this, str
, count
, '\n');
5789 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
5790 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
5791 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 16)
5792 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
5794 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5795 int ch
= (unsigned char)delim
;
5798 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
5802 if(basic_istream_char_sentry_create(this, TRUE
)) {
5803 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5804 state
= IOSTATE_goodbit
;
5807 ch
= basic_streambuf_char_sbumpc(strbuf
);
5810 state
= IOSTATE_eofbit
;
5814 if(ch
==(unsigned char)delim
)
5818 if(count
!= INT_MAX
)
5822 state
= IOSTATE_failbit
;
5823 basic_istream_char_sentry_destroy(this);
5825 basic_ios_char_setstate(base
, state
);
5829 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5830 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5831 basic_istream_char
* __cdecl
ws_basic_istream_char(basic_istream_char
*istream
)
5833 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
5836 TRACE("(%p)\n", istream
);
5838 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
5839 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5840 const ctype_char
*ctype
= ctype_char_use_facet(strbuf
->loc
);
5842 for(ch
= basic_streambuf_char_sgetc(strbuf
); ctype_char_is_ch(ctype
, _SPACE
, ch
);
5843 ch
= basic_streambuf_char_snextc(strbuf
)) {
5848 basic_istream_char_sentry_destroy(istream
);
5851 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5855 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5856 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
5857 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
5858 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
5860 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5863 TRACE("(%p)\n", this);
5867 if(basic_istream_char_sentry_create(this, TRUE
))
5868 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
5869 basic_istream_char_sentry_destroy(this);
5872 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5877 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
5878 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
5879 static basic_istream_char
* basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
5881 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5882 IOSB_iostate state
= IOSTATE_goodbit
;
5884 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
5886 if(basic_istream_char_sentry_create(this, TRUE
)) {
5887 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5889 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
5890 if(this->count
!= count
)
5891 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
5895 basic_istream_char_sentry_destroy(this);
5897 basic_ios_char_setstate(base
, state
);
5901 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5902 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5903 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 16)
5904 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
5906 return basic_istream_char__Read_s(this, str
, count
, count
);
5909 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
5910 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
5911 static streamsize
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
5913 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5914 IOSB_iostate state
= IOSTATE_goodbit
;
5916 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
5920 if(basic_istream_char_sentry_create(this, TRUE
)) {
5921 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
5926 state
|= IOSTATE_eofbit
;
5928 basic_istream_char__Read_s(this, str
, size
, avail
);
5930 state
|= IOSTATE_failbit
;
5932 basic_istream_char_sentry_destroy(this);
5934 basic_ios_char_setstate(base
, state
);
5938 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
5939 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
5940 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 16)
5941 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
5943 return basic_istream_char__Readsome_s(this, str
, count
, count
);
5946 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5947 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5948 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
5949 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
5951 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5952 IOSB_iostate state
= IOSTATE_goodbit
;
5954 TRACE("(%p %c)\n", this, ch
);
5958 if(basic_istream_char_sentry_create(this, TRUE
)) {
5959 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5961 if(!ios_base_good(&base
->base
))
5962 state
|= IOSTATE_failbit
;
5963 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
5964 state
|= IOSTATE_badbit
;
5966 basic_istream_char_sentry_destroy(this);
5968 basic_ios_char_setstate(base
, state
);
5972 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5973 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5974 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
5975 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
5977 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5978 IOSB_iostate state
= IOSTATE_goodbit
;
5980 TRACE("(%p)\n", this);
5984 if(basic_istream_char_sentry_create(this, TRUE
)) {
5985 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5987 if(!ios_base_good(&base
->base
))
5988 state
|= IOSTATE_failbit
;
5989 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
5990 state
|= IOSTATE_badbit
;
5992 basic_istream_char_sentry_destroy(this);
5994 basic_ios_char_setstate(base
, state
);
5998 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5999 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6000 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
6001 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
6003 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6004 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6006 TRACE("(%p)\n", this);
6011 if(basic_istream_char_sentry_create(this, TRUE
)) {
6012 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
6013 basic_istream_char_sentry_destroy(this);
6017 basic_istream_char_sentry_destroy(this);
6019 basic_ios_char_setstate(base
, IOSTATE_badbit
);
6023 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6024 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6025 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
6026 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
6028 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6030 TRACE("(%p %p)\n", this, ret
);
6032 if(ios_base_fail(&base
->base
)) {
6039 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
6040 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
6042 if(ret
->off
==-1 && ret
->pos
==0 && ret
->state
==0)
6043 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6048 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6049 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6050 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 16)
6051 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6053 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6055 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
6057 if(!ios_base_fail(&base
->base
)) {
6058 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6061 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6063 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
6064 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6066 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6069 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6074 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6075 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6076 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6077 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6079 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6081 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6083 if(!ios_base_fail(&base
->base
)) {
6084 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6087 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6089 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
6090 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6092 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6095 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6100 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6101 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6102 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6103 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6105 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6106 int state
= IOSTATE_goodbit
;
6108 TRACE("(%p %p)\n", this, v
);
6110 if(basic_istream_char_sentry_create(this, FALSE
)) {
6111 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6112 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6113 istreambuf_iterator_char first
={0}, last
={0};
6116 first
.strbuf
= strbuf
;
6117 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6119 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6122 state
|= IOSTATE_failbit
;
6124 basic_istream_char_sentry_destroy(this);
6126 basic_ios_char_setstate(base
, state
);
6130 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6131 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6132 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6133 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6135 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6136 int state
= IOSTATE_goodbit
;
6138 TRACE("(%p %p)\n", this, v
);
6140 if(basic_istream_char_sentry_create(this, FALSE
)) {
6141 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6142 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6143 istreambuf_iterator_char first
={0}, last
={0};
6145 first
.strbuf
= strbuf
;
6146 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6148 basic_istream_char_sentry_destroy(this);
6150 basic_ios_char_setstate(base
, state
);
6154 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6155 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6156 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6157 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6159 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6160 int state
= IOSTATE_goodbit
;
6162 TRACE("(%p %p)\n", this, v
);
6164 if(basic_istream_char_sentry_create(this, FALSE
)) {
6165 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6166 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6167 istreambuf_iterator_char first
={0}, last
={0};
6169 first
.strbuf
= strbuf
;
6170 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6172 basic_istream_char_sentry_destroy(this);
6174 basic_ios_char_setstate(base
, state
);
6178 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6179 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6180 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6181 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6183 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6184 int state
= IOSTATE_goodbit
;
6186 TRACE("(%p %p)\n", this, v
);
6188 if(basic_istream_char_sentry_create(this, FALSE
)) {
6189 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6190 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6191 istreambuf_iterator_char first
={0}, last
={0};
6193 first
.strbuf
= strbuf
;
6194 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6196 basic_istream_char_sentry_destroy(this);
6198 basic_ios_char_setstate(base
, state
);
6202 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6203 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6204 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6205 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6207 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6208 int state
= IOSTATE_goodbit
;
6210 TRACE("(%p %p)\n", this, v
);
6212 if(basic_istream_char_sentry_create(this, FALSE
)) {
6213 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6214 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6215 istreambuf_iterator_char first
={0}, last
={0};
6217 first
.strbuf
= strbuf
;
6218 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6220 basic_istream_char_sentry_destroy(this);
6222 basic_ios_char_setstate(base
, state
);
6226 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6227 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6228 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6229 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6231 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6232 int state
= IOSTATE_goodbit
;
6234 TRACE("(%p %p)\n", this, v
);
6236 if(basic_istream_char_sentry_create(this, FALSE
)) {
6237 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6238 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6239 istreambuf_iterator_char first
={0}, last
={0};
6241 first
.strbuf
= strbuf
;
6242 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6244 basic_istream_char_sentry_destroy(this);
6246 basic_ios_char_setstate(base
, state
);
6250 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6251 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6252 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6253 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6255 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6256 int state
= IOSTATE_goodbit
;
6258 TRACE("(%p %p)\n", this, v
);
6260 if(basic_istream_char_sentry_create(this, FALSE
)) {
6261 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6262 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6263 istreambuf_iterator_char first
={0}, last
={0};
6265 first
.strbuf
= strbuf
;
6266 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6268 basic_istream_char_sentry_destroy(this);
6270 basic_ios_char_setstate(base
, state
);
6274 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6275 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6276 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6277 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6279 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6280 int state
= IOSTATE_goodbit
;
6282 TRACE("(%p %p)\n", this, v
);
6284 if(basic_istream_char_sentry_create(this, FALSE
)) {
6285 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6286 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6287 istreambuf_iterator_char first
={0}, last
={0};
6289 first
.strbuf
= strbuf
;
6290 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6292 basic_istream_char_sentry_destroy(this);
6294 basic_ios_char_setstate(base
, state
);
6298 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6299 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6300 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6301 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6303 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6304 int state
= IOSTATE_goodbit
;
6306 TRACE("(%p %p)\n", this, v
);
6308 if(basic_istream_char_sentry_create(this, FALSE
)) {
6309 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6310 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6311 istreambuf_iterator_char first
={0}, last
={0};
6313 first
.strbuf
= strbuf
;
6314 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6316 basic_istream_char_sentry_destroy(this);
6318 basic_ios_char_setstate(base
, state
);
6322 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6323 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6324 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6325 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6327 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6328 int state
= IOSTATE_goodbit
;
6330 TRACE("(%p %p)\n", this, v
);
6332 if(basic_istream_char_sentry_create(this, FALSE
)) {
6333 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6334 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6335 istreambuf_iterator_char first
={0}, last
={0};
6337 first
.strbuf
= strbuf
;
6338 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6340 basic_istream_char_sentry_destroy(this);
6342 basic_ios_char_setstate(base
, state
);
6346 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6347 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6348 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6349 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6351 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6352 int state
= IOSTATE_goodbit
;
6354 TRACE("(%p %p)\n", this, v
);
6356 if(basic_istream_char_sentry_create(this, FALSE
)) {
6357 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6358 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6359 istreambuf_iterator_char first
={0}, last
={0};
6361 first
.strbuf
= strbuf
;
6362 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6364 basic_istream_char_sentry_destroy(this);
6366 basic_ios_char_setstate(base
, state
);
6370 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6371 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6372 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6373 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6375 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6376 int state
= IOSTATE_goodbit
;
6378 TRACE("(%p %p)\n", this, v
);
6380 if(basic_istream_char_sentry_create(this, FALSE
)) {
6381 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6382 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6383 istreambuf_iterator_char first
={0}, last
={0};
6385 first
.strbuf
= strbuf
;
6386 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6388 basic_istream_char_sentry_destroy(this);
6390 basic_ios_char_setstate(base
, state
);
6394 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6395 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6396 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6397 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
6399 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6400 int state
= IOSTATE_goodbit
;
6402 TRACE("(%p %p)\n", this, v
);
6404 if(basic_istream_char_sentry_create(this, FALSE
)) {
6405 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6406 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6407 istreambuf_iterator_char first
={0}, last
={0};
6409 first
.strbuf
= strbuf
;
6410 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6412 basic_istream_char_sentry_destroy(this);
6414 basic_ios_char_setstate(base
, state
);
6418 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6419 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6420 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
6421 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
6422 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
6424 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6425 IOSB_iostate state
= IOSTATE_failbit
;
6428 TRACE("(%p %p)\n", this, streambuf
);
6430 if(basic_istream_char_sentry_create(this, FALSE
)) {
6431 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
6432 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
6433 state
= IOSTATE_goodbit
;
6434 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
6438 basic_istream_char_sentry_destroy(this);
6440 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6444 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6445 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6446 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
6447 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
6448 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
6450 TRACE("(%p %p)\n", this, pfunc
);
6455 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
6456 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
6457 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
6458 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
6459 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
6461 TRACE("(%p %p)\n", this, pfunc
);
6462 pfunc(basic_istream_char_get_basic_ios(this));
6466 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6467 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6468 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
6469 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
6470 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
6472 TRACE("(%p %p)\n", this, pfunc
);
6473 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
6477 /* Caution: basic_istream uses virtual inheritance. */
6478 static inline basic_ios_wchar
* basic_istream_wchar_get_basic_ios(basic_istream_wchar
*this)
6480 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
6483 static inline basic_ios_wchar
* basic_istream_wchar_to_basic_ios(basic_istream_wchar
*ptr
)
6485 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_wchar_vbtable
[1]);
6488 static inline basic_istream_wchar
* basic_istream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
6490 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_wchar_vbtable
[1]);
6493 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
6494 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
6495 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init
, 20)
6496 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_init(basic_istream_wchar
*this,
6497 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
6499 basic_ios_wchar
*base
;
6501 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
6504 this->vbtable
= basic_istream_wchar_vbtable
;
6505 base
= basic_istream_wchar_get_basic_ios(this);
6506 basic_ios_wchar_ctor(base
);
6508 base
= basic_istream_wchar_get_basic_ios(this);
6511 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
6514 basic_ios_wchar_init(base
, strbuf
, isstd
);
6518 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
6519 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
6520 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init
, 20)
6521 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_init(basic_istream_wchar
*this,
6522 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
6524 basic_istream_wchar_ctor_init(this, strbuf
, isstd
, noinit
, virt_init
);
6525 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
6529 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6530 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6531 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor
, 16)
6532 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor(basic_istream_wchar
*this,
6533 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6535 return basic_istream_wchar_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6538 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6539 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6540 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor
, 16)
6541 basic_istream_wchar
* __thiscall
basic_istream_short_ctor(basic_istream_wchar
*this,
6542 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6544 return basic_istream_short_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6547 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6548 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6549 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized
, 12)
6550 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_uninitialized(
6551 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
6553 basic_ios_wchar
*base
;
6555 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6558 this->vbtable
= basic_istream_wchar_vbtable
;
6559 base
= basic_istream_wchar_get_basic_ios(this);
6560 basic_ios_wchar_ctor(base
);
6562 base
= basic_istream_wchar_get_basic_ios(this);
6565 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
6566 ios_base_Addstd(&base
->base
);
6570 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6571 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6572 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized
, 12)
6573 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_uninitialized(
6574 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
6576 basic_istream_wchar_ctor_uninitialized(this, uninitialized
, virt_init
);
6577 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
6581 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6582 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6583 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6584 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6585 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor
, 4)
6586 void __thiscall
basic_istream_wchar_dtor(basic_ios_wchar
*base
)
6588 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
6590 /* don't destroy virtual base here */
6591 TRACE("(%p)\n", this);
6594 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6595 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6596 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6597 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6598 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor
, 4)
6599 void __thiscall
basic_istream_wchar_vbase_dtor(basic_istream_wchar
*this)
6601 TRACE("(%p)\n", this);
6602 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
6603 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
6606 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor
, 8)
6607 basic_istream_wchar
* __thiscall
basic_istream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
6609 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
6611 TRACE("(%p %x)\n", this, flags
);
6614 /* we have an array, with the number of elements stored before the first object */
6615 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6617 for(i
=*ptr
-1; i
>=0; i
--)
6618 basic_istream_wchar_vbase_dtor(this+i
);
6619 MSVCRT_operator_delete(ptr
);
6621 basic_istream_wchar_vbase_dtor(this);
6623 MSVCRT_operator_delete(this);
6629 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
6630 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
6631 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
6632 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
6633 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx
, 8)
6634 MSVCP_bool __thiscall
basic_istream_wchar__Ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
6636 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6638 TRACE("(%p %d)\n", this, noskip
);
6640 if(ios_base_good(&base
->base
)) {
6641 if(basic_ios_wchar_tie_get(base
))
6642 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base
));
6644 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6645 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6646 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
6649 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
6650 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6652 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
6656 if(!ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6662 if(!ios_base_good(&base
->base
)) {
6663 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
6669 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
6670 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
6671 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
6672 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
6673 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx
, 8)
6674 MSVCP_bool __thiscall
basic_istream_wchar_ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
6676 return basic_istream_wchar__Ipfx(this, noskip
);
6679 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6680 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6681 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6682 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6683 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx
, 4)
6684 void __thiscall
basic_istream_wchar_isfx(basic_istream_wchar
*this)
6686 TRACE("(%p)\n", this);
6689 static BOOL
basic_istream_wchar_sentry_create(basic_istream_wchar
*istr
, MSVCP_bool noskip
)
6691 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
6693 if(basic_ios_wchar_rdbuf_get(base
))
6694 basic_streambuf_wchar__Lock(base
->strbuf
);
6696 return basic_istream_wchar_ipfx(istr
, noskip
);
6699 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar
*istr
)
6701 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
6703 if(basic_ios_wchar_rdbuf_get(base
))
6704 basic_streambuf_wchar__Unlock(base
->strbuf
);
6707 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
6708 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
6709 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
6710 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
6711 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount
, 4)
6712 int __thiscall
basic_istream_wchar_gcount(const basic_istream_wchar
*this)
6714 TRACE("(%p)\n", this);
6718 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
6719 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
6720 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
6721 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
6722 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get
, 4)
6723 unsigned short __thiscall
basic_istream_wchar_get(basic_istream_wchar
*this)
6725 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6728 TRACE("(%p)\n", this);
6732 if(!basic_istream_wchar_sentry_create(this, TRUE
)) {
6733 basic_istream_wchar_sentry_destroy(this);
6737 ret
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base
));
6738 basic_istream_wchar_sentry_destroy(this);
6740 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6747 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
6748 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
6749 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
6750 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
6751 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch
, 8)
6752 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
6756 TRACE("(%p %p)\n", this, ch
);
6758 ret
= basic_istream_wchar_get(this);
6764 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
6765 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
6766 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
6767 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
6768 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 20)
6769 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
6771 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6772 unsigned short ch
= delim
;
6774 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
6778 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6779 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6781 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
6782 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6783 if(ch
==WEOF
|| ch
==delim
)
6791 basic_istream_wchar_sentry_destroy(this);
6793 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6794 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6800 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
6801 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
6802 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
6803 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
6804 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 16)
6805 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
6807 return basic_istream_wchar_get_str_delim(this, str
, count
, '\n');
6810 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
6811 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
6812 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
6813 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
6814 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim
, 12)
6815 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
6817 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6818 unsigned short ch
= delim
;
6820 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
6824 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6825 basic_streambuf_wchar
*strbuf_read
= basic_ios_wchar_rdbuf_get(base
);
6827 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
6828 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
6829 if(ch
==WEOF
|| ch
==delim
)
6832 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
6837 basic_istream_wchar_sentry_destroy(this);
6839 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6840 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6844 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
6845 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
6846 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
6847 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
6848 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf
, 8)
6849 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
6851 return basic_istream_wchar_get_streambuf_delim(this, strbuf
, '\n');
6854 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
6855 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
6856 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
6857 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
6858 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 20)
6859 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
6861 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6862 unsigned short ch
= delim
;
6864 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
6868 if(basic_istream_wchar_sentry_create(this, TRUE
) && count
>0) {
6869 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6872 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
6874 if(ch
==WEOF
|| ch
==delim
)
6884 else if(ch
!= WEOF
) {
6885 ch
= basic_streambuf_wchar_sgetc(strbuf
);
6888 basic_streambuf_wchar__Gninc(strbuf
);
6893 basic_istream_wchar_sentry_destroy(this);
6895 basic_ios_wchar_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6896 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6902 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
6903 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
6904 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
6905 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
6906 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 16)
6907 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
6909 return basic_istream_wchar_getline_delim(this, str
, count
, '\n');
6912 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
6913 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
6914 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
6915 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
6916 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 16)
6917 basic_istream_wchar
* __thiscall
basic_istream_wchar_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
6919 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6920 unsigned short ch
= delim
;
6923 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
6927 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6928 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6929 state
= IOSTATE_goodbit
;
6932 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
6935 state
= IOSTATE_eofbit
;
6943 if(count
!= INT_MAX
)
6947 state
= IOSTATE_failbit
;
6948 basic_istream_wchar_sentry_destroy(this);
6950 basic_ios_wchar_setstate(base
, state
);
6954 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6955 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6956 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6957 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6958 basic_istream_wchar
* __cdecl
ws_basic_istream_wchar(basic_istream_wchar
*istream
)
6960 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
6961 unsigned short ch
= '\n';
6963 TRACE("(%p)\n", istream
);
6965 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
6966 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6967 const ctype_wchar
*ctype
= ctype_wchar_use_facet(strbuf
->loc
);
6969 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ctype_wchar_is_ch(ctype
, _SPACE
, ch
);
6970 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6975 basic_istream_wchar_sentry_destroy(istream
);
6978 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
6982 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
6983 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
6984 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
6985 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
6986 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek
, 4)
6987 unsigned short __thiscall
basic_istream_wchar_peek(basic_istream_wchar
*this)
6989 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6990 unsigned short ret
= WEOF
;
6992 TRACE("(%p)\n", this);
6996 if(basic_istream_wchar_sentry_create(this, TRUE
))
6997 ret
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
6998 basic_istream_wchar_sentry_destroy(this);
7001 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
7006 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
7007 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
7008 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
7009 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
7010 static basic_istream_wchar
* basic_istream_wchar__Read_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7012 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7013 IOSB_iostate state
= IOSTATE_goodbit
;
7015 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
7017 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7018 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7020 this->count
= basic_streambuf_wchar__Sgetn_s(strbuf
, str
, size
, count
);
7021 if(this->count
!= count
)
7022 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
7026 basic_istream_wchar_sentry_destroy(this);
7028 basic_ios_wchar_setstate(base
, state
);
7032 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
7033 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
7034 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
7035 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
7036 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 16)
7037 basic_istream_wchar
* __thiscall
basic_istream_wchar_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7039 return basic_istream_wchar__Read_s(this, str
, count
, count
);
7042 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
7043 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
7044 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
7045 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
7046 static streamsize
basic_istream_wchar__Readsome_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7048 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7049 IOSB_iostate state
= IOSTATE_goodbit
;
7051 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
7055 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7056 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base
));
7061 state
|= IOSTATE_eofbit
;
7063 basic_istream_wchar__Read_s(this, str
, size
, avail
);
7065 state
|= IOSTATE_failbit
;
7067 basic_istream_wchar_sentry_destroy(this);
7069 basic_ios_wchar_setstate(base
, state
);
7073 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
7074 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
7075 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
7076 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
7077 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 16)
7078 streamsize __thiscall
basic_istream_wchar_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7080 return basic_istream_wchar__Readsome_s(this, str
, count
, count
);
7083 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
7084 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
7085 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
7086 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
7087 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback
, 8)
7088 basic_istream_wchar
* __thiscall
basic_istream_wchar_putback(basic_istream_wchar
*this, wchar_t ch
)
7090 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7091 IOSB_iostate state
= IOSTATE_goodbit
;
7093 TRACE("(%p %c)\n", this, ch
);
7097 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7098 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7100 if(!ios_base_good(&base
->base
))
7101 state
|= IOSTATE_failbit
;
7102 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7103 state
|= IOSTATE_badbit
;
7105 basic_istream_wchar_sentry_destroy(this);
7107 basic_ios_wchar_setstate(base
, state
);
7111 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
7112 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
7113 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
7114 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
7115 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget
, 4)
7116 basic_istream_wchar
* __thiscall
basic_istream_wchar_unget(basic_istream_wchar
*this)
7118 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7119 IOSB_iostate state
= IOSTATE_goodbit
;
7121 TRACE("(%p)\n", this);
7125 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7126 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7128 if(!ios_base_good(&base
->base
))
7129 state
|= IOSTATE_failbit
;
7130 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7131 state
|= IOSTATE_badbit
;
7133 basic_istream_wchar_sentry_destroy(this);
7135 basic_ios_wchar_setstate(base
, state
);
7139 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
7140 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
7141 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
7142 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
7143 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync
, 4)
7144 int __thiscall
basic_istream_wchar_sync(basic_istream_wchar
*this)
7146 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7147 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7149 TRACE("(%p)\n", this);
7154 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7155 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7156 basic_istream_wchar_sentry_destroy(this);
7160 basic_istream_wchar_sentry_destroy(this);
7162 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7166 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7167 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7168 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7169 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7170 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg
, 8)
7171 fpos_int
* __thiscall
basic_istream_wchar_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7173 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7175 TRACE("(%p %p)\n", this, ret
);
7177 if(ios_base_fail(&base
->base
)) {
7184 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7185 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7186 if(ret
->off
==-1 && ret
->pos
==0 && ret
->state
==0)
7187 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7192 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
7193 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
7194 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
7195 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
7196 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 16)
7197 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7199 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7201 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
7203 if(!ios_base_fail(&base
->base
)) {
7204 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7207 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7209 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
7210 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7212 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7215 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7220 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7221 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7222 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7223 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7224 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos
, 28)
7225 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7227 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7229 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7231 if(!ios_base_fail(&base
->base
)) {
7232 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7235 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7237 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
7238 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7240 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7243 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7248 static basic_istream_wchar
* basic_istream_read_short(basic_istream_wchar
*this, short *v
, const num_get
*numget
)
7250 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7251 int state
= IOSTATE_goodbit
;
7253 TRACE("(%p %p)\n", this, v
);
7255 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7256 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7257 istreambuf_iterator_wchar first
={0}, last
={0};
7260 first
.strbuf
= strbuf
;
7261 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7263 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7266 state
|= IOSTATE_failbit
;
7268 basic_istream_wchar_sentry_destroy(this);
7270 basic_ios_wchar_setstate(base
, state
);
7274 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
7275 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
7276 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short
, 8)
7277 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_short(basic_istream_wchar
*this, short *v
)
7279 return basic_istream_read_short(this, v
, num_get_wchar_use_facet(
7280 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7283 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
7284 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
7285 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short
, 8)
7286 basic_istream_wchar
* __thiscall
basic_istream_short_read_short(basic_istream_wchar
*this, short *v
)
7288 return basic_istream_read_short(this, v
, num_get_short_use_facet(
7289 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7292 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
7293 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
7294 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort
, 8)
7295 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ushort(basic_istream_wchar
*this, unsigned short *v
)
7297 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7298 int state
= IOSTATE_goodbit
;
7300 TRACE("(%p %p)\n", this, v
);
7302 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7303 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7304 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7305 istreambuf_iterator_wchar first
={0}, last
={0};
7307 first
.strbuf
= strbuf
;
7308 num_get_wchar_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7310 basic_istream_wchar_sentry_destroy(this);
7312 basic_ios_wchar_setstate(base
, state
);
7316 static basic_istream_wchar
* basic_istream_read_int(basic_istream_wchar
*this, int *v
, const num_get
*numget
)
7318 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7319 int state
= IOSTATE_goodbit
;
7321 TRACE("(%p %p)\n", this, v
);
7323 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7324 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7325 istreambuf_iterator_wchar first
={0}, last
={0};
7327 first
.strbuf
= strbuf
;
7328 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7330 basic_istream_wchar_sentry_destroy(this);
7332 basic_ios_wchar_setstate(base
, state
);
7336 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
7337 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
7338 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int
, 8)
7339 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int(basic_istream_wchar
*this, int *v
)
7341 return basic_istream_read_int(this, v
, num_get_wchar_use_facet(
7342 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7345 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
7346 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
7347 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int
, 8)
7348 basic_istream_wchar
* __thiscall
basic_istream_short_read_int(basic_istream_wchar
*this, int *v
)
7350 return basic_istream_read_int(this, v
, num_get_short_use_facet(
7351 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7354 static basic_istream_wchar
* basic_istream_read_uint(basic_istream_wchar
*this, unsigned int *v
, const num_get
*numget
)
7356 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7357 int state
= IOSTATE_goodbit
;
7359 TRACE("(%p %p)\n", this, v
);
7361 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7362 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7363 istreambuf_iterator_wchar first
={0}, last
={0};
7365 first
.strbuf
= strbuf
;
7366 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7368 basic_istream_wchar_sentry_destroy(this);
7370 basic_ios_wchar_setstate(base
, state
);
7374 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
7375 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
7376 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint
, 8)
7377 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7379 return basic_istream_read_uint(this, v
, num_get_wchar_use_facet(
7380 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7383 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
7384 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
7385 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint
, 8)
7386 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7388 return basic_istream_read_uint(this, v
, num_get_short_use_facet(
7389 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7392 static basic_istream_wchar
* basic_istream_read_long(basic_istream_wchar
*this, LONG
*v
, const num_get
*numget
)
7394 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7395 int state
= IOSTATE_goodbit
;
7397 TRACE("(%p %p)\n", this, v
);
7399 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7400 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7401 istreambuf_iterator_wchar first
={0}, last
={0};
7403 first
.strbuf
= strbuf
;
7404 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7406 basic_istream_wchar_sentry_destroy(this);
7408 basic_ios_wchar_setstate(base
, state
);
7412 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7413 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7414 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long
, 8)
7415 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_long(basic_istream_wchar
*this, LONG
*v
)
7417 return basic_istream_read_long(this, v
, num_get_wchar_use_facet(
7418 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7421 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7422 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7423 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long
, 8)
7424 basic_istream_wchar
* __thiscall
basic_istream_short_read_long(basic_istream_wchar
*this, LONG
*v
)
7426 return basic_istream_read_long(this, v
, num_get_short_use_facet(
7427 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7430 static basic_istream_wchar
* basic_istream_read_ulong(basic_istream_wchar
*this, ULONG
*v
, const num_get
*numget
)
7432 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7433 int state
= IOSTATE_goodbit
;
7435 TRACE("(%p %p)\n", this, v
);
7437 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7438 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7439 istreambuf_iterator_wchar first
={0}, last
={0};
7441 first
.strbuf
= strbuf
;
7442 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7444 basic_istream_wchar_sentry_destroy(this);
7446 basic_ios_wchar_setstate(base
, state
);
7450 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
7451 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
7452 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong
, 8)
7453 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7455 return basic_istream_read_ulong(this, v
, num_get_wchar_use_facet(
7456 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7459 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
7460 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
7461 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong
, 8)
7462 basic_istream_wchar
* __thiscall
basic_istream_short_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7464 return basic_istream_read_ulong(this, v
, num_get_short_use_facet(
7465 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7468 static basic_istream_wchar
* basic_istream_read_float(basic_istream_wchar
*this, float *v
, const num_get
*numget
)
7470 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7471 int state
= IOSTATE_goodbit
;
7473 TRACE("(%p %p)\n", this, v
);
7475 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7476 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7477 istreambuf_iterator_wchar first
={0}, last
={0};
7479 first
.strbuf
= strbuf
;
7480 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7482 basic_istream_wchar_sentry_destroy(this);
7484 basic_ios_wchar_setstate(base
, state
);
7488 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
7489 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
7490 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float
, 8)
7491 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_float(basic_istream_wchar
*this, float *v
)
7493 return basic_istream_read_float(this, v
, num_get_wchar_use_facet(
7494 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7497 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
7498 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
7499 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float
, 8)
7500 basic_istream_wchar
* __thiscall
basic_istream_short_read_float(basic_istream_wchar
*this, float *v
)
7502 return basic_istream_read_float(this, v
, num_get_short_use_facet(
7503 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7506 static basic_istream_wchar
* basic_istream_read_double(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
7508 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7509 int state
= IOSTATE_goodbit
;
7511 TRACE("(%p %p)\n", this, v
);
7513 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7514 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7515 istreambuf_iterator_wchar first
={0}, last
={0};
7517 first
.strbuf
= strbuf
;
7518 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7520 basic_istream_wchar_sentry_destroy(this);
7522 basic_ios_wchar_setstate(base
, state
);
7526 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
7527 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
7528 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double
, 8)
7529 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_double(basic_istream_wchar
*this, double *v
)
7531 return basic_istream_read_double(this, v
, num_get_wchar_use_facet(
7532 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7535 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
7536 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
7537 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double
, 8)
7538 basic_istream_wchar
* __thiscall
basic_istream_short_read_double(basic_istream_wchar
*this, double *v
)
7540 return basic_istream_read_double(this, v
, num_get_short_use_facet(
7541 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7544 static basic_istream_wchar
* basic_istream_read_ldouble(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
7546 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7547 int state
= IOSTATE_goodbit
;
7549 TRACE("(%p %p)\n", this, v
);
7551 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7552 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7553 istreambuf_iterator_wchar first
={0}, last
={0};
7555 first
.strbuf
= strbuf
;
7556 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7558 basic_istream_wchar_sentry_destroy(this);
7560 basic_ios_wchar_setstate(base
, state
);
7564 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
7565 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
7566 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble
, 8)
7567 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ldouble(basic_istream_wchar
*this, double *v
)
7569 return basic_istream_read_ldouble(this, v
, num_get_wchar_use_facet(
7570 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7573 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
7574 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
7575 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble
, 8)
7576 basic_istream_wchar
* __thiscall
basic_istream_short_read_ldouble(basic_istream_wchar
*this, double *v
)
7578 return basic_istream_read_ldouble(this, v
, num_get_short_use_facet(
7579 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7582 static basic_istream_wchar
* basic_istream_read_ptr(basic_istream_wchar
*this, void **v
, const num_get
*numget
)
7584 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7585 int state
= IOSTATE_goodbit
;
7587 TRACE("(%p %p)\n", this, v
);
7589 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7590 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7591 istreambuf_iterator_wchar first
={0}, last
={0};
7593 first
.strbuf
= strbuf
;
7594 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7596 basic_istream_wchar_sentry_destroy(this);
7598 basic_ios_wchar_setstate(base
, state
);
7602 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
7603 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7604 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr
, 8)
7605 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ptr(basic_istream_wchar
*this, void **v
)
7607 return basic_istream_read_ptr(this, v
, num_get_wchar_use_facet(
7608 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7611 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
7612 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7613 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr
, 8)
7614 basic_istream_wchar
* __thiscall
basic_istream_short_read_ptr(basic_istream_wchar
*this, void **v
)
7616 return basic_istream_read_ptr(this, v
, num_get_short_use_facet(
7617 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7620 static basic_istream_wchar
* basic_istream_read_int64(basic_istream_wchar
*this, __int64
*v
, const num_get
*numget
)
7622 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7623 int state
= IOSTATE_goodbit
;
7625 TRACE("(%p %p)\n", this, v
);
7627 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7628 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7629 istreambuf_iterator_wchar first
={0}, last
={0};
7631 first
.strbuf
= strbuf
;
7632 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7634 basic_istream_wchar_sentry_destroy(this);
7636 basic_ios_wchar_setstate(base
, state
);
7640 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
7641 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
7642 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64
, 8)
7643 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int64(basic_istream_wchar
*this, __int64
*v
)
7645 return basic_istream_read_int64(this, v
, num_get_wchar_use_facet(
7646 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7649 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
7650 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
7651 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64
, 8)
7652 basic_istream_wchar
* __thiscall
basic_istream_short_read_int64(basic_istream_wchar
*this, __int64
*v
)
7654 return basic_istream_read_int64(this, v
, num_get_short_use_facet(
7655 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7658 static basic_istream_wchar
* basic_istream_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
, const num_get
*numget
)
7660 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7661 int state
= IOSTATE_goodbit
;
7663 TRACE("(%p %p)\n", this, v
);
7665 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7666 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7667 istreambuf_iterator_wchar first
={0}, last
={0};
7669 first
.strbuf
= strbuf
;
7670 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7672 basic_istream_wchar_sentry_destroy(this);
7674 basic_ios_wchar_setstate(base
, state
);
7678 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
7679 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
7680 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64
, 8)
7681 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
7683 return basic_istream_read_uint64(this, v
, num_get_wchar_use_facet(
7684 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7687 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
7688 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
7689 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64
, 8)
7690 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
7692 return basic_istream_read_uint64(this, v
, num_get_short_use_facet(
7693 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7696 static basic_istream_wchar
* basic_istream_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
, const num_get
*numget
)
7698 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7699 int state
= IOSTATE_goodbit
;
7701 TRACE("(%p %p)\n", this, v
);
7703 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7704 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7705 istreambuf_iterator_wchar first
={0}, last
={0};
7707 first
.strbuf
= strbuf
;
7708 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7710 basic_istream_wchar_sentry_destroy(this);
7712 basic_ios_wchar_setstate(base
, state
);
7716 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
7717 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
7718 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool
, 8)
7719 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
7721 return basic_istream_read_bool(this, v
, num_get_wchar_use_facet(
7722 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7725 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
7726 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
7727 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool
, 8)
7728 basic_istream_wchar
* __thiscall
basic_istream_short_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
7730 return basic_istream_read_bool(this, v
, num_get_short_use_facet(
7731 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7734 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7735 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7736 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7737 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7738 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf
, 8)
7739 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_streambuf(
7740 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
7742 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7743 IOSB_iostate state
= IOSTATE_failbit
;
7744 unsigned short c
= '\n';
7746 TRACE("(%p %p)\n", this, streambuf
);
7748 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7749 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
)); c
!=WEOF
;
7750 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
))) {
7751 state
= IOSTATE_goodbit
;
7752 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
7756 basic_istream_wchar_sentry_destroy(this);
7758 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7762 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7763 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7764 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7765 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7766 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func
, 8)
7767 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func(basic_istream_wchar
*this,
7768 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
7770 TRACE("(%p %p)\n", this, pfunc
);
7775 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
7776 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
7777 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
7778 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
7779 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios
, 8)
7780 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_basic_ios(basic_istream_wchar
*this,
7781 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
7783 TRACE("(%p %p)\n", this, pfunc
);
7784 pfunc(basic_istream_wchar_get_basic_ios(this));
7788 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7789 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7790 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7791 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7792 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base
, 8)
7793 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_ios_base(
7794 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7796 TRACE("(%p %p)\n", this, pfunc
);
7797 pfunc(&basic_istream_wchar_get_basic_ios(this)->base
);
7801 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
7803 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
7806 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
7808 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
7811 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7812 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7813 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
7814 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
7816 basic_ios_char
*basic_ios
;
7818 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
7821 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
7822 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
7823 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
7824 basic_ios_char_ctor(basic_ios
);
7826 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
7829 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
7831 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
7832 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
7836 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
7837 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
7838 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
7839 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
7841 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
7843 TRACE("(%p)\n", this);
7844 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
7845 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
7848 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7849 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7850 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
7851 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
7853 TRACE("(%p)\n", this);
7854 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
7855 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
7858 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor
, 8)
7859 basic_iostream_char
* __thiscall
basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
7861 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
7863 TRACE("(%p %x)\n", this, flags
);
7866 /* we have an array, with the number of elements stored before the first object */
7867 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7869 for(i
=*ptr
-1; i
>=0; i
--)
7870 basic_iostream_char_vbase_dtor(this+i
);
7871 MSVCRT_operator_delete(ptr
);
7873 basic_iostream_char_vbase_dtor(this);
7875 MSVCRT_operator_delete(this);
7881 static inline basic_ios_wchar
* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar
*ptr
)
7883 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_wchar_vbtable1
[1]);
7886 static inline basic_iostream_wchar
* basic_iostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
7888 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_wchar_vbtable1
[1]);
7891 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7892 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7893 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor
, 12)
7894 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_ctor(basic_iostream_wchar
*this,
7895 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
7897 basic_ios_wchar
*basic_ios
;
7899 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
7902 this->base1
.vbtable
= basic_iostream_wchar_vbtable1
;
7903 this->base2
.vbtable
= basic_iostream_wchar_vbtable2
;
7904 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
7905 basic_ios_wchar_ctor(basic_ios
);
7907 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
7910 basic_istream_wchar_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
7911 basic_ostream_wchar_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
7913 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_wchar_vtable
;
7917 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7918 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7919 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor
, 12)
7920 basic_iostream_wchar
* __thiscall
basic_iostream_short_ctor(basic_iostream_wchar
*this,
7921 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
7923 basic_iostream_wchar_ctor(this, strbuf
, virt_init
);
7924 basic_istream_wchar_get_basic_ios(&this->base1
)->base
.vtable
= &MSVCP_basic_iostream_short_vtable
;
7928 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7929 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7930 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7931 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7932 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor
, 4)
7933 void __thiscall
basic_iostream_wchar_dtor(basic_ios_wchar
*base
)
7935 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
7937 TRACE("(%p)\n", this);
7938 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2
));
7939 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1
));
7942 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7943 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7944 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7945 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7946 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor
, 4)
7947 void __thiscall
basic_iostream_wchar_vbase_dtor(basic_iostream_wchar
*this)
7949 TRACE("(%p)\n", this);
7950 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
7951 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1
));
7954 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor
, 8)
7955 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7957 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
7959 TRACE("(%p %x)\n", this, flags
);
7962 /* we have an array, with the number of elements stored before the first object */
7963 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7965 for(i
=*ptr
-1; i
>=0; i
--)
7966 basic_iostream_wchar_vbase_dtor(this+i
);
7967 MSVCRT_operator_delete(ptr
);
7969 basic_iostream_wchar_vbase_dtor(this);
7971 MSVCRT_operator_delete(this);
7977 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
7979 ios_base_precision_set(base
, prec
);
7982 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
7983 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
7984 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
7986 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(prec
));
7988 ret
->pfunc
= setprecision_func
;
7993 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
7995 ios_base_width_set(base
, width
);
7998 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
7999 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
8000 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
8002 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(width
));
8004 ret
->pfunc
= setw_func
;
8009 static void __cdecl
resetioflags_func(ios_base
*base
, int mask
)
8011 ios_base_setf_mask(base
, 0, mask
);
8014 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
8015 manip_int
* __cdecl
resetiosflags(manip_int
*ret
, int mask
)
8017 TRACE("(%p %d)\n", ret
, mask
);
8019 ret
->pfunc
= resetioflags_func
;
8024 static void __cdecl
setiosflags_func(ios_base
*base
, int mask
)
8026 ios_base_setf_mask(base
, FMTFLAG_mask
, mask
);
8029 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
8030 manip_int
* __cdecl
setiosflags(manip_int
*ret
, int mask
)
8032 TRACE("(%p %d)\n", ret
, mask
);
8034 ret
->pfunc
= setiosflags_func
;
8039 static void __cdecl
setbase_func(ios_base
*base
, int set_base
)
8042 set_base
= FMTFLAG_dec
;
8043 else if(set_base
== 8)
8044 set_base
= FMTFLAG_oct
;
8045 else if(set_base
== 16)
8046 set_base
= FMTFLAG_hex
;
8050 ios_base_setf_mask(base
, set_base
, FMTFLAG_basefield
);
8053 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
8054 manip_int
* __cdecl
setbase(manip_int
*ret
, int base
)
8056 TRACE("(%p %d)\n", ret
, base
);
8058 ret
->pfunc
= setbase_func
;
8063 static basic_filebuf_char filebuf_char_stdin
;
8064 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
8066 basic_istream_char obj
;
8067 basic_ios_char vbase
;
8069 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
8070 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
8071 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
8073 static basic_filebuf_wchar filebuf_short_stdin
;
8074 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
8076 basic_istream_wchar obj
;
8077 basic_ios_wchar vbase
;
8079 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
8080 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
8081 basic_istream_wchar
*_Ptr_ucin
= &ucin
.obj
;
8083 static basic_filebuf_wchar filebuf_wchar_stdin
;
8084 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
8086 basic_istream_wchar obj
;
8087 basic_ios_wchar vbase
;
8089 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
8090 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
8091 basic_istream_wchar
*_Ptr_wcin
= &wcin
.obj
;
8093 static basic_filebuf_char filebuf_char_stdout
;
8094 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8096 basic_ostream_char obj
;
8097 basic_ios_char vbase
;
8099 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8100 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8101 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
8103 static basic_filebuf_wchar filebuf_short_stdout
;
8104 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8106 basic_ostream_wchar obj
;
8107 basic_ios_wchar vbase
;
8108 } ucout
= { { 0 } };
8109 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8110 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8111 basic_ostream_wchar
*_Ptr_ucout
= &ucout
.obj
;
8113 static basic_filebuf_wchar filebuf_wchar_stdout
;
8114 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8116 basic_ostream_wchar obj
;
8117 basic_ios_wchar vbase
;
8118 } wcout
= { { 0 } };
8119 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8120 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8121 basic_ostream_wchar
*_Ptr_wcout
= &wcout
.obj
;
8123 static basic_filebuf_char filebuf_char_stderr
;
8124 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8126 basic_ostream_char obj
;
8127 basic_ios_char vbase
;
8129 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8130 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8131 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
8133 static basic_filebuf_wchar filebuf_short_stderr
;
8134 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8136 basic_ostream_wchar obj
;
8137 basic_ios_wchar vbase
;
8138 } ucerr
= { { 0 } };
8139 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8140 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8141 basic_ostream_wchar
*_Ptr_ucerr
= &ucerr
.obj
;
8143 static basic_filebuf_wchar filebuf_wchar_stderr
;
8144 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8146 basic_ostream_wchar obj
;
8147 basic_ios_wchar vbase
;
8148 } wcerr
= { { 0 } };
8149 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8150 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8151 basic_ostream_wchar
*_Ptr_wcerr
= &wcerr
.obj
;
8153 static basic_filebuf_char filebuf_char_log
;
8154 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8156 basic_ostream_char obj
;
8157 basic_ios_char vbase
;
8159 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8160 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8161 basic_ostream_char
*_Ptr_clog
= &clog
.obj
;
8163 static basic_filebuf_wchar filebuf_short_log
;
8164 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8166 basic_ostream_wchar obj
;
8167 basic_ios_wchar vbase
;
8168 } uclog
= { { 0 } };
8169 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8170 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8171 basic_ostream_wchar
*_Ptr_uclog
= &uclog
.obj
;
8173 static basic_filebuf_wchar filebuf_wchar_log
;
8174 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8176 basic_ostream_wchar obj
;
8177 basic_ios_wchar vbase
;
8178 } wclog
= { { 0 } };
8179 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8180 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8181 basic_ostream_wchar
*_Ptr_wclog
= &wclog
.obj
;
8183 /* ?_Init_cnt@Init@ios_base@std@@0HA */
8184 int ios_base_Init__Init_cnt
= -1;
8186 /* ?_Init_cnt_func@Init@ios_base@std@@CAAAHXZ */
8187 /* ?_Init_cnt_func@Init@ios_base@std@@CAAEAHXZ */
8188 int* __cdecl
ios_base_Init__Init_cnt_func(void)
8190 return &ios_base_Init__Init_cnt
;
8193 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
8194 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
8195 void __cdecl
ios_base_Init__Init_ctor(void *this)
8197 TRACE("(%p)\n", this);
8199 if(ios_base_Init__Init_cnt
< 0)
8200 ios_base_Init__Init_cnt
= 1;
8202 ios_base_Init__Init_cnt
++;
8205 /* ??0Init@ios_base@std@@QAE@XZ */
8206 /* ??0Init@ios_base@std@@QEAA@XZ */
8207 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor
, 4)
8208 void* __thiscall
ios_base_Init_ctor(void *this)
8210 ios_base_Init__Init_ctor(this);
8214 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
8215 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
8216 void __cdecl
ios_base_Init__Init_dtor(void *this)
8218 TRACE("(%p)\n", this);
8220 ios_base_Init__Init_cnt
--;
8221 if(!ios_base_Init__Init_cnt
) {
8222 basic_ostream_char_flush(&cout
.obj
);
8223 basic_ostream_char_flush(&cerr
.obj
);
8224 basic_ostream_char_flush(&clog
.obj
);
8228 /* ??1Init@ios_base@std@@QAE@XZ */
8229 /* ??1Init@ios_base@std@@QEAA@XZ */
8230 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor
, 4)
8231 void __thiscall
ios_base_Init_dtor(void *this)
8233 ios_base_Init__Init_dtor(this);
8236 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
8237 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
8238 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign
, 8)
8239 void* __thiscall
ios_base_Init_op_assign(void *this, void *rhs
)
8241 TRACE("(%p %p)\n", this, rhs
);
8245 /* ?_Init_cnt@_Winit@std@@0HA */
8246 int _Winit__Init_cnt
= -1;
8248 /* ??0_Winit@std@@QAE@XZ */
8249 /* ??0_Winit@std@@QEAA@XZ */
8250 DEFINE_THISCALL_WRAPPER(_Winit_ctor
, 4)
8251 void* __thiscall
_Winit_ctor(void *this)
8253 TRACE("(%p)\n", this);
8255 if(_Winit__Init_cnt
< 0)
8256 _Winit__Init_cnt
= 1;
8263 /* ??1_Winit@std@@QAE@XZ */
8264 /* ??1_Winit@std@@QAE@XZ */
8265 DEFINE_THISCALL_WRAPPER(_Winit_dtor
, 4)
8266 void __thiscall
_Winit_dtor(void *this)
8268 TRACE("(%p)\n", this);
8271 if(!_Winit__Init_cnt
) {
8272 basic_ostream_wchar_flush(&wcout
.obj
);
8273 basic_ostream_wchar_flush(&wcerr
.obj
);
8274 basic_ostream_wchar_flush(&wclog
.obj
);
8278 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
8279 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
8280 DEFINE_THISCALL_WRAPPER(_Winit_op_assign
, 8)
8281 void* __thiscall
_Winit_op_assign(void *this, void *rhs
)
8283 TRACE("(%p %p)\n", this, rhs
);
8287 void init_io(void *base
)
8290 init_iosb_rtti(base
);
8291 init_ios_base_rtti(base
);
8292 init_basic_ios_char_rtti(base
);
8293 init_basic_ios_wchar_rtti(base
);
8294 init_basic_ios_short_rtti(base
);
8295 init_basic_streambuf_char_rtti(base
);
8296 init_basic_streambuf_wchar_rtti(base
);
8297 init_basic_streambuf_short_rtti(base
);
8298 init_basic_filebuf_char_rtti(base
);
8299 init_basic_filebuf_wchar_rtti(base
);
8300 init_basic_filebuf_short_rtti(base
);
8301 init_basic_ostream_char_rtti(base
);
8302 init_basic_ostream_wchar_rtti(base
);
8303 init_basic_ostream_short_rtti(base
);
8304 init_basic_istream_char_rtti(base
);
8305 init_basic_istream_wchar_rtti(base
);
8306 init_basic_istream_short_rtti(base
);
8307 init_basic_iostream_char_rtti(base
);
8308 init_basic_iostream_wchar_rtti(base
);
8309 init_basic_iostream_short_rtti(base
);
8312 basic_filebuf_char_ctor_file(&filebuf_char_stdin
, stdin
);
8313 basic_istream_char_ctor(&cin
.obj
, &filebuf_char_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8315 basic_filebuf_short_ctor_file(&filebuf_short_stdin
, stdin
);
8316 basic_istream_short_ctor(&ucin
.obj
, &filebuf_short_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8318 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin
, stdin
);
8319 basic_istream_wchar_ctor(&wcin
.obj
, &filebuf_wchar_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8321 basic_filebuf_char_ctor_file(&filebuf_char_stdout
, stdout
);
8322 basic_ostream_char_ctor(&cout
.obj
, &filebuf_char_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8324 basic_filebuf_short_ctor_file(&filebuf_short_stdout
, stdout
);
8325 basic_ostream_short_ctor(&ucout
.obj
, &filebuf_short_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8327 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout
, stdout
);
8328 basic_ostream_wchar_ctor(&wcout
.obj
, &filebuf_wchar_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8330 basic_filebuf_char_ctor_file(&filebuf_char_stderr
, stderr
);
8331 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_char_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8333 basic_filebuf_short_ctor_file(&filebuf_short_stderr
, stderr
);
8334 basic_ostream_short_ctor(&ucerr
.obj
, &filebuf_short_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8336 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr
, stderr
);
8337 basic_ostream_wchar_ctor(&wcerr
.obj
, &filebuf_wchar_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8339 basic_filebuf_char_ctor_file(&filebuf_char_log
, stderr
);
8340 basic_ostream_char_ctor(&clog
.obj
, &filebuf_char_log
.base
, FALSE
/*FIXME*/, TRUE
);
8342 basic_filebuf_short_ctor_file(&filebuf_short_log
, stderr
);
8343 basic_ostream_short_ctor(&uclog
.obj
, &filebuf_short_log
.base
, FALSE
/*FIXME*/, TRUE
);
8345 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log
, stderr
);
8346 basic_ostream_wchar_ctor(&wclog
.obj
, &filebuf_wchar_log
.base
, FALSE
/*FIXME*/, TRUE
);
8351 basic_istream_char_vbase_dtor(&cin
.obj
);
8352 basic_filebuf_char_dtor(&filebuf_char_stdin
);
8354 basic_istream_wchar_vbase_dtor(&ucin
.obj
);
8355 basic_filebuf_wchar_dtor(&filebuf_short_stdin
);
8357 basic_istream_wchar_vbase_dtor(&wcin
.obj
);
8358 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin
);
8360 basic_ostream_char_vbase_dtor(&cout
.obj
);
8361 basic_filebuf_char_dtor(&filebuf_char_stdout
);
8363 basic_ostream_wchar_vbase_dtor(&ucout
.obj
);
8364 basic_filebuf_wchar_dtor(&filebuf_short_stdout
);
8366 basic_ostream_wchar_vbase_dtor(&wcout
.obj
);
8367 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout
);
8369 basic_ostream_char_vbase_dtor(&cerr
.obj
);
8370 basic_filebuf_char_dtor(&filebuf_char_stderr
);
8372 basic_ostream_wchar_vbase_dtor(&ucerr
.obj
);
8373 basic_filebuf_wchar_dtor(&filebuf_short_stderr
);
8375 basic_ostream_wchar_vbase_dtor(&wcerr
.obj
);
8376 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr
);
8378 basic_ostream_char_vbase_dtor(&clog
.obj
);
8379 basic_filebuf_char_dtor(&filebuf_char_log
);
8381 basic_ostream_wchar_vbase_dtor(&uclog
.obj
);
8382 basic_filebuf_wchar_dtor(&filebuf_short_log
);
8384 basic_ostream_wchar_vbase_dtor(&wclog
.obj
);
8385 basic_filebuf_wchar_dtor(&filebuf_wchar_log
);