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
;
2223 TRACE("(%p)\n", this);
2225 if(!basic_filebuf_char_is_open(this))
2228 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2229 return (unsigned char)*basic_streambuf_char__Gninc(&this->base
);
2231 c
= fgetc(this->file
);
2232 if(!this->cvt
|| c
==EOF
)
2236 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
2239 switch(codecvt_char_in(this->cvt
, &this->state
, buf_next
,
2240 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2241 case CODECVT_partial
:
2243 if(to_next
== &ch
) {
2244 c
= fgetc(this->file
);
2250 for(i
--; i
>=buf_next
-buf
; i
--)
2251 ungetc(buf
[i
], this->file
);
2253 case CODECVT_noconv
:
2254 return (unsigned char)buf
[0];
2260 FIXME("buffer is too small\n");
2264 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2265 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2266 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow
, 4)
2267 int __thiscall
basic_filebuf_char_underflow(basic_filebuf_char
*this)
2271 TRACE("(%p)\n", this);
2273 if(basic_streambuf_char_gptr(&this->base
) < basic_streambuf_char_egptr(&this->base
))
2274 return (unsigned char)*basic_streambuf_char_gptr(&this->base
);
2276 ret
= call_basic_streambuf_char_uflow(&this->base
);
2278 ret
= call_basic_streambuf_char_pbackfail(&this->base
, ret
);
2282 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2283 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2284 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff
, 24)
2285 fpos_int
* __thiscall
basic_filebuf_char_seekoff(basic_filebuf_char
*this,
2286 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2290 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
2292 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2293 || fseek(this->file
, off
, way
)) {
2300 fgetpos(this->file
, &pos
);
2303 ret
->state
= this->state
;
2307 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2308 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2309 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos
, 36)
2310 fpos_int
* __thiscall
basic_filebuf_char_seekpos(basic_filebuf_char
*this,
2311 fpos_int
*ret
, fpos_int pos
, int mode
)
2315 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2317 if(!basic_filebuf_char_is_open(this) || !basic_filebuf_char__Endwrite(this)
2318 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2319 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2326 fgetpos(this->file
, &fpos
);
2329 ret
->state
= this->state
;
2333 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2334 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2335 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf
, 16)
2336 basic_streambuf_char
* __thiscall
basic_filebuf_char_setbuf(basic_filebuf_char
*this, char *buf
, streamsize count
)
2338 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2340 if(!basic_filebuf_char_is_open(this))
2343 if(setvbuf(this->file
, buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
))
2346 basic_filebuf_char__Init(this, this->file
, INITFL_open
);
2350 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2351 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2352 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync
, 4)
2353 int __thiscall
basic_filebuf_char_sync(basic_filebuf_char
*this)
2355 TRACE("(%p)\n", this);
2357 if(!basic_filebuf_char_is_open(this))
2360 if(call_basic_streambuf_char_overflow(&this->base
, EOF
) == EOF
)
2362 return fflush(this->file
);
2365 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
2366 /* ?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
2367 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_imbue
, 8)
2368 void __thiscall
basic_filebuf_char_imbue(basic_filebuf_char
*this, const locale
*loc
)
2370 TRACE("(%p %p)\n", this, loc
);
2371 basic_filebuf_char__Initcvt(this, codecvt_char_use_facet(loc
));
2374 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2375 /* ?_Stinit@?1??_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2376 static int basic_filebuf_wchar__Init__Stinit
= 0;
2378 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2379 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2380 static int basic_filebuf_short__Init__Stinit
= 0;
2382 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2383 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2384 static void basic_filebuf_wchar__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2386 TRACE("(%p %p %d)\n", this, file
, which
);
2389 this->wrotesome
= FALSE
;
2390 this->state
= basic_filebuf_wchar__Init__Stinit
;
2391 this->close
= (which
== INITFL_open
);
2394 basic_streambuf_wchar__Init_empty(&this->base
);
2397 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2398 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2399 static void basic_filebuf_short__Init(basic_filebuf_wchar
*this, FILE *file
, basic_filebuf__Initfl which
)
2401 TRACE("(%p %p %d)\n", this, file
, which
);
2404 this->wrotesome
= FALSE
;
2405 this->state
= basic_filebuf_short__Init__Stinit
;
2406 this->close
= (which
== INITFL_open
);
2409 basic_streambuf_wchar__Init_empty(&this->base
);
2412 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$codecvt@_WDH@2@@Z */
2413 /* ?_Initcvt@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$codecvt@_WDH@2@@Z */
2414 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z */
2415 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$codecvt@GDH@2@@Z */
2416 static void basic_filebuf_wchar__Initcvt(basic_filebuf_wchar
*this, codecvt_wchar
*cvt
)
2418 TRACE("(%p %p)\n", this, cvt
);
2420 if(codecvt_base_always_noconv(&cvt
->base
)) {
2423 basic_streambuf_wchar__Init_empty(&this->base
);
2428 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAE_NXZ */
2429 /* ?_Endwrite@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAA_NXZ */
2430 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAE_NXZ */
2431 /* ?_Endwrite@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAA_NXZ */
2432 static MSVCP_bool
basic_filebuf_wchar__Endwrite(basic_filebuf_wchar
*this)
2434 TRACE("(%p)\n", this);
2436 if(!this->wrotesome
|| !this->cvt
)
2439 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2443 /* TODO: check if we need a dynamic buffer here */
2448 ret
= codecvt_wchar_unshift(this->cvt
, &this->state
, buf
, buf
+sizeof(buf
), &next
);
2451 this->wrotesome
= FALSE
;
2453 case CODECVT_partial
:
2454 if(!fwrite(buf
, next
-buf
, 1, this->file
))
2459 case CODECVT_noconv
:
2460 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2469 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2470 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2471 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2472 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2473 static basic_filebuf_wchar
* basic_filebuf_wchar_close(basic_filebuf_wchar
*this)
2475 basic_filebuf_wchar
*ret
= this;
2477 TRACE("(%p)\n", this);
2482 /* TODO: handle exceptions */
2483 if(!basic_filebuf_wchar__Endwrite(this))
2485 if(fclose(this->file
))
2488 basic_filebuf_wchar__Init(this, NULL
, INITFL_close
);
2492 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2493 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2494 static basic_filebuf_wchar
* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2496 TRACE("(%p %p)\n", this, file
);
2498 basic_streambuf_wchar_ctor(&this->base
);
2499 this->base
.vtable
= &MSVCP_basic_filebuf_wchar_vtable
;
2501 basic_filebuf_wchar__Init(this, file
, INITFL_new
);
2505 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2506 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2507 static basic_filebuf_wchar
* basic_filebuf_short_ctor_file(basic_filebuf_wchar
*this, FILE *file
)
2509 TRACE("(%p %p)\n", this, file
);
2511 basic_streambuf_short_ctor(&this->base
);
2512 this->base
.vtable
= &MSVCP_basic_filebuf_short_vtable
;
2514 basic_filebuf_short__Init(this, file
, INITFL_new
);
2518 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2519 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2520 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2521 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2522 static void basic_filebuf_wchar_dtor(basic_filebuf_wchar
*this)
2524 TRACE("(%p)\n", this);
2527 basic_filebuf_wchar_close(this);
2528 basic_streambuf_wchar_dtor(&this->base
);
2531 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor
, 8)
2532 basic_filebuf_wchar
* __thiscall
basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar
*this, unsigned int flags
)
2534 TRACE("(%p %x)\n", this, flags
);
2536 /* we have an array, with the number of elements stored before the first object */
2537 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2539 for(i
=*ptr
-1; i
>=0; i
--)
2540 basic_filebuf_wchar_dtor(this+i
);
2541 MSVCRT_operator_delete(ptr
);
2543 basic_filebuf_wchar_dtor(this);
2545 MSVCRT_operator_delete(this);
2551 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
2552 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
2553 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2554 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2555 static MSVCP_bool
basic_filebuf_wchar_is_open(const basic_filebuf_wchar
*this)
2557 TRACE("(%p)\n", this);
2558 return this->file
!= NULL
;
2561 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2562 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2563 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2564 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2565 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow
, 8)
2566 unsigned short __thiscall
basic_filebuf_wchar_overflow(basic_filebuf_wchar
*this, unsigned short c
)
2568 char buf
[8], *dyn_buf
, *to_next
;
2570 const wchar_t *from_next
;
2575 TRACE("(%p %d)\n", this, c
);
2577 if(!basic_filebuf_wchar_is_open(this))
2583 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2587 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2588 &from_next
, buf
, buf
+sizeof(buf
), &to_next
);
2591 case CODECVT_partial
:
2596 if(!fwrite(buf
, to_next
-buf
, 1, this->file
))
2598 if(ret
== CODECVT_partial
)
2601 case CODECVT_noconv
:
2602 return fwrite(&ch
, sizeof(wchar_t), 1, this->file
) ? c
: WEOF
;
2610 max_size
= codecvt_base_max_length(&this->cvt
->base
);
2611 dyn_buf
= malloc(max_size
);
2615 ret
= codecvt_wchar_out(this->cvt
, &this->state
, from_next
, &ch
+1,
2616 &from_next
, dyn_buf
, dyn_buf
+max_size
, &to_next
);
2620 ret
= fwrite(dyn_buf
, to_next
-dyn_buf
, 1, this->file
);
2622 return ret
? c
: WEOF
;
2623 case CODECVT_partial
:
2624 ERR("buffer should be big enough to store all output\n");
2632 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
2633 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
2634 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
2635 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
2636 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail
, 8)
2637 unsigned short __thiscall
basic_filebuf_wchar_pbackfail(basic_filebuf_wchar
*this, unsigned short c
)
2639 TRACE("(%p %d)\n", this, c
);
2641 if(!basic_filebuf_wchar_is_open(this))
2644 if(basic_streambuf_wchar_gptr(&this->base
)>basic_streambuf_wchar_eback(&this->base
)
2645 && (c
==WEOF
|| basic_streambuf_wchar_gptr(&this->base
)[-1]==c
)) {
2646 basic_streambuf_wchar__Gndec(&this->base
);
2647 return c
==WEOF
? !c
: c
;
2648 }else if(c
!=WEOF
&& !this->cvt
) {
2649 return ungetwc(c
, this->file
);
2650 }else if(c
!=WEOF
&& basic_streambuf_wchar_gptr(&this->base
)!=&this->putback
) {
2652 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
, &this->putback
+1);
2659 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2660 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2661 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2662 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2663 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow
, 4)
2664 unsigned short __thiscall
basic_filebuf_wchar_uflow(basic_filebuf_wchar
*this)
2666 wchar_t ch
, *to_next
;
2668 const char *buf_next
;
2671 TRACE("(%p)\n", this);
2673 if(!basic_filebuf_wchar_is_open(this))
2676 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2677 return *basic_streambuf_wchar__Gninc(&this->base
);
2680 return fgetwc(this->file
);
2683 for(i
=0; i
< sizeof(buf
)/sizeof(buf
[0]); i
++) {
2684 if((c
= fgetc(this->file
)) == EOF
)
2688 switch(codecvt_wchar_in(this->cvt
, &this->state
, buf_next
,
2689 buf
+i
+1, &buf_next
, &ch
, &ch
+1, &to_next
)) {
2690 case CODECVT_partial
:
2695 for(i
--; i
>=buf_next
-buf
; i
--)
2696 ungetc(buf
[i
], this->file
);
2698 case CODECVT_noconv
:
2699 if(i
+1 < sizeof(wchar_t))
2702 memcpy(&ch
, buf
, sizeof(wchar_t));
2709 FIXME("buffer is too small\n");
2713 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
2714 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
2715 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
2716 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
2717 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow
, 4)
2718 unsigned short __thiscall
basic_filebuf_wchar_underflow(basic_filebuf_wchar
*this)
2722 TRACE("(%p)\n", this);
2724 if(basic_streambuf_wchar_gptr(&this->base
) < basic_streambuf_wchar_egptr(&this->base
))
2725 return *basic_streambuf_wchar_gptr(&this->base
);
2727 ret
= call_basic_streambuf_wchar_uflow(&this->base
);
2729 ret
= call_basic_streambuf_wchar_pbackfail(&this->base
, ret
);
2733 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2734 /* ?seekoff@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2735 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z */
2736 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JHH@Z */
2737 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff
, 24)
2738 fpos_int
* __thiscall
basic_filebuf_wchar_seekoff(basic_filebuf_wchar
*this,
2739 fpos_int
*ret
, streamoff off
, int way
, int mode
)
2743 TRACE("(%p %p %s %d %d)\n", this, ret
, wine_dbgstr_longlong(off
), way
, mode
);
2745 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
) {
2746 if(way
== SEEKDIR_cur
)
2747 off
-= sizeof(wchar_t);
2749 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
2752 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
2753 || fseek(this->file
, off
, way
)) {
2760 fgetpos(this->file
, &pos
);
2763 ret
->state
= this->state
;
2767 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2768 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2769 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2770 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2771 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos
, 36)
2772 fpos_int
* __thiscall
basic_filebuf_wchar_seekpos(basic_filebuf_wchar
*this,
2773 fpos_int
*ret
, fpos_int pos
, int mode
)
2777 TRACE("(%p %p %s %d)\n", this, ret
, debugstr_fpos_int(&pos
), mode
);
2779 if(!basic_filebuf_wchar_is_open(this) || !basic_filebuf_wchar__Endwrite(this)
2780 || fseek(this->file
, (LONG
)pos
.pos
, SEEK_SET
)
2781 || (pos
.off
&& fseek(this->file
, pos
.off
, SEEK_CUR
))) {
2788 if(basic_streambuf_wchar_gptr(&this->base
) == &this->putback
)
2789 basic_streambuf_wchar_setg(&this->base
, &this->putback
, &this->putback
+1, &this->putback
+1);
2791 fgetpos(this->file
, &fpos
);
2794 ret
->state
= this->state
;
2798 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
2799 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
2800 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf
, 16)
2801 basic_streambuf_wchar
* __thiscall
basic_filebuf_wchar_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2803 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2805 if(!basic_filebuf_wchar_is_open(this))
2808 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2811 basic_filebuf_wchar__Init(this, this->file
, INITFL_open
);
2815 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
2816 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
2817 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf
, 16)
2818 basic_streambuf_wchar
* __thiscall
basic_filebuf_short_setbuf(basic_filebuf_wchar
*this, wchar_t *buf
, streamsize count
)
2820 TRACE("(%p %p %s)\n", this, buf
, wine_dbgstr_longlong(count
));
2822 if(!basic_filebuf_wchar_is_open(this))
2825 if(setvbuf(this->file
, (char*)buf
, (buf
==NULL
&& count
==0) ? _IONBF
: _IOFBF
, count
*sizeof(wchar_t)))
2828 basic_filebuf_short__Init(this, this->file
, INITFL_open
);
2832 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2833 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2834 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2835 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2836 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync
, 4)
2837 int __thiscall
basic_filebuf_wchar_sync(basic_filebuf_wchar
*this)
2839 TRACE("(%p)\n", this);
2841 if(!basic_filebuf_wchar_is_open(this))
2844 if(call_basic_streambuf_wchar_overflow(&this->base
, WEOF
) == WEOF
)
2846 return fflush(this->file
);
2849 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
2850 /* ?imbue@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
2851 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_imbue
, 8)
2852 void __thiscall
basic_filebuf_wchar_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
2854 TRACE("(%p %p)\n", this, loc
);
2855 basic_filebuf_wchar__Initcvt(this, codecvt_wchar_use_facet(loc
));
2858 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
2859 /* ?imbue@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
2860 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_imbue
, 8)
2861 void __thiscall
basic_filebuf_short_imbue(basic_filebuf_wchar
*this, const locale
*loc
)
2863 TRACE("(%p %p)\n", this, loc
);
2864 basic_filebuf_wchar__Initcvt(this, codecvt_short_use_facet(loc
));
2867 /* ??0ios_base@std@@IAE@XZ */
2868 /* ??0ios_base@std@@IEAA@XZ */
2869 DEFINE_THISCALL_WRAPPER(ios_base_ctor
, 4)
2870 ios_base
* __thiscall
ios_base_ctor(ios_base
*this)
2872 TRACE("(%p)\n", this);
2873 this->vtable
= &MSVCP_ios_base_vtable
;
2877 /* ??0ios_base@std@@QAE@ABV01@@Z */
2878 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
2879 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor
, 8)
2880 ios_base
* __thiscall
ios_base_copy_ctor(ios_base
*this, const ios_base
*copy
)
2882 TRACE("(%p %p)\n", this, copy
);
2884 this->vtable
= &MSVCP_ios_base_vtable
;
2888 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
2889 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
2890 DEFINE_THISCALL_WRAPPER(ios_base_Callfns
, 8)
2891 void __thiscall
ios_base_Callfns(ios_base
*this, IOS_BASE_event event
)
2893 IOS_BASE_fnarray
*cur
;
2895 TRACE("(%p %x)\n", this, event
);
2897 for(cur
=this->calls
; cur
; cur
=cur
->next
)
2898 cur
->event_handler(event
, this, cur
->index
);
2901 /* ?_Tidy@ios_base@std@@AAAXXZ */
2902 /* ?_Tidy@ios_base@std@@AEAAXXZ */
2903 void CDECL
ios_base_Tidy(ios_base
*this)
2905 IOS_BASE_iosarray
*arr_cur
, *arr_next
;
2906 IOS_BASE_fnarray
*event_cur
, *event_next
;
2908 TRACE("(%p)\n", this);
2910 ios_base_Callfns(this, EVENT_erase_event
);
2912 for(arr_cur
=this->arr
; arr_cur
; arr_cur
=arr_next
) {
2913 arr_next
= arr_cur
->next
;
2914 MSVCRT_operator_delete(arr_cur
);
2918 for(event_cur
=this->calls
; event_cur
; event_cur
=event_next
) {
2919 event_next
= event_cur
->next
;
2920 MSVCRT_operator_delete(event_cur
);
2925 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
2926 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
2927 void CDECL
ios_base_Ios_base_dtor(ios_base
*obj
)
2929 TRACE("(%p)\n", obj
);
2931 locale_dtor(obj
->loc
);
2932 MSVCRT_operator_delete(obj
->loc
);
2937 /* ??1ios_base@std@@UAE@XZ */
2938 /* ??1ios_base@std@@UEAA@XZ */
2939 DEFINE_THISCALL_WRAPPER(ios_base_dtor
, 4)
2940 void __thiscall
ios_base_dtor(ios_base
*this)
2942 ios_base_Ios_base_dtor(this);
2945 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor
, 8)
2946 ios_base
* __thiscall
ios_base_vector_dtor(ios_base
*this, unsigned int flags
)
2948 TRACE("(%p %x)\n", this, flags
);
2950 /* we have an array, with the number of elements stored before the first object */
2951 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2953 for(i
=*ptr
-1; i
>=0; i
--)
2954 ios_base_dtor(this+i
);
2955 MSVCRT_operator_delete(ptr
);
2957 ios_base_dtor(this);
2959 MSVCRT_operator_delete(this);
2965 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor
, 8)
2966 void* __thiscall
iosb_vector_dtor(void *this, unsigned int flags
)
2968 TRACE("(%p %x)\n", this, flags
);
2970 INT_PTR
*ptr
= (INT_PTR
*)this-1;
2971 MSVCRT_operator_delete(ptr
);
2974 MSVCRT_operator_delete(this);
2980 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
2981 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
2982 DEFINE_THISCALL_WRAPPER(ios_base_Findarr
, 8)
2983 IOS_BASE_iosarray
* __thiscall
ios_base_Findarr(ios_base
*this, int index
)
2985 IOS_BASE_iosarray
*p
;
2987 TRACE("(%p %d)\n", this, index
);
2989 for(p
=this->arr
; p
; p
=p
->next
) {
2990 if(p
->index
== index
)
2994 for(p
=this->arr
; p
; p
=p
->next
) {
2995 if(!p
->long_val
&& !p
->ptr_val
) {
3001 p
= MSVCRT_operator_new(sizeof(IOS_BASE_iosarray
));
3002 p
->next
= this->arr
;
3010 /* ?iword@ios_base@std@@QAEAAJH@Z */
3011 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
3012 DEFINE_THISCALL_WRAPPER(ios_base_iword
, 8)
3013 LONG
* __thiscall
ios_base_iword(ios_base
*this, int index
)
3015 TRACE("(%p %d)\n", this, index
);
3016 return &ios_base_Findarr(this, index
)->long_val
;
3019 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
3020 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
3021 DEFINE_THISCALL_WRAPPER(ios_base_pword
, 8)
3022 void** __thiscall
ios_base_pword(ios_base
*this, int index
)
3024 TRACE("(%p %d)\n", this, index
);
3025 return &ios_base_Findarr(this, index
)->ptr_val
;
3028 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
3029 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
3030 DEFINE_THISCALL_WRAPPER(ios_base_register_callback
, 12)
3031 void __thiscall
ios_base_register_callback(ios_base
*this, IOS_BASE_event_callback callback
, int index
)
3033 IOS_BASE_fnarray
*event
;
3035 TRACE("(%p %p %d)\n", this, callback
, index
);
3037 event
= MSVCRT_operator_new(sizeof(IOS_BASE_fnarray
));
3038 event
->next
= this->calls
;
3039 event
->index
= index
;
3040 event
->event_handler
= callback
;
3041 this->calls
= event
;
3044 /* ?clear@ios_base@std@@QAEXH_N@Z */
3045 /* ?clear@ios_base@std@@QEAAXH_N@Z */
3046 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise
, 12)
3047 void __thiscall
ios_base_clear_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3049 TRACE("(%p %x %x)\n", this, state
, reraise
);
3051 this->state
= state
& IOSTATE_mask
;
3052 if(!(this->state
& this->except
))
3056 throw_exception(EXCEPTION_RERAISE
, NULL
);
3057 else if(this->state
& this->except
& IOSTATE_eofbit
)
3058 throw_exception(EXCEPTION_FAILURE
, "eofbit is set");
3059 else if(this->state
& this->except
& IOSTATE_failbit
)
3060 throw_exception(EXCEPTION_FAILURE
, "failbit is set");
3061 else if(this->state
& this->except
& IOSTATE_badbit
)
3062 throw_exception(EXCEPTION_FAILURE
, "badbit is set");
3063 else if(this->state
& this->except
& IOSTATE__Hardfail
)
3064 throw_exception(EXCEPTION_FAILURE
, "_Hardfail is set");
3067 /* ?clear@ios_base@std@@QAEXH@Z */
3068 /* ?clear@ios_base@std@@QEAAXH@Z */
3069 DEFINE_THISCALL_WRAPPER(ios_base_clear
, 8)
3070 void __thiscall
ios_base_clear(ios_base
*this, IOSB_iostate state
)
3072 ios_base_clear_reraise(this, state
, FALSE
);
3075 /* ?clear@ios_base@std@@QAEXI@Z */
3076 /* ?clear@ios_base@std@@QEAAXI@Z */
3077 DEFINE_THISCALL_WRAPPER(ios_base_clear_unsigned
, 8)
3078 void __thiscall
ios_base_clear_unsigned(ios_base
*this, unsigned int state
)
3080 ios_base_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3083 /* ?exceptions@ios_base@std@@QAEXH@Z */
3084 /* ?exceptions@ios_base@std@@QEAAXH@Z */
3085 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set
, 8)
3086 void __thiscall
ios_base_exceptions_set(ios_base
*this, IOSB_iostate state
)
3088 TRACE("(%p %x)\n", this, state
);
3089 this->except
= state
& IOSTATE_mask
;
3090 ios_base_clear(this, this->state
);
3093 /* ?exceptions@ios_base@std@@QAEXI@Z */
3094 /* ?exceptions@ios_base@std@@QEAAXI@Z */
3095 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set_unsigned
, 8)
3096 void __thiscall
ios_base_exceptions_set_unsigned(ios_base
*this, unsigned int state
)
3098 TRACE("(%p %x)\n", this, state
);
3099 ios_base_exceptions_set(this, state
);
3102 /* ?exceptions@ios_base@std@@QBEHXZ */
3103 /* ?exceptions@ios_base@std@@QEBAHXZ */
3104 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get
, 4)
3105 IOSB_iostate __thiscall
ios_base_exceptions_get(ios_base
*this)
3107 TRACE("(%p)\n", this);
3108 return this->except
;
3111 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
3112 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
3113 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt
, 8)
3114 ios_base
* __thiscall
ios_base_copyfmt(ios_base
*this, const ios_base
*rhs
)
3116 TRACE("(%p %p)\n", this, rhs
);
3119 IOS_BASE_iosarray
*arr_cur
;
3120 IOS_BASE_fnarray
*event_cur
;
3122 ios_base_Tidy(this);
3124 for(arr_cur
=rhs
->arr
; arr_cur
; arr_cur
=arr_cur
->next
) {
3125 if(arr_cur
->long_val
)
3126 *ios_base_iword(this, arr_cur
->index
) = arr_cur
->long_val
;
3127 if(arr_cur
->ptr_val
)
3128 *ios_base_pword(this, arr_cur
->index
) = arr_cur
->ptr_val
;
3130 this->stdstr
= rhs
->stdstr
;
3131 this->fmtfl
= rhs
->fmtfl
;
3132 this->prec
= rhs
->prec
;
3133 this->wide
= rhs
->wide
;
3134 locale_operator_assign(this->loc
, rhs
->loc
);
3136 for(event_cur
=rhs
->calls
; event_cur
; event_cur
=event_cur
->next
)
3137 ios_base_register_callback(this, event_cur
->event_handler
, event_cur
->index
);
3139 ios_base_Callfns(this, EVENT_copyfmt_event
);
3140 ios_base_exceptions_set(this, rhs
->except
);
3146 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
3147 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
3148 DEFINE_THISCALL_WRAPPER(ios_base_assign
, 8)
3149 ios_base
* __thiscall
ios_base_assign(ios_base
*this, const ios_base
*right
)
3151 TRACE("(%p %p)\n", this, right
);
3154 this->state
= right
->state
;
3155 ios_base_copyfmt(this, right
);
3161 /* ?fail@ios_base@std@@QBE_NXZ */
3162 /* ?fail@ios_base@std@@QEBA_NXZ */
3163 DEFINE_THISCALL_WRAPPER(ios_base_fail
, 4)
3164 MSVCP_bool __thiscall
ios_base_fail(const ios_base
*this)
3166 TRACE("(%p)\n", this);
3167 return (this->state
& (IOSTATE_failbit
|IOSTATE_badbit
)) != 0;
3170 /* ??7ios_base@std@@QBE_NXZ */
3171 /* ??7ios_base@std@@QEBA_NXZ */
3172 DEFINE_THISCALL_WRAPPER(ios_base_op_succ
, 4)
3173 MSVCP_bool __thiscall
ios_base_op_succ(const ios_base
*this)
3175 TRACE("(%p)\n", this);
3176 return ios_base_fail(this);
3179 /* ??Bios_base@std@@QBEPAXXZ */
3180 /* ??Bios_base@std@@QEBAPEAXXZ */
3181 DEFINE_THISCALL_WRAPPER(ios_base_op_fail
, 4)
3182 void* __thiscall
ios_base_op_fail(const ios_base
*this)
3184 TRACE("(%p)\n", this);
3185 return ios_base_fail(this) ? NULL
: (void*)this;
3188 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
3189 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
3190 void CDECL
ios_base_Addstd(ios_base
*add
)
3192 FIXME("(%p) stub\n", add
);
3195 /* ?_Init@ios_base@std@@IAEXXZ */
3196 /* ?_Init@ios_base@std@@IEAAXXZ */
3197 DEFINE_THISCALL_WRAPPER(ios_base__Init
, 4)
3198 void __thiscall
ios_base__Init(ios_base
*this)
3200 TRACE("(%p)\n", this);
3203 this->state
= this->except
= IOSTATE_goodbit
;
3204 this->fmtfl
= FMTFLAG_skipws
| FMTFLAG_dec
;
3209 this->loc
= MSVCRT_operator_new(sizeof(locale
));
3210 locale_ctor(this->loc
);
3213 /* ?bad@ios_base@std@@QBE_NXZ */
3214 /* ?bad@ios_base@std@@QEBA_NXZ */
3215 DEFINE_THISCALL_WRAPPER(ios_base_bad
, 4)
3216 MSVCP_bool __thiscall
ios_base_bad(const ios_base
*this)
3218 TRACE("(%p)\n", this);
3219 return (this->state
& IOSTATE_badbit
) != 0;
3222 /* ?eof@ios_base@std@@QBE_NXZ */
3223 /* ?eof@ios_base@std@@QEBA_NXZ */
3224 DEFINE_THISCALL_WRAPPER(ios_base_eof
, 4)
3225 MSVCP_bool __thiscall
ios_base_eof(const ios_base
*this)
3227 TRACE("(%p)\n", this);
3228 return (this->state
& IOSTATE_eofbit
) != 0;
3231 /* ?flags@ios_base@std@@QAEHH@Z */
3232 /* ?flags@ios_base@std@@QEAAHH@Z */
3233 DEFINE_THISCALL_WRAPPER(ios_base_flags_set
, 8)
3234 IOSB_fmtflags __thiscall
ios_base_flags_set(ios_base
*this, IOSB_fmtflags flags
)
3236 IOSB_fmtflags ret
= this->fmtfl
;
3238 TRACE("(%p %x)\n", this, flags
);
3240 this->fmtfl
= flags
& FMTFLAG_mask
;
3244 /* ?flags@ios_base@std@@QBEHXZ */
3245 /* ?flags@ios_base@std@@QEBAHXZ */
3246 DEFINE_THISCALL_WRAPPER(ios_base_flags_get
, 4)
3247 IOSB_fmtflags __thiscall
ios_base_flags_get(const ios_base
*this)
3249 TRACE("(%p)\n", this);
3253 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
3254 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
3255 DEFINE_THISCALL_WRAPPER(ios_base_getloc
, 8)
3256 locale
* __thiscall
ios_base_getloc(const ios_base
*this, locale
*ret
)
3258 TRACE("(%p)\n", this);
3259 return locale_copy_ctor(ret
, this->loc
);
3262 /* ?good@ios_base@std@@QBE_NXZ */
3263 /* ?good@ios_base@std@@QEBA_NXZ */
3264 DEFINE_THISCALL_WRAPPER(ios_base_good
, 4)
3265 MSVCP_bool __thiscall
ios_base_good(const ios_base
*this)
3267 TRACE("(%p)\n", this);
3268 return this->state
== IOSTATE_goodbit
;
3271 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
3272 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
3273 DEFINE_THISCALL_WRAPPER(ios_base_imbue
, 12)
3274 locale
* __thiscall
ios_base_imbue(ios_base
*this, locale
*ret
, const locale
*loc
)
3276 TRACE("(%p %p)\n", this, loc
);
3278 locale_copy_ctor(this->loc
, loc
);
3282 /* ?precision@ios_base@std@@QAEHH@Z */
3283 /* ?precision@ios_base@std@@QEAA_J_J@Z */
3284 DEFINE_THISCALL_WRAPPER(ios_base_precision_set
, 12)
3285 streamsize __thiscall
ios_base_precision_set(ios_base
*this, streamsize precision
)
3287 streamsize ret
= this->prec
;
3289 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(precision
));
3291 this->prec
= precision
;
3295 /* ?precision@ios_base@std@@QBEHXZ */
3296 /* ?precision@ios_base@std@@QEBA_JXZ */
3297 DEFINE_THISCALL_WRAPPER(ios_base_precision_get
, 4)
3298 streamsize __thiscall
ios_base_precision_get(const ios_base
*this)
3300 TRACE("(%p)\n", this);
3304 /* ?rdstate@ios_base@std@@QBEHXZ */
3305 /* ?rdstate@ios_base@std@@QEBAHXZ */
3306 DEFINE_THISCALL_WRAPPER(ios_base_rdstate
, 4)
3307 IOSB_iostate __thiscall
ios_base_rdstate(const ios_base
*this)
3309 TRACE("(%p)\n", this);
3313 /* ?setf@ios_base@std@@QAEHHH@Z */
3314 /* ?setf@ios_base@std@@QEAAHHH@Z */
3315 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask
, 12)
3316 IOSB_fmtflags __thiscall
ios_base_setf_mask(ios_base
*this, IOSB_fmtflags flags
, IOSB_fmtflags mask
)
3318 IOSB_fmtflags ret
= this->fmtfl
;
3320 TRACE("(%p %x %x)\n", this, flags
, mask
);
3322 this->fmtfl
= (this->fmtfl
& (~mask
)) | (flags
& mask
& FMTFLAG_mask
);
3326 /* ?setf@ios_base@std@@QAEHH@Z */
3327 /* ?setf@ios_base@std@@QEAAHH@Z */
3328 DEFINE_THISCALL_WRAPPER(ios_base_setf
, 8)
3329 IOSB_fmtflags __thiscall
ios_base_setf(ios_base
*this, IOSB_fmtflags flags
)
3331 return ios_base_setf_mask(this, flags
, ~0);
3334 /* ?setstate@ios_base@std@@QAEXH_N@Z */
3335 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
3336 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise
, 12)
3337 void __thiscall
ios_base_setstate_reraise(ios_base
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3339 TRACE("(%p %x %x)\n", this, state
, reraise
);
3341 if(state
!= IOSTATE_goodbit
)
3342 ios_base_clear_reraise(this, this->state
| state
, reraise
);
3345 /* ?setstate@ios_base@std@@QAEXH@Z */
3346 /* ?setstate@ios_base@std@@QEAAXH@Z */
3347 DEFINE_THISCALL_WRAPPER(ios_base_setstate
, 8)
3348 void __thiscall
ios_base_setstate(ios_base
*this, IOSB_iostate state
)
3350 ios_base_setstate_reraise(this, state
, FALSE
);
3353 /* ?setstate@ios_base@std@@QAEXI@Z */
3354 /* ?setstate@ios_base@std@@QEAAXI@Z */
3355 DEFINE_THISCALL_WRAPPER(ios_base_setstate_unsigned
, 8)
3356 void __thiscall
ios_base_setstate_unsigned(ios_base
*this, unsigned int state
)
3358 ios_base_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3361 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
3362 MSVCP_bool CDECL
ios_base_sync_with_stdio(MSVCP_bool sync
)
3367 TRACE("(%x)\n", sync
);
3369 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3370 ret
= ios_base_Sync
;
3371 ios_base_Sync
= sync
;
3372 _Lockit_dtor(&lock
);
3376 /* ?unsetf@ios_base@std@@QAEXH@Z */
3377 /* ?unsetf@ios_base@std@@QEAAXH@Z */
3378 DEFINE_THISCALL_WRAPPER(ios_base_unsetf
, 8)
3379 void __thiscall
ios_base_unsetf(ios_base
*this, IOSB_fmtflags flags
)
3381 TRACE("(%p %x)\n", this, flags
);
3382 this->fmtfl
&= ~flags
;
3385 /* ?width@ios_base@std@@QAEHH@Z */
3386 /* ?width@ios_base@std@@QEAA_J_J@Z */
3387 DEFINE_THISCALL_WRAPPER(ios_base_width_set
, 12)
3388 streamsize __thiscall
ios_base_width_set(ios_base
*this, streamsize width
)
3390 streamsize ret
= this->wide
;
3392 TRACE("(%p %s)\n", this, wine_dbgstr_longlong(width
));
3398 /* ?width@ios_base@std@@QBEHXZ */
3399 /* ?width@ios_base@std@@QEBA_JXZ */
3400 DEFINE_THISCALL_WRAPPER(ios_base_width_get
, 4)
3401 streamsize __thiscall
ios_base_width_get(ios_base
*this)
3403 TRACE("(%p)\n", this);
3407 /* ?xalloc@ios_base@std@@SAHXZ */
3408 int CDECL
ios_base_xalloc(void)
3415 _Lockit_ctor_locktype(&lock
, _LOCK_STREAM
);
3416 ret
= ios_base_Index
++;
3417 _Lockit_dtor(&lock
);
3421 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
3422 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
3423 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor
, 4)
3424 basic_ios_char
* __thiscall
basic_ios_char_ctor(basic_ios_char
*this)
3426 TRACE("(%p)\n", this);
3428 ios_base_ctor(&this->base
);
3429 this->base
.vtable
= &MSVCP_basic_ios_char_vtable
;
3433 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3434 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
3435 DEFINE_THISCALL_WRAPPER(basic_ios_char_init
, 12)
3436 void __thiscall
basic_ios_char_init(basic_ios_char
*this, basic_streambuf_char
*streambuf
, MSVCP_bool isstd
)
3438 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3439 ios_base__Init(&this->base
);
3440 this->strbuf
= streambuf
;
3441 this->stream
= NULL
;
3445 ios_base_setstate(&this->base
, IOSTATE_badbit
);
3448 FIXME("standard streams not handled yet\n");
3451 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3452 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
3453 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf
, 8)
3454 basic_ios_char
* __thiscall
basic_ios_char_ctor_streambuf(basic_ios_char
*this, basic_streambuf_char
*strbuf
)
3456 TRACE("(%p %p)\n", this, strbuf
);
3458 basic_ios_char_ctor(this);
3459 basic_ios_char_init(this, strbuf
, FALSE
);
3463 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
3464 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3465 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor
, 4)
3466 void __thiscall
basic_ios_char_dtor(basic_ios_char
*this)
3468 TRACE("(%p)\n", this);
3469 ios_base_dtor(&this->base
);
3472 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor
, 8)
3473 basic_ios_char
* __thiscall
basic_ios_char_vector_dtor(basic_ios_char
*this, unsigned int flags
)
3475 TRACE("(%p %x)\n", this, flags
);
3477 /* we have an array, with the number of elements stored before the first object */
3478 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3480 for(i
=*ptr
-1; i
>=0; i
--)
3481 basic_ios_char_dtor(this+i
);
3482 MSVCRT_operator_delete(ptr
);
3484 basic_ios_char_dtor(this);
3486 MSVCRT_operator_delete(this);
3492 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3493 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3494 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise
, 12)
3495 void __thiscall
basic_ios_char_clear_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3497 TRACE("(%p %x %x)\n", this, state
, reraise
);
3498 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3501 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3502 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3503 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear
, 8)
3504 void __thiscall
basic_ios_char_clear(basic_ios_char
*this, unsigned int state
)
3506 basic_ios_char_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3509 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
3510 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3511 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt
, 8)
3512 basic_ios_char
* __thiscall
basic_ios_char_copyfmt(basic_ios_char
*this, basic_ios_char
*copy
)
3514 TRACE("(%p %p)\n", this, copy
);
3518 this->stream
= copy
->stream
;
3519 this->fillch
= copy
->fillch
;
3520 ios_base_copyfmt(&this->base
, ©
->base
);
3524 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
3525 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
3526 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set
, 8)
3527 char __thiscall
basic_ios_char_fill_set(basic_ios_char
*this, char fill
)
3529 char ret
= this->fillch
;
3531 TRACE("(%p %c)\n", this, fill
);
3533 this->fillch
= fill
;
3537 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
3538 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
3539 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get
, 4)
3540 char __thiscall
basic_ios_char_fill_get(basic_ios_char
*this)
3542 TRACE("(%p)\n", this);
3543 return this->fillch
;
3546 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3547 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3548 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue
, 12)
3549 locale
*__thiscall
basic_ios_char_imbue(basic_ios_char
*this, locale
*ret
, const locale
*loc
)
3551 TRACE("(%p %p %p)\n", this, ret
, loc
);
3554 basic_streambuf_char_pubimbue(this->strbuf
, ret
, loc
);
3558 return ios_base_imbue(&this->base
, ret
, loc
);
3561 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
3562 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
3563 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow
, 12)
3564 char __thiscall
basic_ios_char_narrow(basic_ios_char
*this, char ch
, char def
)
3566 TRACE("(%p %c %c)\n", this, ch
, def
);
3567 return ctype_char_narrow_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
, def
);
3570 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
3571 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3572 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set
, 8)
3573 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_set(basic_ios_char
*this, basic_streambuf_char
*streambuf
)
3575 basic_streambuf_char
*ret
= this->strbuf
;
3577 TRACE("(%p %p)\n", this, streambuf
);
3579 this->strbuf
= streambuf
;
3580 basic_ios_char_clear(this, IOSTATE_goodbit
);
3584 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3585 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
3586 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get
, 4)
3587 basic_streambuf_char
* __thiscall
basic_ios_char_rdbuf_get(const basic_ios_char
*this)
3589 TRACE("(%p)\n", this);
3590 return this->strbuf
;
3593 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
3594 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
3595 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise
, 12)
3596 void __thiscall
basic_ios_char_setstate_reraise(basic_ios_char
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3598 TRACE("(%p %x %x)\n", this, state
, reraise
);
3600 if(state
!= IOSTATE_goodbit
)
3601 basic_ios_char_clear_reraise(this, this->base
.state
| state
, reraise
);
3604 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
3605 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
3606 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate
, 8)
3607 void __thiscall
basic_ios_char_setstate(basic_ios_char
*this, unsigned int state
)
3609 basic_ios_char_setstate_reraise(this, (IOSB_iostate
)state
, FALSE
);
3612 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
3613 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
3614 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set
, 8)
3615 basic_ostream_char
* __thiscall
basic_ios_char_tie_set(basic_ios_char
*this, basic_ostream_char
*ostream
)
3617 basic_ostream_char
*ret
= this->stream
;
3619 TRACE("(%p %p)\n", this, ostream
);
3621 this->stream
= ostream
;
3625 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3626 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
3627 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get
, 4)
3628 basic_ostream_char
* __thiscall
basic_ios_char_tie_get(const basic_ios_char
*this)
3630 TRACE("(%p)\n", this);
3631 return this->stream
;
3634 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
3635 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
3636 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen
, 8)
3637 char __thiscall
basic_ios_char_widen(basic_ios_char
*this, char ch
)
3639 TRACE("(%p %c)\n", this, ch
);
3640 return ctype_char_widen_ch(ctype_char_use_facet(this->strbuf
->loc
), ch
);
3644 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
3645 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
3646 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor
, 4)
3647 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor(basic_ios_wchar
*this)
3649 TRACE("(%p)\n", this);
3651 ios_base_ctor(&this->base
);
3652 this->base
.vtable
= &MSVCP_basic_ios_wchar_vtable
;
3656 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
3657 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
3658 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor
, 4)
3659 basic_ios_wchar
* __thiscall
basic_ios_short_ctor(basic_ios_wchar
*this)
3661 basic_ios_wchar_ctor(this);
3662 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3666 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3667 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
3668 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3669 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
3670 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init
, 12)
3671 void __thiscall
basic_ios_wchar_init(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
, MSVCP_bool isstd
)
3673 TRACE("(%p %p %x)\n", this, streambuf
, isstd
);
3674 ios_base__Init(&this->base
);
3675 this->strbuf
= streambuf
;
3676 this->stream
= NULL
;
3680 ios_base_setstate(&this->base
, IOSTATE_badbit
);
3683 FIXME("standard streams not handled yet\n");
3686 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3687 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
3688 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_ctor_streambuf
, 8)
3689 basic_ios_wchar
* __thiscall
basic_ios_wchar_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3691 TRACE("(%p %p)\n", this, strbuf
);
3693 basic_ios_wchar_ctor(this);
3694 basic_ios_wchar_init(this, strbuf
, FALSE
);
3698 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3699 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
3700 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf
, 8)
3701 basic_ios_wchar
* __thiscall
basic_ios_short_ctor_streambuf(basic_ios_wchar
*this, basic_streambuf_wchar
*strbuf
)
3703 basic_ios_wchar_ctor_streambuf(this, strbuf
);
3704 this->base
.vtable
= &MSVCP_basic_ios_short_vtable
;
3708 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
3709 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
3710 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
3711 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
3712 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor
, 4)
3713 void __thiscall
basic_ios_wchar_dtor(basic_ios_wchar
*this)
3715 TRACE("(%p)\n", this);
3716 ios_base_dtor(&this->base
);
3719 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor
, 8)
3720 basic_ios_wchar
* __thiscall
basic_ios_wchar_vector_dtor(basic_ios_wchar
*this, unsigned int flags
)
3722 TRACE("(%p %x)\n", this, flags
);
3724 /* we have an array, with the number of elements stored before the first object */
3725 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3727 for(i
=*ptr
-1; i
>=0; i
--)
3728 basic_ios_wchar_dtor(this+i
);
3729 MSVCRT_operator_delete(ptr
);
3731 basic_ios_wchar_dtor(this);
3733 MSVCRT_operator_delete(this);
3739 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3740 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3741 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3742 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3743 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise
, 12)
3744 void __thiscall
basic_ios_wchar_clear_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3746 TRACE("(%p %x %x)\n", this, state
, reraise
);
3747 ios_base_clear_reraise(&this->base
, state
| (this->strbuf
? IOSTATE_goodbit
: IOSTATE_badbit
), reraise
);
3750 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3751 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3752 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3753 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3754 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear
, 8)
3755 void __thiscall
basic_ios_wchar_clear(basic_ios_wchar
*this, unsigned int state
)
3757 basic_ios_wchar_clear_reraise(this, (IOSB_iostate
)state
, FALSE
);
3760 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
3761 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3762 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
3763 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
3764 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt
, 8)
3765 basic_ios_wchar
* __thiscall
basic_ios_wchar_copyfmt(basic_ios_wchar
*this, basic_ios_wchar
*copy
)
3767 TRACE("(%p %p)\n", this, copy
);
3771 this->stream
= copy
->stream
;
3772 this->fillch
= copy
->fillch
;
3773 ios_base_copyfmt(&this->base
, ©
->base
);
3777 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
3778 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
3779 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
3780 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
3781 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set
, 8)
3782 wchar_t __thiscall
basic_ios_wchar_fill_set(basic_ios_wchar
*this, wchar_t fill
)
3784 wchar_t ret
= this->fillch
;
3786 TRACE("(%p %c)\n", this, fill
);
3788 this->fillch
= fill
;
3792 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
3793 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
3794 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
3795 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
3796 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get
, 4)
3797 wchar_t __thiscall
basic_ios_wchar_fill_get(basic_ios_wchar
*this)
3799 TRACE("(%p)\n", this);
3800 return this->fillch
;
3803 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3804 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3805 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
3806 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
3807 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue
, 12)
3808 locale
*__thiscall
basic_ios_wchar_imbue(basic_ios_wchar
*this, locale
*ret
, const locale
*loc
)
3810 TRACE("(%p %p %p)\n", this, ret
, loc
);
3813 basic_streambuf_wchar_pubimbue(this->strbuf
, ret
, loc
);
3817 return ios_base_imbue(&this->base
, ret
, loc
);
3820 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
3821 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
3822 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
3823 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
3824 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow
, 12)
3825 char __thiscall
basic_ios_wchar_narrow(basic_ios_wchar
*this, wchar_t ch
, char def
)
3827 TRACE("(%p %c %c)\n", this, ch
, def
);
3828 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
, def
);
3831 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3832 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3833 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
3834 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3835 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set
, 8)
3836 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_set(basic_ios_wchar
*this, basic_streambuf_wchar
*streambuf
)
3838 basic_streambuf_wchar
*ret
= this->strbuf
;
3840 TRACE("(%p %p)\n", this, streambuf
);
3842 this->strbuf
= streambuf
;
3843 basic_ios_wchar_clear(this, IOSTATE_goodbit
);
3847 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3848 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
3849 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3850 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
3851 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get
, 4)
3852 basic_streambuf_wchar
* __thiscall
basic_ios_wchar_rdbuf_get(const basic_ios_wchar
*this)
3854 TRACE("(%p)\n", this);
3855 return this->strbuf
;
3858 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
3859 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
3860 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
3861 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
3862 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise
, 12)
3863 void __thiscall
basic_ios_wchar_setstate_reraise(basic_ios_wchar
*this, IOSB_iostate state
, MSVCP_bool reraise
)
3865 TRACE("(%p %x %x)\n", this, state
, reraise
);
3867 if(state
!= IOSTATE_goodbit
)
3868 basic_ios_wchar_clear_reraise(this, this->base
.state
| state
, reraise
);
3871 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
3872 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
3873 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
3874 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
3875 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate
, 8)
3876 void __thiscall
basic_ios_wchar_setstate(basic_ios_wchar
*this, IOSB_iostate state
)
3878 basic_ios_wchar_setstate_reraise(this, state
, FALSE
);
3881 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
3882 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
3883 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
3884 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
3885 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set
, 8)
3886 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_set(basic_ios_wchar
*this, basic_ostream_wchar
*ostream
)
3888 basic_ostream_wchar
*ret
= this->stream
;
3890 TRACE("(%p %p)\n", this, ostream
);
3892 this->stream
= ostream
;
3896 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3897 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
3898 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3899 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
3900 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get
, 4)
3901 basic_ostream_wchar
* __thiscall
basic_ios_wchar_tie_get(const basic_ios_wchar
*this)
3903 TRACE("(%p)\n", this);
3904 return this->stream
;
3907 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
3908 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
3909 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
3910 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
3911 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen
, 8)
3912 wchar_t __thiscall
basic_ios_wchar_widen(basic_ios_wchar
*this, char ch
)
3914 TRACE("(%p %c)\n", this, ch
);
3915 return ctype_wchar_widen_ch(ctype_wchar_use_facet(this->strbuf
->loc
), ch
);
3918 /* Caution: basic_ostream uses virtual inheritance.
3919 * All constructors have additional parameter that says if base class should be initialized.
3920 * Base class needs to be accessed using vbtable.
3922 static inline basic_ios_char
* basic_ostream_char_get_basic_ios(basic_ostream_char
*this)
3924 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
3927 static inline basic_ios_char
* basic_ostream_char_to_basic_ios(basic_ostream_char
*ptr
)
3929 return (basic_ios_char
*)((char*)ptr
+basic_ostream_char_vbtable
[1]);
3932 static inline basic_ostream_char
* basic_ostream_char_from_basic_ios(basic_ios_char
*ptr
)
3934 return (basic_ostream_char
*)((char*)ptr
-basic_ostream_char_vbtable
[1]);
3937 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3938 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
3939 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor
, 16)
3940 basic_ostream_char
* __thiscall
basic_ostream_char_ctor(basic_ostream_char
*this,
3941 basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
3943 basic_ios_char
*base
;
3945 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
3948 this->vbtable
= basic_ostream_char_vbtable
;
3949 base
= basic_ostream_char_get_basic_ios(this);
3950 basic_ios_char_ctor(base
);
3952 base
= basic_ostream_char_get_basic_ios(this);
3955 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3956 basic_ios_char_init(base
, strbuf
, isstd
);
3960 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
3961 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
3962 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized
, 16)
3963 basic_ostream_char
* __thiscall
basic_ostream_char_ctor_uninitialized(basic_ostream_char
*this,
3964 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
3966 basic_ios_char
*base
;
3968 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
3971 this->vbtable
= basic_ostream_char_vbtable
;
3972 base
= basic_ostream_char_get_basic_ios(this);
3973 basic_ios_char_ctor(base
);
3975 base
= basic_ostream_char_get_basic_ios(this);
3978 base
->base
.vtable
= &MSVCP_basic_ostream_char_vtable
;
3980 ios_base_Addstd(&base
->base
);
3984 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
3985 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
3986 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor
, 4)
3987 void __thiscall
basic_ostream_char_dtor(basic_ios_char
*base
)
3989 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
3991 /* don't destroy virtual base here */
3992 TRACE("(%p)\n", this);
3995 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
3996 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
3997 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor
, 4)
3998 void __thiscall
basic_ostream_char_vbase_dtor(basic_ostream_char
*this)
4000 TRACE("(%p)\n", this);
4001 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
4002 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
4005 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor
, 8)
4006 basic_ostream_char
* __thiscall
basic_ostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
4008 basic_ostream_char
*this = basic_ostream_char_from_basic_ios(base
);
4010 TRACE("(%p %x)\n", this, flags
);
4013 /* we have an array, with the number of elements stored before the first object */
4014 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4016 for(i
=*ptr
-1; i
>=0; i
--)
4017 basic_ostream_char_vbase_dtor(this+i
);
4018 MSVCRT_operator_delete(ptr
);
4020 basic_ostream_char_vbase_dtor(this);
4022 MSVCRT_operator_delete(this);
4028 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
4029 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
4030 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush
, 4)
4031 basic_ostream_char
* __thiscall
basic_ostream_char_flush(basic_ostream_char
*this)
4033 /* this function is not matching C++ specification */
4034 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4036 TRACE("(%p)\n", this);
4038 if(basic_ios_char_rdbuf_get(base
) && ios_base_good(&base
->base
)
4039 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base
))==-1)
4040 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4044 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4045 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4046 basic_ostream_char
* __cdecl
flush_ostream_char(basic_ostream_char
*ostream
)
4048 return basic_ostream_char_flush(ostream
);
4051 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4052 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4053 DEFINE_THISCALL_WRAPPER(basic_ostream_char__Osfx
, 4)
4054 void __thiscall
basic_ostream_char__Osfx(basic_ostream_char
*this)
4056 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4058 TRACE("(%p)\n", this);
4060 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4061 basic_ostream_char_flush(this);
4064 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
4065 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
4066 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx
, 4)
4067 void __thiscall
basic_ostream_char_osfx(basic_ostream_char
*this)
4069 TRACE("(%p)\n", this);
4070 basic_ostream_char__Osfx(this);
4073 static BOOL
basic_ostream_char_sentry_create(basic_ostream_char
*ostr
)
4075 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4077 if(basic_ios_char_rdbuf_get(base
))
4078 call_basic_streambuf_char__Lock(base
->strbuf
);
4080 if(ios_base_good(&base
->base
) && base
->stream
)
4081 basic_ostream_char_flush(base
->stream
);
4083 return ios_base_good(&base
->base
);
4086 static void basic_ostream_char_sentry_destroy(basic_ostream_char
*ostr
)
4088 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(ostr
);
4090 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4091 basic_ostream_char_osfx(ostr
);
4093 if(basic_ios_char_rdbuf_get(base
))
4094 call_basic_streambuf_char__Unlock(base
->strbuf
);
4097 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
4098 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
4099 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx
, 4)
4100 MSVCP_bool __thiscall
basic_ostream_char_opfx(basic_ostream_char
*this)
4102 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4104 TRACE("(%p)\n", this);
4106 if(ios_base_good(&base
->base
) && base
->stream
)
4107 basic_ostream_char_flush(base
->stream
);
4108 return ios_base_good(&base
->base
);
4111 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
4112 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
4113 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put
, 8)
4114 basic_ostream_char
* __thiscall
basic_ostream_char_put(basic_ostream_char
*this, char ch
)
4116 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4118 TRACE("(%p %c)\n", this, ch
);
4120 if(!basic_ostream_char_sentry_create(this)
4121 || basic_streambuf_char_sputc(base
->strbuf
, ch
)==EOF
) {
4122 basic_ostream_char_sentry_destroy(this);
4123 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4127 basic_ostream_char_sentry_destroy(this);
4131 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
4132 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
4133 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp
, 16)
4134 basic_ostream_char
* __thiscall
basic_ostream_char_seekp(basic_ostream_char
*this, streamoff off
, int way
)
4136 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4138 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
4140 if(!ios_base_fail(&base
->base
)) {
4143 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4144 &seek
, off
, way
, OPENMODE_out
);
4145 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4146 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4151 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4152 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4153 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos
, 28)
4154 basic_ostream_char
* __thiscall
basic_ostream_char_seekp_fpos(basic_ostream_char
*this, fpos_int pos
)
4156 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4158 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4160 if(!ios_base_fail(&base
->base
)) {
4163 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base
),
4164 &seek
, pos
, OPENMODE_out
);
4165 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4166 basic_ios_char_setstate(base
, IOSTATE_failbit
);
4171 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4172 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4173 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp
, 8)
4174 fpos_int
* __thiscall
basic_ostream_char_tellp(basic_ostream_char
*this, fpos_int
*ret
)
4176 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4178 TRACE("(%p)\n", this);
4180 if(!ios_base_fail(&base
->base
)) {
4181 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
4182 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4191 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
4192 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
4193 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write
, 16)
4194 basic_ostream_char
* __thiscall
basic_ostream_char_write(basic_ostream_char
*this, const char *str
, streamsize count
)
4196 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4198 TRACE("(%p %s %s)\n", this, debugstr_a(str
), wine_dbgstr_longlong(count
));
4200 if(!basic_ostream_char_sentry_create(this)
4201 || basic_streambuf_char_sputn(base
->strbuf
, str
, count
)!=count
) {
4202 basic_ostream_char_sentry_destroy(this);
4203 basic_ios_char_setstate(base
, IOSTATE_badbit
);
4207 basic_ostream_char_sentry_destroy(this);
4211 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
4212 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
4213 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short
, 8)
4214 basic_ostream_char
* __thiscall
basic_ostream_char_print_short(basic_ostream_char
*this, short val
)
4216 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4217 int state
= IOSTATE_goodbit
;
4219 TRACE("(%p %d)\n", this, val
);
4221 if(basic_ostream_char_sentry_create(this)) {
4222 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4223 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4224 ostreambuf_iterator_char dest
= {0, strbuf
};
4226 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
),
4227 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4228 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4230 basic_ostream_char_sentry_destroy(this);
4232 basic_ios_char_setstate(base
, state
);
4236 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
4237 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
4238 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort
, 8)
4239 basic_ostream_char
* __thiscall
basic_ostream_char_print_ushort(basic_ostream_char
*this, unsigned short val
)
4241 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4242 int state
= IOSTATE_goodbit
;
4244 TRACE("(%p %u)\n", this, val
);
4246 if(basic_ostream_char_sentry_create(this)) {
4247 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4248 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4249 ostreambuf_iterator_char dest
= {0, strbuf
};
4251 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4253 basic_ostream_char_sentry_destroy(this);
4255 basic_ios_char_setstate(base
, state
);
4259 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
4260 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
4261 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
4262 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
4263 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int
, 8)
4264 basic_ostream_char
* __thiscall
basic_ostream_char_print_int(basic_ostream_char
*this, int val
)
4266 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4267 int state
= IOSTATE_goodbit
;
4269 TRACE("(%p %d)\n", this, val
);
4271 if(basic_ostream_char_sentry_create(this)) {
4272 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4273 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4274 ostreambuf_iterator_char dest
= {0, strbuf
};
4276 num_put_char_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4278 basic_ostream_char_sentry_destroy(this);
4280 basic_ios_char_setstate(base
, state
);
4284 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
4285 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
4286 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
4287 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
4288 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint
, 8)
4289 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint(basic_ostream_char
*this, unsigned int val
)
4291 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4292 int state
= IOSTATE_goodbit
;
4294 TRACE("(%p %u)\n", this, val
);
4296 if(basic_ostream_char_sentry_create(this)) {
4297 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4298 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4299 ostreambuf_iterator_char dest
= {0, strbuf
};
4301 num_put_char_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4303 basic_ostream_char_sentry_destroy(this);
4305 basic_ios_char_setstate(base
, state
);
4309 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
4310 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
4311 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float
, 8)
4312 basic_ostream_char
* __thiscall
basic_ostream_char_print_float(basic_ostream_char
*this, float val
)
4314 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4315 int state
= IOSTATE_goodbit
;
4317 TRACE("(%p %f)\n", this, val
);
4319 if(basic_ostream_char_sentry_create(this)) {
4320 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4321 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4322 ostreambuf_iterator_char dest
= {0, strbuf
};
4324 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4326 basic_ostream_char_sentry_destroy(this);
4328 basic_ios_char_setstate(base
, state
);
4332 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
4333 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
4334 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double
, 12)
4335 basic_ostream_char
* __thiscall
basic_ostream_char_print_double(basic_ostream_char
*this, double val
)
4337 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4338 int state
= IOSTATE_goodbit
;
4340 TRACE("(%p %lf)\n", this, val
);
4342 if(basic_ostream_char_sentry_create(this)) {
4343 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4344 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4345 ostreambuf_iterator_char dest
= {0, strbuf
};
4347 num_put_char_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4349 basic_ostream_char_sentry_destroy(this);
4351 basic_ios_char_setstate(base
, state
);
4355 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
4356 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
4357 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble
, 12)
4358 basic_ostream_char
* __thiscall
basic_ostream_char_print_ldouble(basic_ostream_char
*this, double val
)
4360 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4361 int state
= IOSTATE_goodbit
;
4363 TRACE("(%p %lf)\n", this, val
);
4365 if(basic_ostream_char_sentry_create(this)) {
4366 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4367 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4368 ostreambuf_iterator_char dest
= {0, strbuf
};
4370 num_put_char_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4372 basic_ostream_char_sentry_destroy(this);
4374 basic_ios_char_setstate(base
, state
);
4378 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4379 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4380 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf
, 8)
4381 basic_ostream_char
* __thiscall
basic_ostream_char_print_streambuf(basic_ostream_char
*this, basic_streambuf_char
*val
)
4383 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4384 IOSB_iostate state
= IOSTATE_badbit
;
4387 TRACE("(%p %p)\n", this, val
);
4389 if(basic_ostream_char_sentry_create(this)) {
4390 for(c
= basic_streambuf_char_sgetc(val
); c
!=EOF
;
4391 c
= basic_streambuf_char_snextc(val
)) {
4392 state
= IOSTATE_goodbit
;
4394 if(basic_streambuf_char_sputc(base
->strbuf
, c
) == EOF
) {
4395 state
= IOSTATE_badbit
;
4400 state
= IOSTATE_badbit
;
4402 basic_ostream_char_sentry_destroy(this);
4404 ios_base_width_set(&base
->base
, 0);
4405 basic_ios_char_setstate(base
, state
);
4409 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
4410 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
4411 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr
, 8)
4412 basic_ostream_char
* __thiscall
basic_ostream_char_print_ptr(basic_ostream_char
*this, const void *val
)
4414 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4415 int state
= IOSTATE_goodbit
;
4417 TRACE("(%p %p)\n", this, val
);
4419 if(basic_ostream_char_sentry_create(this)) {
4420 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4421 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4422 ostreambuf_iterator_char dest
= {0, strbuf
};
4424 num_put_char_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4426 basic_ostream_char_sentry_destroy(this);
4428 basic_ios_char_setstate(base
, state
);
4432 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
4433 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
4434 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64
, 12)
4435 basic_ostream_char
* __thiscall
basic_ostream_char_print_int64(basic_ostream_char
*this, __int64 val
)
4437 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4438 int state
= IOSTATE_goodbit
;
4440 TRACE("(%p)\n", this);
4442 if(basic_ostream_char_sentry_create(this)) {
4443 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4444 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4445 ostreambuf_iterator_char dest
= {0, strbuf
};
4447 num_put_char_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4449 basic_ostream_char_sentry_destroy(this);
4451 basic_ios_char_setstate(base
, state
);
4455 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
4456 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
4457 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64
, 12)
4458 basic_ostream_char
* __thiscall
basic_ostream_char_print_uint64(basic_ostream_char
*this, unsigned __int64 val
)
4460 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4461 int state
= IOSTATE_goodbit
;
4463 TRACE("(%p)\n", this);
4465 if(basic_ostream_char_sentry_create(this)) {
4466 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4467 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4468 ostreambuf_iterator_char dest
= {0, strbuf
};
4470 num_put_char_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4472 basic_ostream_char_sentry_destroy(this);
4474 basic_ios_char_setstate(base
, state
);
4478 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
4479 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
4480 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool
, 8)
4481 basic_ostream_char
* __thiscall
basic_ostream_char_print_bool(basic_ostream_char
*this, MSVCP_bool val
)
4483 basic_ios_char
*base
= basic_ostream_char_get_basic_ios(this);
4484 int state
= IOSTATE_goodbit
;
4486 TRACE("(%p %x)\n", this, val
);
4488 if(basic_ostream_char_sentry_create(this)) {
4489 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
4490 const num_put
*numput
= num_put_char_use_facet(strbuf
->loc
);
4491 ostreambuf_iterator_char dest
= {0, strbuf
};
4493 num_put_char_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_char_fill_get(base
), val
);
4495 basic_ostream_char_sentry_destroy(this);
4497 basic_ios_char_setstate(base
, state
);
4501 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
4502 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
4503 basic_ostream_char
* __cdecl
basic_ostream_char_endl(basic_ostream_char
*ostr
)
4505 TRACE("(%p)\n", ostr
);
4507 basic_ostream_char_put(ostr
, '\n');
4508 basic_ostream_char_flush(ostr
);
4512 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
4513 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
4514 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func
, 8)
4515 basic_ostream_char
* __thiscall
basic_ostream_char_print_func(basic_ostream_char
*this,
4516 basic_ostream_char
* (__cdecl
*pfunc
)(basic_ostream_char
*))
4518 TRACE("(%p %p)\n", this, pfunc
);
4523 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
4524 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
4525 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios
, 8)
4526 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_basic_ios(basic_ostream_char
*this,
4527 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
4529 TRACE("(%p %p)\n", this, pfunc
);
4530 pfunc(basic_ostream_char_get_basic_ios(this));
4534 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
4535 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
4536 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base
, 8)
4537 basic_ostream_char
* __thiscall
basic_ostream_char_print_func_ios_base(
4538 basic_ostream_char
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
4540 TRACE("(%p %p)\n", this, pfunc
);
4541 pfunc(&basic_ostream_char_get_basic_ios(this)->base
);
4545 /* Caution: basic_ostream uses virtual inheritance. */
4546 static inline basic_ios_wchar
* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar
*this)
4548 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
4551 static inline basic_ios_wchar
* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar
*ptr
)
4553 return (basic_ios_wchar
*)((char*)ptr
+basic_ostream_wchar_vbtable
[1]);
4556 static inline basic_ostream_wchar
* basic_ostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
4558 return (basic_ostream_wchar
*)((char*)ptr
-basic_ostream_wchar_vbtable
[1]);
4561 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
4562 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
4563 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor
, 16)
4564 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor(basic_ostream_wchar
*this,
4565 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4567 basic_ios_wchar
*base
;
4569 TRACE("(%p %p %d %d)\n", this, strbuf
, isstd
, virt_init
);
4572 this->vbtable
= basic_ostream_wchar_vbtable
;
4573 base
= basic_ostream_wchar_get_basic_ios(this);
4574 basic_ios_wchar_ctor(base
);
4576 base
= basic_ostream_wchar_get_basic_ios(this);
4579 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
4580 basic_ios_wchar_init(base
, strbuf
, isstd
);
4584 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
4585 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
4586 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor
, 16)
4587 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor(basic_ostream_wchar
*this,
4588 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
4590 basic_ostream_wchar_ctor(this, strbuf
, isstd
, virt_init
);
4591 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
4595 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4596 /* ??0?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4597 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_ctor_uninitialized
, 16)
4598 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_ctor_uninitialized(basic_ostream_wchar
*this,
4599 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4601 basic_ios_wchar
*base
;
4603 TRACE("(%p %d %x)\n", this, uninitialized
, addstd
);
4606 this->vbtable
= basic_ostream_wchar_vbtable
;
4607 base
= basic_ostream_wchar_get_basic_ios(this);
4608 basic_ios_wchar_ctor(base
);
4610 base
= basic_ostream_wchar_get_basic_ios(this);
4613 base
->base
.vtable
= &MSVCP_basic_ostream_wchar_vtable
;
4615 ios_base_Addstd(&base
->base
);
4619 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@_N@Z */
4620 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@_N@Z */
4621 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized
, 16)
4622 basic_ostream_wchar
* __thiscall
basic_ostream_short_ctor_uninitialized(basic_ostream_wchar
*this,
4623 int uninitialized
, MSVCP_bool addstd
, MSVCP_bool virt_init
)
4625 basic_ostream_wchar_ctor_uninitialized(this, uninitialized
, addstd
, virt_init
);
4626 basic_ostream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_ostream_short_vtable
;
4630 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4631 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4632 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
4633 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4634 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor
, 4)
4635 void __thiscall
basic_ostream_wchar_dtor(basic_ios_wchar
*base
)
4637 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
4639 /* don't destroy virtual base here */
4640 TRACE("(%p)\n", this);
4643 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4644 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4645 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4646 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4647 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor
, 4)
4648 void __thiscall
basic_ostream_wchar_vbase_dtor(basic_ostream_wchar
*this)
4650 TRACE("(%p)\n", this);
4651 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
4652 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
4655 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor
, 8)
4656 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
4658 basic_ostream_wchar
*this = basic_ostream_wchar_from_basic_ios(base
);
4660 TRACE("(%p %x)\n", this, flags
);
4663 /* we have an array, with the number of elements stored before the first object */
4664 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4666 for(i
=*ptr
-1; i
>=0; i
--)
4667 basic_ostream_wchar_vbase_dtor(this+i
);
4668 MSVCRT_operator_delete(ptr
);
4670 basic_ostream_wchar_vbase_dtor(this);
4672 MSVCRT_operator_delete(this);
4678 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
4679 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
4680 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
4681 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
4682 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush
, 4)
4683 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_flush(basic_ostream_wchar
*this)
4685 /* this function is not matching C++ specification */
4686 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4688 TRACE("(%p)\n", this);
4690 if(basic_ios_wchar_rdbuf_get(base
) && ios_base_good(&base
->base
)
4691 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base
))==-1)
4692 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4696 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
4697 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
4698 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
4699 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
4700 basic_ostream_wchar
* __cdecl
flush_ostream_wchar(basic_ostream_wchar
*ostream
)
4702 return basic_ostream_wchar_flush(ostream
);
4705 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4706 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4707 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4708 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4709 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar__Osfx
, 4)
4710 void __thiscall
basic_ostream_wchar__Osfx(basic_ostream_wchar
*this)
4712 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4714 TRACE("(%p)\n", this);
4716 if(base
->base
.fmtfl
& FMTFLAG_unitbuf
)
4717 basic_ostream_wchar_flush(this);
4720 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
4721 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
4722 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
4723 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
4724 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx
, 4)
4725 void __thiscall
basic_ostream_wchar_osfx(basic_ostream_wchar
*this)
4727 TRACE("(%p)\n", this);
4728 basic_ostream_wchar__Osfx(this);
4731 static BOOL
basic_ostream_wchar_sentry_create(basic_ostream_wchar
*ostr
)
4733 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
4735 if(basic_ios_wchar_rdbuf_get(base
))
4736 basic_streambuf_wchar__Lock(base
->strbuf
);
4738 if(ios_base_good(&base
->base
) && base
->stream
)
4739 basic_ostream_wchar_flush(base
->stream
);
4741 return ios_base_good(&base
->base
);
4744 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar
*ostr
)
4746 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(ostr
);
4748 if(ios_base_good(&base
->base
) && !__uncaught_exception())
4749 basic_ostream_wchar_osfx(ostr
);
4751 if(basic_ios_wchar_rdbuf_get(base
))
4752 basic_streambuf_wchar__Unlock(base
->strbuf
);
4755 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
4756 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
4757 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
4758 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
4759 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx
, 4)
4760 MSVCP_bool __thiscall
basic_ostream_wchar_opfx(basic_ostream_wchar
*this)
4762 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4764 TRACE("(%p)\n", this);
4766 if(ios_base_good(&base
->base
) && base
->stream
)
4767 basic_ostream_wchar_flush(base
->stream
);
4768 return ios_base_good(&base
->base
);
4771 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
4772 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
4773 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
4774 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
4775 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put
, 8)
4776 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_put(basic_ostream_wchar
*this, wchar_t ch
)
4778 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4780 TRACE("(%p %c)\n", this, ch
);
4782 if(!basic_ostream_wchar_sentry_create(this)
4783 || basic_streambuf_wchar_sputc(base
->strbuf
, ch
)==WEOF
) {
4784 basic_ostream_wchar_sentry_destroy(this);
4785 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4789 basic_ostream_wchar_sentry_destroy(this);
4793 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
4794 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
4795 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
4796 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
4797 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp
, 16)
4798 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp(basic_ostream_wchar
*this, streamoff off
, int way
)
4800 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4802 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), way
);
4804 if(!ios_base_fail(&base
->base
)) {
4807 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
4808 &seek
, off
, way
, OPENMODE_out
);
4809 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4810 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
4815 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4816 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4817 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
4818 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
4819 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos
, 28)
4820 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_seekp_fpos(basic_ostream_wchar
*this, fpos_int pos
)
4822 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4824 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
4826 if(!ios_base_fail(&base
->base
)) {
4829 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base
),
4830 &seek
, pos
, OPENMODE_out
);
4831 if(seek
.off
==-1 && seek
.pos
==0 && seek
.state
==0)
4832 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
4837 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4838 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4839 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
4840 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
4841 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp
, 8)
4842 fpos_int
* __thiscall
basic_ostream_wchar_tellp(basic_ostream_wchar
*this, fpos_int
*ret
)
4844 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4846 TRACE("(%p)\n", this);
4848 if(!ios_base_fail(&base
->base
)) {
4849 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
4850 ret
, 0, SEEKDIR_cur
, OPENMODE_out
);
4859 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
4860 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
4861 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
4862 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
4863 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write
, 16)
4864 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_write(basic_ostream_wchar
*this, const wchar_t *str
, streamsize count
)
4866 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4868 TRACE("(%p %s %s)\n", this, debugstr_w(str
), wine_dbgstr_longlong(count
));
4870 if(!basic_ostream_wchar_sentry_create(this)
4871 || basic_streambuf_wchar_sputn(base
->strbuf
, str
, count
)!=count
) {
4872 basic_ostream_wchar_sentry_destroy(this);
4873 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
4877 basic_ostream_wchar_sentry_destroy(this);
4881 static basic_ostream_wchar
* basic_ostream_print_short(basic_ostream_wchar
*this, short val
, const num_put
*numput
)
4883 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4884 int state
= IOSTATE_goodbit
;
4886 TRACE("(%p %d)\n", this, val
);
4888 if(basic_ostream_wchar_sentry_create(this)) {
4889 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4890 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4892 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
),
4893 (ios_base_flags_get(&base
->base
) & FMTFLAG_basefield
& (FMTFLAG_oct
| FMTFLAG_hex
))
4894 ? (LONG
)((unsigned short)val
) : (LONG
)val
);
4896 basic_ostream_wchar_sentry_destroy(this);
4898 basic_ios_wchar_setstate(base
, state
);
4902 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@F@Z */
4903 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@F@Z */
4904 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_short
, 8)
4905 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_short(basic_ostream_wchar
*this, short val
)
4907 return basic_ostream_print_short(this, val
, num_put_wchar_use_facet(
4908 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4911 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
4912 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
4913 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short
, 8)
4914 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_short(basic_ostream_wchar
*this, short val
)
4916 return basic_ostream_print_short(this, val
, num_put_short_use_facet(
4917 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4920 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@G@Z */
4921 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@G@Z */
4922 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ushort
, 8)
4923 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ushort(basic_ostream_wchar
*this, unsigned short val
)
4925 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4926 int state
= IOSTATE_goodbit
;
4928 TRACE("(%p %u)\n", this, val
);
4930 if(basic_ostream_wchar_sentry_create(this)) {
4931 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4932 const num_put
*numput
= num_put_wchar_use_facet(strbuf
->loc
);
4933 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4935 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
4937 basic_ostream_wchar_sentry_destroy(this);
4939 basic_ios_wchar_setstate(base
, state
);
4943 static basic_ostream_wchar
* basic_ostream_print_int(basic_ostream_wchar
*this, int val
, const num_put
*numput
)
4945 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4946 int state
= IOSTATE_goodbit
;
4948 TRACE("(%p %d)\n", this, val
);
4950 if(basic_ostream_wchar_sentry_create(this)) {
4951 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4952 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4954 num_put_wchar_put_long(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
4956 basic_ostream_wchar_sentry_destroy(this);
4958 basic_ios_wchar_setstate(base
, state
);
4962 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@H@Z */
4963 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@H@Z */
4964 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@J@Z */
4965 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@J@Z */
4966 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int
, 8)
4967 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int(basic_ostream_wchar
*this, int val
)
4969 return basic_ostream_print_int(this, val
, num_put_wchar_use_facet(
4970 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4973 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
4974 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
4975 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
4976 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
4977 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int
, 8)
4978 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int(basic_ostream_wchar
*this, int val
)
4980 return basic_ostream_print_int(this, val
, num_put_short_use_facet(
4981 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
4984 static basic_ostream_wchar
* basic_ostream_print_uint(basic_ostream_wchar
*this, unsigned int val
, const num_put
*numput
)
4986 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
4987 int state
= IOSTATE_goodbit
;
4989 TRACE("(%p %u)\n", this, val
);
4991 if(basic_ostream_wchar_sentry_create(this)) {
4992 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
4993 ostreambuf_iterator_wchar dest
= {0, strbuf
};
4995 num_put_wchar_put_ulong(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
4997 basic_ostream_wchar_sentry_destroy(this);
4999 basic_ios_wchar_setstate(base
, state
);
5003 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@I@Z */
5004 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@I@Z */
5005 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@K@Z */
5006 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@K@Z */
5007 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint
, 8)
5008 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5010 return basic_ostream_print_uint(this, val
, num_put_wchar_use_facet(
5011 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5014 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
5015 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
5016 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
5017 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
5018 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint
, 8)
5019 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint(basic_ostream_wchar
*this, unsigned int val
)
5021 return basic_ostream_print_uint(this, val
, num_put_short_use_facet(
5022 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5025 static basic_ostream_wchar
* basic_ostream_print_float(basic_ostream_wchar
*this, float val
, const num_put
*numput
)
5027 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5028 int state
= IOSTATE_goodbit
;
5030 TRACE("(%p %f)\n", this, val
);
5032 if(basic_ostream_wchar_sentry_create(this)) {
5033 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5034 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5036 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5038 basic_ostream_wchar_sentry_destroy(this);
5040 basic_ios_wchar_setstate(base
, state
);
5044 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@M@Z */
5045 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@M@Z */
5046 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_float
, 8)
5047 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_float(basic_ostream_wchar
*this, float val
)
5049 return basic_ostream_print_float(this, val
, num_put_wchar_use_facet(
5050 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5053 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
5054 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
5055 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float
, 8)
5056 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_float(basic_ostream_wchar
*this, float val
)
5058 return basic_ostream_print_float(this, val
, num_put_short_use_facet(
5059 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5062 static basic_ostream_wchar
* basic_ostream_print_double(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
5064 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5065 int state
= IOSTATE_goodbit
;
5067 TRACE("(%p %lf)\n", this, val
);
5069 if(basic_ostream_wchar_sentry_create(this)) {
5070 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5071 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5073 num_put_wchar_put_double(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5075 basic_ostream_wchar_sentry_destroy(this);
5077 basic_ios_wchar_setstate(base
, state
);
5081 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@N@Z */
5082 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@N@Z */
5083 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_double
, 12)
5084 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_double(basic_ostream_wchar
*this, double val
)
5086 return basic_ostream_print_double(this, val
, num_put_wchar_use_facet(
5087 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5090 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
5091 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
5092 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double
, 12)
5093 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_double(basic_ostream_wchar
*this, double val
)
5095 return basic_ostream_print_double(this, val
, num_put_short_use_facet(
5096 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5099 static basic_ostream_wchar
* basic_ostream_print_ldouble(basic_ostream_wchar
*this, double val
, const num_put
*numput
)
5101 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5102 int state
= IOSTATE_goodbit
;
5104 TRACE("(%p %lf)\n", this, val
);
5106 if(basic_ostream_wchar_sentry_create(this)) {
5107 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5108 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5110 num_put_wchar_put_ldouble(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5112 basic_ostream_wchar_sentry_destroy(this);
5114 basic_ios_wchar_setstate(base
, state
);
5118 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@O@Z */
5119 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@O@Z */
5120 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ldouble
, 12)
5121 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ldouble(basic_ostream_wchar
*this, double val
)
5123 return basic_ostream_print_ldouble(this, val
, num_put_wchar_use_facet(
5124 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5127 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
5128 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
5129 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble
, 12)
5130 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ldouble(basic_ostream_wchar
*this, double val
)
5132 return basic_ostream_print_ldouble(this, val
, num_put_short_use_facet(
5133 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5136 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5137 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
5138 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5139 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
5140 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf
, 8)
5141 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_streambuf(basic_ostream_wchar
*this, basic_streambuf_wchar
*val
)
5143 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5144 IOSB_iostate state
= IOSTATE_badbit
;
5145 unsigned short c
= '\n';
5147 TRACE("(%p %p)\n", this, val
);
5149 if(basic_ostream_wchar_sentry_create(this)) {
5150 for(c
= basic_streambuf_wchar_sgetc(val
); c
!=WEOF
;
5151 c
= basic_streambuf_wchar_snextc(val
)) {
5152 state
= IOSTATE_goodbit
;
5154 if(basic_streambuf_wchar_sputc(base
->strbuf
, c
) == WEOF
) {
5155 state
= IOSTATE_badbit
;
5160 state
= IOSTATE_badbit
;
5162 basic_ostream_wchar_sentry_destroy(this);
5164 ios_base_width_set(&base
->base
, 0);
5165 basic_ios_wchar_setstate(base
, state
);
5169 static basic_ostream_wchar
* basic_ostream_print_ptr(basic_ostream_wchar
*this, const void *val
, const num_put
*numput
)
5171 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5172 int state
= IOSTATE_goodbit
;
5174 TRACE("(%p %p)\n", this, val
);
5176 if(basic_ostream_wchar_sentry_create(this)) {
5177 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5178 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5180 num_put_wchar_put_ptr(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5182 basic_ostream_wchar_sentry_destroy(this);
5184 basic_ios_wchar_setstate(base
, state
);
5188 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PBX@Z */
5189 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEBX@Z */
5190 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_ptr
, 8)
5191 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_ptr(basic_ostream_wchar
*this, const void *val
)
5193 return basic_ostream_print_ptr(this, val
, num_put_wchar_use_facet(
5194 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5197 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
5198 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
5199 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr
, 8)
5200 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_ptr(basic_ostream_wchar
*this, const void *val
)
5202 return basic_ostream_print_ptr(this, val
, num_put_short_use_facet(
5203 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5206 static basic_ostream_wchar
* basic_ostream_print_int64(basic_ostream_wchar
*this, __int64 val
, const num_put
*numput
)
5208 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5209 int state
= IOSTATE_goodbit
;
5211 TRACE("(%p)\n", this);
5213 if(basic_ostream_wchar_sentry_create(this)) {
5214 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5215 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5217 num_put_wchar_put_int64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5219 basic_ostream_wchar_sentry_destroy(this);
5221 basic_ios_wchar_setstate(base
, state
);
5225 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_J@Z */
5226 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_J@Z */
5227 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_int64
, 12)
5228 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_int64(basic_ostream_wchar
*this, __int64 val
)
5230 return basic_ostream_print_int64(this, val
, num_put_wchar_use_facet(
5231 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5234 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
5235 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
5236 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64
, 12)
5237 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_int64(basic_ostream_wchar
*this, __int64 val
)
5239 return basic_ostream_print_int64(this, val
, num_put_short_use_facet(
5240 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5243 static basic_ostream_wchar
* basic_ostream_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
, const num_put
*numput
)
5245 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5246 int state
= IOSTATE_goodbit
;
5248 TRACE("(%p)\n", this);
5250 if(basic_ostream_wchar_sentry_create(this)) {
5251 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5252 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5254 num_put_wchar_put_uint64(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5256 basic_ostream_wchar_sentry_destroy(this);
5258 basic_ios_wchar_setstate(base
, state
);
5262 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_K@Z */
5263 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_K@Z */
5264 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_uint64
, 12)
5265 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5267 return basic_ostream_print_uint64(this, val
, num_put_wchar_use_facet(
5268 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5271 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
5272 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
5273 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64
, 12)
5274 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_uint64(basic_ostream_wchar
*this, unsigned __int64 val
)
5276 return basic_ostream_print_uint64(this, val
, num_put_short_use_facet(
5277 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5280 static basic_ostream_wchar
* basic_ostream_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
, const num_put
*numput
)
5282 basic_ios_wchar
*base
= basic_ostream_wchar_get_basic_ios(this);
5283 int state
= IOSTATE_goodbit
;
5285 TRACE("(%p %x)\n", this, val
);
5287 if(basic_ostream_wchar_sentry_create(this)) {
5288 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
5289 ostreambuf_iterator_wchar dest
= {0, strbuf
};
5291 num_put_wchar_put_bool(numput
, &dest
, dest
, &base
->base
, basic_ios_wchar_fill_get(base
), val
);
5293 basic_ostream_wchar_sentry_destroy(this);
5295 basic_ios_wchar_setstate(base
, state
);
5299 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@_N@Z */
5300 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@_N@Z */
5301 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_bool
, 8)
5302 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5304 return basic_ostream_print_bool(this, val
, num_put_wchar_use_facet(
5305 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5308 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
5309 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
5310 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool
, 8)
5311 basic_ostream_wchar
* __thiscall
basic_ostream_short_print_bool(basic_ostream_wchar
*this, MSVCP_bool val
)
5313 return basic_ostream_print_bool(this, val
, num_put_short_use_facet(
5314 basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc
));
5317 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5318 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5319 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5320 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5321 basic_ostream_wchar
* __cdecl
basic_ostream_wchar_endl(basic_ostream_wchar
*ostr
)
5323 TRACE("(%p)\n", ostr
);
5325 basic_ostream_wchar_put(ostr
, '\n');
5326 basic_ostream_wchar_flush(ostr
);
5330 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5331 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5332 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5333 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5334 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func
, 8)
5335 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func(basic_ostream_wchar
*this,
5336 basic_ostream_wchar
* (__cdecl
*pfunc
)(basic_ostream_wchar
*))
5338 TRACE("(%p %p)\n", this, pfunc
);
5343 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
5344 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
5345 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
5346 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
5347 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios
, 8)
5348 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar
*this,
5349 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
5351 TRACE("(%p %p)\n", this, pfunc
);
5352 pfunc(basic_ostream_wchar_get_basic_ios(this));
5356 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5357 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5358 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5359 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5360 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base
, 8)
5361 basic_ostream_wchar
* __thiscall
basic_ostream_wchar_print_func_ios_base(
5362 basic_ostream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
5364 TRACE("(%p %p)\n", this, pfunc
);
5365 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base
);
5369 /* Caution: basic_istream uses virtual inheritance. */
5370 static inline basic_ios_char
* basic_istream_char_get_basic_ios(basic_istream_char
*this)
5372 return (basic_ios_char
*)((char*)this+this->vbtable
[1]);
5375 static inline basic_ios_char
* basic_istream_char_to_basic_ios(basic_istream_char
*ptr
)
5377 return (basic_ios_char
*)((char*)ptr
+basic_istream_char_vbtable
[1]);
5380 static inline basic_istream_char
* basic_istream_char_from_basic_ios(basic_ios_char
*ptr
)
5382 return (basic_istream_char
*)((char*)ptr
-basic_istream_char_vbtable
[1]);
5385 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5386 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5387 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_init
, 20)
5388 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
)
5390 basic_ios_char
*base
;
5392 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
5395 this->vbtable
= basic_istream_char_vbtable
;
5396 base
= basic_istream_char_get_basic_ios(this);
5397 basic_ios_char_ctor(base
);
5399 base
= basic_istream_char_get_basic_ios(this);
5402 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
5405 basic_ios_char_init(base
, strbuf
, isstd
);
5409 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5410 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
5411 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor
, 16)
5412 basic_istream_char
* __thiscall
basic_istream_char_ctor(basic_istream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
5414 return basic_istream_char_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
5417 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5418 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5419 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized
, 12)
5420 basic_istream_char
* __thiscall
basic_istream_char_ctor_uninitialized(basic_istream_char
*this, int uninitialized
, MSVCP_bool virt_init
)
5422 basic_ios_char
*base
;
5424 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
5427 this->vbtable
= basic_istream_char_vbtable
;
5428 base
= basic_istream_char_get_basic_ios(this);
5429 basic_ios_char_ctor(base
);
5431 base
= basic_istream_char_get_basic_ios(this);
5434 base
->base
.vtable
= &MSVCP_basic_istream_char_vtable
;
5435 ios_base_Addstd(&base
->base
);
5439 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5440 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5441 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor
, 4)
5442 void __thiscall
basic_istream_char_dtor(basic_ios_char
*base
)
5444 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
5446 /* don't destroy virtual base here */
5447 TRACE("(%p)\n", this);
5450 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5451 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5452 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor
, 4)
5453 void __thiscall
basic_istream_char_vbase_dtor(basic_istream_char
*this)
5455 TRACE("(%p)\n", this);
5456 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
5457 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
5460 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor
, 8)
5461 basic_istream_char
* __thiscall
basic_istream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
5463 basic_istream_char
*this = basic_istream_char_from_basic_ios(base
);
5465 TRACE("(%p %x)\n", this, flags
);
5468 /* we have an array, with the number of elements stored before the first object */
5469 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5471 for(i
=*ptr
-1; i
>=0; i
--)
5472 basic_istream_char_vbase_dtor(this+i
);
5473 MSVCRT_operator_delete(ptr
);
5475 basic_istream_char_vbase_dtor(this);
5477 MSVCRT_operator_delete(this);
5483 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
5484 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
5485 DEFINE_THISCALL_WRAPPER(basic_istream_char__Ipfx
, 8)
5486 MSVCP_bool __thiscall
basic_istream_char__Ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
5488 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5490 TRACE("(%p %d)\n", this, noskip
);
5492 if(ios_base_good(&base
->base
)) {
5493 if(basic_ios_char_tie_get(base
))
5494 basic_ostream_char_flush(basic_ios_char_tie_get(base
));
5496 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
5497 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5498 const ctype_char
*ctype
= ctype_char_use_facet(base
->strbuf
->loc
);
5501 for(ch
= basic_streambuf_char_sgetc(strbuf
); ;
5502 ch
= basic_streambuf_char_snextc(strbuf
)) {
5504 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5508 if(!ctype_char_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
5514 if(!ios_base_good(&base
->base
)) {
5515 basic_ios_char_setstate(base
, IOSTATE_failbit
);
5522 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
5523 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
5524 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx
, 8)
5525 MSVCP_bool __thiscall
basic_istream_char_ipfx(basic_istream_char
*this, MSVCP_bool noskip
)
5527 return basic_istream_char__Ipfx(this, noskip
);
5530 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5531 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5532 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx
, 4)
5533 void __thiscall
basic_istream_char_isfx(basic_istream_char
*this)
5535 TRACE("(%p)\n", this);
5538 static BOOL
basic_istream_char_sentry_create(basic_istream_char
*istr
, MSVCP_bool noskip
)
5540 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
5542 if(basic_ios_char_rdbuf_get(base
))
5543 call_basic_streambuf_char__Lock(base
->strbuf
);
5545 return basic_istream_char_ipfx(istr
, noskip
);
5548 static void basic_istream_char_sentry_destroy(basic_istream_char
*istr
)
5550 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istr
);
5552 if(basic_ios_char_rdbuf_get(base
))
5553 call_basic_streambuf_char__Unlock(base
->strbuf
);
5556 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
5557 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
5558 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount
, 4)
5559 int __thiscall
basic_istream_char_gcount(const basic_istream_char
*this)
5561 TRACE("(%p)\n", this);
5565 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5566 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
5567 DEFINE_THISCALL_WRAPPER(basic_istream_char_get
, 4)
5568 int __thiscall
basic_istream_char_get(basic_istream_char
*this)
5570 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5573 TRACE("(%p)\n", this);
5577 if(!basic_istream_char_sentry_create(this, TRUE
)) {
5578 basic_istream_char_sentry_destroy(this);
5582 ret
= basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base
));
5583 basic_istream_char_sentry_destroy(this);
5585 basic_ios_char_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
5592 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
5593 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
5594 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch
, 8)
5595 basic_istream_char
* __thiscall
basic_istream_char_get_ch(basic_istream_char
*this, char *ch
)
5599 TRACE("(%p %p)\n", this, ch
);
5601 ret
= basic_istream_char_get(this);
5607 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
5608 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
5609 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim
, 20)
5610 basic_istream_char
* __thiscall
basic_istream_char_get_str_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
5612 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5615 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
5619 if(basic_istream_char_sentry_create(this, TRUE
)) {
5620 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5622 for(ch
= basic_streambuf_char_sgetc(strbuf
); count
>1;
5623 ch
= basic_streambuf_char_snextc(strbuf
)) {
5624 if(ch
==EOF
|| ch
==delim
)
5632 basic_istream_char_sentry_destroy(this);
5634 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
5635 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
5641 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5642 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5643 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str
, 16)
5644 basic_istream_char
* __thiscall
basic_istream_char_get_str(basic_istream_char
*this, char *str
, streamsize count
)
5646 return basic_istream_char_get_str_delim(this, str
, count
, '\n');
5649 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
5650 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
5651 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim
, 12)
5652 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf_delim(basic_istream_char
*this, basic_streambuf_char
*strbuf
, char delim
)
5654 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5657 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
5661 if(basic_istream_char_sentry_create(this, TRUE
)) {
5662 basic_streambuf_char
*strbuf_read
= basic_ios_char_rdbuf_get(base
);
5664 for(ch
= basic_streambuf_char_sgetc(strbuf_read
); ;
5665 ch
= basic_streambuf_char_snextc(strbuf_read
)) {
5666 if(ch
==EOF
|| ch
==delim
)
5669 if(basic_streambuf_char_sputc(strbuf
, ch
) == EOF
)
5674 basic_istream_char_sentry_destroy(this);
5676 basic_ios_char_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
5677 (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
5681 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
5682 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
5683 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf
, 8)
5684 basic_istream_char
* __thiscall
basic_istream_char_get_streambuf(basic_istream_char
*this, basic_streambuf_char
*strbuf
)
5686 return basic_istream_char_get_streambuf_delim(this, strbuf
, '\n');
5689 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
5690 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
5691 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim
, 20)
5692 basic_istream_char
* __thiscall
basic_istream_char_getline_delim(basic_istream_char
*this, char *str
, streamsize count
, char delim
)
5694 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5695 int ch
= (unsigned char)delim
;
5697 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
5701 if(basic_istream_char_sentry_create(this, TRUE
) && count
>0) {
5702 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5705 ch
= basic_streambuf_char_sbumpc(strbuf
);
5707 if(ch
==EOF
|| ch
==(unsigned char)delim
)
5715 if(ch
== (unsigned char)delim
)
5717 else if(ch
!= EOF
) {
5718 ch
= basic_streambuf_char_sgetc(strbuf
);
5720 if(ch
== (unsigned char)delim
) {
5721 basic_streambuf_char__Gninc(strbuf
);
5726 basic_istream_char_sentry_destroy(this);
5728 basic_ios_char_setstate(base
, (ch
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
5729 (!this->count
|| (ch
!=(unsigned char)delim
&& ch
!=EOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
5735 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5736 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5737 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline
, 16)
5738 basic_istream_char
* __thiscall
basic_istream_char_getline(basic_istream_char
*this, char *str
, streamsize count
)
5740 return basic_istream_char_getline_delim(this, str
, count
, '\n');
5743 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
5744 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
5745 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore
, 16)
5746 basic_istream_char
* __thiscall
basic_istream_char_ignore(basic_istream_char
*this, streamsize count
, int delim
)
5748 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5749 int ch
= (unsigned char)delim
;
5752 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
5756 if(basic_istream_char_sentry_create(this, TRUE
)) {
5757 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5758 state
= IOSTATE_goodbit
;
5761 ch
= basic_streambuf_char_sbumpc(strbuf
);
5764 state
= IOSTATE_eofbit
;
5768 if(ch
==(unsigned char)delim
)
5772 if(count
!= INT_MAX
)
5776 state
= IOSTATE_failbit
;
5777 basic_istream_char_sentry_destroy(this);
5779 basic_ios_char_setstate(base
, state
);
5783 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5784 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5785 basic_istream_char
* __cdecl
ws_basic_istream_char(basic_istream_char
*istream
)
5787 basic_ios_char
*base
= basic_istream_char_get_basic_ios(istream
);
5790 TRACE("(%p)\n", istream
);
5792 if(basic_istream_char_sentry_create(istream
, TRUE
)) {
5793 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5794 const ctype_char
*ctype
= ctype_char_use_facet(strbuf
->loc
);
5796 for(ch
= basic_streambuf_char_sgetc(strbuf
); ctype_char_is_ch(ctype
, _SPACE
, ch
);
5797 ch
= basic_streambuf_char_snextc(strbuf
)) {
5802 basic_istream_char_sentry_destroy(istream
);
5805 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5809 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5810 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
5811 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek
, 4)
5812 int __thiscall
basic_istream_char_peek(basic_istream_char
*this)
5814 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5817 TRACE("(%p)\n", this);
5821 if(basic_istream_char_sentry_create(this, TRUE
))
5822 ret
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
));
5823 basic_istream_char_sentry_destroy(this);
5826 basic_ios_char_setstate(base
, IOSTATE_eofbit
);
5831 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
5832 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
5833 static basic_istream_char
* basic_istream_char__Read_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
5835 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5836 IOSB_iostate state
= IOSTATE_goodbit
;
5838 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
5840 if(basic_istream_char_sentry_create(this, TRUE
)) {
5841 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5843 this->count
= basic_streambuf_char__Sgetn_s(strbuf
, str
, size
, count
);
5844 if(this->count
!= count
)
5845 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
5849 basic_istream_char_sentry_destroy(this);
5851 basic_ios_char_setstate(base
, state
);
5855 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
5856 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
5857 DEFINE_THISCALL_WRAPPER(basic_istream_char_read
, 16)
5858 basic_istream_char
* __thiscall
basic_istream_char_read(basic_istream_char
*this, char *str
, streamsize count
)
5860 return basic_istream_char__Read_s(this, str
, count
, count
);
5863 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
5864 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
5865 static streamsize
basic_istream_char__Readsome_s(basic_istream_char
*this, char *str
, MSVCP_size_t size
, streamsize count
)
5867 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5868 IOSB_iostate state
= IOSTATE_goodbit
;
5870 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
5874 if(basic_istream_char_sentry_create(this, TRUE
)) {
5875 streamsize avail
= basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base
));
5880 state
|= IOSTATE_eofbit
;
5882 basic_istream_char__Read_s(this, str
, size
, avail
);
5884 state
|= IOSTATE_failbit
;
5886 basic_istream_char_sentry_destroy(this);
5888 basic_ios_char_setstate(base
, state
);
5892 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
5893 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
5894 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome
, 16)
5895 streamsize __thiscall
basic_istream_char_readsome(basic_istream_char
*this, char *str
, streamsize count
)
5897 return basic_istream_char__Readsome_s(this, str
, count
, count
);
5900 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5901 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5902 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback
, 8)
5903 basic_istream_char
* __thiscall
basic_istream_char_putback(basic_istream_char
*this, char ch
)
5905 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5906 IOSB_iostate state
= IOSTATE_goodbit
;
5908 TRACE("(%p %c)\n", this, ch
);
5912 if(basic_istream_char_sentry_create(this, TRUE
)) {
5913 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5915 if(!ios_base_good(&base
->base
))
5916 state
|= IOSTATE_failbit
;
5917 else if(!strbuf
|| basic_streambuf_char_sputbackc(strbuf
, ch
)==EOF
)
5918 state
|= IOSTATE_badbit
;
5920 basic_istream_char_sentry_destroy(this);
5922 basic_ios_char_setstate(base
, state
);
5926 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5927 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5928 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget
, 4)
5929 basic_istream_char
* __thiscall
basic_istream_char_unget(basic_istream_char
*this)
5931 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5932 IOSB_iostate state
= IOSTATE_goodbit
;
5934 TRACE("(%p)\n", this);
5938 if(basic_istream_char_sentry_create(this, TRUE
)) {
5939 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5941 if(!ios_base_good(&base
->base
))
5942 state
|= IOSTATE_failbit
;
5943 else if(!strbuf
|| basic_streambuf_char_sungetc(strbuf
)==EOF
)
5944 state
|= IOSTATE_badbit
;
5946 basic_istream_char_sentry_destroy(this);
5948 basic_ios_char_setstate(base
, state
);
5952 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
5953 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
5954 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync
, 4)
5955 int __thiscall
basic_istream_char_sync(basic_istream_char
*this)
5957 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5958 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
5960 TRACE("(%p)\n", this);
5965 if(basic_istream_char_sentry_create(this, TRUE
)) {
5966 if(basic_streambuf_char_pubsync(strbuf
) != -1) {
5967 basic_istream_char_sentry_destroy(this);
5971 basic_istream_char_sentry_destroy(this);
5973 basic_ios_char_setstate(base
, IOSTATE_badbit
);
5977 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5978 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5979 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg
, 8)
5980 fpos_int
* __thiscall
basic_istream_char_tellg(basic_istream_char
*this, fpos_int
*ret
)
5982 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
5984 TRACE("(%p %p)\n", this, ret
);
5986 if(ios_base_fail(&base
->base
)) {
5993 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base
),
5994 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
5996 if(ret
->off
==-1 && ret
->pos
==0 && ret
->state
==0)
5997 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6002 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z */
6003 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
6004 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg
, 16)
6005 basic_istream_char
* __thiscall
basic_istream_char_seekg(basic_istream_char
*this, streamoff off
, int dir
)
6007 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6009 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
6011 if(!ios_base_fail(&base
->base
)) {
6012 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6015 basic_streambuf_char_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
6017 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
6018 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6020 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6023 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6028 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6029 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6030 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos
, 28)
6031 basic_istream_char
* __thiscall
basic_istream_char_seekg_fpos(basic_istream_char
*this, fpos_int pos
)
6033 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6035 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
6037 if(!ios_base_fail(&base
->base
)) {
6038 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6041 basic_streambuf_char_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
6043 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
6044 basic_ios_char_setstate(base
, IOSTATE_failbit
);
6046 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6049 basic_ios_char_clear(base
, IOSTATE_goodbit
);
6054 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
6055 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
6056 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short
, 8)
6057 basic_istream_char
* __thiscall
basic_istream_char_read_short(basic_istream_char
*this, short *v
)
6059 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6060 int state
= IOSTATE_goodbit
;
6062 TRACE("(%p %p)\n", this, v
);
6064 if(basic_istream_char_sentry_create(this, FALSE
)) {
6065 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6066 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6067 istreambuf_iterator_char first
={0}, last
={0};
6070 first
.strbuf
= strbuf
;
6071 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
6073 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
6076 state
|= IOSTATE_failbit
;
6078 basic_istream_char_sentry_destroy(this);
6080 basic_ios_char_setstate(base
, state
);
6084 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
6085 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
6086 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort
, 8)
6087 basic_istream_char
* __thiscall
basic_istream_char_read_ushort(basic_istream_char
*this, unsigned short *v
)
6089 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6090 int state
= IOSTATE_goodbit
;
6092 TRACE("(%p %p)\n", this, v
);
6094 if(basic_istream_char_sentry_create(this, FALSE
)) {
6095 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6096 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6097 istreambuf_iterator_char first
={0}, last
={0};
6099 first
.strbuf
= strbuf
;
6100 num_get_char_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6102 basic_istream_char_sentry_destroy(this);
6104 basic_ios_char_setstate(base
, state
);
6108 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
6109 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
6110 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int
, 8)
6111 basic_istream_char
* __thiscall
basic_istream_char_read_int(basic_istream_char
*this, int *v
)
6113 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6114 int state
= IOSTATE_goodbit
;
6116 TRACE("(%p %p)\n", this, v
);
6118 if(basic_istream_char_sentry_create(this, FALSE
)) {
6119 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6120 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6121 istreambuf_iterator_char first
={0}, last
={0};
6123 first
.strbuf
= strbuf
;
6124 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6126 basic_istream_char_sentry_destroy(this);
6128 basic_ios_char_setstate(base
, state
);
6132 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
6133 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
6134 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint
, 8)
6135 basic_istream_char
* __thiscall
basic_istream_char_read_uint(basic_istream_char
*this, unsigned int *v
)
6137 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6138 int state
= IOSTATE_goodbit
;
6140 TRACE("(%p %p)\n", this, v
);
6142 if(basic_istream_char_sentry_create(this, FALSE
)) {
6143 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6144 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6145 istreambuf_iterator_char first
={0}, last
={0};
6147 first
.strbuf
= strbuf
;
6148 num_get_char_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6150 basic_istream_char_sentry_destroy(this);
6152 basic_ios_char_setstate(base
, state
);
6156 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
6157 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
6158 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long
, 8)
6159 basic_istream_char
* __thiscall
basic_istream_char_read_long(basic_istream_char
*this, LONG
*v
)
6161 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6162 int state
= IOSTATE_goodbit
;
6164 TRACE("(%p %p)\n", this, v
);
6166 if(basic_istream_char_sentry_create(this, FALSE
)) {
6167 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6168 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6169 istreambuf_iterator_char first
={0}, last
={0};
6171 first
.strbuf
= strbuf
;
6172 num_get_char_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6174 basic_istream_char_sentry_destroy(this);
6176 basic_ios_char_setstate(base
, state
);
6180 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
6181 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
6182 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong
, 8)
6183 basic_istream_char
* __thiscall
basic_istream_char_read_ulong(basic_istream_char
*this, ULONG
*v
)
6185 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6186 int state
= IOSTATE_goodbit
;
6188 TRACE("(%p %p)\n", this, v
);
6190 if(basic_istream_char_sentry_create(this, FALSE
)) {
6191 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6192 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6193 istreambuf_iterator_char first
={0}, last
={0};
6195 first
.strbuf
= strbuf
;
6196 num_get_char_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6198 basic_istream_char_sentry_destroy(this);
6200 basic_ios_char_setstate(base
, state
);
6204 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
6205 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
6206 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float
, 8)
6207 basic_istream_char
* __thiscall
basic_istream_char_read_float(basic_istream_char
*this, float *v
)
6209 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6210 int state
= IOSTATE_goodbit
;
6212 TRACE("(%p %p)\n", this, v
);
6214 if(basic_istream_char_sentry_create(this, FALSE
)) {
6215 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6216 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6217 istreambuf_iterator_char first
={0}, last
={0};
6219 first
.strbuf
= strbuf
;
6220 num_get_char_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6222 basic_istream_char_sentry_destroy(this);
6224 basic_ios_char_setstate(base
, state
);
6228 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
6229 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
6230 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double
, 8)
6231 basic_istream_char
* __thiscall
basic_istream_char_read_double(basic_istream_char
*this, double *v
)
6233 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6234 int state
= IOSTATE_goodbit
;
6236 TRACE("(%p %p)\n", this, v
);
6238 if(basic_istream_char_sentry_create(this, FALSE
)) {
6239 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6240 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6241 istreambuf_iterator_char first
={0}, last
={0};
6243 first
.strbuf
= strbuf
;
6244 num_get_char_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6246 basic_istream_char_sentry_destroy(this);
6248 basic_ios_char_setstate(base
, state
);
6252 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
6253 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
6254 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble
, 8)
6255 basic_istream_char
* __thiscall
basic_istream_char_read_ldouble(basic_istream_char
*this, double *v
)
6257 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6258 int state
= IOSTATE_goodbit
;
6260 TRACE("(%p %p)\n", this, v
);
6262 if(basic_istream_char_sentry_create(this, FALSE
)) {
6263 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6264 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6265 istreambuf_iterator_char first
={0}, last
={0};
6267 first
.strbuf
= strbuf
;
6268 num_get_char_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6270 basic_istream_char_sentry_destroy(this);
6272 basic_ios_char_setstate(base
, state
);
6276 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
6277 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
6278 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr
, 8)
6279 basic_istream_char
* __thiscall
basic_istream_char_read_ptr(basic_istream_char
*this, void **v
)
6281 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6282 int state
= IOSTATE_goodbit
;
6284 TRACE("(%p %p)\n", this, v
);
6286 if(basic_istream_char_sentry_create(this, FALSE
)) {
6287 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6288 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6289 istreambuf_iterator_char first
={0}, last
={0};
6291 first
.strbuf
= strbuf
;
6292 num_get_char_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6294 basic_istream_char_sentry_destroy(this);
6296 basic_ios_char_setstate(base
, state
);
6300 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
6301 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
6302 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64
, 8)
6303 basic_istream_char
* __thiscall
basic_istream_char_read_int64(basic_istream_char
*this, __int64
*v
)
6305 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6306 int state
= IOSTATE_goodbit
;
6308 TRACE("(%p %p)\n", this, v
);
6310 if(basic_istream_char_sentry_create(this, FALSE
)) {
6311 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6312 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6313 istreambuf_iterator_char first
={0}, last
={0};
6315 first
.strbuf
= strbuf
;
6316 num_get_char_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6318 basic_istream_char_sentry_destroy(this);
6320 basic_ios_char_setstate(base
, state
);
6324 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
6325 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
6326 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64
, 8)
6327 basic_istream_char
* __thiscall
basic_istream_char_read_uint64(basic_istream_char
*this, unsigned __int64
*v
)
6329 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6330 int state
= IOSTATE_goodbit
;
6332 TRACE("(%p %p)\n", this, v
);
6334 if(basic_istream_char_sentry_create(this, FALSE
)) {
6335 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6336 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6337 istreambuf_iterator_char first
={0}, last
={0};
6339 first
.strbuf
= strbuf
;
6340 num_get_char_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6342 basic_istream_char_sentry_destroy(this);
6344 basic_ios_char_setstate(base
, state
);
6348 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
6349 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
6350 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool
, 8)
6351 basic_istream_char
* __thiscall
basic_istream_char_read_bool(basic_istream_char
*this, MSVCP_bool
*v
)
6353 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6354 int state
= IOSTATE_goodbit
;
6356 TRACE("(%p %p)\n", this, v
);
6358 if(basic_istream_char_sentry_create(this, FALSE
)) {
6359 basic_streambuf_char
*strbuf
= basic_ios_char_rdbuf_get(base
);
6360 const num_get
*numget
= num_get_char_use_facet(strbuf
->loc
);
6361 istreambuf_iterator_char first
={0}, last
={0};
6363 first
.strbuf
= strbuf
;
6364 num_get_char_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
6366 basic_istream_char_sentry_destroy(this);
6368 basic_ios_char_setstate(base
, state
);
6372 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6373 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
6374 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf
, 8)
6375 basic_istream_char
* __thiscall
basic_istream_char_read_streambuf(
6376 basic_istream_char
*this, basic_streambuf_char
*streambuf
)
6378 basic_ios_char
*base
= basic_istream_char_get_basic_ios(this);
6379 IOSB_iostate state
= IOSTATE_failbit
;
6382 TRACE("(%p %p)\n", this, streambuf
);
6384 if(basic_istream_char_sentry_create(this, FALSE
)) {
6385 for(c
= basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base
)); c
!=EOF
;
6386 c
= basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base
))) {
6387 state
= IOSTATE_goodbit
;
6388 if(basic_streambuf_char_sputc(streambuf
, c
) == EOF
)
6392 basic_istream_char_sentry_destroy(this);
6394 basic_ios_char_setstate(base
, state
| (c
==EOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6398 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6399 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6400 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func
, 8)
6401 basic_istream_char
* __thiscall
basic_istream_char_read_func(basic_istream_char
*this,
6402 basic_istream_char
* (__cdecl
*pfunc
)(basic_istream_char
*))
6404 TRACE("(%p %p)\n", this, pfunc
);
6409 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
6410 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
6411 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios
, 8)
6412 basic_istream_char
* __thiscall
basic_istream_char_read_func_basic_ios(basic_istream_char
*this,
6413 basic_ios_char
* (__cdecl
*pfunc
)(basic_ios_char
*))
6415 TRACE("(%p %p)\n", this, pfunc
);
6416 pfunc(basic_istream_char_get_basic_ios(this));
6420 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6421 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6422 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base
, 8)
6423 basic_istream_char
* __thiscall
basic_istream_char_read_func_ios_base(basic_istream_char
*this,
6424 ios_base
* (__cdecl
*pfunc
)(ios_base
*))
6426 TRACE("(%p %p)\n", this, pfunc
);
6427 pfunc(&basic_istream_char_get_basic_ios(this)->base
);
6431 /* Caution: basic_istream uses virtual inheritance. */
6432 static inline basic_ios_wchar
* basic_istream_wchar_get_basic_ios(basic_istream_wchar
*this)
6434 return (basic_ios_wchar
*)((char*)this+this->vbtable
[1]);
6437 static inline basic_ios_wchar
* basic_istream_wchar_to_basic_ios(basic_istream_wchar
*ptr
)
6439 return (basic_ios_wchar
*)((char*)ptr
+basic_istream_wchar_vbtable
[1]);
6442 static inline basic_istream_wchar
* basic_istream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
6444 return (basic_istream_wchar
*)((char*)ptr
-basic_istream_wchar_vbtable
[1]);
6447 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
6448 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
6449 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_init
, 20)
6450 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_init(basic_istream_wchar
*this,
6451 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
6453 basic_ios_wchar
*base
;
6455 TRACE("(%p %p %d %d %d)\n", this, strbuf
, isstd
, noinit
, virt_init
);
6458 this->vbtable
= basic_istream_wchar_vbtable
;
6459 base
= basic_istream_wchar_get_basic_ios(this);
6460 basic_ios_wchar_ctor(base
);
6462 base
= basic_istream_wchar_get_basic_ios(this);
6465 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
6468 basic_ios_wchar_init(base
, strbuf
, isstd
);
6472 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
6473 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
6474 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_init
, 20)
6475 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_init(basic_istream_wchar
*this,
6476 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool noinit
, MSVCP_bool virt_init
)
6478 basic_istream_wchar_ctor_init(this, strbuf
, isstd
, noinit
, virt_init
);
6479 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
6483 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6484 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
6485 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor
, 16)
6486 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor(basic_istream_wchar
*this,
6487 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6489 return basic_istream_wchar_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6492 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6493 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
6494 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor
, 16)
6495 basic_istream_wchar
* __thiscall
basic_istream_short_ctor(basic_istream_wchar
*this,
6496 basic_streambuf_wchar
*strbuf
, MSVCP_bool isstd
, MSVCP_bool virt_init
)
6498 return basic_istream_short_ctor_init(this, strbuf
, isstd
, FALSE
, virt_init
);
6501 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6502 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6503 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ctor_uninitialized
, 12)
6504 basic_istream_wchar
* __thiscall
basic_istream_wchar_ctor_uninitialized(
6505 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
6507 basic_ios_wchar
*base
;
6509 TRACE("(%p %d %d)\n", this, uninitialized
, virt_init
);
6512 this->vbtable
= basic_istream_wchar_vbtable
;
6513 base
= basic_istream_wchar_get_basic_ios(this);
6514 basic_ios_wchar_ctor(base
);
6516 base
= basic_istream_wchar_get_basic_ios(this);
6519 base
->base
.vtable
= &MSVCP_basic_istream_wchar_vtable
;
6520 ios_base_Addstd(&base
->base
);
6524 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6525 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6526 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized
, 12)
6527 basic_istream_wchar
* __thiscall
basic_istream_short_ctor_uninitialized(
6528 basic_istream_wchar
*this, int uninitialized
, MSVCP_bool virt_init
)
6530 basic_istream_wchar_ctor_uninitialized(this, uninitialized
, virt_init
);
6531 basic_istream_wchar_get_basic_ios(this)->base
.vtable
= &MSVCP_basic_istream_short_vtable
;
6535 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
6536 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
6537 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
6538 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
6539 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor
, 4)
6540 void __thiscall
basic_istream_wchar_dtor(basic_ios_wchar
*base
)
6542 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
6544 /* don't destroy virtual base here */
6545 TRACE("(%p)\n", this);
6548 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6549 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6550 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6551 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6552 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor
, 4)
6553 void __thiscall
basic_istream_wchar_vbase_dtor(basic_istream_wchar
*this)
6555 TRACE("(%p)\n", this);
6556 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
6557 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
6560 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor
, 8)
6561 basic_istream_wchar
* __thiscall
basic_istream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
6563 basic_istream_wchar
*this = basic_istream_wchar_from_basic_ios(base
);
6565 TRACE("(%p %x)\n", this, flags
);
6568 /* we have an array, with the number of elements stored before the first object */
6569 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6571 for(i
=*ptr
-1; i
>=0; i
--)
6572 basic_istream_wchar_vbase_dtor(this+i
);
6573 MSVCRT_operator_delete(ptr
);
6575 basic_istream_wchar_vbase_dtor(this);
6577 MSVCRT_operator_delete(this);
6583 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
6584 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
6585 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
6586 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
6587 DEFINE_THISCALL_WRAPPER(basic_istream_wchar__Ipfx
, 8)
6588 MSVCP_bool __thiscall
basic_istream_wchar__Ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
6590 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6592 TRACE("(%p %d)\n", this, noskip
);
6594 if(ios_base_good(&base
->base
)) {
6595 if(basic_ios_wchar_tie_get(base
))
6596 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base
));
6598 if(!noskip
&& (ios_base_flags_get(&base
->base
) & FMTFLAG_skipws
)) {
6599 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6600 const ctype_wchar
*ctype
= ctype_wchar_use_facet(base
->strbuf
->loc
);
6603 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ;
6604 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6606 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
6610 if(!ctype_wchar_is_ch(ctype
, _SPACE
|_BLANK
, ch
))
6616 if(!ios_base_good(&base
->base
)) {
6617 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
6623 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
6624 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
6625 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
6626 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
6627 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx
, 8)
6628 MSVCP_bool __thiscall
basic_istream_wchar_ipfx(basic_istream_wchar
*this, MSVCP_bool noskip
)
6630 return basic_istream_wchar__Ipfx(this, noskip
);
6633 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
6634 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
6635 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
6636 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
6637 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx
, 4)
6638 void __thiscall
basic_istream_wchar_isfx(basic_istream_wchar
*this)
6640 TRACE("(%p)\n", this);
6643 static BOOL
basic_istream_wchar_sentry_create(basic_istream_wchar
*istr
, MSVCP_bool noskip
)
6645 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
6647 if(basic_ios_wchar_rdbuf_get(base
))
6648 basic_streambuf_wchar__Lock(base
->strbuf
);
6650 return basic_istream_wchar_ipfx(istr
, noskip
);
6653 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar
*istr
)
6655 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istr
);
6657 if(basic_ios_wchar_rdbuf_get(base
))
6658 basic_streambuf_wchar__Unlock(base
->strbuf
);
6661 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
6662 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
6663 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
6664 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
6665 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount
, 4)
6666 int __thiscall
basic_istream_wchar_gcount(const basic_istream_wchar
*this)
6668 TRACE("(%p)\n", this);
6672 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
6673 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
6674 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
6675 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
6676 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get
, 4)
6677 unsigned short __thiscall
basic_istream_wchar_get(basic_istream_wchar
*this)
6679 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6682 TRACE("(%p)\n", this);
6686 if(!basic_istream_wchar_sentry_create(this, TRUE
)) {
6687 basic_istream_wchar_sentry_destroy(this);
6691 ret
= basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base
));
6692 basic_istream_wchar_sentry_destroy(this);
6694 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
|IOSTATE_failbit
);
6701 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
6702 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
6703 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
6704 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
6705 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch
, 8)
6706 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_ch(basic_istream_wchar
*this, wchar_t *ch
)
6710 TRACE("(%p %p)\n", this, ch
);
6712 ret
= basic_istream_wchar_get(this);
6718 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
6719 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
6720 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
6721 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
6722 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim
, 20)
6723 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
6725 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6726 unsigned short ch
= delim
;
6728 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
6732 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6733 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6735 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); count
>1;
6736 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6737 if(ch
==WEOF
|| ch
==delim
)
6745 basic_istream_wchar_sentry_destroy(this);
6747 basic_ios_wchar_setstate(base
, (!this->count
? IOSTATE_failbit
: IOSTATE_goodbit
) |
6748 (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
6754 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
6755 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
6756 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
6757 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
6758 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str
, 16)
6759 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_str(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
6761 return basic_istream_wchar_get_str_delim(this, str
, count
, '\n');
6764 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
6765 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
6766 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
6767 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
6768 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim
, 12)
6769 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf_delim(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
, wchar_t delim
)
6771 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6772 unsigned short ch
= delim
;
6774 TRACE("(%p %p %c)\n", this, strbuf
, delim
);
6778 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6779 basic_streambuf_wchar
*strbuf_read
= basic_ios_wchar_rdbuf_get(base
);
6781 for(ch
= basic_streambuf_wchar_sgetc(strbuf_read
); ;
6782 ch
= basic_streambuf_wchar_snextc(strbuf_read
)) {
6783 if(ch
==WEOF
|| ch
==delim
)
6786 if(basic_streambuf_wchar_sputc(strbuf
, ch
) == WEOF
)
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
));
6798 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
6799 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
6800 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
6801 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
6802 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf
, 8)
6803 basic_istream_wchar
* __thiscall
basic_istream_wchar_get_streambuf(basic_istream_wchar
*this, basic_streambuf_wchar
*strbuf
)
6805 return basic_istream_wchar_get_streambuf_delim(this, strbuf
, '\n');
6808 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
6809 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
6810 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
6811 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
6812 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim
, 20)
6813 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline_delim(basic_istream_wchar
*this, wchar_t *str
, streamsize count
, wchar_t delim
)
6815 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6816 unsigned short ch
= delim
;
6818 TRACE("(%p %p %s %c)\n", this, str
, wine_dbgstr_longlong(count
), delim
);
6822 if(basic_istream_wchar_sentry_create(this, TRUE
) && count
>0) {
6823 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6826 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
6828 if(ch
==WEOF
|| ch
==delim
)
6838 else if(ch
!= WEOF
) {
6839 ch
= basic_streambuf_wchar_sgetc(strbuf
);
6842 basic_streambuf_wchar__Gninc(strbuf
);
6847 basic_istream_wchar_sentry_destroy(this);
6849 basic_ios_wchar_setstate(base
, (ch
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
) |
6850 (!this->count
|| (ch
!=delim
&& ch
!=WEOF
) ? IOSTATE_failbit
: IOSTATE_goodbit
));
6856 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
6857 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
6858 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
6859 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
6860 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline
, 16)
6861 basic_istream_wchar
* __thiscall
basic_istream_wchar_getline(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
6863 return basic_istream_wchar_getline_delim(this, str
, count
, '\n');
6866 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
6867 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
6868 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
6869 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
6870 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore
, 16)
6871 basic_istream_wchar
* __thiscall
basic_istream_wchar_ignore(basic_istream_wchar
*this, streamsize count
, unsigned short delim
)
6873 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6874 unsigned short ch
= delim
;
6877 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(count
), delim
);
6881 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6882 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6883 state
= IOSTATE_goodbit
;
6886 ch
= basic_streambuf_wchar_sbumpc(strbuf
);
6889 state
= IOSTATE_eofbit
;
6897 if(count
!= INT_MAX
)
6901 state
= IOSTATE_failbit
;
6902 basic_istream_wchar_sentry_destroy(this);
6904 basic_ios_wchar_setstate(base
, state
);
6908 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6909 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6910 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6911 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6912 basic_istream_wchar
* __cdecl
ws_basic_istream_wchar(basic_istream_wchar
*istream
)
6914 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(istream
);
6915 unsigned short ch
= '\n';
6917 TRACE("(%p)\n", istream
);
6919 if(basic_istream_wchar_sentry_create(istream
, TRUE
)) {
6920 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6921 const ctype_wchar
*ctype
= ctype_wchar_use_facet(strbuf
->loc
);
6923 for(ch
= basic_streambuf_wchar_sgetc(strbuf
); ctype_wchar_is_ch(ctype
, _SPACE
, ch
);
6924 ch
= basic_streambuf_wchar_snextc(strbuf
)) {
6929 basic_istream_wchar_sentry_destroy(istream
);
6932 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
6936 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
6937 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
6938 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
6939 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
6940 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek
, 4)
6941 unsigned short __thiscall
basic_istream_wchar_peek(basic_istream_wchar
*this)
6943 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6944 unsigned short ret
= WEOF
;
6946 TRACE("(%p)\n", this);
6950 if(basic_istream_wchar_sentry_create(this, TRUE
))
6951 ret
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
));
6952 basic_istream_wchar_sentry_destroy(this);
6955 basic_ios_wchar_setstate(base
, IOSTATE_eofbit
);
6960 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
6961 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
6962 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
6963 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
6964 static basic_istream_wchar
* basic_istream_wchar__Read_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
6966 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
6967 IOSB_iostate state
= IOSTATE_goodbit
;
6969 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
6971 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
6972 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
6974 this->count
= basic_streambuf_wchar__Sgetn_s(strbuf
, str
, size
, count
);
6975 if(this->count
!= count
)
6976 state
|= IOSTATE_failbit
| IOSTATE_eofbit
;
6980 basic_istream_wchar_sentry_destroy(this);
6982 basic_ios_wchar_setstate(base
, state
);
6986 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
6987 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
6988 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
6989 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
6990 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read
, 16)
6991 basic_istream_wchar
* __thiscall
basic_istream_wchar_read(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
6993 return basic_istream_wchar__Read_s(this, str
, count
, count
);
6996 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
6997 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
6998 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
6999 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
7000 static streamsize
basic_istream_wchar__Readsome_s(basic_istream_wchar
*this, wchar_t *str
, MSVCP_size_t size
, streamsize count
)
7002 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7003 IOSB_iostate state
= IOSTATE_goodbit
;
7005 TRACE("(%p %p %lu %s)\n", this, str
, size
, wine_dbgstr_longlong(count
));
7009 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7010 streamsize avail
= basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base
));
7015 state
|= IOSTATE_eofbit
;
7017 basic_istream_wchar__Read_s(this, str
, size
, avail
);
7019 state
|= IOSTATE_failbit
;
7021 basic_istream_wchar_sentry_destroy(this);
7023 basic_ios_wchar_setstate(base
, state
);
7027 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
7028 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
7029 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
7030 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
7031 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome
, 16)
7032 streamsize __thiscall
basic_istream_wchar_readsome(basic_istream_wchar
*this, wchar_t *str
, streamsize count
)
7034 return basic_istream_wchar__Readsome_s(this, str
, count
, count
);
7037 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
7038 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
7039 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
7040 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
7041 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback
, 8)
7042 basic_istream_wchar
* __thiscall
basic_istream_wchar_putback(basic_istream_wchar
*this, wchar_t ch
)
7044 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7045 IOSB_iostate state
= IOSTATE_goodbit
;
7047 TRACE("(%p %c)\n", this, ch
);
7051 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7052 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7054 if(!ios_base_good(&base
->base
))
7055 state
|= IOSTATE_failbit
;
7056 else if(!strbuf
|| basic_streambuf_wchar_sputbackc(strbuf
, ch
)==WEOF
)
7057 state
|= IOSTATE_badbit
;
7059 basic_istream_wchar_sentry_destroy(this);
7061 basic_ios_wchar_setstate(base
, state
);
7065 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
7066 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
7067 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
7068 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
7069 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget
, 4)
7070 basic_istream_wchar
* __thiscall
basic_istream_wchar_unget(basic_istream_wchar
*this)
7072 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7073 IOSB_iostate state
= IOSTATE_goodbit
;
7075 TRACE("(%p)\n", this);
7079 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7080 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7082 if(!ios_base_good(&base
->base
))
7083 state
|= IOSTATE_failbit
;
7084 else if(!strbuf
|| basic_streambuf_wchar_sungetc(strbuf
)==WEOF
)
7085 state
|= IOSTATE_badbit
;
7087 basic_istream_wchar_sentry_destroy(this);
7089 basic_ios_wchar_setstate(base
, state
);
7093 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
7094 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
7095 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
7096 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
7097 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync
, 4)
7098 int __thiscall
basic_istream_wchar_sync(basic_istream_wchar
*this)
7100 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7101 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7103 TRACE("(%p)\n", this);
7108 if(basic_istream_wchar_sentry_create(this, TRUE
)) {
7109 if(basic_streambuf_wchar_pubsync(strbuf
) != -1) {
7110 basic_istream_wchar_sentry_destroy(this);
7114 basic_istream_wchar_sentry_destroy(this);
7116 basic_ios_wchar_setstate(base
, IOSTATE_badbit
);
7120 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7121 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7122 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7123 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7124 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg
, 8)
7125 fpos_int
* __thiscall
basic_istream_wchar_tellg(basic_istream_wchar
*this, fpos_int
*ret
)
7127 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7129 TRACE("(%p %p)\n", this, ret
);
7131 if(ios_base_fail(&base
->base
)) {
7138 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base
),
7139 ret
, 0, SEEKDIR_cur
, OPENMODE_in
);
7140 if(ret
->off
==-1 && ret
->pos
==0 && ret
->state
==0)
7141 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7146 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@JH@Z */
7147 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JH@Z */
7148 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JH@Z */
7149 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JH@Z */
7150 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg
, 16)
7151 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg(basic_istream_wchar
*this, streamoff off
, int dir
)
7153 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7155 TRACE("(%p %s %d)\n", this, wine_dbgstr_longlong(off
), dir
);
7157 if(!ios_base_fail(&base
->base
)) {
7158 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7161 basic_streambuf_wchar_pubseekoff(strbuf
, &ret
, off
, dir
, OPENMODE_in
);
7163 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
7164 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7166 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7169 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7174 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7175 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7176 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7177 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7178 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos
, 28)
7179 basic_istream_wchar
* __thiscall
basic_istream_wchar_seekg_fpos(basic_istream_wchar
*this, fpos_int pos
)
7181 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7183 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos
));
7185 if(!ios_base_fail(&base
->base
)) {
7186 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7189 basic_streambuf_wchar_pubseekpos(strbuf
, &ret
, pos
, OPENMODE_in
);
7191 if(ret
.off
==-1 && ret
.pos
==0 && ret
.state
==0)
7192 basic_ios_wchar_setstate(base
, IOSTATE_failbit
);
7194 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7197 basic_ios_wchar_clear(base
, IOSTATE_goodbit
);
7202 static basic_istream_wchar
* basic_istream_read_short(basic_istream_wchar
*this, short *v
, const num_get
*numget
)
7204 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7205 int state
= IOSTATE_goodbit
;
7207 TRACE("(%p %p)\n", this, v
);
7209 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7210 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7211 istreambuf_iterator_wchar first
={0}, last
={0};
7214 first
.strbuf
= strbuf
;
7215 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, &tmp
);
7217 if(!(state
&IOSTATE_failbit
) && tmp
==(LONG
)((short)tmp
))
7220 state
|= IOSTATE_failbit
;
7222 basic_istream_wchar_sentry_destroy(this);
7224 basic_ios_wchar_setstate(base
, state
);
7228 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAF@Z */
7229 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAF@Z */
7230 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_short
, 8)
7231 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_short(basic_istream_wchar
*this, short *v
)
7233 return basic_istream_read_short(this, v
, num_get_wchar_use_facet(
7234 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7237 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
7238 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
7239 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short
, 8)
7240 basic_istream_wchar
* __thiscall
basic_istream_short_read_short(basic_istream_wchar
*this, short *v
)
7242 return basic_istream_read_short(this, v
, num_get_short_use_facet(
7243 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7246 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAG@Z */
7247 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAG@Z */
7248 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ushort
, 8)
7249 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ushort(basic_istream_wchar
*this, unsigned short *v
)
7251 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7252 int state
= IOSTATE_goodbit
;
7254 TRACE("(%p %p)\n", this, v
);
7256 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7257 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7258 const num_get
*numget
= num_get_wchar_use_facet(strbuf
->loc
);
7259 istreambuf_iterator_wchar first
={0}, last
={0};
7261 first
.strbuf
= strbuf
;
7262 num_get_wchar_get_ushort(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7264 basic_istream_wchar_sentry_destroy(this);
7266 basic_ios_wchar_setstate(base
, state
);
7270 static basic_istream_wchar
* basic_istream_read_int(basic_istream_wchar
*this, int *v
, const num_get
*numget
)
7272 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7273 int state
= IOSTATE_goodbit
;
7275 TRACE("(%p %p)\n", this, v
);
7277 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7278 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7279 istreambuf_iterator_wchar first
={0}, last
={0};
7281 first
.strbuf
= strbuf
;
7282 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7284 basic_istream_wchar_sentry_destroy(this);
7286 basic_ios_wchar_setstate(base
, state
);
7290 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAH@Z */
7291 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAH@Z */
7292 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int
, 8)
7293 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int(basic_istream_wchar
*this, int *v
)
7295 return basic_istream_read_int(this, v
, num_get_wchar_use_facet(
7296 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7299 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
7300 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
7301 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int
, 8)
7302 basic_istream_wchar
* __thiscall
basic_istream_short_read_int(basic_istream_wchar
*this, int *v
)
7304 return basic_istream_read_int(this, v
, num_get_short_use_facet(
7305 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7308 static basic_istream_wchar
* basic_istream_read_uint(basic_istream_wchar
*this, unsigned int *v
, const num_get
*numget
)
7310 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7311 int state
= IOSTATE_goodbit
;
7313 TRACE("(%p %p)\n", this, v
);
7315 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7316 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7317 istreambuf_iterator_wchar first
={0}, last
={0};
7319 first
.strbuf
= strbuf
;
7320 num_get_wchar_get_uint(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7322 basic_istream_wchar_sentry_destroy(this);
7324 basic_ios_wchar_setstate(base
, state
);
7328 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAI@Z */
7329 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAI@Z */
7330 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint
, 8)
7331 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7333 return basic_istream_read_uint(this, v
, num_get_wchar_use_facet(
7334 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7337 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
7338 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
7339 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint
, 8)
7340 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint(basic_istream_wchar
*this, unsigned int *v
)
7342 return basic_istream_read_uint(this, v
, num_get_short_use_facet(
7343 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7346 static basic_istream_wchar
* basic_istream_read_long(basic_istream_wchar
*this, LONG
*v
, const num_get
*numget
)
7348 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7349 int state
= IOSTATE_goodbit
;
7351 TRACE("(%p %p)\n", this, v
);
7353 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7354 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7355 istreambuf_iterator_wchar first
={0}, last
={0};
7357 first
.strbuf
= strbuf
;
7358 num_get_wchar_get_long(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7360 basic_istream_wchar_sentry_destroy(this);
7362 basic_ios_wchar_setstate(base
, state
);
7366 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7367 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7368 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_long
, 8)
7369 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_long(basic_istream_wchar
*this, LONG
*v
)
7371 return basic_istream_read_long(this, v
, num_get_wchar_use_facet(
7372 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7375 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
7376 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
7377 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long
, 8)
7378 basic_istream_wchar
* __thiscall
basic_istream_short_read_long(basic_istream_wchar
*this, LONG
*v
)
7380 return basic_istream_read_long(this, v
, num_get_short_use_facet(
7381 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7384 static basic_istream_wchar
* basic_istream_read_ulong(basic_istream_wchar
*this, ULONG
*v
, const num_get
*numget
)
7386 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7387 int state
= IOSTATE_goodbit
;
7389 TRACE("(%p %p)\n", this, v
);
7391 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7392 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7393 istreambuf_iterator_wchar first
={0}, last
={0};
7395 first
.strbuf
= strbuf
;
7396 num_get_wchar_get_ulong(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7398 basic_istream_wchar_sentry_destroy(this);
7400 basic_ios_wchar_setstate(base
, state
);
7404 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAK@Z */
7405 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAK@Z */
7406 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ulong
, 8)
7407 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7409 return basic_istream_read_ulong(this, v
, num_get_wchar_use_facet(
7410 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7413 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
7414 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
7415 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong
, 8)
7416 basic_istream_wchar
* __thiscall
basic_istream_short_read_ulong(basic_istream_wchar
*this, ULONG
*v
)
7418 return basic_istream_read_ulong(this, v
, num_get_short_use_facet(
7419 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7422 static basic_istream_wchar
* basic_istream_read_float(basic_istream_wchar
*this, float *v
, const num_get
*numget
)
7424 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7425 int state
= IOSTATE_goodbit
;
7427 TRACE("(%p %p)\n", this, v
);
7429 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7430 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7431 istreambuf_iterator_wchar first
={0}, last
={0};
7433 first
.strbuf
= strbuf
;
7434 num_get_wchar_get_float(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7436 basic_istream_wchar_sentry_destroy(this);
7438 basic_ios_wchar_setstate(base
, state
);
7442 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAM@Z */
7443 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAM@Z */
7444 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_float
, 8)
7445 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_float(basic_istream_wchar
*this, float *v
)
7447 return basic_istream_read_float(this, v
, num_get_wchar_use_facet(
7448 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7451 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
7452 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
7453 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float
, 8)
7454 basic_istream_wchar
* __thiscall
basic_istream_short_read_float(basic_istream_wchar
*this, float *v
)
7456 return basic_istream_read_float(this, v
, num_get_short_use_facet(
7457 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7460 static basic_istream_wchar
* basic_istream_read_double(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
7462 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7463 int state
= IOSTATE_goodbit
;
7465 TRACE("(%p %p)\n", this, v
);
7467 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7468 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7469 istreambuf_iterator_wchar first
={0}, last
={0};
7471 first
.strbuf
= strbuf
;
7472 num_get_wchar_get_double(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7474 basic_istream_wchar_sentry_destroy(this);
7476 basic_ios_wchar_setstate(base
, state
);
7480 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAN@Z */
7481 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAN@Z */
7482 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_double
, 8)
7483 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_double(basic_istream_wchar
*this, double *v
)
7485 return basic_istream_read_double(this, v
, num_get_wchar_use_facet(
7486 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7489 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
7490 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
7491 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double
, 8)
7492 basic_istream_wchar
* __thiscall
basic_istream_short_read_double(basic_istream_wchar
*this, double *v
)
7494 return basic_istream_read_double(this, v
, num_get_short_use_facet(
7495 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7498 static basic_istream_wchar
* basic_istream_read_ldouble(basic_istream_wchar
*this, double *v
, const num_get
*numget
)
7500 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7501 int state
= IOSTATE_goodbit
;
7503 TRACE("(%p %p)\n", this, v
);
7505 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7506 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7507 istreambuf_iterator_wchar first
={0}, last
={0};
7509 first
.strbuf
= strbuf
;
7510 num_get_wchar_get_ldouble(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7512 basic_istream_wchar_sentry_destroy(this);
7514 basic_ios_wchar_setstate(base
, state
);
7518 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAO@Z */
7519 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAO@Z */
7520 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ldouble
, 8)
7521 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ldouble(basic_istream_wchar
*this, double *v
)
7523 return basic_istream_read_ldouble(this, v
, num_get_wchar_use_facet(
7524 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7527 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
7528 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
7529 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble
, 8)
7530 basic_istream_wchar
* __thiscall
basic_istream_short_read_ldouble(basic_istream_wchar
*this, double *v
)
7532 return basic_istream_read_ldouble(this, v
, num_get_short_use_facet(
7533 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7536 static basic_istream_wchar
* basic_istream_read_ptr(basic_istream_wchar
*this, void **v
, const num_get
*numget
)
7538 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7539 int state
= IOSTATE_goodbit
;
7541 TRACE("(%p %p)\n", this, v
);
7543 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7544 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7545 istreambuf_iterator_wchar first
={0}, last
={0};
7547 first
.strbuf
= strbuf
;
7548 num_get_wchar_get_void(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7550 basic_istream_wchar_sentry_destroy(this);
7552 basic_ios_wchar_setstate(base
, state
);
7556 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAPAX@Z */
7557 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7558 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_ptr
, 8)
7559 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_ptr(basic_istream_wchar
*this, void **v
)
7561 return basic_istream_read_ptr(this, v
, num_get_wchar_use_facet(
7562 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7565 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
7566 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7567 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr
, 8)
7568 basic_istream_wchar
* __thiscall
basic_istream_short_read_ptr(basic_istream_wchar
*this, void **v
)
7570 return basic_istream_read_ptr(this, v
, num_get_short_use_facet(
7571 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7574 static basic_istream_wchar
* basic_istream_read_int64(basic_istream_wchar
*this, __int64
*v
, const num_get
*numget
)
7576 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7577 int state
= IOSTATE_goodbit
;
7579 TRACE("(%p %p)\n", this, v
);
7581 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7582 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7583 istreambuf_iterator_wchar first
={0}, last
={0};
7585 first
.strbuf
= strbuf
;
7586 num_get_wchar_get_int64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7588 basic_istream_wchar_sentry_destroy(this);
7590 basic_ios_wchar_setstate(base
, state
);
7594 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_J@Z */
7595 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_J@Z */
7596 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_int64
, 8)
7597 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_int64(basic_istream_wchar
*this, __int64
*v
)
7599 return basic_istream_read_int64(this, v
, num_get_wchar_use_facet(
7600 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7603 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
7604 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
7605 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64
, 8)
7606 basic_istream_wchar
* __thiscall
basic_istream_short_read_int64(basic_istream_wchar
*this, __int64
*v
)
7608 return basic_istream_read_int64(this, v
, num_get_short_use_facet(
7609 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7612 static basic_istream_wchar
* basic_istream_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
, const num_get
*numget
)
7614 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7615 int state
= IOSTATE_goodbit
;
7617 TRACE("(%p %p)\n", this, v
);
7619 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7620 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7621 istreambuf_iterator_wchar first
={0}, last
={0};
7623 first
.strbuf
= strbuf
;
7624 num_get_wchar_get_uint64(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7626 basic_istream_wchar_sentry_destroy(this);
7628 basic_ios_wchar_setstate(base
, state
);
7632 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_K@Z */
7633 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_K@Z */
7634 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_uint64
, 8)
7635 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
7637 return basic_istream_read_uint64(this, v
, num_get_wchar_use_facet(
7638 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7641 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
7642 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
7643 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64
, 8)
7644 basic_istream_wchar
* __thiscall
basic_istream_short_read_uint64(basic_istream_wchar
*this, unsigned __int64
*v
)
7646 return basic_istream_read_uint64(this, v
, num_get_short_use_facet(
7647 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7650 static basic_istream_wchar
* basic_istream_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
, const num_get
*numget
)
7652 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7653 int state
= IOSTATE_goodbit
;
7655 TRACE("(%p %p)\n", this, v
);
7657 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7658 basic_streambuf_wchar
*strbuf
= basic_ios_wchar_rdbuf_get(base
);
7659 istreambuf_iterator_wchar first
={0}, last
={0};
7661 first
.strbuf
= strbuf
;
7662 num_get_wchar_get_bool(numget
, &last
, first
, last
, &base
->base
, &state
, v
);
7664 basic_istream_wchar_sentry_destroy(this);
7666 basic_ios_wchar_setstate(base
, state
);
7670 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AA_N@Z */
7671 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEA_N@Z */
7672 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_bool
, 8)
7673 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
7675 return basic_istream_read_bool(this, v
, num_get_wchar_use_facet(
7676 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7679 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
7680 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
7681 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool
, 8)
7682 basic_istream_wchar
* __thiscall
basic_istream_short_read_bool(basic_istream_wchar
*this, MSVCP_bool
*v
)
7684 return basic_istream_read_bool(this, v
, num_get_short_use_facet(
7685 basic_istream_wchar_get_basic_ios(this)->strbuf
->loc
));
7688 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7689 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7690 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7691 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7692 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf
, 8)
7693 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_streambuf(
7694 basic_istream_wchar
*this, basic_streambuf_wchar
*streambuf
)
7696 basic_ios_wchar
*base
= basic_istream_wchar_get_basic_ios(this);
7697 IOSB_iostate state
= IOSTATE_failbit
;
7698 unsigned short c
= '\n';
7700 TRACE("(%p %p)\n", this, streambuf
);
7702 if(basic_istream_wchar_sentry_create(this, FALSE
)) {
7703 for(c
= basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base
)); c
!=WEOF
;
7704 c
= basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base
))) {
7705 state
= IOSTATE_goodbit
;
7706 if(basic_streambuf_wchar_sputc(streambuf
, c
) == WEOF
)
7710 basic_istream_wchar_sentry_destroy(this);
7712 basic_ios_wchar_setstate(base
, state
| (c
==WEOF
? IOSTATE_eofbit
: IOSTATE_goodbit
));
7716 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7717 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7718 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7719 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7720 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func
, 8)
7721 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func(basic_istream_wchar
*this,
7722 basic_istream_wchar
* (__cdecl
*pfunc
)(basic_istream_wchar
*))
7724 TRACE("(%p %p)\n", this, pfunc
);
7729 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
7730 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
7731 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
7732 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
7733 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios
, 8)
7734 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_basic_ios(basic_istream_wchar
*this,
7735 basic_ios_wchar
* (__cdecl
*pfunc
)(basic_ios_wchar
*))
7737 TRACE("(%p %p)\n", this, pfunc
);
7738 pfunc(basic_istream_wchar_get_basic_ios(this));
7742 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7743 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7744 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7745 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7746 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base
, 8)
7747 basic_istream_wchar
* __thiscall
basic_istream_wchar_read_func_ios_base(
7748 basic_istream_wchar
*this, ios_base
* (__cdecl
*pfunc
)(ios_base
*))
7750 TRACE("(%p %p)\n", this, pfunc
);
7751 pfunc(&basic_istream_wchar_get_basic_ios(this)->base
);
7755 static inline basic_ios_char
* basic_iostream_char_to_basic_ios(basic_iostream_char
*ptr
)
7757 return (basic_ios_char
*)((char*)ptr
+basic_iostream_char_vbtable1
[1]);
7760 static inline basic_iostream_char
* basic_iostream_char_from_basic_ios(basic_ios_char
*ptr
)
7762 return (basic_iostream_char
*)((char*)ptr
-basic_iostream_char_vbtable1
[1]);
7765 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7766 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7767 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor
, 12)
7768 basic_iostream_char
* __thiscall
basic_iostream_char_ctor(basic_iostream_char
*this, basic_streambuf_char
*strbuf
, MSVCP_bool virt_init
)
7770 basic_ios_char
*basic_ios
;
7772 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
7775 this->base1
.vbtable
= basic_iostream_char_vbtable1
;
7776 this->base2
.vbtable
= basic_iostream_char_vbtable2
;
7777 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
7778 basic_ios_char_ctor(basic_ios
);
7780 basic_ios
= basic_istream_char_get_basic_ios(&this->base1
);
7783 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_char_vtable
;
7785 basic_istream_char_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
7786 basic_ostream_char_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
7790 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
7791 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
7792 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor
, 4)
7793 void __thiscall
basic_iostream_char_dtor(basic_ios_char
*base
)
7795 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
7797 TRACE("(%p)\n", this);
7798 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2
));
7799 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1
));
7802 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
7803 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
7804 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor
, 4)
7805 void __thiscall
basic_iostream_char_vbase_dtor(basic_iostream_char
*this)
7807 TRACE("(%p)\n", this);
7808 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
7809 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1
));
7812 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor
, 8)
7813 basic_iostream_char
* __thiscall
basic_iostream_char_vector_dtor(basic_ios_char
*base
, unsigned int flags
)
7815 basic_iostream_char
*this = basic_iostream_char_from_basic_ios(base
);
7817 TRACE("(%p %x)\n", this, flags
);
7820 /* we have an array, with the number of elements stored before the first object */
7821 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7823 for(i
=*ptr
-1; i
>=0; i
--)
7824 basic_iostream_char_vbase_dtor(this+i
);
7825 MSVCRT_operator_delete(ptr
);
7827 basic_iostream_char_vbase_dtor(this);
7829 MSVCRT_operator_delete(this);
7835 static inline basic_ios_wchar
* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar
*ptr
)
7837 return (basic_ios_wchar
*)((char*)ptr
+basic_iostream_wchar_vbtable1
[1]);
7840 static inline basic_iostream_wchar
* basic_iostream_wchar_from_basic_ios(basic_ios_wchar
*ptr
)
7842 return (basic_iostream_wchar
*)((char*)ptr
-basic_iostream_wchar_vbtable1
[1]);
7845 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7846 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
7847 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_ctor
, 12)
7848 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_ctor(basic_iostream_wchar
*this,
7849 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
7851 basic_ios_wchar
*basic_ios
;
7853 TRACE("(%p %p %d)\n", this, strbuf
, virt_init
);
7856 this->base1
.vbtable
= basic_iostream_wchar_vbtable1
;
7857 this->base2
.vbtable
= basic_iostream_wchar_vbtable2
;
7858 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
7859 basic_ios_wchar_ctor(basic_ios
);
7861 basic_ios
= basic_istream_wchar_get_basic_ios(&this->base1
);
7864 basic_istream_wchar_ctor(&this->base1
, strbuf
, FALSE
, FALSE
);
7865 basic_ostream_wchar_ctor_uninitialized(&this->base2
, 0, FALSE
, FALSE
);
7867 basic_ios
->base
.vtable
= &MSVCP_basic_iostream_wchar_vtable
;
7871 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7872 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
7873 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor
, 12)
7874 basic_iostream_wchar
* __thiscall
basic_iostream_short_ctor(basic_iostream_wchar
*this,
7875 basic_streambuf_wchar
*strbuf
, MSVCP_bool virt_init
)
7877 basic_iostream_wchar_ctor(this, strbuf
, virt_init
);
7878 basic_istream_wchar_get_basic_ios(&this->base1
)->base
.vtable
= &MSVCP_basic_iostream_short_vtable
;
7882 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7883 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7884 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7885 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7886 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor
, 4)
7887 void __thiscall
basic_iostream_wchar_dtor(basic_ios_wchar
*base
)
7889 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
7891 TRACE("(%p)\n", this);
7892 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2
));
7893 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1
));
7896 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7897 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7898 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7899 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7900 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor
, 4)
7901 void __thiscall
basic_iostream_wchar_vbase_dtor(basic_iostream_wchar
*this)
7903 TRACE("(%p)\n", this);
7904 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
7905 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1
));
7908 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor
, 8)
7909 basic_iostream_wchar
* __thiscall
basic_iostream_wchar_vector_dtor(basic_ios_wchar
*base
, unsigned int flags
)
7911 basic_iostream_wchar
*this = basic_iostream_wchar_from_basic_ios(base
);
7913 TRACE("(%p %x)\n", this, flags
);
7916 /* we have an array, with the number of elements stored before the first object */
7917 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7919 for(i
=*ptr
-1; i
>=0; i
--)
7920 basic_iostream_wchar_vbase_dtor(this+i
);
7921 MSVCRT_operator_delete(ptr
);
7923 basic_iostream_wchar_vbase_dtor(this);
7925 MSVCRT_operator_delete(this);
7931 static void __cdecl
setprecision_func(ios_base
*base
, streamsize prec
)
7933 ios_base_precision_set(base
, prec
);
7936 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
7937 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
7938 manip_streamsize
* __cdecl
setprecision(manip_streamsize
*ret
, streamsize prec
)
7940 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(prec
));
7942 ret
->pfunc
= setprecision_func
;
7947 static void __cdecl
setw_func(ios_base
*base
, streamsize width
)
7949 ios_base_width_set(base
, width
);
7952 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
7953 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
7954 manip_streamsize
* __cdecl
setw(manip_streamsize
*ret
, streamsize width
)
7956 TRACE("(%p %s)\n", ret
, wine_dbgstr_longlong(width
));
7958 ret
->pfunc
= setw_func
;
7963 static void __cdecl
resetioflags_func(ios_base
*base
, int mask
)
7965 ios_base_setf_mask(base
, 0, mask
);
7968 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
7969 manip_int
* __cdecl
resetiosflags(manip_int
*ret
, int mask
)
7971 TRACE("(%p %d)\n", ret
, mask
);
7973 ret
->pfunc
= resetioflags_func
;
7978 static void __cdecl
setiosflags_func(ios_base
*base
, int mask
)
7980 ios_base_setf_mask(base
, FMTFLAG_mask
, mask
);
7983 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
7984 manip_int
* __cdecl
setiosflags(manip_int
*ret
, int mask
)
7986 TRACE("(%p %d)\n", ret
, mask
);
7988 ret
->pfunc
= setiosflags_func
;
7993 static void __cdecl
setbase_func(ios_base
*base
, int set_base
)
7996 set_base
= FMTFLAG_dec
;
7997 else if(set_base
== 8)
7998 set_base
= FMTFLAG_oct
;
7999 else if(set_base
== 16)
8000 set_base
= FMTFLAG_hex
;
8004 ios_base_setf_mask(base
, set_base
, FMTFLAG_basefield
);
8007 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
8008 manip_int
* __cdecl
setbase(manip_int
*ret
, int base
)
8010 TRACE("(%p %d)\n", ret
, base
);
8012 ret
->pfunc
= setbase_func
;
8017 static basic_filebuf_char filebuf_char_stdin
;
8018 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
8020 basic_istream_char obj
;
8021 basic_ios_char vbase
;
8023 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
8024 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
8025 basic_istream_char
*_Ptr_cin
= &cin
.obj
;
8027 static basic_filebuf_wchar filebuf_short_stdin
;
8028 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
8030 basic_istream_wchar obj
;
8031 basic_ios_wchar vbase
;
8033 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
8034 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
8035 basic_istream_wchar
*_Ptr_ucin
= &ucin
.obj
;
8037 static basic_filebuf_wchar filebuf_wchar_stdin
;
8038 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
8040 basic_istream_wchar obj
;
8041 basic_ios_wchar vbase
;
8043 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
8044 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
8045 basic_istream_wchar
*_Ptr_wcin
= &wcin
.obj
;
8047 static basic_filebuf_char filebuf_char_stdout
;
8048 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8050 basic_ostream_char obj
;
8051 basic_ios_char vbase
;
8053 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8054 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8055 basic_ostream_char
*_Ptr_cout
= &cout
.obj
;
8057 static basic_filebuf_wchar filebuf_short_stdout
;
8058 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8060 basic_ostream_wchar obj
;
8061 basic_ios_wchar vbase
;
8062 } ucout
= { { 0 } };
8063 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8064 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8065 basic_ostream_wchar
*_Ptr_ucout
= &ucout
.obj
;
8067 static basic_filebuf_wchar filebuf_wchar_stdout
;
8068 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8070 basic_ostream_wchar obj
;
8071 basic_ios_wchar vbase
;
8072 } wcout
= { { 0 } };
8073 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8074 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8075 basic_ostream_wchar
*_Ptr_wcout
= &wcout
.obj
;
8077 static basic_filebuf_char filebuf_char_stderr
;
8078 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8080 basic_ostream_char obj
;
8081 basic_ios_char vbase
;
8083 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8084 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8085 basic_ostream_char
*_Ptr_cerr
= &cerr
.obj
;
8087 static basic_filebuf_wchar filebuf_short_stderr
;
8088 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8090 basic_ostream_wchar obj
;
8091 basic_ios_wchar vbase
;
8092 } ucerr
= { { 0 } };
8093 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8094 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8095 basic_ostream_wchar
*_Ptr_ucerr
= &ucerr
.obj
;
8097 static basic_filebuf_wchar filebuf_wchar_stderr
;
8098 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8100 basic_ostream_wchar obj
;
8101 basic_ios_wchar vbase
;
8102 } wcerr
= { { 0 } };
8103 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8104 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8105 basic_ostream_wchar
*_Ptr_wcerr
= &wcerr
.obj
;
8107 static basic_filebuf_char filebuf_char_log
;
8108 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8110 basic_ostream_char obj
;
8111 basic_ios_char vbase
;
8113 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
8114 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
8115 basic_ostream_char
*_Ptr_clog
= &clog
.obj
;
8117 static basic_filebuf_wchar filebuf_short_log
;
8118 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8120 basic_ostream_wchar obj
;
8121 basic_ios_wchar vbase
;
8122 } uclog
= { { 0 } };
8123 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
8124 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
8125 basic_ostream_wchar
*_Ptr_uclog
= &uclog
.obj
;
8127 static basic_filebuf_wchar filebuf_wchar_log
;
8128 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8130 basic_ostream_wchar obj
;
8131 basic_ios_wchar vbase
;
8132 } wclog
= { { 0 } };
8133 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
8134 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
8135 basic_ostream_wchar
*_Ptr_wclog
= &wclog
.obj
;
8137 /* ?_Init_cnt@Init@ios_base@std@@0HA */
8138 int ios_base_Init__Init_cnt
= -1;
8140 /* ?_Init_cnt_func@Init@ios_base@std@@CAAAHXZ */
8141 /* ?_Init_cnt_func@Init@ios_base@std@@CAAEAHXZ */
8142 int* __cdecl
ios_base_Init__Init_cnt_func(void)
8144 return &ios_base_Init__Init_cnt
;
8147 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
8148 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
8149 void __cdecl
ios_base_Init__Init_ctor(void *this)
8151 TRACE("(%p)\n", this);
8153 if(ios_base_Init__Init_cnt
< 0)
8154 ios_base_Init__Init_cnt
= 1;
8156 ios_base_Init__Init_cnt
++;
8159 /* ??0Init@ios_base@std@@QAE@XZ */
8160 /* ??0Init@ios_base@std@@QEAA@XZ */
8161 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor
, 4)
8162 void* __thiscall
ios_base_Init_ctor(void *this)
8164 ios_base_Init__Init_ctor(this);
8168 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
8169 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
8170 void __cdecl
ios_base_Init__Init_dtor(void *this)
8172 TRACE("(%p)\n", this);
8174 ios_base_Init__Init_cnt
--;
8175 if(!ios_base_Init__Init_cnt
) {
8176 basic_ostream_char_flush(&cout
.obj
);
8177 basic_ostream_char_flush(&cerr
.obj
);
8178 basic_ostream_char_flush(&clog
.obj
);
8182 /* ??1Init@ios_base@std@@QAE@XZ */
8183 /* ??1Init@ios_base@std@@QEAA@XZ */
8184 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor
, 4)
8185 void __thiscall
ios_base_Init_dtor(void *this)
8187 ios_base_Init__Init_dtor(this);
8190 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
8191 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
8192 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign
, 8)
8193 void* __thiscall
ios_base_Init_op_assign(void *this, void *rhs
)
8195 TRACE("(%p %p)\n", this, rhs
);
8199 /* ?_Init_cnt@_Winit@std@@0HA */
8200 int _Winit__Init_cnt
= -1;
8202 /* ??0_Winit@std@@QAE@XZ */
8203 /* ??0_Winit@std@@QEAA@XZ */
8204 DEFINE_THISCALL_WRAPPER(_Winit_ctor
, 4)
8205 void* __thiscall
_Winit_ctor(void *this)
8207 TRACE("(%p)\n", this);
8209 if(_Winit__Init_cnt
< 0)
8210 _Winit__Init_cnt
= 1;
8217 /* ??1_Winit@std@@QAE@XZ */
8218 /* ??1_Winit@std@@QAE@XZ */
8219 DEFINE_THISCALL_WRAPPER(_Winit_dtor
, 4)
8220 void __thiscall
_Winit_dtor(void *this)
8222 TRACE("(%p)\n", this);
8225 if(!_Winit__Init_cnt
) {
8226 basic_ostream_wchar_flush(&wcout
.obj
);
8227 basic_ostream_wchar_flush(&wcerr
.obj
);
8228 basic_ostream_wchar_flush(&wclog
.obj
);
8232 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
8233 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
8234 DEFINE_THISCALL_WRAPPER(_Winit_op_assign
, 8)
8235 void* __thiscall
_Winit_op_assign(void *this, void *rhs
)
8237 TRACE("(%p %p)\n", this, rhs
);
8241 void init_io(void *base
)
8244 init_iosb_rtti(base
);
8245 init_ios_base_rtti(base
);
8246 init_basic_ios_char_rtti(base
);
8247 init_basic_ios_wchar_rtti(base
);
8248 init_basic_ios_short_rtti(base
);
8249 init_basic_streambuf_char_rtti(base
);
8250 init_basic_streambuf_wchar_rtti(base
);
8251 init_basic_streambuf_short_rtti(base
);
8252 init_basic_filebuf_char_rtti(base
);
8253 init_basic_filebuf_wchar_rtti(base
);
8254 init_basic_filebuf_short_rtti(base
);
8255 init_basic_ostream_char_rtti(base
);
8256 init_basic_ostream_wchar_rtti(base
);
8257 init_basic_ostream_short_rtti(base
);
8258 init_basic_istream_char_rtti(base
);
8259 init_basic_istream_wchar_rtti(base
);
8260 init_basic_istream_short_rtti(base
);
8261 init_basic_iostream_char_rtti(base
);
8262 init_basic_iostream_wchar_rtti(base
);
8263 init_basic_iostream_short_rtti(base
);
8266 basic_filebuf_char_ctor_file(&filebuf_char_stdin
, stdin
);
8267 basic_istream_char_ctor(&cin
.obj
, &filebuf_char_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8269 basic_filebuf_short_ctor_file(&filebuf_short_stdin
, stdin
);
8270 basic_istream_short_ctor(&ucin
.obj
, &filebuf_short_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8272 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin
, stdin
);
8273 basic_istream_wchar_ctor(&wcin
.obj
, &filebuf_wchar_stdin
.base
, FALSE
/*FIXME*/, TRUE
);
8275 basic_filebuf_char_ctor_file(&filebuf_char_stdout
, stdout
);
8276 basic_ostream_char_ctor(&cout
.obj
, &filebuf_char_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8278 basic_filebuf_short_ctor_file(&filebuf_short_stdout
, stdout
);
8279 basic_ostream_short_ctor(&ucout
.obj
, &filebuf_short_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8281 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout
, stdout
);
8282 basic_ostream_wchar_ctor(&wcout
.obj
, &filebuf_wchar_stdout
.base
, FALSE
/*FIXME*/, TRUE
);
8284 basic_filebuf_char_ctor_file(&filebuf_char_stderr
, stderr
);
8285 basic_ostream_char_ctor(&cerr
.obj
, &filebuf_char_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8287 basic_filebuf_short_ctor_file(&filebuf_short_stderr
, stderr
);
8288 basic_ostream_short_ctor(&ucerr
.obj
, &filebuf_short_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8290 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr
, stderr
);
8291 basic_ostream_wchar_ctor(&wcerr
.obj
, &filebuf_wchar_stderr
.base
, FALSE
/*FIXME*/, TRUE
);
8293 basic_filebuf_char_ctor_file(&filebuf_char_log
, stderr
);
8294 basic_ostream_char_ctor(&clog
.obj
, &filebuf_char_log
.base
, FALSE
/*FIXME*/, TRUE
);
8296 basic_filebuf_short_ctor_file(&filebuf_short_log
, stderr
);
8297 basic_ostream_short_ctor(&uclog
.obj
, &filebuf_short_log
.base
, FALSE
/*FIXME*/, TRUE
);
8299 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log
, stderr
);
8300 basic_ostream_wchar_ctor(&wclog
.obj
, &filebuf_wchar_log
.base
, FALSE
/*FIXME*/, TRUE
);
8305 basic_istream_char_vbase_dtor(&cin
.obj
);
8306 basic_filebuf_char_dtor(&filebuf_char_stdin
);
8308 basic_istream_wchar_vbase_dtor(&ucin
.obj
);
8309 basic_filebuf_wchar_dtor(&filebuf_short_stdin
);
8311 basic_istream_wchar_vbase_dtor(&wcin
.obj
);
8312 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin
);
8314 basic_ostream_char_vbase_dtor(&cout
.obj
);
8315 basic_filebuf_char_dtor(&filebuf_char_stdout
);
8317 basic_ostream_wchar_vbase_dtor(&ucout
.obj
);
8318 basic_filebuf_wchar_dtor(&filebuf_short_stdout
);
8320 basic_ostream_wchar_vbase_dtor(&wcout
.obj
);
8321 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout
);
8323 basic_ostream_char_vbase_dtor(&cerr
.obj
);
8324 basic_filebuf_char_dtor(&filebuf_char_stderr
);
8326 basic_ostream_wchar_vbase_dtor(&ucerr
.obj
);
8327 basic_filebuf_wchar_dtor(&filebuf_short_stderr
);
8329 basic_ostream_wchar_vbase_dtor(&wcerr
.obj
);
8330 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr
);
8332 basic_ostream_char_vbase_dtor(&clog
.obj
);
8333 basic_filebuf_char_dtor(&filebuf_char_log
);
8335 basic_ostream_wchar_vbase_dtor(&uclog
.obj
);
8336 basic_filebuf_wchar_dtor(&filebuf_short_log
);
8338 basic_ostream_wchar_vbase_dtor(&wclog
.obj
);
8339 basic_filebuf_wchar_dtor(&filebuf_wchar_log
);