msvcrt: _filbuf should not lock any file.
[wine.git] / dlls / msvcp60 / ios.c
blob913086a65e35fb26d0e37be41cbe1e52a37abab7
1 /*
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
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
23 #include <limits.h>
24 #include <share.h>
25 #include <locale.h>
27 #include "msvcp.h"
28 #include "windef.h"
29 #include "winbase.h"
30 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
33 /* ?_Index@ios_base@std@@0HA */
34 int ios_base_Index = 0;
35 /* ?_Sync@ios_base@std@@0_NA */
36 MSVCP_bool ios_base_Sync = FALSE;
38 typedef struct {
39 streamoff off;
40 __int64 DECLSPEC_ALIGN(8) pos;
41 int state;
42 } fpos_int;
44 static inline const char* debugstr_fpos_int(fpos_int *fpos)
46 return wine_dbg_sprintf("fpos(%ld %s %d)", fpos->off, wine_dbgstr_longlong(fpos->pos), fpos->state);
49 typedef struct {
50 void (__cdecl *pfunc)(ios_base*, streamsize);
51 streamsize arg;
52 } manip_streamsize;
54 typedef struct {
55 void (__cdecl *pfunc)(ios_base*, int);
56 int arg;
57 } manip_int;
59 typedef enum {
60 INITFL_new = 0,
61 INITFL_open = 1,
62 INITFL_close = 2
63 } basic_filebuf__Initfl;
65 typedef struct {
66 basic_streambuf_char base;
67 codecvt_char *cvt;
68 int state0;
69 int state;
70 basic_string_char *str;
71 MSVCP_bool close;
72 locale loc;
73 FILE *file;
74 } basic_filebuf_char;
76 typedef struct {
77 basic_streambuf_wchar base;
78 codecvt_wchar *cvt;
79 int state0;
80 int state;
81 basic_string_char *str;
82 MSVCP_bool close;
83 locale loc;
84 FILE *file;
85 } basic_filebuf_wchar;
87 typedef enum {
88 STRINGBUF_allocated = 1,
89 STRINGBUF_no_write = 2,
90 STRINGBUF_no_read = 4,
91 STRINGBUF_append = 8,
92 STRINGBUF_at_end = 16
93 } basic_stringbuf_state;
95 typedef struct {
96 basic_streambuf_char base;
97 char *pendsave;
98 char *seekhigh;
99 int alsize;
100 int state;
101 char allocator; /* empty struct */
102 } basic_stringbuf_char;
104 typedef struct {
105 basic_streambuf_wchar base;
106 wchar_t *pendsave;
107 wchar_t *seekhigh;
108 int alsize;
109 int state;
110 char allocator; /* empty struct */
111 } basic_stringbuf_wchar;
113 typedef struct {
114 ios_base base;
115 basic_streambuf_char *strbuf;
116 struct _basic_ostream_char *stream;
117 char fillch;
118 } basic_ios_char;
120 typedef struct {
121 ios_base base;
122 basic_streambuf_wchar *strbuf;
123 struct _basic_ostream_wchar *stream;
124 wchar_t fillch;
125 } basic_ios_wchar;
127 typedef struct _basic_ostream_char {
128 const int *vbtable;
129 /* virtual inheritance
130 * basic_ios_char basic_ios;
132 } basic_ostream_char;
134 typedef struct _basic_ostream_wchar {
135 const int *vbtable;
136 /* virtual inheritance
137 * basic_ios_wchar basic_ios;
139 } basic_ostream_wchar;
141 typedef struct {
142 const int *vbtable;
143 streamsize count;
144 /* virtual inheritance
145 * basic_ios_char basic_ios;
147 } basic_istream_char;
149 typedef struct {
150 const int *vbtable;
151 streamsize count;
152 /* virtual inheritance
153 * basic_ios_wchar basic_ios;
155 } basic_istream_wchar;
157 typedef struct {
158 basic_istream_char base1;
159 basic_ostream_char base2;
160 /* virtual inheritance
161 * basic_ios_char basic_ios;
163 } basic_iostream_char;
165 typedef struct {
166 basic_istream_wchar base1;
167 basic_ostream_wchar base2;
168 /* virtual inheritance
169 * basic_ios_wchar basic_ios;
171 } basic_iostream_wchar;
173 typedef struct {
174 basic_ostream_char base;
175 basic_filebuf_char filebuf;
176 /* virtual inheritance
177 * basic_ios_char basic_ios;
179 } basic_ofstream_char;
181 typedef struct {
182 basic_ostream_wchar base;
183 basic_filebuf_wchar filebuf;
184 /* virtual inheritance
185 * basic_ios_wchar basic_ios;
187 } basic_ofstream_wchar;
189 typedef struct {
190 basic_istream_char base;
191 basic_filebuf_char filebuf;
192 /* virtual inheritance
193 * basic_ios_char basic_ios;
195 } basic_ifstream_char;
197 typedef struct {
198 basic_istream_wchar base;
199 basic_filebuf_wchar filebuf;
200 /* virtual inheritance
201 * basic_ios_wchar basic_ios;
203 } basic_ifstream_wchar;
205 typedef struct {
206 basic_iostream_char base;
207 basic_filebuf_char filebuf;
208 /* virtual inheritance
209 * basic_ios_char basic_ios;
211 } basic_fstream_char;
213 typedef struct {
214 basic_iostream_wchar base;
215 basic_filebuf_wchar filebuf;
216 /* virtual inheritance
217 * basic_ios_char basic_ios;
219 } basic_fstream_wchar;
221 typedef struct {
222 basic_ostream_char base;
223 basic_stringbuf_char strbuf;
224 /* virtual inheritance
225 * basic_ios_char basic_ios;
227 } basic_ostringstream_char;
229 typedef struct {
230 basic_ostream_wchar base;
231 basic_stringbuf_wchar strbuf;
232 /* virtual inheritance
233 * basic_ios_wchar basic_ios;
235 } basic_ostringstream_wchar;
237 typedef struct {
238 basic_istream_char base;
239 basic_stringbuf_char strbuf;
240 /* virtual inheritance
241 * basic_ios_char basic_ios;
243 } basic_istringstream_char;
245 typedef struct {
246 basic_istream_wchar base;
247 basic_stringbuf_wchar strbuf;
248 /* virtual inheritance
249 * basic_ios_wchar basic_ios;
251 } basic_istringstream_wchar;
253 typedef struct {
254 basic_iostream_char base;
255 basic_stringbuf_char strbuf;
256 /* virtual inheritance
257 * basic_ios_char basic_ios;
259 } basic_stringstream_char;
261 typedef struct {
262 basic_iostream_wchar base;
263 basic_stringbuf_wchar strbuf;
264 /* virtual inheritance
265 * basic_ios_wchar basic_ios;
267 } basic_stringstream_wchar;
269 typedef enum {
270 STRSTATE_Allocated = 1,
271 STRSTATE_Constant = 2,
272 STRSTATE_Dynamic = 4,
273 STRSTATE_Frozen = 8
274 } strstreambuf__Strstate;
276 typedef struct {
277 basic_streambuf_char base;
278 char *endsave;
279 char *seekhigh;
280 streamsize minsize;
281 int strmode;
282 void* (__cdecl *palloc)(MSVCP_size_t);
283 void (__cdecl *pfree)(void*);
284 } strstreambuf;
286 typedef struct {
287 basic_ostream_char base;
288 strstreambuf buf;
289 /* virtual inheritance
290 * basic_ios_char basic_ios;
292 } ostrstream;
294 typedef struct {
295 basic_istream_char base;
296 strstreambuf buf;
297 /* virtual inheritance
298 * basic_ios_char basic_ios;
300 } istrstream;
302 typedef struct {
303 basic_iostream_char base;
304 strstreambuf buf;
305 /* virtual inheritance
306 * basic_ios_char basic_ios;
308 } strstream;
310 extern const vtable_ptr MSVCP_iosb_vtable;
312 /* ??_7ios_base@std@@6B@ */
313 extern const vtable_ptr MSVCP_ios_base_vtable;
315 /* ??_7?$basic_ios@DU?$char_traits@D@std@@@std@@6B@ */
316 extern const vtable_ptr MSVCP_basic_ios_char_vtable;
318 /* ??_7?$basic_ios@_WU?$char_traits@_W@std@@@std@@6B@ */
319 extern const vtable_ptr MSVCP_basic_ios_wchar_vtable;
321 /* ??_7?$basic_ios@GU?$char_traits@G@std@@@std@@6B@ */
322 extern const vtable_ptr MSVCP_basic_ios_short_vtable;
324 /* ??_7?$basic_streambuf@DU?$char_traits@D@std@@@std@@6B@ */
325 extern const vtable_ptr MSVCP_basic_streambuf_char_vtable;
327 /* ??_7?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@6B@ */
328 extern const vtable_ptr MSVCP_basic_streambuf_wchar_vtable;
330 /* ??_7?$basic_streambuf@GU?$char_traits@G@std@@@std@@6B@ */
331 extern const vtable_ptr MSVCP_basic_streambuf_short_vtable;
333 /* ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@ */
334 extern const vtable_ptr MSVCP_basic_filebuf_char_vtable;
336 /* ??_7?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@6B@ */
337 extern const vtable_ptr MSVCP_basic_filebuf_wchar_vtable;
339 /* ??_7?$basic_filebuf@GU?$char_traits@G@std@@@std@@6B@ */
340 extern const vtable_ptr MSVCP_basic_filebuf_short_vtable;
342 /* ??_7?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
343 extern const vtable_ptr MSVCP_basic_stringbuf_char_vtable;
345 /* ??_7?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
346 extern const vtable_ptr MSVCP_basic_stringbuf_wchar_vtable;
348 /* ??_7?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
349 extern const vtable_ptr MSVCP_basic_stringbuf_short_vtable;
351 /* ??_8?$basic_ostream@DU?$char_traits@D@std@@@std@@7B@ */
352 const int basic_ostream_char_vbtable[] = {0, sizeof(basic_ostream_char)};
353 /* ??_7?$basic_ostream@DU?$char_traits@D@std@@@std@@6B@ */
354 extern const vtable_ptr MSVCP_basic_ostream_char_vtable;
356 /* ??_8?$basic_ostream@_WU?$char_traits@_W@std@@@std@@7B@ */
357 const int basic_ostream_wchar_vbtable[] = {0, sizeof(basic_ostream_wchar)};
358 /* ??_7?$basic_ostream@_WU?$char_traits@_W@std@@@std@@6B@ */
359 extern const vtable_ptr MSVCP_basic_ostream_wchar_vtable;
361 /* ??_8?$basic_ostream@GU?$char_traits@G@std@@@std@@7B@ */
362 const int basic_ostream_short_vbtable[] = {0, sizeof(basic_ostream_wchar)};
363 /* ??_7?$basic_ostream@GU?$char_traits@G@std@@@std@@6B@ */
364 extern const vtable_ptr MSVCP_basic_ostream_short_vtable;
366 /* ??_8?$basic_istream@DU?$char_traits@D@std@@@std@@7B@ */
367 const int basic_istream_char_vbtable[] = {0, sizeof(basic_istream_char)};
368 /* ??_7?$basic_istream@DU?$char_traits@D@std@@@std@@6B@ */
369 extern const vtable_ptr MSVCP_basic_istream_char_vtable;
371 /* ??_8?$basic_istream@_WU?$char_traits@_W@std@@@std@@7B@ */
372 const int basic_istream_wchar_vbtable[] = {0, sizeof(basic_istream_wchar)};
373 /* ??_7?$basic_istream@_WU?$char_traits@_W@std@@@std@@6B@ */
374 extern const vtable_ptr MSVCP_basic_istream_wchar_vtable;
376 /* ??_8?$basic_istream@GU?$char_traits@G@std@@@std@@7B@ */
377 const int basic_istream_short_vbtable[] = {0, sizeof(basic_istream_wchar)};
378 /* ??_7?$basic_istream@GU?$char_traits@G@std@@@std@@6B@ */
379 extern const vtable_ptr MSVCP_basic_istream_short_vtable;
381 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
382 const int basic_iostream_char_vbtable1[] = {0, sizeof(basic_iostream_char)};
383 /* ??_8?$basic_iostream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
384 const int basic_iostream_char_vbtable2[] = {0, sizeof(basic_iostream_char)-FIELD_OFFSET(basic_iostream_char, base2)};
385 /* ??_7?$basic_iostream@DU?$char_traits@D@std@@@std@@6B@ */
386 extern const vtable_ptr MSVCP_basic_iostream_char_vtable;
388 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
389 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
390 const int basic_iostream_wchar_vbtable1[] = {0, sizeof(basic_iostream_wchar)};
391 /* ??_8?$basic_iostream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
392 /* ??_8?$basic_iostream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
393 const int basic_iostream_wchar_vbtable2[] = {0, sizeof(basic_iostream_wchar)-FIELD_OFFSET(basic_iostream_wchar, base2)};
394 /* ??_7?$basic_iostream@_WU?$char_traits@_W@std@@@std@@6B@ */
395 extern const vtable_ptr MSVCP_basic_iostream_wchar_vtable;
396 /* ??_7?$basic_iostream@GU?$char_traits@G@std@@@std@@6B@ */
397 extern const vtable_ptr MSVCP_basic_iostream_short_vtable;
399 /* ??_8?$basic_ofstream@DU?$char_traits@D@std@@@std@@7B@ */
400 const int basic_ofstream_char_vbtable[] = {0, sizeof(basic_ofstream_char)};
401 /* ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@ */
402 extern const vtable_ptr MSVCP_basic_ofstream_char_vtable;
404 /* ??_8?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@7B@ */
405 const int basic_ofstream_wchar_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
406 /* ??_7?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@6B@ */
407 extern const vtable_ptr MSVCP_basic_ofstream_wchar_vtable;
409 /* ??_8?$basic_ofstream@GU?$char_traits@G@std@@@std@@7B@ */
410 const int basic_ofstream_short_vbtable[] = {0, sizeof(basic_ofstream_wchar)};
411 /* ??_7?$basic_ofstream@GU?$char_traits@G@std@@@std@@6B@ */
412 extern const vtable_ptr MSVCP_basic_ofstream_short_vtable;
414 /* ??_8?$basic_ifstream@DU?$char_traits@D@std@@@std@@7B@ */
415 const int basic_ifstream_char_vbtable[] = {0, sizeof(basic_ifstream_char)};
416 /* ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@ */
417 extern const vtable_ptr MSVCP_basic_ifstream_char_vtable;
419 /* ??_8?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@7B@ */
420 const int basic_ifstream_wchar_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
421 /* ??_7?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@6B@ */
422 extern const vtable_ptr MSVCP_basic_ifstream_wchar_vtable;
424 /* ??_8?$basic_ifstream@GU?$char_traits@G@std@@@std@@7B@ */
425 const int basic_ifstream_short_vbtable[] = {0, sizeof(basic_ifstream_wchar)};
426 /* ??_7?$basic_ifstream@GU?$char_traits@G@std@@@std@@6B@ */
427 extern const vtable_ptr MSVCP_basic_ifstream_short_vtable;
429 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
430 const int basic_fstream_char_vbtable1[] = {0, sizeof(basic_fstream_char)};
431 /* ??_8?$basic_fstream@DU?$char_traits@D@std@@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
432 const int basic_fstream_char_vbtable2[] = {0, sizeof(basic_fstream_char)-FIELD_OFFSET(basic_fstream_char, base.base2)};
433 /* ??_7?$basic_fstream@DU?$char_traits@D@std@@@std@@6B@ */
434 extern const vtable_ptr MSVCP_basic_fstream_char_vtable;
436 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
437 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
438 const int basic_fstream_wchar_vbtable1[] = {0, sizeof(basic_fstream_wchar)};
439 /* ??_8?$basic_fstream@_WU?$char_traits@_W@std@@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
440 /* ??_8?$basic_fstream@GU?$char_traits@G@std@@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
441 const int basic_fstream_wchar_vbtable2[] = {0, sizeof(basic_fstream_wchar)-FIELD_OFFSET(basic_fstream_wchar, base.base2)};
442 /* ??_7?$basic_fstream@_WU?$char_traits@_W@std@@@std@@6B@ */
443 extern const vtable_ptr MSVCP_basic_fstream_wchar_vtable;
444 /* ??_7?$basic_fstream@GU?$char_traits@G@std@@@std@@6B@ */
445 extern const vtable_ptr MSVCP_basic_fstream_short_vtable;
447 /* ??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
448 const int basic_ostringstream_char_vbtable[] = {0, sizeof(basic_ostringstream_char)};
449 /* ??_7?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
450 extern const vtable_ptr MSVCP_basic_ostringstream_char_vtable;
452 /* ??_8?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
453 const int basic_ostringstream_wchar_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
454 /* ??_7?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
455 extern const vtable_ptr MSVCP_basic_ostringstream_wchar_vtable;
457 /* ??_8?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
458 const int basic_ostringstream_short_vbtable[] = {0, sizeof(basic_ostringstream_wchar)};
459 /* ??_7?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
460 extern const vtable_ptr MSVCP_basic_ostringstream_short_vtable;
462 /* ??_8?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@ */
463 const int basic_istringstream_char_vbtable[] = {0, sizeof(basic_istringstream_char)};
464 /* ??_7?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
465 extern const vtable_ptr MSVCP_basic_istringstream_char_vtable;
467 /* ??_8?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B@ */
468 const int basic_istringstream_wchar_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
469 /* ??_7?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
470 extern const vtable_ptr MSVCP_basic_istringstream_wchar_vtable;
472 /* ??_8?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B@ */
473 const int basic_istringstream_short_vbtable[] = {0, sizeof(basic_istringstream_wchar)};
474 /* ??_7?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
475 extern const vtable_ptr MSVCP_basic_istringstream_short_vtable;
477 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_istream@DU?$char_traits@D@std@@@1@@ */
478 const int basic_stringstream_char_vbtable1[] = {0, sizeof(basic_stringstream_char)};
479 /* ??_8?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B?$basic_ostream@DU?$char_traits@D@std@@@1@@ */
480 const int basic_stringstream_char_vbtable2[] = {0, sizeof(basic_stringstream_char)-FIELD_OFFSET(basic_stringstream_char, base.base2)};
481 /* ??_7?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@6B@ */
482 extern const vtable_ptr MSVCP_basic_stringstream_char_vtable;
484 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_istream@_WU?$char_traits@_W@std@@@1@@ */
485 const int basic_stringstream_wchar_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
486 /* ??_8?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@7B?$basic_ostream@_WU?$char_traits@_W@std@@@1@@ */
487 const int basic_stringstream_wchar_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
488 /* ??_7?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@6B@ */
489 extern const vtable_ptr MSVCP_basic_stringstream_wchar_vtable;
491 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_istream@GU?$char_traits@G@std@@@1@@ */
492 const int basic_stringstream_short_vbtable1[] = {0, sizeof(basic_stringstream_wchar)};
493 /* ??_8?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@7B?$basic_ostream@GU?$char_traits@G@std@@@1@@ */
494 const int basic_stringstream_short_vbtable2[] = {0, sizeof(basic_stringstream_wchar)-FIELD_OFFSET(basic_stringstream_wchar, base.base2)};
495 /* ??_7?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@6B@ */
496 extern const vtable_ptr MSVCP_basic_stringstream_short_vtable;
498 /* ??_7strstreambuf@std@@6B */
499 extern const vtable_ptr MSVCP_strstreambuf_vtable;
501 static const int ostrstream_vbtable[] = {0, sizeof(ostrstream)};
502 extern const vtable_ptr MSVCP_ostrstream_vtable;
504 static const int istrstream_vbtable[] = {0, sizeof(istrstream)};
506 static const int strstream_vbtable1[] = {0, sizeof(strstream)};
507 static const int strstream_vbtable2[] = {0, sizeof(strstream)-FIELD_OFFSET(strstream, base.base2)};
508 extern const vtable_ptr MSVCP_strstream_vtable;
510 DEFINE_RTTI_DATA0(iosb, 0, ".?AV?$_Iosb@H@std@@")
511 DEFINE_RTTI_DATA1(ios_base, 0, &iosb_rtti_base_descriptor, ".?AV?$_Iosb@H@std@@")
512 DEFINE_RTTI_DATA2(basic_ios_char, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
513 ".?AV?$basic_ios@DU?$char_traits@D@std@@@std@@")
514 DEFINE_RTTI_DATA2(basic_ios_wchar, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
515 ".?AV?$basic_ios@_WU?$char_traits@_W@std@@@std@@")
516 DEFINE_RTTI_DATA2(basic_ios_short, 0, &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
517 ".?AV?$basic_ios@GU?$char_traits@G@std@@@std@@")
518 DEFINE_RTTI_DATA0(basic_streambuf_char, 0,
519 ".?AV?$basic_streambuf@DU?$char_traits@D@std@@@std@@")
520 DEFINE_RTTI_DATA0(basic_streambuf_wchar, 0,
521 ".?AV?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@")
522 DEFINE_RTTI_DATA0(basic_streambuf_short, 0,
523 ".?AV?$basic_streambuf@GU?$char_traits@G@std@@@std@@")
524 DEFINE_RTTI_DATA1(basic_filebuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
525 ".?AV?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@")
526 DEFINE_RTTI_DATA1(basic_filebuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
527 ".?AV?$basic_filebuf@GU?$char_traits@G@std@@@std@@")
528 DEFINE_RTTI_DATA1(basic_filebuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
529 ".?AV?$basic_filebuf@DU?$char_traits@D@std@@@std@@")
530 DEFINE_RTTI_DATA1(basic_stringbuf_char, 0, &basic_streambuf_char_rtti_base_descriptor,
531 ".?AV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
532 DEFINE_RTTI_DATA1(basic_stringbuf_wchar, 0, &basic_streambuf_wchar_rtti_base_descriptor,
533 ".?AV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
534 DEFINE_RTTI_DATA1(basic_stringbuf_short, 0, &basic_streambuf_short_rtti_base_descriptor,
535 ".?AV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
536 DEFINE_RTTI_DATA3(basic_ostream_char, sizeof(basic_ostream_char), &basic_ios_char_rtti_base_descriptor,
537 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
538 ".?AV?$basic_ostream@DU?$char_traits@D@std@@@std@@")
539 DEFINE_RTTI_DATA3(basic_ostream_wchar, sizeof(basic_ostream_wchar), &basic_ios_wchar_rtti_base_descriptor,
540 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
541 ".?AV?$basic_ostream@_WU?$char_traits@_W@std@@@std@@")
542 DEFINE_RTTI_DATA3(basic_ostream_short, sizeof(basic_ostream_wchar), &basic_ios_short_rtti_base_descriptor,
543 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
544 ".?AV?$basic_ostream@GU?$char_traits@G@std@@@std@@")
545 DEFINE_RTTI_DATA3(basic_istream_char, sizeof(basic_istream_char), &basic_ios_char_rtti_base_descriptor,
546 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
547 ".?AV?$basic_istream@DU?$char_traits@D@std@@@std@@")
548 DEFINE_RTTI_DATA3(basic_istream_wchar, sizeof(basic_istream_wchar), &basic_ios_wchar_rtti_base_descriptor,
549 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
550 ".?AV?$basic_istream@_WU?$char_traits@_W@std@@@std@@")
551 DEFINE_RTTI_DATA3(basic_istream_short, sizeof(basic_istream_wchar), &basic_ios_short_rtti_base_descriptor,
552 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
553 ".?AV?$basic_istream@GU?$char_traits@G@std@@@std@@")
554 DEFINE_RTTI_DATA8(basic_iostream_char, sizeof(basic_iostream_char),
555 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
556 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
557 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
558 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
559 ".?AV?$basic_iostream@DU?$char_traits@D@std@@@std@@")
560 DEFINE_RTTI_DATA8(basic_iostream_wchar, sizeof(basic_iostream_wchar),
561 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
562 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
563 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
564 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
565 ".?AV?$basic_iostream@_WU?$char_traits@_W@std@@@std@@")
566 DEFINE_RTTI_DATA8(basic_iostream_short, sizeof(basic_iostream_wchar),
567 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
568 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
569 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
570 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
571 ".?AV?$basic_iostream@GU?$char_traits@G@std@@@std@@")
572 DEFINE_RTTI_DATA4(basic_ofstream_char, sizeof(basic_ofstream_char),
573 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
574 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
575 ".?AV?$basic_ofstream@DU?$char_traits@D@std@@@std@@")
576 DEFINE_RTTI_DATA4(basic_ofstream_wchar, sizeof(basic_ofstream_wchar),
577 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
578 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
579 ".?AV?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@")
580 DEFINE_RTTI_DATA4(basic_ofstream_short, sizeof(basic_ofstream_wchar),
581 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
582 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
583 ".?AV?$basic_ofstream@GU?$char_traits@G@std@@@std@@")
584 DEFINE_RTTI_DATA4(basic_ifstream_char, sizeof(basic_ifstream_char),
585 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
586 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
587 ".?AV?$basic_ifstream@DU?$char_traits@D@std@@@std@@")
588 DEFINE_RTTI_DATA4(basic_ifstream_wchar, sizeof(basic_ifstream_wchar),
589 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
590 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
591 ".?AV?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@")
592 DEFINE_RTTI_DATA4(basic_ifstream_short, sizeof(basic_ifstream_wchar),
593 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
594 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
595 ".?AV?$basic_ifstream@GU?$char_traits@G@std@@@std@@")
596 DEFINE_RTTI_DATA8(basic_fstream_char, sizeof(basic_fstream_char),
597 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
598 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
599 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
600 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
601 ".?AV?$basic_fstream@DU?$char_traits@D@std@@@std@@")
602 DEFINE_RTTI_DATA8(basic_fstream_wchar, sizeof(basic_fstream_wchar),
603 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
604 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
605 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
606 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
607 ".?AV?$basic_fstream@_WU?$char_traits@_W@std@@@std@@")
608 DEFINE_RTTI_DATA8(basic_fstream_short, sizeof(basic_fstream_wchar),
609 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
610 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
611 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
612 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
613 ".?AV?$basic_fstream@GU?$char_traits@G@std@@@std@@")
614 DEFINE_RTTI_DATA4(basic_ostringstream_char, sizeof(basic_ostringstream_char),
615 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
616 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
617 ".?AV?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
618 DEFINE_RTTI_DATA4(basic_ostringstream_wchar, sizeof(basic_ostringstream_wchar),
619 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
620 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
621 ".?AV?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
622 DEFINE_RTTI_DATA4(basic_ostringstream_short, sizeof(basic_ostringstream_wchar),
623 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
624 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
625 ".?AV?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
626 DEFINE_RTTI_DATA4(basic_istringstream_char, sizeof(basic_istringstream_char),
627 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
628 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
629 ".?AV?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
630 DEFINE_RTTI_DATA4(basic_istringstream_wchar, sizeof(basic_istringstream_wchar),
631 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
632 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
633 ".?AV?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
634 DEFINE_RTTI_DATA4(basic_istringstream_short, sizeof(basic_istringstream_wchar),
635 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
636 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
637 ".?AV?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
638 DEFINE_RTTI_DATA8(basic_stringstream_char, sizeof(basic_stringstream_char),
639 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
640 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
641 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
642 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
643 ".?AV?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@")
644 DEFINE_RTTI_DATA8(basic_stringstream_wchar, sizeof(basic_stringstream_wchar),
645 &basic_istream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
646 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
647 &basic_ostream_wchar_rtti_base_descriptor, &basic_ios_wchar_rtti_base_descriptor,
648 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
649 ".?AV?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@")
650 DEFINE_RTTI_DATA8(basic_stringstream_short, sizeof(basic_stringstream_wchar),
651 &basic_istream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
652 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
653 &basic_ostream_short_rtti_base_descriptor, &basic_ios_short_rtti_base_descriptor,
654 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
655 ".?AV?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@")
656 DEFINE_RTTI_DATA1(strstreambuf, sizeof(strstreambuf),
657 &basic_streambuf_char_rtti_base_descriptor, ".?AVstrstreambuf@std@@")
658 DEFINE_RTTI_DATA4(ostrstream, sizeof(ostrstream),
659 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
660 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
661 "?AVostrstream@std@@")
662 DEFINE_RTTI_DATA8(strstream, sizeof(strstream),
663 &basic_istream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
664 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
665 &basic_ostream_char_rtti_base_descriptor, &basic_ios_char_rtti_base_descriptor,
666 &ios_base_rtti_base_descriptor, &iosb_rtti_base_descriptor,
667 "?AVstrstream@std@@")
669 #ifndef __GNUC__
670 void __asm_dummy_vtables(void) {
671 #endif
672 __ASM_VTABLE(iosb,
673 VTABLE_ADD_FUNC(iosb_vector_dtor));
674 __ASM_VTABLE(ios_base,
675 VTABLE_ADD_FUNC(ios_base_vector_dtor));
676 __ASM_VTABLE(basic_ios_char,
677 VTABLE_ADD_FUNC(basic_ios_char_vector_dtor));
678 __ASM_VTABLE(basic_ios_wchar,
679 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
680 __ASM_VTABLE(basic_ios_short,
681 VTABLE_ADD_FUNC(basic_ios_wchar_vector_dtor));
682 __ASM_VTABLE(basic_streambuf_char,
683 VTABLE_ADD_FUNC(basic_streambuf_char_vector_dtor)
684 VTABLE_ADD_FUNC(basic_streambuf_char_overflow)
685 VTABLE_ADD_FUNC(basic_streambuf_char_pbackfail)
686 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
687 VTABLE_ADD_FUNC(basic_streambuf_char_underflow)
688 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
689 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
690 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
691 VTABLE_ADD_FUNC(basic_streambuf_char_seekoff)
692 VTABLE_ADD_FUNC(basic_streambuf_char_seekpos)
693 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
694 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
695 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
696 __ASM_VTABLE(basic_streambuf_wchar,
697 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
698 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
699 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
700 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
701 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
702 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
703 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
704 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
705 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
706 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
707 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
708 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
709 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
710 __ASM_VTABLE(basic_streambuf_short,
711 VTABLE_ADD_FUNC(basic_streambuf_wchar_vector_dtor)
712 VTABLE_ADD_FUNC(basic_streambuf_wchar_overflow)
713 VTABLE_ADD_FUNC(basic_streambuf_wchar_pbackfail)
714 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
715 VTABLE_ADD_FUNC(basic_streambuf_wchar_underflow)
716 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
717 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
718 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
719 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekoff)
720 VTABLE_ADD_FUNC(basic_streambuf_wchar_seekpos)
721 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
722 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
723 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
724 __ASM_VTABLE(basic_filebuf_char,
725 VTABLE_ADD_FUNC(basic_filebuf_char_vector_dtor)
726 VTABLE_ADD_FUNC(basic_filebuf_char_overflow)
727 VTABLE_ADD_FUNC(basic_filebuf_char_pbackfail)
728 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
729 VTABLE_ADD_FUNC(basic_filebuf_char_underflow)
730 VTABLE_ADD_FUNC(basic_filebuf_char_uflow)
731 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
732 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
733 VTABLE_ADD_FUNC(basic_filebuf_char_seekoff)
734 VTABLE_ADD_FUNC(basic_filebuf_char_seekpos)
735 VTABLE_ADD_FUNC(basic_filebuf_char_setbuf)
736 VTABLE_ADD_FUNC(basic_filebuf_char_sync)
737 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
738 __ASM_VTABLE(basic_filebuf_wchar,
739 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
740 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
741 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
742 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
743 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
744 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
745 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
746 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
747 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
748 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
749 VTABLE_ADD_FUNC(basic_filebuf_wchar_setbuf)
750 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
751 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
752 __ASM_VTABLE(basic_filebuf_short,
753 VTABLE_ADD_FUNC(basic_filebuf_wchar_vector_dtor)
754 VTABLE_ADD_FUNC(basic_filebuf_wchar_overflow)
755 VTABLE_ADD_FUNC(basic_filebuf_wchar_pbackfail)
756 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
757 VTABLE_ADD_FUNC(basic_filebuf_wchar_underflow)
758 VTABLE_ADD_FUNC(basic_filebuf_wchar_uflow)
759 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
760 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
761 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekoff)
762 VTABLE_ADD_FUNC(basic_filebuf_wchar_seekpos)
763 VTABLE_ADD_FUNC(basic_filebuf_short_setbuf)
764 VTABLE_ADD_FUNC(basic_filebuf_wchar_sync)
765 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
766 __ASM_VTABLE(basic_stringbuf_char,
767 VTABLE_ADD_FUNC(basic_stringbuf_char_vector_dtor)
768 VTABLE_ADD_FUNC(basic_stringbuf_char_overflow)
769 VTABLE_ADD_FUNC(basic_stringbuf_char_pbackfail)
770 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
771 VTABLE_ADD_FUNC(basic_stringbuf_char_underflow)
772 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
773 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
774 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
775 VTABLE_ADD_FUNC(basic_stringbuf_char_seekoff)
776 VTABLE_ADD_FUNC(basic_stringbuf_char_seekpos)
777 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
778 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
779 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
780 __ASM_VTABLE(basic_stringbuf_wchar,
781 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
782 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
783 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
784 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
785 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
786 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
787 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
788 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
789 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
790 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
791 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
792 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
793 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
794 __ASM_VTABLE(basic_stringbuf_short,
795 VTABLE_ADD_FUNC(basic_stringbuf_wchar_vector_dtor)
796 VTABLE_ADD_FUNC(basic_stringbuf_wchar_overflow)
797 VTABLE_ADD_FUNC(basic_stringbuf_wchar_pbackfail)
798 VTABLE_ADD_FUNC(basic_streambuf_wchar_showmanyc)
799 VTABLE_ADD_FUNC(basic_stringbuf_wchar_underflow)
800 VTABLE_ADD_FUNC(basic_streambuf_wchar_uflow)
801 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsgetn)
802 VTABLE_ADD_FUNC(basic_streambuf_wchar_xsputn)
803 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekoff)
804 VTABLE_ADD_FUNC(basic_stringbuf_wchar_seekpos)
805 VTABLE_ADD_FUNC(basic_streambuf_wchar_setbuf)
806 VTABLE_ADD_FUNC(basic_streambuf_wchar_sync)
807 VTABLE_ADD_FUNC(basic_streambuf_wchar_imbue));
808 __ASM_VTABLE(basic_ostream_char,
809 VTABLE_ADD_FUNC(basic_ostream_char_vector_dtor));
810 __ASM_VTABLE(basic_ostream_wchar,
811 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
812 __ASM_VTABLE(basic_ostream_short,
813 VTABLE_ADD_FUNC(basic_ostream_wchar_vector_dtor));
814 __ASM_VTABLE(basic_istream_char,
815 VTABLE_ADD_FUNC(basic_istream_char_vector_dtor));
816 __ASM_VTABLE(basic_istream_wchar,
817 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
818 __ASM_VTABLE(basic_istream_short,
819 VTABLE_ADD_FUNC(basic_istream_wchar_vector_dtor));
820 __ASM_VTABLE(basic_iostream_char,
821 VTABLE_ADD_FUNC(basic_iostream_char_vector_dtor));
822 __ASM_VTABLE(basic_iostream_wchar,
823 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
824 __ASM_VTABLE(basic_iostream_short,
825 VTABLE_ADD_FUNC(basic_iostream_wchar_vector_dtor));
826 __ASM_VTABLE(basic_ofstream_char,
827 VTABLE_ADD_FUNC(basic_ofstream_char_vector_dtor));
828 __ASM_VTABLE(basic_ofstream_wchar,
829 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
830 __ASM_VTABLE(basic_ofstream_short,
831 VTABLE_ADD_FUNC(basic_ofstream_wchar_vector_dtor));
832 __ASM_VTABLE(basic_ifstream_char,
833 VTABLE_ADD_FUNC(basic_ifstream_char_vector_dtor));
834 __ASM_VTABLE(basic_ifstream_wchar,
835 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
836 __ASM_VTABLE(basic_ifstream_short,
837 VTABLE_ADD_FUNC(basic_ifstream_wchar_vector_dtor));
838 __ASM_VTABLE(basic_fstream_char,
839 VTABLE_ADD_FUNC(basic_fstream_char_vector_dtor));
840 __ASM_VTABLE(basic_fstream_wchar,
841 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
842 __ASM_VTABLE(basic_fstream_short,
843 VTABLE_ADD_FUNC(basic_fstream_wchar_vector_dtor));
844 __ASM_VTABLE(basic_ostringstream_char,
845 VTABLE_ADD_FUNC(basic_ostringstream_char_vector_dtor));
846 __ASM_VTABLE(basic_ostringstream_wchar,
847 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
848 __ASM_VTABLE(basic_ostringstream_short,
849 VTABLE_ADD_FUNC(basic_ostringstream_wchar_vector_dtor));
850 __ASM_VTABLE(basic_istringstream_char,
851 VTABLE_ADD_FUNC(basic_istringstream_char_vector_dtor));
852 __ASM_VTABLE(basic_istringstream_wchar,
853 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
854 __ASM_VTABLE(basic_istringstream_short,
855 VTABLE_ADD_FUNC(basic_istringstream_wchar_vector_dtor));
856 __ASM_VTABLE(basic_stringstream_char,
857 VTABLE_ADD_FUNC(basic_stringstream_char_vector_dtor));
858 __ASM_VTABLE(basic_stringstream_wchar,
859 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
860 __ASM_VTABLE(basic_stringstream_short,
861 VTABLE_ADD_FUNC(basic_stringstream_wchar_vector_dtor));
862 __ASM_VTABLE(strstreambuf,
863 VTABLE_ADD_FUNC(strstreambuf_vector_dtor)
864 VTABLE_ADD_FUNC(strstreambuf_overflow)
865 VTABLE_ADD_FUNC(strstreambuf_pbackfail)
866 VTABLE_ADD_FUNC(basic_streambuf_char_showmanyc)
867 VTABLE_ADD_FUNC(strstreambuf_underflow)
868 VTABLE_ADD_FUNC(basic_streambuf_char_uflow)
869 VTABLE_ADD_FUNC(basic_streambuf_char_xsgetn)
870 VTABLE_ADD_FUNC(basic_streambuf_char_xsputn)
871 VTABLE_ADD_FUNC(strstreambuf_seekoff)
872 VTABLE_ADD_FUNC(strstreambuf_seekpos)
873 VTABLE_ADD_FUNC(basic_streambuf_char_setbuf)
874 VTABLE_ADD_FUNC(basic_streambuf_char_sync)
875 VTABLE_ADD_FUNC(basic_streambuf_char_imbue));
876 __ASM_VTABLE(ostrstream,
877 VTABLE_ADD_FUNC(ostrstream_vector_dtor));
878 __ASM_VTABLE(strstream,
879 VTABLE_ADD_FUNC(strstream_vector_dtor));
880 #ifndef __GNUC__
882 #endif
884 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
885 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
886 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp_next, 16)
887 void __thiscall basic_streambuf_char_setp_next(basic_streambuf_char *this, char *first, char *next, char *last)
889 TRACE("(%p %p %p %p)\n", this, first, next, last);
891 this->wbuf = first;
892 this->wpos = next;
893 this->wsize = last-next;
896 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD0@Z */
897 /* ?setp@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD0@Z */
898 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setp, 12)
899 void __thiscall basic_streambuf_char_setp(basic_streambuf_char *this, char *first, char *last)
901 basic_streambuf_char_setp_next(this, first, first, last);
904 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAD00@Z */
905 /* ?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z */
906 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setg, 16)
907 void __thiscall basic_streambuf_char_setg(basic_streambuf_char *this, char *first, char *next, char *last)
909 TRACE("(%p %p %p %p)\n", this, first, next, last);
911 this->rbuf = first;
912 this->rpos = next;
913 this->rsize = last-next;
916 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
917 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
918 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init_empty, 4)
919 void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
921 TRACE("(%p)\n", this);
923 this->prbuf = &this->rbuf;
924 this->pwbuf = &this->wbuf;
925 this->prpos = &this->rpos;
926 this->pwpos = &this->wpos;
927 this->prsize = &this->rsize;
928 this->pwsize = &this->wsize;
930 basic_streambuf_char_setp(this, NULL, NULL);
931 basic_streambuf_char_setg(this, NULL, NULL, NULL);
934 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@W4_Uninitialized@1@@Z */
935 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
936 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor_uninitialized, 8)
937 basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_streambuf_char *this, int uninitialized)
939 TRACE("(%p %d)\n", this, uninitialized);
940 this->vtable = &MSVCP_basic_streambuf_char_vtable;
941 return this;
944 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAE@XZ */
945 /* ??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ */
946 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_ctor, 4)
947 basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char *this)
949 TRACE("(%p)\n", this);
951 this->vtable = &MSVCP_basic_streambuf_char_vtable;
952 locale_ctor(&this->loc);
953 basic_streambuf_char__Init_empty(this);
955 return this;
958 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
959 /* ??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
960 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_dtor, 4)
961 void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
963 TRACE("(%p)\n", this);
965 locale_dtor(&this->loc);
968 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_vector_dtor, 8)
969 basic_streambuf_char* __thiscall basic_streambuf_char_vector_dtor(basic_streambuf_char *this, unsigned int flags)
971 TRACE("(%p %x)\n", this, flags);
972 if(flags & 2) {
973 /* we have an array, with the number of elements stored before the first object */
974 INT_PTR i, *ptr = (INT_PTR *)this-1;
976 for(i=*ptr-1; i>=0; i--)
977 basic_streambuf_char_dtor(this+i);
978 MSVCRT_operator_delete(ptr);
979 } else {
980 basic_streambuf_char_dtor(this);
981 if(flags & 1)
982 MSVCRT_operator_delete(this);
985 return this;
988 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
989 /* ?_Gnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
990 static streamsize basic_streambuf_char__Gnavail(const basic_streambuf_char *this)
992 TRACE("(%p)\n", this);
993 return *this->prpos ? *this->prsize : 0;
996 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
997 /* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
998 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4)
999 char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this)
1001 TRACE("(%p)\n", this);
1002 (*this->prsize)++;
1003 (*this->prpos)--;
1004 return *this->prpos;
1007 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1008 /* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1009 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4)
1010 char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this)
1012 TRACE("(%p)\n", this);
1013 (*this->prsize)--;
1014 return (*this->prpos)++;
1017 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1018 /* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1019 static char* basic_streambuf_char__Gnpreinc(basic_streambuf_char *this)
1021 TRACE("(%p)\n", this);
1022 (*this->prsize)--;
1023 (*this->prpos)++;
1024 return *this->prpos;
1027 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */
1028 /* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAPEAD0PEAH001@Z */
1029 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Init, 28)
1030 void __thiscall basic_streambuf_char__Init(basic_streambuf_char *this, char **gf, char **gn, int *gc, char **pf, char **pn, int *pc)
1032 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1034 this->prbuf = gf;
1035 this->pwbuf = pf;
1036 this->prpos = gn;
1037 this->pwpos = pn;
1038 this->prsize = gc;
1039 this->pwsize = pc;
1042 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1043 /* ?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1044 static void basic_streambuf_char__Lock(basic_streambuf_char *this)
1046 TRACE("(%p)\n", this);
1049 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
1050 /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBA_JXZ */
1051 static streamsize basic_streambuf_char__Pnavail(const basic_streambuf_char *this)
1053 TRACE("(%p)\n", this);
1054 return *this->pwpos ? *this->pwsize : 0;
1057 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */
1058 /* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ */
1059 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4)
1060 char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this)
1062 TRACE("(%p)\n", this);
1063 (*this->pwsize)--;
1064 return (*this->pwpos)++;
1067 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1068 /* ?underflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1069 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_underflow, 4)
1070 #define call_basic_streambuf_char_underflow(this) CALL_VTBL_FUNC(this, 16, \
1071 int, (basic_streambuf_char*), (this))
1072 int __thiscall basic_streambuf_char_underflow(basic_streambuf_char *this)
1074 TRACE("(%p)\n", this);
1075 return EOF;
1078 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1079 /* ?uflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1080 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_uflow, 4)
1081 #define call_basic_streambuf_char_uflow(this) CALL_VTBL_FUNC(this, 20, \
1082 int, (basic_streambuf_char*), (this))
1083 int __thiscall basic_streambuf_char_uflow(basic_streambuf_char *this)
1085 int ret;
1087 TRACE("(%p)\n", this);
1089 if(call_basic_streambuf_char_underflow(this)==EOF)
1090 return EOF;
1092 ret = (unsigned char)**this->prpos;
1093 (*this->prsize)--;
1094 (*this->prpos)++;
1095 return ret;
1098 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
1099 /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z */
1100 static streamsize basic_streambuf_char__Xsgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1102 streamsize copied, chunk;
1103 int c;
1105 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1107 for(copied=0; copied<count && size;) {
1108 chunk = basic_streambuf_char__Gnavail(this);
1109 if(chunk > count-copied)
1110 chunk = count-copied;
1112 if(chunk > 0) {
1113 memcpy_s(ptr+copied, size, *this->prpos, chunk);
1114 *this->prpos += chunk;
1115 *this->prsize -= chunk;
1116 copied += chunk;
1117 size -= chunk;
1118 }else if((c = call_basic_streambuf_char_uflow(this)) != EOF) {
1119 ptr[copied] = c;
1120 copied++;
1121 size--;
1122 }else {
1123 break;
1127 return copied;
1130 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
1131 /* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
1132 static streamsize basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, char *ptr, MSVCP_size_t size, streamsize count)
1134 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1135 return basic_streambuf_char__Xsgetn_s(this, ptr, size, count);
1138 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1139 /* ?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1140 static void basic_streambuf_char__Unlock(basic_streambuf_char *this)
1142 TRACE("(%p)\n", this);
1145 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1146 /* ?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1147 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_eback, 4)
1148 char* __thiscall basic_streambuf_char_eback(const basic_streambuf_char *this)
1150 TRACE("(%p)\n", this);
1151 return *this->prbuf;
1154 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1155 /* ?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1156 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gptr, 4)
1157 char* __thiscall basic_streambuf_char_gptr(const basic_streambuf_char *this)
1159 TRACE("(%p)\n", this);
1160 return *this->prpos;
1163 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1164 /* ?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1165 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_egptr, 4)
1166 char* __thiscall basic_streambuf_char_egptr(const basic_streambuf_char *this)
1168 TRACE("(%p)\n", this);
1169 return *this->prpos+*this->prsize;
1172 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1173 /* ?epptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1174 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_epptr, 4)
1175 char* __thiscall basic_streambuf_char_epptr(const basic_streambuf_char *this)
1177 TRACE("(%p)\n", this);
1178 return *this->pwpos+*this->pwsize;
1181 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1182 /* ?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1183 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_gbump, 8)
1184 void __thiscall basic_streambuf_char_gbump(basic_streambuf_char *this, int off)
1186 TRACE("(%p %d)\n", this, off);
1187 *this->prpos += off;
1188 *this->prsize -= off;
1191 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z */
1192 /* ?imbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAXAEBVlocale@2@@Z */
1193 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_imbue, 8)
1194 #define call_basic_streambuf_char_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1195 void, (basic_streambuf_char*, const locale*), (this, loc))
1196 void __thiscall basic_streambuf_char_imbue(basic_streambuf_char *this, const locale *loc)
1198 TRACE("(%p %p)\n", this, loc);
1201 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1202 /* ?overflow@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1203 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_overflow, 8)
1204 #define call_basic_streambuf_char_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1205 int, (basic_streambuf_char*, int), (this, ch))
1206 int __thiscall basic_streambuf_char_overflow(basic_streambuf_char *this, int ch)
1208 TRACE("(%p %d)\n", this, ch);
1209 return EOF;
1212 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
1213 /* ?pbackfail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
1214 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbackfail, 8)
1215 #define call_basic_streambuf_char_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1216 int, (basic_streambuf_char*, int), (this, ch))
1217 int __thiscall basic_streambuf_char_pbackfail(basic_streambuf_char *this, int ch)
1219 TRACE("(%p %d)\n", this, ch);
1220 return EOF;
1223 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1224 /* ?pbase@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1225 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbase, 4)
1226 char* __thiscall basic_streambuf_char_pbase(const basic_streambuf_char *this)
1228 TRACE("(%p)\n", this);
1229 return *this->pwbuf;
1232 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXH@Z */
1233 /* ?pbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z */
1234 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pbump, 8)
1235 void __thiscall basic_streambuf_char_pbump(basic_streambuf_char *this, int off)
1237 TRACE("(%p %d)\n", this, off);
1238 *this->pwpos += off;
1239 *this->pwsize -= off;
1242 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEPADXZ */
1243 /* ?pptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ */
1244 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pptr, 4)
1245 char* __thiscall basic_streambuf_char_pptr(const basic_streambuf_char *this)
1247 TRACE("(%p)\n", this);
1248 return *this->pwpos;
1251 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1252 /* ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1253 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubimbue, 12)
1254 locale* __thiscall basic_streambuf_char_pubimbue(basic_streambuf_char *this, locale *ret, const locale *loc)
1256 TRACE("(%p %p)\n", this, loc);
1257 memcpy(ret, &this->loc, sizeof(locale));
1258 call_basic_streambuf_char_imbue(this, loc);
1259 locale_copy_ctor(&this->loc, loc);
1260 return ret;
1263 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1264 /* ?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1265 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekoff, 20)
1266 #define call_basic_streambuf_char_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1267 fpos_int*, (basic_streambuf_char*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
1268 fpos_int* __thiscall basic_streambuf_char_seekoff(basic_streambuf_char *this,
1269 fpos_int *ret, streamoff off, int way, int mode)
1271 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1272 ret->off = -1;
1273 ret->pos = 0;
1274 ret->state = 0;
1275 return ret;
1278 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
1279 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
1280 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
1281 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
1282 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1283 /* ?pubseekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1284 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekoff, 20)
1285 fpos_int* __thiscall basic_streambuf_char_pubseekoff(basic_streambuf_char *this,
1286 fpos_int *ret, streamoff off, int way, int mode)
1288 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
1289 return call_basic_streambuf_char_seekoff(this, ret, off, way, mode);
1292 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
1293 /* ?seekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
1294 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_seekpos, 36)
1295 #define call_basic_streambuf_char_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
1296 fpos_int*, (basic_streambuf_char*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
1297 fpos_int* __thiscall basic_streambuf_char_seekpos(basic_streambuf_char *this,
1298 fpos_int *ret, fpos_int pos, int mode)
1300 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1301 ret->off = -1;
1302 ret->pos = 0;
1303 ret->state = 0;
1304 return ret;
1307 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
1308 /* ?pubseekpos@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
1309 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubseekpos, 36)
1310 fpos_int* __thiscall basic_streambuf_char_pubseekpos(basic_streambuf_char *this,
1311 fpos_int *ret, fpos_int pos, int mode)
1313 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
1314 return call_basic_streambuf_char_seekpos(this, ret, pos, mode);
1317 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z */
1318 /* ?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAPEAV12@PEAD_J@Z */
1319 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_setbuf, 12)
1320 #define call_basic_streambuf_char_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
1321 basic_streambuf_char*, (basic_streambuf_char*, char*, streamsize), (this, buf, count))
1322 basic_streambuf_char* __thiscall basic_streambuf_char_setbuf(basic_streambuf_char *this, char *buf, streamsize count)
1324 TRACE("(%p %p %ld)\n", this, buf, count);
1325 return this;
1328 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PADH@Z */
1329 /* ?pubsetbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEAD_J@Z */
1330 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsetbuf, 12)
1331 basic_streambuf_char* __thiscall basic_streambuf_char_pubsetbuf(basic_streambuf_char *this, char *buf, streamsize count)
1333 TRACE("(%p %p %ld)\n", this, buf, count);
1334 return call_basic_streambuf_char_setbuf(this, buf, count);
1337 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1338 /* ?sync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
1339 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sync, 4)
1340 #define call_basic_streambuf_char_sync(this) CALL_VTBL_FUNC(this, 44, \
1341 int, (basic_streambuf_char*), (this))
1342 int __thiscall basic_streambuf_char_sync(basic_streambuf_char *this)
1344 TRACE("(%p)\n", this);
1345 return 0;
1348 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1349 /* ?pubsync@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1350 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_pubsync, 4)
1351 int __thiscall basic_streambuf_char_pubsync(basic_streambuf_char *this)
1353 TRACE("(%p)\n", this);
1354 return call_basic_streambuf_char_sync(this);
1357 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
1358 /* ?sgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
1359 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetn, 12)
1360 streamsize __thiscall basic_streambuf_char_sgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1362 TRACE("(%p %p %ld)\n", this, ptr, count);
1363 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1366 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
1367 /* ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JXZ */
1368 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_showmanyc, 4)
1369 #define call_basic_streambuf_char_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
1370 streamsize, (basic_streambuf_char*), (this))
1371 streamsize __thiscall basic_streambuf_char_showmanyc(basic_streambuf_char *this)
1373 TRACE("(%p)\n", this);
1374 return 0;
1377 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1378 /* ?in_avail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JXZ */
1379 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_in_avail, 4)
1380 streamsize __thiscall basic_streambuf_char_in_avail(basic_streambuf_char *this)
1382 streamsize ret;
1384 TRACE("(%p)\n", this);
1386 ret = basic_streambuf_char__Gnavail(this);
1387 return ret ? ret : call_basic_streambuf_char_showmanyc(this);
1390 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1391 /* ?sputbackc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1392 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputbackc, 8)
1393 int __thiscall basic_streambuf_char_sputbackc(basic_streambuf_char *this, char ch)
1395 TRACE("(%p %d)\n", this, ch);
1396 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
1397 (*this->prsize)++;
1398 (*this->prpos)--;
1399 return (unsigned char)ch;
1402 return call_basic_streambuf_char_pbackfail(this, (unsigned char)ch);
1405 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHD@Z */
1406 /* ?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z */
1407 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputc, 8)
1408 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char *this, char ch)
1410 TRACE("(%p %d)\n", this, ch);
1411 return basic_streambuf_char__Pnavail(this) ?
1412 (unsigned char)(*basic_streambuf_char__Pninc(this) = ch) :
1413 call_basic_streambuf_char_overflow(this, (unsigned char)ch);
1416 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1417 /* ?sungetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1418 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sungetc, 4)
1419 int __thiscall basic_streambuf_char_sungetc(basic_streambuf_char *this)
1421 TRACE("(%p)\n", this);
1422 if(*this->prpos && *this->prpos>*this->prbuf) {
1423 (*this->prsize)++;
1424 (*this->prpos)--;
1425 return (unsigned char)**this->prpos;
1428 return call_basic_streambuf_char_pbackfail(this, EOF);
1431 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
1432 /* ?stossc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
1433 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_stossc, 4)
1434 void __thiscall basic_streambuf_char_stossc(basic_streambuf_char *this)
1436 TRACE("(%p)\n", this);
1437 if(basic_streambuf_char__Gnavail(this))
1438 basic_streambuf_char__Gninc(this);
1439 else
1440 call_basic_streambuf_char_uflow(this);
1443 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1444 /* ?sbumpc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1445 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sbumpc, 4)
1446 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char *this)
1448 TRACE("(%p)\n", this);
1449 return basic_streambuf_char__Gnavail(this) ?
1450 (int)(unsigned char)*basic_streambuf_char__Gninc(this) : call_basic_streambuf_char_uflow(this);
1453 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1454 /* ?sgetc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1455 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sgetc, 4)
1456 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char *this)
1458 TRACE("(%p)\n", this);
1459 return basic_streambuf_char__Gnavail(this) ?
1460 (int)(unsigned char)*basic_streambuf_char_gptr(this) : call_basic_streambuf_char_underflow(this);
1463 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHXZ */
1464 /* ?snextc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHXZ */
1465 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_snextc, 4)
1466 int __thiscall basic_streambuf_char_snextc(basic_streambuf_char *this)
1468 TRACE("(%p)\n", this);
1470 if(basic_streambuf_char__Gnavail(this) > 1)
1471 return (unsigned char)*basic_streambuf_char__Gnpreinc(this);
1472 return basic_streambuf_char_sbumpc(this)==EOF ?
1473 EOF : basic_streambuf_char_sgetc(this);
1476 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z */
1477 /* ?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_J@Z */
1478 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsgetn, 12)
1479 #define call_basic_streambuf_char_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
1480 streamsize, (basic_streambuf_char*, char*, streamsize), (this, ptr, count))
1481 streamsize __thiscall basic_streambuf_char_xsgetn(basic_streambuf_char *this, char *ptr, streamsize count)
1483 TRACE("(%p %p %ld)\n", this, ptr, count);
1484 return basic_streambuf_char__Xsgetn_s(this, ptr, -1, count);
1487 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPBDH@Z */
1488 /* ?xsputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEBD_J@Z */
1489 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_xsputn, 12)
1490 #define call_basic_streambuf_char_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
1491 streamsize, (basic_streambuf_char*, const char*, streamsize), (this, ptr, count))
1492 streamsize __thiscall basic_streambuf_char_xsputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1494 streamsize copied, chunk;
1496 TRACE("(%p %p %ld)\n", this, ptr, count);
1498 for(copied=0; copied<count;) {
1499 chunk = basic_streambuf_char__Pnavail(this);
1500 if(chunk > count-copied)
1501 chunk = count-copied;
1503 if(chunk > 0) {
1504 memcpy(*this->pwpos, ptr+copied, chunk);
1505 *this->pwpos += chunk;
1506 *this->pwsize -= chunk;
1507 copied += chunk;
1508 }else if(call_basic_streambuf_char_overflow(this, (unsigned char)ptr[copied]) != EOF) {
1509 copied++;
1510 }else {
1511 break;
1515 return copied;
1518 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z */
1519 /* ?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA_JPEBD_J@Z */
1520 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_sputn, 12)
1521 streamsize __thiscall basic_streambuf_char_sputn(basic_streambuf_char *this, const char *ptr, streamsize count)
1523 TRACE("(%p %p %ld)\n", this, ptr, count);
1524 return call_basic_streambuf_char_xsputn(this, ptr, count);
1527 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@XZ */
1528 /* ?getloc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@XZ */
1529 DEFINE_THISCALL_WRAPPER(basic_streambuf_char_getloc, 8)
1530 locale* __thiscall basic_streambuf_char_getloc(basic_streambuf_char *this, locale *ret)
1532 TRACE("(%p %p)\n", this, ret);
1533 return locale_copy_ctor(ret, &this->loc);
1536 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1537 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1538 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1539 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1540 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp_next, 16)
1541 void __thiscall basic_streambuf_wchar_setp_next(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1543 TRACE("(%p %p %p %p)\n", this, first, next, last);
1545 this->wbuf = first;
1546 this->wpos = next;
1547 this->wsize = last-next;
1550 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W0@Z */
1551 /* ?setp@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W0@Z */
1552 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG0@Z */
1553 /* ?setp@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG0@Z */
1554 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setp, 12)
1555 void __thiscall basic_streambuf_wchar_setp(basic_streambuf_wchar *this, wchar_t *first, wchar_t *last)
1557 basic_streambuf_wchar_setp_next(this, first, first, last);
1560 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPA_W00@Z */
1561 /* ?setg@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEA_W00@Z */
1562 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAG00@Z */
1563 /* ?setg@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAG00@Z */
1564 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setg, 16)
1565 void __thiscall basic_streambuf_wchar_setg(basic_streambuf_wchar *this, wchar_t *first, wchar_t *next, wchar_t *last)
1567 TRACE("(%p %p %p %p)\n", this, first, next, last);
1569 this->rbuf = first;
1570 this->rpos = next;
1571 this->rsize = last-next;
1574 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXXZ */
1575 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXXZ */
1576 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
1577 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
1578 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init_empty, 4)
1579 void __thiscall basic_streambuf_wchar__Init_empty(basic_streambuf_wchar *this)
1581 TRACE("(%p)\n", this);
1583 this->prbuf = &this->rbuf;
1584 this->pwbuf = &this->wbuf;
1585 this->prpos = &this->rpos;
1586 this->pwpos = &this->wpos;
1587 this->prsize = &this->rsize;
1588 this->pwsize = &this->wsize;
1590 basic_streambuf_wchar_setp(this, NULL, NULL);
1591 basic_streambuf_wchar_setg(this, NULL, NULL, NULL);
1594 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1595 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1596 static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1598 TRACE("(%p %d)\n", this, uninitialized);
1599 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1600 return this;
1603 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@W4_Uninitialized@1@@Z */
1604 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@W4_Uninitialized@1@@Z */
1605 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor_uninitialized, 8)
1606 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor_uninitialized(basic_streambuf_wchar *this, int uninitialized)
1608 TRACE("(%p %d)\n", this, uninitialized);
1609 basic_streambuf_wchar_ctor_uninitialized(this, uninitialized);
1610 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1611 return this;
1614 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
1615 /* ??0?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
1616 static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *this)
1618 TRACE("(%p)\n", this);
1620 this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
1621 locale_ctor(&this->loc);
1622 basic_streambuf_wchar__Init_empty(this);
1624 return this;
1627 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAE@XZ */
1628 /* ??0?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAA@XZ */
1629 DEFINE_THISCALL_WRAPPER(basic_streambuf_short_ctor, 4)
1630 basic_streambuf_wchar* __thiscall basic_streambuf_short_ctor(basic_streambuf_wchar *this)
1632 TRACE("(%p)\n", this);
1633 basic_streambuf_wchar_ctor(this);
1634 this->vtable = &MSVCP_basic_streambuf_short_vtable;
1635 return this;
1638 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
1639 /* ??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
1640 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
1641 /* ??1?$basic_streambuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
1642 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_dtor, 4)
1643 void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
1645 TRACE("(%p)\n", this);
1647 locale_dtor(&this->loc);
1650 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_vector_dtor, 8)
1651 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_vector_dtor(basic_streambuf_wchar *this, unsigned int flags)
1653 TRACE("(%p %x)\n", this, flags);
1654 if(flags & 2) {
1655 /* we have an array, with the number of elements stored before the first object */
1656 INT_PTR i, *ptr = (INT_PTR *)this-1;
1658 for(i=*ptr-1; i>=0; i--)
1659 basic_streambuf_wchar_dtor(this+i);
1660 MSVCRT_operator_delete(ptr);
1661 } else {
1662 basic_streambuf_wchar_dtor(this);
1663 if(flags & 1)
1664 MSVCRT_operator_delete(this);
1667 return this;
1670 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1671 /* ?_Gnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1672 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1673 /* ?_Gnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1674 static streamsize basic_streambuf_wchar__Gnavail(const basic_streambuf_wchar *this)
1676 TRACE("(%p)\n", this);
1677 return *this->prpos ? *this->prsize : 0;
1680 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1681 /* ?_Gndec@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1682 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1683 /* ?_Gndec@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1684 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gndec, 4)
1685 wchar_t* __thiscall basic_streambuf_wchar__Gndec(basic_streambuf_wchar *this)
1687 TRACE("(%p)\n", this);
1688 (*this->prsize)++;
1689 (*this->prpos)--;
1690 return *this->prpos;
1693 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1694 /* ?_Gninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1695 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1696 /* ?_Gninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1697 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Gninc, 4)
1698 wchar_t* __thiscall basic_streambuf_wchar__Gninc(basic_streambuf_wchar *this)
1700 TRACE("(%p)\n", this);
1701 (*this->prsize)--;
1702 return (*this->prpos)++;
1705 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1706 /* ?_Gnpreinc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1707 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1708 /* ?_Gnpreinc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1709 static wchar_t* basic_streambuf_wchar__Gnpreinc(basic_streambuf_wchar *this)
1711 TRACE("(%p)\n", this);
1712 (*this->prsize)--;
1713 (*this->prpos)++;
1714 return *this->prpos;
1717 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXPAPA_W0PAH001@Z */
1718 /* ?_Init@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAPEA_W0PEAH001@Z */
1719 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXPAPAG0PAH001@Z */
1720 /* ?_Init@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXPEAPEAG0PEAH001@Z */
1721 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Init, 28)
1722 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)
1724 TRACE("(%p %p %p %p %p %p %p)\n", this, gf, gn, gc, pf, pn, pc);
1726 this->prbuf = gf;
1727 this->pwbuf = pf;
1728 this->prpos = gn;
1729 this->pwpos = pn;
1730 this->prsize = gc;
1731 this->pwsize = pc;
1734 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1735 /* ?_Lock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1736 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1737 /* ?_Lock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1738 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
1740 TRACE("(%p)\n", this);
1743 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEHXZ */
1744 /* ?_Pnavail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBA_JXZ */
1745 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEHXZ */
1746 /* ?_Pnavail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBA_JXZ */
1747 static streamsize basic_streambuf_wchar__Pnavail(const basic_streambuf_wchar *this)
1749 TRACE("(%p)\n", this);
1750 return *this->pwpos ? *this->pwsize : 0;
1753 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEPA_WXZ */
1754 /* ?_Pninc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAPEA_WXZ */
1755 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEPAGXZ */
1756 /* ?_Pninc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAPEAGXZ */
1757 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Pninc, 4)
1758 wchar_t* __thiscall basic_streambuf_wchar__Pninc(basic_streambuf_wchar *this)
1760 TRACE("(%p)\n", this);
1761 (*this->pwsize)--;
1762 return (*this->pwpos)++;
1765 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1766 /* ?underflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1767 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1768 /* ?underflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1769 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_underflow, 4)
1770 #define call_basic_streambuf_wchar_underflow(this) CALL_VTBL_FUNC(this, 16, \
1771 unsigned short, (basic_streambuf_wchar*), (this))
1772 unsigned short __thiscall basic_streambuf_wchar_underflow(basic_streambuf_wchar *this)
1774 TRACE("(%p)\n", this);
1775 return WEOF;
1778 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
1779 /* ?uflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
1780 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
1781 /* ?uflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
1782 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_uflow, 4)
1783 #define call_basic_streambuf_wchar_uflow(this) CALL_VTBL_FUNC(this, 20, \
1784 unsigned short, (basic_streambuf_wchar*), (this))
1785 unsigned short __thiscall basic_streambuf_wchar_uflow(basic_streambuf_wchar *this)
1787 int ret;
1789 TRACE("(%p)\n", this);
1791 if(call_basic_streambuf_wchar_underflow(this)==WEOF)
1792 return WEOF;
1794 ret = **this->prpos;
1795 (*this->prsize)--;
1796 (*this->prpos)++;
1797 return ret;
1800 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WIH@Z */
1801 /* ?_Xsgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_K_J@Z */
1802 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGIH@Z */
1803 /* ?_Xsgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_K_J@Z */
1804 static streamsize basic_streambuf_wchar__Xsgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1806 streamsize copied, chunk;
1807 unsigned short c;
1809 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1811 for(copied=0; copied<count && size;) {
1812 chunk = basic_streambuf_wchar__Gnavail(this);
1813 if(chunk > count-copied)
1814 chunk = count-copied;
1816 if(chunk > 0) {
1817 memcpy_s(ptr+copied, size, *this->prpos, chunk*sizeof(wchar_t));
1818 *this->prpos += chunk;
1819 *this->prsize -= chunk;
1820 copied += chunk;
1821 size -= chunk*sizeof(wchar_t);
1822 }else if((c = call_basic_streambuf_wchar_uflow(this)) != WEOF) {
1823 ptr[copied] = c;
1824 copied++;
1825 size--;
1826 }else {
1827 break;
1831 return copied;
1834 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
1835 /* ?_Sgetn_s@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
1836 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
1837 /* ?_Sgetn_s@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
1838 static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wchar_t *ptr, MSVCP_size_t size, streamsize count)
1840 TRACE("(%p %p %lu %ld)\n", this, ptr, size, count);
1841 return basic_streambuf_wchar__Xsgetn_s(this, ptr, size, count);
1844 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
1845 /* ?_Unlock@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
1846 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
1847 /* ?_Unlock@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
1848 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
1850 TRACE("(%p)\n", this);
1853 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1854 /* ?eback@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1855 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1856 /* ?eback@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1857 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_eback, 4)
1858 wchar_t* __thiscall basic_streambuf_wchar_eback(const basic_streambuf_wchar *this)
1860 TRACE("(%p)\n", this);
1861 return *this->prbuf;
1864 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1865 /* ?gptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1866 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1867 /* ?gptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1868 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gptr, 4)
1869 wchar_t* __thiscall basic_streambuf_wchar_gptr(const basic_streambuf_wchar *this)
1871 TRACE("(%p)\n", this);
1872 return *this->prpos;
1875 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1876 /* ?egptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1877 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1878 /* ?egptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1879 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_egptr, 4)
1880 wchar_t* __thiscall basic_streambuf_wchar_egptr(const basic_streambuf_wchar *this)
1882 TRACE("(%p)\n", this);
1883 return *this->prpos+*this->prsize;
1886 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1887 /* ?epptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1888 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1889 /* ?epptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1890 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_epptr, 4)
1891 wchar_t* __thiscall basic_streambuf_wchar_epptr(const basic_streambuf_wchar *this)
1893 TRACE("(%p)\n", this);
1894 return *this->pwpos+*this->pwsize;
1897 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1898 /* ?gbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1899 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1900 /* ?gbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1901 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_gbump, 8)
1902 void __thiscall basic_streambuf_wchar_gbump(basic_streambuf_wchar *this, int off)
1904 TRACE("(%p %d)\n", this, off);
1905 *this->prpos += off;
1906 *this->prsize -= off;
1909 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEXABVlocale@2@@Z */
1910 /* ?imbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAXAEBVlocale@2@@Z */
1911 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEXABVlocale@2@@Z */
1912 /* ?imbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAXAEBVlocale@2@@Z */
1913 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_imbue, 8)
1914 #define call_basic_streambuf_wchar_imbue(this, loc) CALL_VTBL_FUNC(this, 48, \
1915 void, (basic_streambuf_wchar*, const locale*), (this, loc))
1916 void __thiscall basic_streambuf_wchar_imbue(basic_streambuf_wchar *this, const locale *loc)
1918 TRACE("(%p %p)\n", this, loc);
1921 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1922 /* ?overflow@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1923 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1924 /* ?overflow@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1925 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_overflow, 8)
1926 #define call_basic_streambuf_wchar_overflow(this, ch) CALL_VTBL_FUNC(this, 4, \
1927 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1928 unsigned short __thiscall basic_streambuf_wchar_overflow(basic_streambuf_wchar *this, unsigned short ch)
1930 TRACE("(%p %d)\n", this, ch);
1931 return WEOF;
1934 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
1935 /* ?pbackfail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
1936 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
1937 /* ?pbackfail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
1938 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbackfail, 8)
1939 #define call_basic_streambuf_wchar_pbackfail(this, ch) CALL_VTBL_FUNC(this, 8, \
1940 unsigned short, (basic_streambuf_wchar*, unsigned short), (this, ch))
1941 unsigned short __thiscall basic_streambuf_wchar_pbackfail(basic_streambuf_wchar *this, unsigned short ch)
1943 TRACE("(%p %d)\n", this, ch);
1944 return WEOF;
1947 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1948 /* ?pbase@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1949 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1950 /* ?pbase@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1951 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbase, 4)
1952 wchar_t* __thiscall basic_streambuf_wchar_pbase(const basic_streambuf_wchar *this)
1954 TRACE("(%p)\n", this);
1955 return *this->pwbuf;
1958 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IAEXH@Z */
1959 /* ?pbump@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEAAXH@Z */
1960 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IAEXH@Z */
1961 /* ?pbump@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEAAXH@Z */
1962 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pbump, 8)
1963 void __thiscall basic_streambuf_wchar_pbump(basic_streambuf_wchar *this, int off)
1965 TRACE("(%p %d)\n", this, off);
1966 *this->pwpos += off;
1967 *this->pwsize -= off;
1970 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IBEPA_WXZ */
1971 /* ?pptr@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@IEBAPEA_WXZ */
1972 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ */
1973 /* ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ */
1974 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pptr, 4)
1975 wchar_t* __thiscall basic_streambuf_wchar_pptr(const basic_streambuf_wchar *this)
1977 TRACE("(%p)\n", this);
1978 return *this->pwpos;
1981 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1982 /* ?pubimbue@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1983 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
1984 /* ?pubimbue@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
1985 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubimbue, 12)
1986 locale* __thiscall basic_streambuf_wchar_pubimbue(basic_streambuf_wchar *this, locale *ret, const locale *loc)
1988 TRACE("(%p %p)\n", this, loc);
1989 memcpy(ret, &this->loc, sizeof(locale));
1990 call_basic_streambuf_wchar_imbue(this, loc);
1991 locale_copy_ctor(&this->loc, loc);
1992 return ret;
1995 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
1996 /* ?seekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
1997 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekoff, 20)
1998 #define call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode) CALL_VTBL_FUNC(this, 32, \
1999 fpos_int*, (basic_streambuf_wchar*, fpos_int*, streamoff, int, int), (this, ret, off, way, mode))
2000 fpos_int* __thiscall basic_streambuf_wchar_seekoff(basic_streambuf_wchar *this,
2001 fpos_int *ret, streamoff off, int way, int mode)
2003 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2004 ret->off = -1;
2005 ret->pos = 0;
2006 ret->state = 0;
2007 return ret;
2010 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2011 /* ?pubseekoff@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2012 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JHH@Z */
2013 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JHH@Z */
2014 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JFF@Z */
2015 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JFF@Z */
2016 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2017 /* ?pubseekoff@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@_JW4seekdir@ioos_base@2@H@Z */
2018 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekoff, 20)
2019 fpos_int* __thiscall basic_streambuf_wchar_pubseekoff(basic_streambuf_wchar *this,
2020 fpos_int *ret, streamoff off, int way, int mode)
2022 TRACE("(%p %ld %d %d)\n", this, off, way, mode);
2023 return call_basic_streambuf_wchar_seekoff(this, ret, off, way, mode);
2026 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2027 /* ?seekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2028 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2029 /* ?seekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2030 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_seekpos, 36)
2031 #define call_basic_streambuf_wchar_seekpos(this, ret, pos, mode) CALL_VTBL_FUNC(this, 36, \
2032 fpos_int*, (basic_streambuf_wchar*, fpos_int*, fpos_int, int), (this, ret, pos, mode))
2033 fpos_int* __thiscall basic_streambuf_wchar_seekpos(basic_streambuf_wchar *this,
2034 fpos_int *ret, fpos_int pos, int mode)
2036 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2037 ret->off = -1;
2038 ret->pos = 0;
2039 ret->state = 0;
2040 return ret;
2043 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2044 /* ?pubseekpos@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2045 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@V32@H@Z */
2046 /* ?pubseekpos@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@V32@H@Z */
2047 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubseekpos, 36)
2048 fpos_int* __thiscall basic_streambuf_wchar_pubseekpos(basic_streambuf_wchar *this,
2049 fpos_int *ret, fpos_int pos, int mode)
2051 TRACE("(%p %s %d)\n", this, debugstr_fpos_int(&pos), mode);
2052 return call_basic_streambuf_wchar_seekpos(this, ret, pos, mode);
2055 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEPAV12@PA_WH@Z */
2056 /* ?setbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV12@PEA_W_J@Z */
2057 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEPAV12@PAGH@Z */
2058 /* ?setbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAPEAV12@PEAG_J@Z */
2059 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_setbuf, 12)
2060 #define call_basic_streambuf_wchar_setbuf(this, buf, count) CALL_VTBL_FUNC(this, 40, \
2061 basic_streambuf_wchar*, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, buf, count))
2062 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_setbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2064 TRACE("(%p %p %ld)\n", this, buf, count);
2065 return this;
2068 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PA_WH@Z */
2069 /* ?pubsetbuf@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEA_W_J@Z */
2070 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PAGH@Z */
2071 /* ?pubsetbuf@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEAG_J@Z */
2072 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsetbuf, 12)
2073 basic_streambuf_wchar* __thiscall basic_streambuf_wchar_pubsetbuf(basic_streambuf_wchar *this, wchar_t *buf, streamsize count)
2075 TRACE("(%p %p %ld)\n", this, buf, count);
2076 return call_basic_streambuf_wchar_setbuf(this, buf, count);
2079 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2080 /* ?sync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
2081 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2082 /* ?sync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
2083 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sync, 4)
2084 #define call_basic_streambuf_wchar_sync(this) CALL_VTBL_FUNC(this, 44, \
2085 int, (basic_streambuf_wchar*), (this))
2086 int __thiscall basic_streambuf_wchar_sync(basic_streambuf_wchar *this)
2088 TRACE("(%p)\n", this);
2089 return 0;
2092 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2093 /* ?pubsync@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
2094 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2095 /* ?pubsync@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHXZ */
2096 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_pubsync, 4)
2097 int __thiscall basic_streambuf_wchar_pubsync(basic_streambuf_wchar *this)
2099 TRACE("(%p)\n", this);
2100 return call_basic_streambuf_wchar_sync(this);
2103 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
2104 /* ?sgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
2105 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
2106 /* ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
2107 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetn, 12)
2108 streamsize __thiscall basic_streambuf_wchar_sgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2110 TRACE("(%p %p %ld)\n", this, ptr, count);
2111 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2114 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
2115 /* ?showmanyc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JXZ */
2116 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
2117 /* ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JXZ */
2118 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_showmanyc, 4)
2119 #define call_basic_streambuf_wchar_showmanyc(this) CALL_VTBL_FUNC(this, 12, \
2120 streamsize, (basic_streambuf_wchar*), (this))
2121 streamsize __thiscall basic_streambuf_wchar_showmanyc(basic_streambuf_wchar *this)
2123 TRACE("(%p)\n", this);
2124 return 0;
2127 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
2128 /* ?in_avail@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JXZ */
2129 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHXZ */
2130 /* ?in_avail@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JXZ */
2131 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_in_avail, 4)
2132 streamsize __thiscall basic_streambuf_wchar_in_avail(basic_streambuf_wchar *this)
2134 streamsize ret;
2136 TRACE("(%p)\n", this);
2138 ret = basic_streambuf_wchar__Gnavail(this);
2139 return ret ? ret : call_basic_streambuf_wchar_showmanyc(this);
2142 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2143 /* ?sputbackc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2144 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2145 /* ?sputbackc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
2146 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputbackc, 8)
2147 unsigned short __thiscall basic_streambuf_wchar_sputbackc(basic_streambuf_wchar *this, wchar_t ch)
2149 TRACE("(%p %d)\n", this, ch);
2150 if(*this->prpos && *this->prpos>*this->prbuf && (*this->prpos)[-1]==ch) {
2151 (*this->prsize)++;
2152 (*this->prpos)--;
2153 return ch;
2156 return call_basic_streambuf_wchar_pbackfail(this, ch);
2159 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEG_W@Z */
2160 /* ?sputc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAG_W@Z */
2161 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGG@Z */
2162 /* ?sputc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAHG@Z */
2163 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputc, 8)
2164 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar *this, wchar_t ch)
2166 TRACE("(%p %d)\n", this, ch);
2167 return basic_streambuf_wchar__Pnavail(this) ?
2168 (*basic_streambuf_wchar__Pninc(this) = ch) :
2169 call_basic_streambuf_wchar_overflow(this, ch);
2172 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2173 /* ?sungetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2174 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2175 /* ?sungetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2176 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sungetc, 4)
2177 unsigned short __thiscall basic_streambuf_wchar_sungetc(basic_streambuf_wchar *this)
2179 TRACE("(%p)\n", this);
2180 if(*this->prpos && *this->prpos>*this->prbuf) {
2181 (*this->prsize)++;
2182 (*this->prpos)--;
2183 return **this->prpos;
2186 return call_basic_streambuf_wchar_pbackfail(this, WEOF);
2189 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2190 /* ?stossc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2191 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2192 /* ?stossc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2193 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_stossc, 4)
2194 void __thiscall basic_streambuf_wchar_stossc(basic_streambuf_wchar *this)
2196 TRACE("(%p)\n", this);
2197 if(basic_streambuf_wchar__Gnavail(this))
2198 basic_streambuf_wchar__Gninc(this);
2199 else
2200 call_basic_streambuf_wchar_uflow(this);
2203 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2204 /* ?sbumpc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2205 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2206 /* ?sbumpc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2207 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sbumpc, 4)
2208 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar *this)
2210 TRACE("(%p)\n", this);
2211 return basic_streambuf_wchar__Gnavail(this) ?
2212 *basic_streambuf_wchar__Gninc(this) : call_basic_streambuf_wchar_uflow(this);
2215 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2216 /* ?sgetc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2217 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2218 /* ?sgetc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2219 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sgetc, 4)
2220 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar *this)
2222 TRACE("(%p)\n", this);
2223 return basic_streambuf_wchar__Gnavail(this) ?
2224 *basic_streambuf_wchar_gptr(this) : call_basic_streambuf_wchar_underflow(this);
2227 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
2228 /* ?snextc@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
2229 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEGXZ */
2230 /* ?snextc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAAGXZ */
2231 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_snextc, 4)
2232 unsigned short __thiscall basic_streambuf_wchar_snextc(basic_streambuf_wchar *this)
2234 TRACE("(%p)\n", this);
2236 if(basic_streambuf_wchar__Gnavail(this) > 1)
2237 return *basic_streambuf_wchar__Gnpreinc(this);
2238 return basic_streambuf_wchar_sbumpc(this)==WEOF ?
2239 WEOF : basic_streambuf_wchar_sgetc(this);
2242 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPA_WH@Z */
2243 /* ?xsgetn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEA_W_J@Z */
2244 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPAGH@Z */
2245 /* ?xsgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEAG_J@Z */
2246 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsgetn, 12)
2247 #define call_basic_streambuf_wchar_xsgetn(this, ptr, count) CALL_VTBL_FUNC(this, 24, \
2248 streamsize, (basic_streambuf_wchar*, wchar_t*, streamsize), (this, ptr, count))
2249 streamsize __thiscall basic_streambuf_wchar_xsgetn(basic_streambuf_wchar *this, wchar_t *ptr, streamsize count)
2251 TRACE("(%p %p %ld)\n", this, ptr, count);
2252 return basic_streambuf_wchar__Xsgetn_s(this, ptr, -1, count);
2255 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MAEHPB_WH@Z */
2256 /* ?xsputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@MEAA_JPEB_W_J@Z */
2257 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHPBGH@Z */
2258 /* ?xsputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAA_JPEBG_J@Z */
2259 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_xsputn, 12)
2260 #define call_basic_streambuf_wchar_xsputn(this, ptr, count) CALL_VTBL_FUNC(this, 28, \
2261 streamsize, (basic_streambuf_wchar*, const wchar_t*, streamsize), (this, ptr, count))
2262 streamsize __thiscall basic_streambuf_wchar_xsputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2264 streamsize copied, chunk;
2266 TRACE("(%p %p %ld)\n", this, ptr, count);
2268 for(copied=0; copied<count;) {
2269 chunk = basic_streambuf_wchar__Pnavail(this);
2270 if(chunk > count-copied)
2271 chunk = count-copied;
2273 if(chunk > 0) {
2274 memcpy(*this->pwpos, ptr+copied, chunk*sizeof(wchar_t));
2275 *this->pwpos += chunk;
2276 *this->pwsize -= chunk;
2277 copied += chunk;
2278 }else if(call_basic_streambuf_wchar_overflow(this, ptr[copied]) != WEOF) {
2279 copied++;
2280 }else {
2281 break;
2285 return copied;
2288 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QAEHPB_WH@Z */
2289 /* ?sputn@?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@QEAA_JPEB_W_J@Z */
2290 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPBGH@Z */
2291 /* ?sputn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEBG_J@Z */
2292 DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar_sputn, 12)
2293 streamsize __thiscall basic_streambuf_wchar_sputn(basic_streambuf_wchar *this, const wchar_t *ptr, streamsize count)
2295 TRACE("(%p %p %ld)\n", this, ptr, count);
2296 return call_basic_streambuf_wchar_xsputn(this, ptr, count);
2299 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2300 /* ?_Stinit@?1??_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2301 int basic_filebuf_char__Init__Stinit = 0;
2303 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2304 /* ?_Init@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2305 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Init, 12)
2306 void __thiscall basic_filebuf_char__Init(basic_filebuf_char *this, FILE *file, basic_filebuf__Initfl which)
2308 TRACE("(%p %p %d)\n", this, file, which);
2310 this->cvt = NULL;
2311 this->state0 = basic_filebuf_char__Init__Stinit;
2312 this->state = basic_filebuf_char__Init__Stinit;
2313 if(which == INITFL_new)
2314 this->str = NULL;
2315 this->close = (which == INITFL_open);
2316 this->file = file;
2318 basic_streambuf_char__Init_empty(&this->base);
2319 if(file)
2320 basic_streambuf_char__Init(&this->base, &file->_base, &file->_ptr,
2321 &file->_cnt, &file->_base, &file->_ptr, &file->_cnt);
2324 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ */
2325 /* ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXXZ */
2326 DEFINE_THISCALL_WRAPPER(basic_filebuf_char__Initcvt, 4)
2327 void __thiscall basic_filebuf_char__Initcvt(basic_filebuf_char *this)
2329 TRACE("(%p)\n", this);
2331 this->cvt = codecvt_char_use_facet(&this->base.loc);
2332 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_char_id.id, LC_CTYPE);
2333 if(codecvt_base_always_noconv(&this->cvt->base)) {
2334 this->cvt = NULL;
2335 }else {
2336 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2337 basic_string_char_ctor(this->str);
2341 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@XZ */
2342 /* ?close@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@XZ */
2343 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_close, 4)
2344 basic_filebuf_char* __thiscall basic_filebuf_char_close(basic_filebuf_char *this)
2346 basic_filebuf_char *ret = this;
2348 TRACE("(%p)\n", this);
2350 if(!this->file || fclose(this->file))
2351 return NULL;
2353 basic_filebuf_char__Init(this, NULL, INITFL_close);
2354 return ret;
2357 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
2358 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2359 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_file, 8)
2360 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_file(basic_filebuf_char *this, FILE *file)
2362 TRACE("(%p %p)\n", this, file);
2364 basic_streambuf_char_ctor(&this->base);
2365 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2367 locale_ctor(&this->loc);
2368 basic_filebuf_char__Init(this, file, INITFL_new);
2369 return this;
2372 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEXXZ */
2373 /* ??_F?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAXXZ */
2374 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor, 4)
2375 basic_filebuf_char* __thiscall basic_filebuf_char_ctor(basic_filebuf_char *this)
2377 return basic_filebuf_char_ctor_file(this, NULL);
2380 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2381 /* ??0?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2382 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_ctor_uninitialized, 8)
2383 basic_filebuf_char* __thiscall basic_filebuf_char_ctor_uninitialized(basic_filebuf_char *this, int uninitialized)
2385 TRACE("(%p %d)\n", this, uninitialized);
2387 basic_streambuf_char_ctor_uninitialized(&this->base, 0);
2388 this->base.vtable = &MSVCP_basic_filebuf_char_vtable;
2389 locale_ctor(&this->loc);
2390 return this;
2393 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UAE@XZ */
2394 /* ??1?$basic_filebuf@DU?$char_traits@D@std@@@std@@UEAA@XZ */
2395 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_dtor, 4)
2396 void __thiscall basic_filebuf_char_dtor(basic_filebuf_char *this)
2398 TRACE("(%p)\n", this);
2400 if(this->close)
2401 basic_filebuf_char_close(this);
2402 if(this->str) {
2403 basic_string_char_dtor(this->str);
2404 MSVCRT_operator_delete(this->str);
2406 locale_dtor(&this->loc);
2407 basic_streambuf_char_dtor(&this->base);
2410 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_vector_dtor, 8)
2411 basic_filebuf_char* __thiscall basic_filebuf_char_vector_dtor(basic_filebuf_char *this, unsigned int flags)
2413 TRACE("(%p %x)\n", this, flags);
2414 if(flags & 2) {
2415 /* we have an array, with the number of elements stored before the first object */
2416 INT_PTR i, *ptr = (INT_PTR *)this-1;
2418 for(i=*ptr-1; i>=0; i--)
2419 basic_filebuf_char_dtor(this+i);
2420 MSVCRT_operator_delete(ptr);
2421 } else {
2422 basic_filebuf_char_dtor(this);
2423 if(flags & 1)
2424 MSVCRT_operator_delete(this);
2427 return this;
2430 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QBE_NXZ */
2431 /* ?is_open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
2432 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_is_open, 4)
2433 MSVCP_bool __thiscall basic_filebuf_char_is_open(const basic_filebuf_char *this)
2435 TRACE("(%p)\n", this);
2436 return this->file != NULL;
2439 /* ?_Fiopen@std@@YAPAU_iobuf@@PB_WHH@Z */
2440 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEB_WHH@Z */
2441 static FILE* _Fiopen_wchar(const wchar_t *name, int mode, int prot)
2443 static const wchar_t rW[] = {'r',0};
2444 static const struct {
2445 int mode;
2446 const wchar_t str[4];
2447 const wchar_t str_bin[4];
2448 } str_mode[] = {
2449 {OPENMODE_out, {'w',0}, {'w','b',0}},
2450 {OPENMODE_out|OPENMODE_app, {'a',0}, {'a','b',0}},
2451 {OPENMODE_app, {'a',0}, {'a','b',0}},
2452 {OPENMODE_out|OPENMODE_trunc, {'w',0}, {'w','b',0}},
2453 {OPENMODE_in, {'r',0}, {'r','b',0}},
2454 {OPENMODE_in|OPENMODE_out, {'r','+',0}, {'r','+','b',0}},
2455 {OPENMODE_in|OPENMODE_out|OPENMODE_trunc, {'w','+',0}, {'w','+','b',0}},
2456 {OPENMODE_in|OPENMODE_out|OPENMODE_app, {'a','+',0}, {'a','+','b',0}},
2457 {OPENMODE_in|OPENMODE_app, {'a','+',0}, {'a','+','b',0}}
2460 int real_mode = mode & ~(OPENMODE_ate|OPENMODE__Nocreate|OPENMODE__Noreplace|OPENMODE_binary);
2461 unsigned int mode_idx;
2462 FILE *f = NULL;
2464 TRACE("(%s %d %d)\n", debugstr_w(name), mode, prot);
2466 for(mode_idx=0; mode_idx<sizeof(str_mode)/sizeof(str_mode[0]); mode_idx++)
2467 if(str_mode[mode_idx].mode == real_mode)
2468 break;
2469 if(mode_idx == sizeof(str_mode)/sizeof(str_mode[0]))
2470 return NULL;
2472 if((mode & OPENMODE__Nocreate) && !(f = _wfopen(name, rW)))
2473 return NULL;
2474 else if(f)
2475 fclose(f);
2477 if((mode & OPENMODE__Noreplace) && (mode & (OPENMODE_out|OPENMODE_app))
2478 && (f = _wfopen(name, rW))) {
2479 fclose(f);
2480 return NULL;
2483 f = _wfsopen(name, (mode & OPENMODE_binary) ? str_mode[mode_idx].str_bin
2484 : str_mode[mode_idx].str, prot);
2485 if(!f)
2486 return NULL;
2488 if((mode & OPENMODE_ate) && fseek(f, 0, SEEK_END)) {
2489 fclose(f);
2490 return NULL;
2493 return f;
2496 /* ?_Fiopen@std@@YAPAU_iobuf@@PBDHH@Z */
2497 /* ?_Fiopen@std@@YAPEAU_iobuf@@PEBDHH@Z */
2498 static FILE* _Fiopen(const char *name, int mode, int prot)
2500 wchar_t nameW[FILENAME_MAX];
2502 TRACE("(%s %d %d)\n", name, mode, prot);
2504 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2505 return NULL;
2506 return _Fiopen_wchar(nameW, mode, prot);
2509 /* ?__Fiopen@std@@YAPAU_iobuf@@PBDH@Z */
2510 /* ?__Fiopen@std@@YAPEAU_iobuf@@PEBDH@Z */
2511 FILE* __cdecl ___Fiopen(const char *name, int mode)
2513 TRACE("(%p %d)\n", name, mode);
2514 return _Fiopen(name, mode, _SH_DENYNO);
2517 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PB_WHH@Z */
2518 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2519 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBGHH@Z */
2520 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2521 static basic_filebuf_char* basic_filebuf_char_open_wchar(basic_filebuf_char *this, const wchar_t *name, int mode, int prot)
2523 FILE *f = NULL;
2525 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2527 if(basic_filebuf_char_is_open(this))
2528 return NULL;
2530 if(!(f = _Fiopen_wchar(name, mode, prot)))
2531 return NULL;
2533 basic_filebuf_char__Init(this, f, INITFL_open);
2534 basic_filebuf_char__Initcvt(this);
2535 return this;
2538 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDHH@Z */
2539 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2540 static basic_filebuf_char* basic_filebuf_char_open(basic_filebuf_char *this, const char *name, int mode, int prot)
2542 wchar_t nameW[FILENAME_MAX];
2544 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
2546 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
2547 return NULL;
2548 return basic_filebuf_char_open_wchar(this, nameW, mode, prot);
2551 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDF@Z */
2552 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDF@Z */
2553 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode_old, 12)
2554 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode_old(basic_filebuf_char *this, const char *name, short mode)
2556 TRACE("(%p %p %d)\n", this, name, mode);
2557 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2560 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QAEPAV12@PBDH@Z */
2561 /* ?open@?$basic_filebuf@DU?$char_traits@D@std@@@std@@QEAAPEAV12@PEBDH@Z */
2562 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_open_mode, 12)
2563 basic_filebuf_char* __thiscall basic_filebuf_char_open_mode(basic_filebuf_char *this, const char *name, int mode)
2565 TRACE("(%p %p %d)\n", this, name, mode);
2566 return basic_filebuf_char_open(this, name, mode, _SH_DENYNO);
2569 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2570 /* ?overflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2571 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_overflow, 8)
2572 int __thiscall basic_filebuf_char_overflow(basic_filebuf_char *this, int c)
2574 char *ptr, ch = c, *to_next;
2575 const char *from_next;
2576 int ret;
2579 TRACE("(%p %d)\n", this, c);
2581 if(!basic_filebuf_char_is_open(this))
2582 return EOF;
2583 if(c == EOF)
2584 return !c;
2586 if(!this->cvt)
2587 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2589 from_next = &ch;
2590 basic_string_char_clear(this->str);
2591 basic_string_char_append_len_ch(this->str, 8, '\0');
2592 ptr = this->str->ptr;
2593 ret = codecvt_char_out(this->cvt, &this->state, from_next, &ch+1, &from_next,
2594 ptr, ptr+basic_string_char_length(this->str), &to_next);
2596 switch(ret) {
2597 case CODECVT_partial:
2598 if(from_next == &ch)
2599 return EOF;
2600 case CODECVT_ok:
2601 if(!fwrite(ptr, to_next-ptr, 1, this->file))
2602 return EOF;
2603 return c;
2604 case CODECVT_noconv:
2605 return fwrite(&ch, sizeof(char), 1, this->file) ? c : EOF;
2606 default:
2607 return EOF;
2611 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHH@Z */
2612 /* ?pbackfail@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHH@Z */
2613 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_pbackfail, 8)
2614 int __thiscall basic_filebuf_char_pbackfail(basic_filebuf_char *this, int c)
2616 TRACE("(%p %d)\n", this, c);
2618 if(!basic_filebuf_char_is_open(this))
2619 return EOF;
2621 if(basic_streambuf_char_gptr(&this->base)>basic_streambuf_char_eback(&this->base)
2622 && (c==EOF || (int)(unsigned char)basic_streambuf_char_gptr(&this->base)[-1]==c)) {
2623 basic_streambuf_char__Gndec(&this->base);
2624 return c==EOF ? !c : c;
2625 }else if(c == EOF) {
2626 return EOF;
2627 }else if(!this->cvt) {
2628 return ungetc(c, this->file);
2629 }else if(basic_string_char_length(this->str)) {
2630 char *b, *e, *cur;
2632 e = this->str->ptr;
2633 b = e+this->str->size-1;
2634 for(cur = b; cur>=e; cur--) {
2635 if(ungetc(*cur, this->file) == EOF) {
2636 for(; cur<=b; cur++)
2637 fgetc(this->file);
2638 return EOF;
2641 basic_string_char_clear(this->str);
2642 this->state = this->state0;
2643 return c;
2646 return EOF;
2649 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2650 /* ?uflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2651 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_uflow, 4)
2652 int __thiscall basic_filebuf_char_uflow(basic_filebuf_char *this)
2654 char ch, *to_next;
2655 const char *buf_next;
2656 int c;
2658 TRACE("(%p)\n", this);
2660 if(!basic_filebuf_char_is_open(this))
2661 return EOF;
2663 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2664 return (unsigned char)*basic_streambuf_char__Gninc(&this->base);
2666 c = fgetc(this->file);
2667 if(!this->cvt || c==EOF)
2668 return c;
2670 basic_string_char_clear(this->str);
2671 this->state0 = this->state;
2672 while(1) {
2673 basic_string_char_append_ch(this->str, c);
2674 this->state = this->state0;
2676 switch(codecvt_char_in(this->cvt, &this->state, this->str->ptr,
2677 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
2678 case CODECVT_partial:
2679 break;
2680 case CODECVT_noconv:
2681 return (unsigned char)this->str->ptr[0];
2682 case CODECVT_ok:
2683 return (unsigned char)ch;
2684 default:
2685 return EOF;
2688 c = fgetc(this->file);
2689 if(c == EOF)
2690 return EOF;
2694 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2695 /* ?underflow@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2696 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_underflow, 4)
2697 int __thiscall basic_filebuf_char_underflow(basic_filebuf_char *this)
2699 int ret;
2701 TRACE("(%p)\n", this);
2703 if(basic_streambuf_char_gptr(&this->base) < basic_streambuf_char_egptr(&this->base))
2704 return (unsigned char)*basic_streambuf_char_gptr(&this->base);
2706 ret = call_basic_streambuf_char_uflow(&this->base);
2707 if(ret != EOF)
2708 ret = call_basic_streambuf_char_pbackfail(&this->base, ret);
2709 return ret;
2712 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
2713 /* ?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
2714 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekoff, 20)
2715 fpos_int* __thiscall basic_filebuf_char_seekoff(basic_filebuf_char *this,
2716 fpos_int *ret, streamoff off, int way, int mode)
2718 fpos_t pos;
2720 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
2722 if(!basic_filebuf_char_is_open(this) || fseek(this->file, off, way)) {
2723 ret->off = -1;
2724 ret->pos = 0;
2725 ret->state = 0;
2726 return ret;
2729 fgetpos(this->file, &pos);
2730 ret->off = 0;
2731 ret->pos = pos;
2732 ret->state = this->state;
2733 return ret;
2736 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
2737 /* ?seekpos@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
2738 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_seekpos, 36)
2739 fpos_int* __thiscall basic_filebuf_char_seekpos(basic_filebuf_char *this,
2740 fpos_int *ret, fpos_int pos, int mode)
2742 fpos_t fpos;
2744 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
2746 if(!basic_filebuf_char_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
2747 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
2748 ret->off = -1;
2749 ret->pos = 0;
2750 ret->state = 0;
2751 return ret;
2754 fgetpos(this->file, &fpos);
2755 ret->off = 0;
2756 ret->pos = fpos;
2757 ret->state = this->state;
2758 return ret;
2761 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z */
2762 /* ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z */
2763 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_setbuf, 12)
2764 basic_streambuf_char* __thiscall basic_filebuf_char_setbuf(basic_filebuf_char *this, char *buf, streamsize count)
2766 TRACE("(%p %p %ld)\n", this, buf, count);
2768 if(!basic_filebuf_char_is_open(this))
2769 return NULL;
2771 if(setvbuf(this->file, buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count))
2772 return NULL;
2774 basic_filebuf_char__Init(this, this->file, INITFL_open);
2775 return &this->base;
2778 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEHXZ */
2779 /* ?sync@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAHXZ */
2780 DEFINE_THISCALL_WRAPPER(basic_filebuf_char_sync, 4)
2781 int __thiscall basic_filebuf_char_sync(basic_filebuf_char *this)
2783 TRACE("(%p)\n", this);
2785 if(!basic_filebuf_char_is_open(this))
2786 return 0;
2788 if(call_basic_streambuf_char_overflow(&this->base, EOF) == EOF)
2789 return 0;
2790 return fflush(this->file);
2793 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@23@@Z@4HA */
2794 /* ?_Stinit@?1??_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@23@@Z@4HA */
2795 int basic_filebuf_short__Init__Stinit = 0;
2797 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2798 /* ?_Init@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2799 static void basic_filebuf_wchar__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2801 TRACE("(%p %p %d)\n", this, file, which);
2803 this->cvt = NULL;
2804 this->state0 = basic_filebuf_short__Init__Stinit;
2805 this->state = basic_filebuf_short__Init__Stinit;
2806 if(which == INITFL_new)
2807 this->str = NULL;
2808 this->close = (which == INITFL_open);
2809 this->file = file;
2811 basic_streambuf_wchar__Init_empty(&this->base);
2814 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAU_iobuf@@W4_Initfl@12@@Z */
2815 /* ?_Init@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXPEAU_iobuf@@W4_Initfl@12@@Z */
2816 DEFINE_THISCALL_WRAPPER(basic_filebuf_short__Init, 12)
2817 void __thiscall basic_filebuf_short__Init(basic_filebuf_wchar *this, FILE *file, basic_filebuf__Initfl which)
2819 TRACE("(%p %p %d)\n", this, file, which);
2821 this->cvt = NULL;
2822 this->state0 = basic_filebuf_short__Init__Stinit;
2823 this->state = basic_filebuf_short__Init__Stinit;
2824 if(which == INITFL_new)
2825 this->str = NULL;
2826 this->close = (which == INITFL_open);
2827 this->file = file;
2829 basic_streambuf_wchar__Init_empty(&this->base);
2832 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXXZ */
2833 /* ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IEAAXXZ */
2834 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar__Initcvt, 4)
2835 void __thiscall basic_filebuf_wchar__Initcvt(basic_filebuf_wchar *this)
2837 TRACE("(%p)\n", this);
2839 this->cvt = codecvt_short_use_facet(&this->base.loc);
2840 locale__Addfac(&this->loc, &this->cvt->base.facet, codecvt_short_id.id, LC_CTYPE);
2841 if(codecvt_base_always_noconv(&this->cvt->base)) {
2842 this->cvt = NULL;
2843 }else {
2844 this->str = MSVCRT_operator_new(sizeof(basic_string_char));
2845 basic_string_char_ctor(this->str);
2849 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@XZ */
2850 /* ?close@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@XZ */
2851 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@XZ */
2852 /* ?close@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@XZ */
2853 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_close, 4)
2854 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_close(basic_filebuf_wchar *this)
2856 basic_filebuf_wchar *ret = this;
2858 TRACE("(%p)\n", this);
2860 if(!this->file || fclose(this->file))
2861 return NULL;
2863 basic_filebuf_wchar__Init(this, NULL, INITFL_close);
2864 return ret;
2867 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
2868 /* ??0?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2869 static basic_filebuf_wchar* basic_filebuf_wchar_ctor_file(basic_filebuf_wchar *this, FILE *file)
2871 TRACE("(%p %p)\n", this, file);
2873 basic_streambuf_wchar_ctor(&this->base);
2874 this->base.vtable = &MSVCP_basic_filebuf_wchar_vtable;
2876 locale_ctor(&this->loc);
2877 basic_filebuf_wchar__Init(this, file, INITFL_new);
2878 return this;
2881 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
2882 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
2883 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_file, 8)
2884 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_file(basic_filebuf_wchar *this, FILE *file)
2886 TRACE("(%p %p)\n", this, file);
2888 basic_streambuf_short_ctor(&this->base);
2889 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2891 locale_ctor(&this->loc);
2892 basic_filebuf_short__Init(this, file, INITFL_new);
2893 return this;
2896 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
2897 /* ??_F?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
2898 static basic_filebuf_wchar* basic_filebuf_wchar_ctor(basic_filebuf_wchar *this)
2900 return basic_filebuf_wchar_ctor_file(this, NULL);
2903 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEXXZ */
2904 /* ??_F?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAXXZ */
2905 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor, 4)
2906 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor(basic_filebuf_wchar *this)
2908 return basic_filebuf_short_ctor_file(this, NULL);
2911 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
2912 /* ??0?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
2913 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_ctor_uninitialized, 8)
2914 basic_filebuf_wchar* __thiscall basic_filebuf_short_ctor_uninitialized(basic_filebuf_wchar *this, int uninitialized)
2916 TRACE("(%p %d)\n", this, uninitialized);
2918 basic_streambuf_short_ctor_uninitialized(&this->base, 0);
2919 this->base.vtable = &MSVCP_basic_filebuf_short_vtable;
2920 locale_ctor(&this->loc);
2921 return this;
2924 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
2925 /* ??1?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
2926 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UAE@XZ */
2927 /* ??1?$basic_filebuf@GU?$char_traits@G@std@@@std@@UEAA@XZ */
2928 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_dtor, 4)
2929 void __thiscall basic_filebuf_wchar_dtor(basic_filebuf_wchar *this)
2931 TRACE("(%p)\n", this);
2933 if(this->close)
2934 basic_filebuf_wchar_close(this);
2935 if(this->str) {
2936 basic_string_char_dtor(this->str);
2937 MSVCRT_operator_delete(this->str);
2939 locale_dtor(&this->loc);
2940 basic_streambuf_wchar_dtor(&this->base);
2943 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_vector_dtor, 8)
2944 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_vector_dtor(basic_filebuf_wchar *this, unsigned int flags)
2946 TRACE("(%p %x)\n", this, flags);
2947 if(flags & 2) {
2948 /* we have an array, with the number of elements stored before the first object */
2949 INT_PTR i, *ptr = (INT_PTR *)this-1;
2951 for(i=*ptr-1; i>=0; i--)
2952 basic_filebuf_wchar_dtor(this+i);
2953 MSVCRT_operator_delete(ptr);
2954 } else {
2955 basic_filebuf_wchar_dtor(this);
2956 if(flags & 1)
2957 MSVCRT_operator_delete(this);
2960 return this;
2963 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
2964 /* ?is_open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
2965 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QBE_NXZ */
2966 /* ?is_open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
2967 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_is_open, 4)
2968 MSVCP_bool __thiscall basic_filebuf_wchar_is_open(const basic_filebuf_wchar *this)
2970 TRACE("(%p)\n", this);
2971 return this->file != NULL;
2974 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PB_WHH@Z */
2975 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEB_WHH@Z */
2976 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBGHH@Z */
2977 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBGHH@Z */
2978 static basic_filebuf_wchar* basic_filebuf_wchar_open_wchar(basic_filebuf_wchar *this, const wchar_t *name, int mode, int prot)
2980 FILE *f = NULL;
2982 TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot);
2984 if(basic_filebuf_wchar_is_open(this))
2985 return NULL;
2987 if(!(f = _Fiopen_wchar(name, mode, prot)))
2988 return NULL;
2990 basic_filebuf_wchar__Init(this, f, INITFL_open);
2991 basic_filebuf_wchar__Initcvt(this);
2992 return this;
2995 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QAEPAV12@PBDHH@Z */
2996 /* ?open@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@QEAAPEAV12@PEBDHH@Z */
2997 static basic_filebuf_wchar* basic_filebuf_wchar_open(basic_filebuf_wchar *this, const char *name, int mode, int prot)
2999 wchar_t nameW[FILENAME_MAX];
3001 TRACE("(%p %s %d %d)\n", this, name, mode, prot);
3003 if(mbstowcs_s(NULL, nameW, FILENAME_MAX, name, FILENAME_MAX-1) != 0)
3004 return NULL;
3005 return basic_filebuf_wchar_open_wchar(this, nameW, mode, prot);
3008 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
3009 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
3010 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode_old, 12)
3011 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode_old(basic_filebuf_wchar *this, const char *name, short mode)
3013 TRACE("(%p %p %d)\n", this, name, mode);
3014 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3017 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
3018 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
3019 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_open_mode, 12)
3020 basic_filebuf_wchar* __thiscall basic_filebuf_wchar_open_mode(basic_filebuf_wchar *this, const char *name, int mode)
3022 TRACE("(%p %p %d)\n", this, name, mode);
3023 return basic_filebuf_wchar_open(this, name, mode, _SH_DENYNO);
3026 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3027 /* ?overflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3028 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3029 /* ?overflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3030 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_overflow, 8)
3031 unsigned short __thiscall basic_filebuf_wchar_overflow(basic_filebuf_wchar *this, unsigned short c)
3033 char *ptr, *to_next;
3034 wchar_t ch = c;
3035 const wchar_t *from_next;
3036 unsigned short ret;
3039 TRACE("(%p %d)\n", this, c);
3041 if(!basic_filebuf_wchar_is_open(this))
3042 return WEOF;
3043 if(c == WEOF)
3044 return !c;
3046 if(!this->cvt)
3047 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3049 from_next = &ch;
3050 basic_string_char_clear(this->str);
3051 basic_string_char_append_len_ch(this->str, 8, '\0');
3052 ptr = this->str->ptr;
3053 ret = codecvt_wchar_out(this->cvt, &this->state, &ch, &ch+1, &from_next,
3054 ptr, ptr+basic_string_char_length(this->str), &to_next);
3056 switch(ret) {
3057 case CODECVT_partial:
3058 if(from_next == &ch)
3059 return WEOF;
3060 /* fall through */
3061 case CODECVT_ok:
3062 if(!fwrite(ptr, to_next-ptr, 1, this->file))
3063 return WEOF;
3064 return c;
3065 case CODECVT_noconv:
3066 return fwrite(&ch, sizeof(wchar_t), 1, this->file) ? c : WEOF;
3067 default:
3068 return WEOF;
3072 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGG@Z */
3073 /* ?pbackfail@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGG@Z */
3074 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGG@Z */
3075 /* ?pbackfail@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGG@Z */
3076 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_pbackfail, 8)
3077 unsigned short __thiscall basic_filebuf_wchar_pbackfail(basic_filebuf_wchar *this, unsigned short c)
3079 TRACE("(%p %d)\n", this, c);
3081 if(!basic_filebuf_wchar_is_open(this))
3082 return WEOF;
3084 if(basic_streambuf_wchar_gptr(&this->base)>basic_streambuf_wchar_eback(&this->base)
3085 && (c==WEOF || basic_streambuf_wchar_gptr(&this->base)[-1]==c)) {
3086 basic_streambuf_wchar__Gndec(&this->base);
3087 return c==WEOF ? !c : c;
3088 }else if(c == WEOF) {
3089 return WEOF;
3090 }else if(!this->cvt) {
3091 return ungetwc(c, this->file);
3092 }else if(basic_string_char_length(this->str)) {
3093 char *b, *e, *cur;
3095 e = this->str->ptr;
3096 b = e+this->str->size-1;
3097 for(cur = b; cur>=e; cur--) {
3098 if(ungetc(*cur, this->file) == EOF) {
3099 for(; cur<=b; cur++)
3100 fgetc(this->file);
3101 return WEOF;
3104 basic_string_char_clear(this->str);
3105 this->state = this->state0;
3106 return c;
3109 return WEOF;
3112 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3113 /* ?uflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3114 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3115 /* ?uflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3116 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_uflow, 4)
3117 unsigned short __thiscall basic_filebuf_wchar_uflow(basic_filebuf_wchar *this)
3119 wchar_t ch, *to_next;
3120 const char *buf_next;
3121 int c;
3123 TRACE("(%p)\n", this);
3125 if(!basic_filebuf_wchar_is_open(this))
3126 return WEOF;
3128 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3129 return *basic_streambuf_wchar__Gninc(&this->base);
3131 if(!this->cvt)
3132 return fgetwc(this->file);
3134 basic_string_char_clear(this->str);
3135 this->state0 = this->state;
3136 while(1) {
3137 if((c = fgetc(this->file)) == EOF)
3138 return WEOF;
3139 basic_string_char_append_ch(this->str, c);
3140 this->state = this->state0;
3142 switch(codecvt_wchar_in(this->cvt, &this->state, this->str->ptr,
3143 this->str->ptr+this->str->size, &buf_next, &ch, &ch+1, &to_next)) {
3144 case CODECVT_partial:
3145 break;
3146 case CODECVT_noconv:
3147 if(this->str->size < sizeof(unsigned short)/sizeof(char))
3148 break;
3149 return *(unsigned short*)this->str->ptr;
3150 case CODECVT_ok:
3151 return (unsigned short)ch;
3152 default:
3153 return WEOF;
3158 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEGXZ */
3159 /* ?underflow@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAGXZ */
3160 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEGXZ */
3161 /* ?underflow@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAGXZ */
3162 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_underflow, 4)
3163 unsigned short __thiscall basic_filebuf_wchar_underflow(basic_filebuf_wchar *this)
3165 unsigned short ret;
3167 TRACE("(%p)\n", this);
3169 if(basic_streambuf_wchar_gptr(&this->base) < basic_streambuf_wchar_egptr(&this->base))
3170 return *basic_streambuf_wchar_gptr(&this->base);
3172 ret = call_basic_streambuf_wchar_uflow(&this->base);
3173 if(ret != WEOF)
3174 ret = call_basic_streambuf_wchar_pbackfail(&this->base, ret);
3175 return ret;
3178 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3179 /* ?seekoff@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3180 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekoff, 20)
3181 fpos_int* __thiscall basic_filebuf_wchar_seekoff(basic_filebuf_wchar *this,
3182 fpos_int *ret, streamoff off, int way, int mode)
3184 fpos_t pos;
3186 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3188 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, off, way)) {
3189 ret->off = -1;
3190 ret->pos = 0;
3191 ret->state = 0;
3192 return ret;
3195 fgetpos(this->file, &pos);
3196 ret->off = 0;
3197 ret->pos = pos;
3198 ret->state = this->state;
3199 return ret;
3202 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3203 /* ?seekpos@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3204 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3205 /* ?seekpos@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3206 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_seekpos, 36)
3207 fpos_int* __thiscall basic_filebuf_wchar_seekpos(basic_filebuf_wchar *this,
3208 fpos_int *ret, fpos_int pos, int mode)
3210 fpos_t fpos;
3212 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3214 if(!basic_filebuf_wchar_is_open(this) || fseek(this->file, (LONG)pos.pos, SEEK_SET)
3215 || (pos.off && fseek(this->file, pos.off, SEEK_CUR))) {
3216 ret->off = -1;
3217 ret->pos = 0;
3218 ret->state = 0;
3219 return ret;
3222 fgetpos(this->file, &fpos);
3223 ret->off = 0;
3224 ret->pos = fpos;
3225 ret->state = this->state;
3226 return ret;
3229 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PA_WH@Z */
3230 /* ?setbuf@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEA_W_J@Z */
3231 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_setbuf, 12)
3232 basic_streambuf_wchar* __thiscall basic_filebuf_wchar_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3234 TRACE("(%p %p %ld)\n", this, buf, count);
3236 if(!basic_filebuf_wchar_is_open(this))
3237 return NULL;
3239 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3240 return NULL;
3242 basic_filebuf_wchar__Init(this, this->file, INITFL_open);
3243 return &this->base;
3246 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAGH@Z */
3247 /* ?setbuf@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAG_J@Z */
3248 DEFINE_THISCALL_WRAPPER(basic_filebuf_short_setbuf, 12)
3249 basic_streambuf_wchar* __thiscall basic_filebuf_short_setbuf(basic_filebuf_wchar *this, wchar_t *buf, streamsize count)
3251 TRACE("(%p %p %ld)\n", this, buf, count);
3253 if(!basic_filebuf_wchar_is_open(this))
3254 return NULL;
3256 if(setvbuf(this->file, (char*)buf, (buf==NULL && count==0) ? _IONBF : _IOFBF, count*sizeof(wchar_t)))
3257 return NULL;
3259 basic_filebuf_short__Init(this, this->file, INITFL_open);
3260 return &this->base;
3263 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MAEHXZ */
3264 /* ?sync@?$basic_filebuf@_WU?$char_traits@_W@std@@@std@@MEAAHXZ */
3265 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MAEHXZ */
3266 /* ?sync@?$basic_filebuf@GU?$char_traits@G@std@@@std@@MEAAHXZ */
3267 DEFINE_THISCALL_WRAPPER(basic_filebuf_wchar_sync, 4)
3268 int __thiscall basic_filebuf_wchar_sync(basic_filebuf_wchar *this)
3270 TRACE("(%p)\n", this);
3272 if(!basic_filebuf_wchar_is_open(this))
3273 return 0;
3275 if(call_basic_streambuf_wchar_overflow(&this->base, WEOF) == WEOF)
3276 return 0;
3277 return fflush(this->file);
3280 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3281 /* ?_Getstate@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3282 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEHH@Z */
3283 /* ?_Mode@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAAHH@Z */
3284 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Getstate, 8)
3285 int __thiscall basic_stringbuf_char__Getstate(basic_stringbuf_char *this, IOSB_openmode mode)
3287 int state = 0;
3289 if(!(mode & OPENMODE_in))
3290 state |= STRINGBUF_no_read;
3292 if(!(mode & OPENMODE_out))
3293 state |= STRINGBUF_no_write;
3295 if(mode & OPENMODE_ate)
3296 state |= STRINGBUF_at_end;
3298 if(mode & OPENMODE_app)
3299 state |= STRINGBUF_append;
3301 return state;
3304 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXPBDIH@Z */
3305 /* ?_Init@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXPEBD_KH@Z */
3306 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Init, 16)
3307 void __thiscall basic_stringbuf_char__Init(basic_stringbuf_char *this, const char *str, MSVCP_size_t count, int state)
3309 TRACE("(%p, %p, %ld, %d)\n", this, str, count, state);
3311 basic_streambuf_char__Init_empty(&this->base);
3313 this->state = state;
3314 this->seekhigh = NULL;
3316 if(count && str) {
3317 char *buf = MSVCRT_operator_new(count);
3318 if(!buf) {
3319 ERR("Out of memory\n");
3320 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3323 memcpy(buf, str, count);
3324 this->seekhigh = buf + count;
3326 this->state |= STRINGBUF_allocated;
3328 if(!(state & STRINGBUF_no_read))
3329 basic_streambuf_char_setg(&this->base, buf, buf, buf + count);
3331 if(!(state & STRINGBUF_no_write)) {
3332 basic_streambuf_char_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3334 if(!basic_streambuf_char_gptr(&this->base))
3335 basic_streambuf_char_setg(&this->base, buf, 0, buf);
3340 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
3341 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
3342 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_str, 12)
3343 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_str(basic_stringbuf_char *this,
3344 const basic_string_char *str, IOSB_openmode mode)
3346 TRACE("(%p %p %d)\n", this, str, mode);
3348 basic_streambuf_char_ctor(&this->base);
3349 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3351 basic_stringbuf_char__Init(this, basic_string_char_c_str(str),
3352 str->size, basic_stringbuf_char__Getstate(this, mode));
3353 return this;
3356 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
3357 /* ??0?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
3358 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor_mode, 8)
3359 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor_mode(
3360 basic_stringbuf_char *this, IOSB_openmode mode)
3362 TRACE("(%p %d)\n", this, mode);
3364 basic_streambuf_char_ctor(&this->base);
3365 this->base.vtable = &MSVCP_basic_stringbuf_char_vtable;
3367 basic_stringbuf_char__Init(this, NULL, 0, basic_stringbuf_char__Getstate(this, mode));
3368 return this;
3371 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
3372 /* ??_F?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
3373 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_ctor, 4)
3374 basic_stringbuf_char* __thiscall basic_stringbuf_char_ctor(basic_stringbuf_char *this)
3376 return basic_stringbuf_char_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3379 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXXZ */
3380 /* ?_Tidy@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IEAAXXZ */
3381 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char__Tidy, 4)
3382 void __thiscall basic_stringbuf_char__Tidy(basic_stringbuf_char *this)
3384 TRACE("(%p)\n", this);
3386 if(this->state & STRINGBUF_allocated) {
3387 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
3388 this->seekhigh = NULL;
3389 this->state &= ~STRINGBUF_allocated;
3392 basic_streambuf_char__Init_empty(&this->base);
3395 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
3396 /* ??1?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
3397 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_dtor, 4)
3398 void __thiscall basic_stringbuf_char_dtor(basic_stringbuf_char *this)
3400 TRACE("(%p)\n", this);
3402 basic_stringbuf_char__Tidy(this);
3403 basic_streambuf_char_dtor(&this->base);
3406 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_vector_dtor, 8)
3407 basic_stringbuf_char* __thiscall basic_stringbuf_char_vector_dtor(basic_stringbuf_char *this, unsigned int flags)
3409 TRACE("(%p %x)\n", this, flags);
3411 if(flags & 2) {
3412 /* we have an array, with the number of elements stored before the first object */
3413 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3415 for (i = *ptr - 1; i >= 0; i--)
3416 basic_stringbuf_char_dtor(this+i);
3418 MSVCRT_operator_delete(ptr);
3419 }else {
3420 basic_stringbuf_char_dtor(this);
3422 if(flags & 1)
3423 MSVCRT_operator_delete(this);
3426 return this;
3429 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3430 /* ?overflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3431 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_overflow, 8)
3432 int __thiscall basic_stringbuf_char_overflow(basic_stringbuf_char *this, int meta)
3434 MSVCP_size_t oldsize, size;
3435 char *ptr, *buf;
3437 TRACE("(%p %x)\n", this, meta);
3439 if(meta == EOF)
3440 return !EOF;
3441 if(this->state & STRINGBUF_no_write)
3442 return EOF;
3444 ptr = basic_streambuf_char_pptr(&this->base);
3445 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3446 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
3447 this->seekhigh, basic_streambuf_char_epptr(&this->base));
3449 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
3450 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
3452 oldsize = (ptr ? basic_streambuf_char_epptr(&this->base)-basic_streambuf_char_eback(&this->base): 0);
3453 size = oldsize|0xf;
3454 size += size/2;
3455 buf = MSVCRT_operator_new(size);
3456 if(!buf) {
3457 ERR("Out of memory\n");
3458 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3461 if(!oldsize) {
3462 this->seekhigh = buf;
3463 basic_streambuf_char_setp(&this->base, buf, buf+size);
3464 if(this->state & STRINGBUF_no_read)
3465 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3466 else
3467 basic_streambuf_char_setg(&this->base, buf, buf, buf+1);
3469 this->state |= STRINGBUF_allocated;
3470 }else {
3471 ptr = basic_streambuf_char_eback(&this->base);
3472 memcpy(buf, ptr, oldsize);
3474 this->seekhigh = buf+(this->seekhigh-ptr);
3475 basic_streambuf_char_setp_next(&this->base, buf,
3476 buf+(basic_streambuf_char_pptr(&this->base)-ptr), buf+size);
3477 if(this->state & STRINGBUF_no_read)
3478 basic_streambuf_char_setg(&this->base, buf, NULL, buf);
3479 else
3480 basic_streambuf_char_setg(&this->base, buf,
3481 buf+(basic_streambuf_char_gptr(&this->base)-ptr),
3482 basic_streambuf_char_pptr(&this->base)+1);
3484 MSVCRT_operator_delete(ptr);
3487 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = meta);
3490 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHH@Z */
3491 /* ?pbackfail@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHH@Z */
3492 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_pbackfail, 8)
3493 int __thiscall basic_stringbuf_char_pbackfail(basic_stringbuf_char *this, int c)
3495 char *cur;
3497 TRACE("(%p %x)\n", this, c);
3499 cur = basic_streambuf_char_gptr(&this->base);
3500 if(!cur || cur==basic_streambuf_char_eback(&this->base)
3501 || (c!=EOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3502 return EOF;
3504 if(c != EOF)
3505 cur[-1] = c;
3506 basic_streambuf_char_gbump(&this->base, -1);
3507 return c==EOF ? !EOF : c;
3510 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAEHXZ */
3511 /* ?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ */
3512 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_underflow, 4)
3513 int __thiscall basic_stringbuf_char_underflow(basic_stringbuf_char *this)
3515 char *ptr, *cur;
3517 TRACE("(%p)\n", this);
3519 cur = basic_streambuf_char_gptr(&this->base);
3520 if(!cur || this->state&STRINGBUF_no_read)
3521 return EOF;
3523 ptr = basic_streambuf_char_pptr(&this->base);
3524 if(this->seekhigh < ptr)
3525 this->seekhigh = ptr;
3527 ptr = basic_streambuf_char_egptr(&this->base);
3528 if(this->seekhigh > ptr)
3529 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base), cur, this->seekhigh);
3531 if(cur < this->seekhigh)
3532 return (unsigned char)*cur;
3533 return EOF;
3536 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3537 /* ?seekoff@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3538 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekoff, 20)
3539 fpos_int* __thiscall basic_stringbuf_char_seekoff(basic_stringbuf_char *this,
3540 fpos_int *ret, streamoff off, int way, int mode)
3542 char *beg, *cur_r, *cur_w;
3544 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3546 cur_w = basic_streambuf_char_pptr(&this->base);
3547 if(cur_w > this->seekhigh)
3548 this->seekhigh = cur_w;
3550 ret->off = 0;
3551 ret->pos = 0;
3552 ret->state = 0;
3554 beg = basic_streambuf_char_eback(&this->base);
3555 cur_r = basic_streambuf_char_gptr(&this->base);
3556 if((mode & OPENMODE_in) && cur_r) {
3557 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3558 off += cur_r-beg;
3559 else if(way == SEEKDIR_end)
3560 off += this->seekhigh-beg;
3561 else if(way != SEEKDIR_beg)
3562 off = -1;
3564 if(off<0 || off>this->seekhigh-beg) {
3565 off = -1;
3566 }else {
3567 basic_streambuf_char_gbump(&this->base, beg-cur_r+off);
3568 if((mode & OPENMODE_out) && cur_w) {
3569 basic_streambuf_char_setp_next(&this->base, beg,
3570 basic_streambuf_char_gptr(&this->base),
3571 basic_streambuf_char_epptr(&this->base));
3574 }else if((mode & OPENMODE_out) && cur_w) {
3575 if(way == SEEKDIR_cur)
3576 off += cur_w-beg;
3577 else if(way == SEEKDIR_end)
3578 off += this->seekhigh-beg;
3579 else if(way != SEEKDIR_beg)
3580 off = -1;
3582 if(off<0 || off>this->seekhigh-beg)
3583 off = -1;
3584 else
3585 basic_streambuf_char_pbump(&this->base, beg-cur_w+off);
3586 }else {
3587 off = -1;
3590 ret->off = off;
3591 return ret;
3594 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3595 /* ?seekpos@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3596 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_seekpos, 36)
3597 fpos_int* __thiscall basic_stringbuf_char_seekpos(basic_stringbuf_char *this,
3598 fpos_int *ret, fpos_int pos, int mode)
3600 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
3602 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
3603 *ret = pos;
3604 return ret;
3607 return basic_stringbuf_char_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
3610 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
3611 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
3612 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_set, 8)
3613 void __thiscall basic_stringbuf_char_str_set(basic_stringbuf_char *this, const basic_string_char *str)
3615 TRACE("(%p %p)\n", this, str);
3617 basic_stringbuf_char__Tidy(this);
3618 basic_stringbuf_char__Init(this, basic_string_char_c_str(str), str->size, this->state);
3621 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3622 /* ?str@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3623 DEFINE_THISCALL_WRAPPER(basic_stringbuf_char_str_get, 8)
3624 basic_string_char* __thiscall basic_stringbuf_char_str_get(const basic_stringbuf_char *this, basic_string_char *ret)
3626 char *ptr;
3628 TRACE("(%p)\n", this);
3630 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_char_pptr(&this->base)) {
3631 char *pptr;
3633 ptr = basic_streambuf_char_pbase(&this->base);
3634 pptr = basic_streambuf_char_pptr(&this->base);
3636 return basic_string_char_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
3639 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_char_gptr(&this->base)) {
3640 ptr = basic_streambuf_char_eback(&this->base);
3641 return basic_string_char_ctor_cstr_len(ret, ptr, basic_streambuf_char_egptr(&this->base) - ptr);
3644 return basic_string_char_ctor(ret);
3647 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AAEHH@Z */
3648 /* ?_Getstate@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@AEAAHH@Z */
3649 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3650 /* ?_Getstate@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3651 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEHH@Z */
3652 /* ?_Mode@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AEAAHH@Z */
3653 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Getstate, 8)
3654 int __thiscall basic_stringbuf_wchar__Getstate(basic_stringbuf_wchar *this, IOSB_openmode mode)
3656 int state = 0;
3658 if(!(mode & OPENMODE_in))
3659 state |= STRINGBUF_no_read;
3661 if(!(mode & OPENMODE_out))
3662 state |= STRINGBUF_no_write;
3664 if(mode & OPENMODE_ate)
3665 state |= STRINGBUF_at_end;
3667 if(mode & OPENMODE_app)
3668 state |= STRINGBUF_append;
3670 return state;
3673 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXPB_WIH@Z */
3674 /* ?_Init@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXPEB_W_KH@Z */
3675 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXPBGIH@Z */
3676 /* ?_Init@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXPEBG_KH@Z */
3677 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Init, 16)
3678 void __thiscall basic_stringbuf_wchar__Init(basic_stringbuf_wchar *this, const wchar_t *str, MSVCP_size_t count, int state)
3680 TRACE("(%p, %p, %lu, %d)\n", this, str, count, state);
3682 basic_streambuf_wchar__Init_empty(&this->base);
3684 this->state = state;
3685 this->seekhigh = NULL;
3687 if(count && str) {
3688 wchar_t *buf = MSVCRT_operator_new(count*sizeof(wchar_t));
3689 if(!buf) {
3690 ERR("Out of memory\n");
3691 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3694 memcpy(buf, str, count*sizeof(wchar_t));
3695 this->seekhigh = buf + count;
3697 this->state |= STRINGBUF_allocated;
3699 if(!(state & STRINGBUF_no_read))
3700 basic_streambuf_wchar_setg(&this->base, buf, buf, buf + count);
3702 if(!(state & STRINGBUF_no_write)) {
3703 basic_streambuf_wchar_setp_next(&this->base, buf, (state & STRINGBUF_at_end) ? buf + count : buf, buf + count);
3705 if(!basic_streambuf_wchar_gptr(&this->base))
3706 basic_streambuf_wchar_setg(&this->base, buf, 0, buf);
3711 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
3712 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
3713 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_str(basic_stringbuf_wchar *this,
3714 const basic_string_wchar *str, IOSB_openmode mode)
3716 TRACE("(%p %p %d)\n", this, str, mode);
3718 basic_streambuf_wchar_ctor(&this->base);
3719 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3721 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str),
3722 str->size, basic_stringbuf_wchar__Getstate(this, mode));
3723 return this;
3726 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
3727 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
3728 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_str, 12)
3729 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_str(basic_stringbuf_wchar *this,
3730 const basic_string_wchar *str, IOSB_openmode mode)
3732 basic_stringbuf_wchar_ctor_str(this, str, mode);
3733 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3734 return this;
3737 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
3738 /* ??0?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
3739 static basic_stringbuf_wchar* basic_stringbuf_wchar_ctor_mode(
3740 basic_stringbuf_wchar *this, IOSB_openmode mode)
3742 TRACE("(%p %d)\n", this, mode);
3744 basic_streambuf_wchar_ctor(&this->base);
3745 this->base.vtable = &MSVCP_basic_stringbuf_wchar_vtable;
3747 basic_stringbuf_wchar__Init(this, NULL, 0, basic_stringbuf_wchar__Getstate(this, mode));
3748 return this;
3751 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
3752 /* ??0?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
3753 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor_mode, 8)
3754 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor_mode(
3755 basic_stringbuf_wchar *this, IOSB_openmode mode)
3757 basic_stringbuf_wchar_ctor_mode(this, mode);
3758 this->base.vtable = &MSVCP_basic_stringbuf_short_vtable;
3759 return this;
3762 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
3763 /* ??_F?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
3764 DEFINE_THISCALL_WRAPPER(basic_stringbuf_short_ctor, 4)
3765 basic_stringbuf_wchar* __thiscall basic_stringbuf_short_ctor(basic_stringbuf_wchar *this)
3767 return basic_stringbuf_short_ctor_mode(this, OPENMODE_in|OPENMODE_out);
3770 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXXZ */
3771 /* ?_Tidy@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IEAAXXZ */
3772 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IAEXXZ */
3773 /* ?_Tidy@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@IEAAXXZ */
3774 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar__Tidy, 4)
3775 void __thiscall basic_stringbuf_wchar__Tidy(basic_stringbuf_wchar *this)
3777 TRACE("(%p)\n", this);
3779 if(this->state & STRINGBUF_allocated) {
3780 MSVCRT_operator_delete(basic_streambuf_wchar_eback(&this->base));
3781 this->seekhigh = NULL;
3782 this->state &= ~STRINGBUF_allocated;
3785 basic_streambuf_wchar__Init_empty(&this->base);
3788 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
3789 /* ??1?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
3790 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
3791 /* ??1?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
3792 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_dtor, 4)
3793 void __thiscall basic_stringbuf_wchar_dtor(basic_stringbuf_wchar *this)
3795 TRACE("(%p)\n", this);
3797 basic_stringbuf_wchar__Tidy(this);
3798 basic_streambuf_wchar_dtor(&this->base);
3801 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_vector_dtor, 8)
3802 basic_stringbuf_wchar* __thiscall basic_stringbuf_wchar_vector_dtor(basic_stringbuf_wchar *this, unsigned int flags)
3804 TRACE("(%p %x)\n", this, flags);
3806 if(flags & 2) {
3807 /* we have an array, with the number of elements stored before the first object */
3808 INT_PTR i, *ptr = (INT_PTR *) this - 1;
3810 for (i = *ptr - 1; i >= 0; i--)
3811 basic_stringbuf_wchar_dtor(this+i);
3813 MSVCRT_operator_delete(ptr);
3814 }else {
3815 basic_stringbuf_wchar_dtor(this);
3817 if(flags & 1)
3818 MSVCRT_operator_delete(this);
3821 return this;
3824 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3825 /* ?overflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3826 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3827 /* ?overflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3828 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_overflow, 8)
3829 unsigned short __thiscall basic_stringbuf_wchar_overflow(basic_stringbuf_wchar *this, unsigned short meta)
3831 MSVCP_size_t oldsize, size;
3832 wchar_t *ptr, *buf;
3834 TRACE("(%p %x)\n", this, meta);
3836 if(meta == WEOF)
3837 return !WEOF;
3838 if(this->state & STRINGBUF_no_write)
3839 return WEOF;
3841 ptr = basic_streambuf_wchar_pptr(&this->base);
3842 if((this->state&STRINGBUF_append) && ptr<this->seekhigh)
3843 basic_streambuf_wchar_setp_next(&this->base, basic_streambuf_wchar_pbase(&this->base),
3844 this->seekhigh, basic_streambuf_wchar_epptr(&this->base));
3846 if(ptr && ptr<basic_streambuf_wchar_epptr(&this->base))
3847 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3849 oldsize = (ptr ? basic_streambuf_wchar_epptr(&this->base)-basic_streambuf_wchar_eback(&this->base): 0);
3850 size = oldsize|0xf;
3851 size += size/2;
3852 buf = MSVCRT_operator_new(size*sizeof(wchar_t));
3853 if(!buf) {
3854 ERR("Out of memory\n");
3855 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3858 if(!oldsize) {
3859 this->seekhigh = buf;
3860 basic_streambuf_wchar_setp(&this->base, buf, buf+size);
3861 if(this->state & STRINGBUF_no_read)
3862 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3863 else
3864 basic_streambuf_wchar_setg(&this->base, buf, buf, buf+1);
3866 this->state |= STRINGBUF_allocated;
3867 }else {
3868 ptr = basic_streambuf_wchar_eback(&this->base);
3869 memcpy(buf, ptr, oldsize*sizeof(wchar_t));
3871 this->seekhigh = buf+(this->seekhigh-ptr);
3872 basic_streambuf_wchar_setp_next(&this->base, buf,
3873 buf+(basic_streambuf_wchar_pptr(&this->base)-ptr), buf+size);
3874 if(this->state & STRINGBUF_no_read)
3875 basic_streambuf_wchar_setg(&this->base, buf, NULL, buf);
3876 else
3877 basic_streambuf_wchar_setg(&this->base, buf,
3878 buf+(basic_streambuf_wchar_gptr(&this->base)-ptr),
3879 basic_streambuf_wchar_pptr(&this->base)+1);
3881 MSVCRT_operator_delete(ptr);
3884 return (*basic_streambuf_wchar__Pninc(&this->base) = meta);
3887 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGG@Z */
3888 /* ?pbackfail@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGG@Z */
3889 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGG@Z */
3890 /* ?pbackfail@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGG@Z */
3891 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_pbackfail, 8)
3892 unsigned short __thiscall basic_stringbuf_wchar_pbackfail(basic_stringbuf_wchar *this, unsigned short c)
3894 wchar_t *cur;
3896 TRACE("(%p %x)\n", this, c);
3898 cur = basic_streambuf_wchar_gptr(&this->base);
3899 if(!cur || cur==basic_streambuf_wchar_eback(&this->base)
3900 || (c!=WEOF && c!=cur[-1] && this->state&STRINGBUF_no_write))
3901 return WEOF;
3903 if(c != WEOF)
3904 cur[-1] = c;
3905 basic_streambuf_wchar_gbump(&this->base, -1);
3906 return c==WEOF ? !WEOF : c;
3909 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAEGXZ */
3910 /* ?underflow@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAAGXZ */
3911 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAEGXZ */
3912 /* ?underflow@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAAGXZ */
3913 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_underflow, 4)
3914 unsigned short __thiscall basic_stringbuf_wchar_underflow(basic_stringbuf_wchar *this)
3916 wchar_t *ptr, *cur;
3918 TRACE("(%p)\n", this);
3920 cur = basic_streambuf_wchar_gptr(&this->base);
3921 if(!cur || this->state&STRINGBUF_no_read)
3922 return WEOF;
3924 ptr = basic_streambuf_wchar_pptr(&this->base);
3925 if(this->seekhigh < ptr)
3926 this->seekhigh = ptr;
3928 ptr = basic_streambuf_wchar_egptr(&this->base);
3929 if(this->seekhigh > ptr)
3930 basic_streambuf_wchar_setg(&this->base, basic_streambuf_wchar_eback(&this->base), cur, this->seekhigh);
3932 if(cur < this->seekhigh)
3933 return *cur;
3934 return WEOF;
3937 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
3938 /* ?seekoff@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
3939 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekoff, 20)
3940 fpos_int* __thiscall basic_stringbuf_wchar_seekoff(basic_stringbuf_wchar *this,
3941 fpos_int *ret, streamoff off, int way, int mode)
3943 wchar_t *beg, *cur_r, *cur_w;
3945 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
3947 cur_w = basic_streambuf_wchar_pptr(&this->base);
3948 if(cur_w > this->seekhigh)
3949 this->seekhigh = cur_w;
3951 ret->off = 0;
3952 ret->pos = 0;
3953 ret->state = 0;
3955 beg = basic_streambuf_wchar_eback(&this->base);
3956 cur_r = basic_streambuf_wchar_gptr(&this->base);
3957 if((mode & OPENMODE_in) && cur_r) {
3958 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
3959 off += cur_r-beg;
3960 else if(way == SEEKDIR_end)
3961 off += this->seekhigh-beg;
3962 else if(way != SEEKDIR_beg)
3963 off = -1;
3965 if(off<0 || off>this->seekhigh-beg) {
3966 off = -1;
3967 }else {
3968 basic_streambuf_wchar_gbump(&this->base, beg-cur_r+off);
3969 if((mode & OPENMODE_out) && cur_w) {
3970 basic_streambuf_wchar_setp_next(&this->base, beg,
3971 basic_streambuf_wchar_gptr(&this->base),
3972 basic_streambuf_wchar_epptr(&this->base));
3975 }else if((mode & OPENMODE_out) && cur_w) {
3976 if(way == SEEKDIR_cur)
3977 off += cur_w-beg;
3978 else if(way == SEEKDIR_end)
3979 off += this->seekhigh-beg;
3980 else if(way != SEEKDIR_beg)
3981 off = -1;
3983 if(off<0 || off>this->seekhigh-beg)
3984 off = -1;
3985 else
3986 basic_streambuf_wchar_pbump(&this->base, beg-cur_w+off);
3987 }else {
3988 off = -1;
3991 ret->off = off;
3992 return ret;
3995 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3996 /* ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3997 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MAE?AV?$fpos@H@2@V32@H@Z */
3998 /* ?seekpos@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
3999 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_seekpos, 36)
4000 fpos_int* __thiscall basic_stringbuf_wchar_seekpos(basic_stringbuf_wchar *this,
4001 fpos_int *ret, fpos_int pos, int mode)
4003 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
4005 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
4006 *ret = pos;
4007 return ret;
4010 return basic_stringbuf_wchar_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
4013 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
4014 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
4015 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
4016 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
4017 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_set, 8)
4018 void __thiscall basic_stringbuf_wchar_str_set(basic_stringbuf_wchar *this, const basic_string_wchar *str)
4020 TRACE("(%p %p)\n", this, str);
4022 basic_stringbuf_wchar__Tidy(this);
4023 basic_stringbuf_wchar__Init(this, basic_string_wchar_c_str(str), str->size, this->state);
4026 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4027 /* ?str@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4028 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4029 /* ?str@?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4030 DEFINE_THISCALL_WRAPPER(basic_stringbuf_wchar_str_get, 8)
4031 basic_string_wchar* __thiscall basic_stringbuf_wchar_str_get(const basic_stringbuf_wchar *this, basic_string_wchar *ret)
4033 wchar_t *ptr;
4035 TRACE("(%p)\n", this);
4037 if(!(this->state & STRINGBUF_no_write) && basic_streambuf_wchar_pptr(&this->base)) {
4038 wchar_t *pptr;
4040 ptr = basic_streambuf_wchar_pbase(&this->base);
4041 pptr = basic_streambuf_wchar_pptr(&this->base);
4043 return basic_string_wchar_ctor_cstr_len(ret, ptr, (this->seekhigh < pptr ? pptr : this->seekhigh) - ptr);
4046 if(!(this->state & STRINGBUF_no_read) && basic_streambuf_wchar_gptr(&this->base)) {
4047 ptr = basic_streambuf_wchar_eback(&this->base);
4048 return basic_string_wchar_ctor_cstr_len(ret, ptr, basic_streambuf_wchar_egptr(&this->base) - ptr);
4051 return basic_string_wchar_ctor(ret);
4054 /* ??0ios_base@std@@IAE@XZ */
4055 /* ??0ios_base@std@@IEAA@XZ */
4056 DEFINE_THISCALL_WRAPPER(ios_base_ctor, 4)
4057 ios_base* __thiscall ios_base_ctor(ios_base *this)
4059 TRACE("(%p)\n", this);
4060 this->vtable = &MSVCP_ios_base_vtable;
4061 locale_ctor_uninitialized(&this->loc, 0);
4062 return this;
4065 /* ??0ios_base@std@@QAE@ABV01@@Z */
4066 /* ??0ios_base@std@@QEAA@AEBV01@@Z */
4067 DEFINE_THISCALL_WRAPPER(ios_base_copy_ctor, 8)
4068 ios_base* __thiscall ios_base_copy_ctor(ios_base *this, const ios_base *copy)
4070 TRACE("(%p %p)\n", this, copy);
4071 *this = *copy;
4072 this->vtable = &MSVCP_ios_base_vtable;
4073 return this;
4076 /* ?_Callfns@ios_base@std@@AAEXW4event@12@@Z */
4077 /* ?_Callfns@ios_base@std@@AEAAXW4event@12@@Z */
4078 DEFINE_THISCALL_WRAPPER(ios_base_Callfns, 8)
4079 void __thiscall ios_base_Callfns(ios_base *this, IOS_BASE_event event)
4081 IOS_BASE_fnarray *cur;
4083 TRACE("(%p %x)\n", this, event);
4085 for(cur=this->calls; cur; cur=cur->next)
4086 cur->event_handler(event, this, cur->index);
4089 /* ?_Tidy@ios_base@std@@AAAXXZ */
4090 /* ?_Tidy@ios_base@std@@AEAAXXZ */
4091 void CDECL ios_base_Tidy(ios_base *this)
4093 IOS_BASE_iosarray *arr_cur, *arr_next;
4094 IOS_BASE_fnarray *event_cur, *event_next;
4096 TRACE("(%p)\n", this);
4098 ios_base_Callfns(this, EVENT_erase_event);
4100 for(arr_cur=this->arr; arr_cur; arr_cur=arr_next) {
4101 arr_next = arr_cur->next;
4102 MSVCRT_operator_delete(arr_cur);
4104 this->arr = NULL;
4106 for(event_cur=this->calls; event_cur; event_cur=event_next) {
4107 event_next = event_cur->next;
4108 MSVCRT_operator_delete(event_cur);
4110 this->calls = NULL;
4113 /* ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z */
4114 /* ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z */
4115 static void ios_base_Ios_base_dtor(ios_base *obj)
4117 TRACE("(%p)\n", obj);
4118 locale_dtor(&obj->loc);
4119 ios_base_Tidy(obj);
4122 /* ??1ios_base@std@@UAE@XZ */
4123 /* ??1ios_base@std@@UEAA@XZ */
4124 DEFINE_THISCALL_WRAPPER(ios_base_dtor, 4)
4125 void __thiscall ios_base_dtor(ios_base *this)
4127 ios_base_Ios_base_dtor(this);
4130 DEFINE_THISCALL_WRAPPER(ios_base_vector_dtor, 8)
4131 ios_base* __thiscall ios_base_vector_dtor(ios_base *this, unsigned int flags)
4133 TRACE("(%p %x)\n", this, flags);
4134 if(flags & 2) {
4135 /* we have an array, with the number of elements stored before the first object */
4136 INT_PTR i, *ptr = (INT_PTR *)this-1;
4138 for(i=*ptr-1; i>=0; i--)
4139 ios_base_dtor(this+i);
4140 MSVCRT_operator_delete(ptr);
4141 } else {
4142 ios_base_dtor(this);
4143 if(flags & 1)
4144 MSVCRT_operator_delete(this);
4147 return this;
4150 DEFINE_THISCALL_WRAPPER(iosb_vector_dtor, 8)
4151 void* __thiscall iosb_vector_dtor(void *this, unsigned int flags)
4153 TRACE("(%p %x)\n", this, flags);
4154 if(flags & 2) {
4155 INT_PTR *ptr = (INT_PTR *)this-1;
4156 MSVCRT_operator_delete(ptr);
4157 } else {
4158 if(flags & 1)
4159 MSVCRT_operator_delete(this);
4162 return this;
4165 /* ?_Findarr@ios_base@std@@AAEAAU_Iosarray@12@H@Z */
4166 /* ?_Findarr@ios_base@std@@AEAAAEAU_Iosarray@12@H@Z */
4167 DEFINE_THISCALL_WRAPPER(ios_base_Findarr, 8)
4168 IOS_BASE_iosarray* __thiscall ios_base_Findarr(ios_base *this, int index)
4170 IOS_BASE_iosarray *p;
4172 TRACE("(%p %d)\n", this, index);
4174 for(p=this->arr; p; p=p->next) {
4175 if(p->index == index)
4176 return p;
4179 for(p=this->arr; p; p=p->next) {
4180 if(!p->long_val && !p->ptr_val) {
4181 p->index = index;
4182 return p;
4186 p = MSVCRT_operator_new(sizeof(IOS_BASE_iosarray));
4187 p->next = this->arr;
4188 p->index = index;
4189 p->long_val = 0;
4190 p->ptr_val = NULL;
4191 this->arr = p;
4192 return p;
4195 /* ?iword@ios_base@std@@QAEAAJH@Z */
4196 /* ?iword@ios_base@std@@QEAAAEAJH@Z */
4197 DEFINE_THISCALL_WRAPPER(ios_base_iword, 8)
4198 LONG* __thiscall ios_base_iword(ios_base *this, int index)
4200 TRACE("(%p %d)\n", this, index);
4201 return &ios_base_Findarr(this, index)->long_val;
4204 /* ?pword@ios_base@std@@QAEAAPAXH@Z */
4205 /* ?pword@ios_base@std@@QEAAAEAPEAXH@Z */
4206 DEFINE_THISCALL_WRAPPER(ios_base_pword, 8)
4207 void** __thiscall ios_base_pword(ios_base *this, int index)
4209 TRACE("(%p %d)\n", this, index);
4210 return &ios_base_Findarr(this, index)->ptr_val;
4213 /* ?register_callback@ios_base@std@@QAEXP6AXW4event@12@AAV12@H@ZH@Z */
4214 /* ?register_callback@ios_base@std@@QEAAXP6AXW4event@12@AEAV12@H@ZH@Z */
4215 DEFINE_THISCALL_WRAPPER(ios_base_register_callback, 12)
4216 void __thiscall ios_base_register_callback(ios_base *this, IOS_BASE_event_callback callback, int index)
4218 IOS_BASE_fnarray *event;
4220 TRACE("(%p %p %d)\n", this, callback, index);
4222 event = MSVCRT_operator_new(sizeof(IOS_BASE_fnarray));
4223 event->next = this->calls;
4224 event->index = index;
4225 event->event_handler = callback;
4226 this->calls = event;
4229 /* ?clear@ios_base@std@@QAEXH_N@Z */
4230 /* ?clear@ios_base@std@@QEAAXH_N@Z */
4231 DEFINE_THISCALL_WRAPPER(ios_base_clear_reraise, 12)
4232 void __thiscall ios_base_clear_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4234 TRACE("(%p %x %x)\n", this, state, reraise);
4236 this->state = state & IOSTATE_mask;
4237 if(!(this->state & this->except))
4238 return;
4240 if(reraise)
4241 throw_exception(EXCEPTION_RERAISE, NULL);
4242 else if(this->state & this->except & IOSTATE_eofbit)
4243 throw_exception(EXCEPTION_FAILURE, "eofbit is set");
4244 else if(this->state & this->except & IOSTATE_failbit)
4245 throw_exception(EXCEPTION_FAILURE, "failbit is set");
4246 else if(this->state & this->except & IOSTATE_badbit)
4247 throw_exception(EXCEPTION_FAILURE, "badbit is set");
4248 else if(this->state & this->except & IOSTATE__Hardfail)
4249 throw_exception(EXCEPTION_FAILURE, "_Hardfail is set");
4252 /* ?clear@ios_base@std@@QAEXH@Z */
4253 /* ?clear@ios_base@std@@QEAAXH@Z */
4254 static void ios_base_clear(ios_base *this, IOSB_iostate state)
4256 ios_base_clear_reraise(this, state, FALSE);
4259 /* ?exceptions@ios_base@std@@QAEXH@Z */
4260 /* ?exceptions@ios_base@std@@QEAAXH@Z */
4261 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_set, 8)
4262 void __thiscall ios_base_exceptions_set(ios_base *this, IOSB_iostate state)
4264 TRACE("(%p %x)\n", this, state);
4265 this->except = state & IOSTATE_mask;
4266 ios_base_clear(this, this->state);
4269 /* ?exceptions@ios_base@std@@QBEHXZ */
4270 /* ?exceptions@ios_base@std@@QEBAHXZ */
4271 DEFINE_THISCALL_WRAPPER(ios_base_exceptions_get, 4)
4272 IOSB_iostate __thiscall ios_base_exceptions_get(ios_base *this)
4274 TRACE("(%p)\n", this);
4275 return this->except;
4278 /* ?copyfmt@ios_base@std@@QAEAAV12@ABV12@@Z */
4279 /* ?copyfmt@ios_base@std@@QEAAAEAV12@AEBV12@@Z */
4280 DEFINE_THISCALL_WRAPPER(ios_base_copyfmt, 8)
4281 ios_base* __thiscall ios_base_copyfmt(ios_base *this, const ios_base *rhs)
4283 TRACE("(%p %p)\n", this, rhs);
4285 if(this != rhs) {
4286 IOS_BASE_iosarray *arr_cur;
4287 IOS_BASE_fnarray *event_cur;
4289 ios_base_Tidy(this);
4291 for(arr_cur=rhs->arr; arr_cur; arr_cur=arr_cur->next) {
4292 if(arr_cur->long_val)
4293 *ios_base_iword(this, arr_cur->index) = arr_cur->long_val;
4294 if(arr_cur->ptr_val)
4295 *ios_base_pword(this, arr_cur->index) = arr_cur->ptr_val;
4297 this->stdstr = rhs->stdstr;
4298 this->fmtfl = rhs->fmtfl;
4299 this->prec = rhs->prec;
4300 this->wide = rhs->wide;
4301 locale_operator_assign(&this->loc, &rhs->loc);
4303 for(event_cur=rhs->calls; event_cur; event_cur=event_cur->next)
4304 ios_base_register_callback(this, event_cur->event_handler, event_cur->index);
4306 ios_base_Callfns(this, EVENT_copyfmt_event);
4307 ios_base_exceptions_set(this, rhs->except);
4310 return this;
4313 /* ??4ios_base@std@@QAEAAV01@ABV01@@Z */
4314 /* ??4ios_base@std@@QEAAAEAV01@AEBV01@@Z */
4315 DEFINE_THISCALL_WRAPPER(ios_base_assign, 8)
4316 ios_base* __thiscall ios_base_assign(ios_base *this, const ios_base *right)
4318 TRACE("(%p %p)\n", this, right);
4320 if(this != right) {
4321 this->state = right->state;
4322 ios_base_copyfmt(this, right);
4325 return this;
4328 /* ?fail@ios_base@std@@QBE_NXZ */
4329 /* ?fail@ios_base@std@@QEBA_NXZ */
4330 DEFINE_THISCALL_WRAPPER(ios_base_fail, 4)
4331 MSVCP_bool __thiscall ios_base_fail(const ios_base *this)
4333 TRACE("(%p)\n", this);
4334 return (this->state & (IOSTATE_failbit|IOSTATE_badbit)) != 0;
4337 /* ??7ios_base@std@@QBE_NXZ */
4338 /* ??7ios_base@std@@QEBA_NXZ */
4339 DEFINE_THISCALL_WRAPPER(ios_base_op_succ, 4)
4340 MSVCP_bool __thiscall ios_base_op_succ(const ios_base *this)
4342 TRACE("(%p)\n", this);
4343 return ios_base_fail(this);
4346 /* ??Bios_base@std@@QBEPAXXZ */
4347 /* ??Bios_base@std@@QEBAPEAXXZ */
4348 DEFINE_THISCALL_WRAPPER(ios_base_op_fail, 4)
4349 void* __thiscall ios_base_op_fail(const ios_base *this)
4351 TRACE("(%p)\n", this);
4352 return ios_base_fail(this) ? NULL : (void*)this;
4355 /* ?_Addstd@ios_base@std@@SAXPAV12@@Z */
4356 /* ?_Addstd@ios_base@std@@SAXPEAV12@@Z */
4357 static void ios_base_Addstd(ios_base *add)
4359 FIXME("(%p) stub\n", add);
4362 /* ?_Init@ios_base@std@@IAEXXZ */
4363 /* ?_Init@ios_base@std@@IEAAXXZ */
4364 DEFINE_THISCALL_WRAPPER(ios_base__Init, 4)
4365 void __thiscall ios_base__Init(ios_base *this)
4367 TRACE("(%p)\n", this);
4369 this->stdstr = 0;
4370 this->state = this->except = IOSTATE_goodbit;
4371 this->fmtfl = FMTFLAG_skipws | FMTFLAG_dec;
4372 this->prec = 6;
4373 this->wide = 0;
4374 this->arr = NULL;
4375 this->calls = NULL;
4376 locale_ctor(&this->loc);
4379 /* ?bad@ios_base@std@@QBE_NXZ */
4380 /* ?bad@ios_base@std@@QEBA_NXZ */
4381 DEFINE_THISCALL_WRAPPER(ios_base_bad, 4)
4382 MSVCP_bool __thiscall ios_base_bad(const ios_base *this)
4384 TRACE("(%p)\n", this);
4385 return (this->state & IOSTATE_badbit) != 0;
4388 /* ?eof@ios_base@std@@QBE_NXZ */
4389 /* ?eof@ios_base@std@@QEBA_NXZ */
4390 DEFINE_THISCALL_WRAPPER(ios_base_eof, 4)
4391 MSVCP_bool __thiscall ios_base_eof(const ios_base *this)
4393 TRACE("(%p)\n", this);
4394 return (this->state & IOSTATE_eofbit) != 0;
4397 /* ?flags@ios_base@std@@QAEHH@Z */
4398 /* ?flags@ios_base@std@@QEAAHH@Z */
4399 DEFINE_THISCALL_WRAPPER(ios_base_flags_set, 8)
4400 IOSB_fmtflags __thiscall ios_base_flags_set(ios_base *this, IOSB_fmtflags flags)
4402 IOSB_fmtflags ret = this->fmtfl;
4404 TRACE("(%p %x)\n", this, flags);
4406 this->fmtfl = flags & FMTFLAG_mask;
4407 return ret;
4410 /* ?flags@ios_base@std@@QBEHXZ */
4411 /* ?flags@ios_base@std@@QEBAHXZ */
4412 DEFINE_THISCALL_WRAPPER(ios_base_flags_get, 4)
4413 IOSB_fmtflags __thiscall ios_base_flags_get(const ios_base *this)
4415 TRACE("(%p)\n", this);
4416 return this->fmtfl;
4419 /* ?getloc@ios_base@std@@QBE?AVlocale@2@XZ */
4420 /* ?getloc@ios_base@std@@QEBA?AVlocale@2@XZ */
4421 DEFINE_THISCALL_WRAPPER(ios_base_getloc, 8)
4422 locale* __thiscall ios_base_getloc(const ios_base *this, locale *ret)
4424 TRACE("(%p)\n", this);
4425 return locale_copy_ctor(ret, &this->loc);
4428 /* ?good@ios_base@std@@QBE_NXZ */
4429 /* ?good@ios_base@std@@QEBA_NXZ */
4430 DEFINE_THISCALL_WRAPPER(ios_base_good, 4)
4431 MSVCP_bool __thiscall ios_base_good(const ios_base *this)
4433 TRACE("(%p)\n", this);
4434 return this->state == IOSTATE_goodbit;
4437 /* ?imbue@ios_base@std@@QAE?AVlocale@2@ABV32@@Z */
4438 /* ?imbue@ios_base@std@@QEAA?AVlocale@2@AEBV32@@Z */
4439 DEFINE_THISCALL_WRAPPER(ios_base_imbue, 12)
4440 locale* __thiscall ios_base_imbue(ios_base *this, locale *ret, const locale *loc)
4442 TRACE("(%p %p)\n", this, loc);
4443 *ret = this->loc;
4444 locale_copy_ctor(&this->loc, loc);
4445 return ret;
4448 /* ?precision@ios_base@std@@QAEHH@Z */
4449 /* ?precision@ios_base@std@@QEAA_J_J@Z */
4450 DEFINE_THISCALL_WRAPPER(ios_base_precision_set, 8)
4451 streamsize __thiscall ios_base_precision_set(ios_base *this, streamsize precision)
4453 streamsize ret = this->prec;
4455 TRACE("(%p %ld)\n", this, precision);
4457 this->prec = precision;
4458 return ret;
4461 /* ?precision@ios_base@std@@QBEHXZ */
4462 /* ?precision@ios_base@std@@QEBA_JXZ */
4463 DEFINE_THISCALL_WRAPPER(ios_base_precision_get, 4)
4464 streamsize __thiscall ios_base_precision_get(const ios_base *this)
4466 TRACE("(%p)\n", this);
4467 return this->prec;
4470 /* ?rdstate@ios_base@std@@QBEHXZ */
4471 /* ?rdstate@ios_base@std@@QEBAHXZ */
4472 DEFINE_THISCALL_WRAPPER(ios_base_rdstate, 4)
4473 IOSB_iostate __thiscall ios_base_rdstate(const ios_base *this)
4475 TRACE("(%p)\n", this);
4476 return this->state;
4479 /* ?setf@ios_base@std@@QAEHHH@Z */
4480 /* ?setf@ios_base@std@@QEAAHHH@Z */
4481 DEFINE_THISCALL_WRAPPER(ios_base_setf_mask, 12)
4482 IOSB_fmtflags __thiscall ios_base_setf_mask(ios_base *this, IOSB_fmtflags flags, IOSB_fmtflags mask)
4484 IOSB_fmtflags ret = this->fmtfl;
4486 TRACE("(%p %x %x)\n", this, flags, mask);
4488 this->fmtfl = (this->fmtfl & (~mask)) | (flags & mask & FMTFLAG_mask);
4489 return ret;
4492 /* ?setf@ios_base@std@@QAEHH@Z */
4493 /* ?setf@ios_base@std@@QEAAHH@Z */
4494 DEFINE_THISCALL_WRAPPER(ios_base_setf, 8)
4495 IOSB_fmtflags __thiscall ios_base_setf(ios_base *this, IOSB_fmtflags flags)
4497 IOSB_fmtflags ret = this->fmtfl;
4499 TRACE("(%p %x)\n", this, flags);
4501 this->fmtfl |= flags & FMTFLAG_mask;
4502 return ret;
4505 /* ?setstate@ios_base@std@@QAEXH_N@Z */
4506 /* ?setstate@ios_base@std@@QEAAXH_N@Z */
4507 DEFINE_THISCALL_WRAPPER(ios_base_setstate_reraise, 12)
4508 void __thiscall ios_base_setstate_reraise(ios_base *this, IOSB_iostate state, MSVCP_bool reraise)
4510 TRACE("(%p %x %x)\n", this, state, reraise);
4512 if(state != IOSTATE_goodbit)
4513 ios_base_clear_reraise(this, this->state | state, reraise);
4516 /* ?setstate@ios_base@std@@QAEXH@Z */
4517 /* ?setstate@ios_base@std@@QEAAXH@Z */
4518 static void ios_base_setstate(ios_base *this, IOSB_iostate state)
4520 ios_base_setstate_reraise(this, state, FALSE);
4523 /* ?sync_with_stdio@ios_base@std@@SA_N_N@Z */
4524 MSVCP_bool CDECL ios_base_sync_with_stdio(MSVCP_bool sync)
4526 _Lockit lock;
4527 MSVCP_bool ret;
4529 TRACE("(%x)\n", sync);
4531 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4532 ret = ios_base_Sync;
4533 ios_base_Sync = sync;
4534 _Lockit_dtor(&lock);
4535 return ret;
4538 /* ?unsetf@ios_base@std@@QAEXH@Z */
4539 /* ?unsetf@ios_base@std@@QEAAXH@Z */
4540 DEFINE_THISCALL_WRAPPER(ios_base_unsetf, 8)
4541 void __thiscall ios_base_unsetf(ios_base *this, IOSB_fmtflags flags)
4543 TRACE("(%p %x)\n", this, flags);
4544 this->fmtfl &= ~flags;
4547 /* ?width@ios_base@std@@QAEHH@Z */
4548 /* ?width@ios_base@std@@QEAA_J_J@Z */
4549 DEFINE_THISCALL_WRAPPER(ios_base_width_set, 8)
4550 streamsize __thiscall ios_base_width_set(ios_base *this, streamsize width)
4552 streamsize ret = this->wide;
4554 TRACE("(%p %ld)\n", this, width);
4556 this->wide = width;
4557 return ret;
4560 /* ?width@ios_base@std@@QBEHXZ */
4561 /* ?width@ios_base@std@@QEBA_JXZ */
4562 DEFINE_THISCALL_WRAPPER(ios_base_width_get, 4)
4563 streamsize __thiscall ios_base_width_get(ios_base *this)
4565 TRACE("(%p)\n", this);
4566 return this->wide;
4569 /* ?xalloc@ios_base@std@@SAHXZ */
4570 int CDECL ios_base_xalloc(void)
4572 _Lockit lock;
4573 int ret;
4575 TRACE("\n");
4577 _Lockit_ctor_locktype(&lock, _LOCK_STREAM);
4578 ret = ios_base_Index++;
4579 _Lockit_dtor(&lock);
4580 return ret;
4583 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IAE@XZ */
4584 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ */
4585 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor, 4)
4586 basic_ios_char* __thiscall basic_ios_char_ctor(basic_ios_char *this)
4588 TRACE("(%p)\n", this);
4590 ios_base_ctor(&this->base);
4591 this->base.vtable = &MSVCP_basic_ios_char_vtable;
4592 return this;
4595 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4596 /* ?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z */
4597 DEFINE_THISCALL_WRAPPER(basic_ios_char_init, 12)
4598 void __thiscall basic_ios_char_init(basic_ios_char *this, basic_streambuf_char *streambuf, MSVCP_bool isstd)
4600 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4601 ios_base__Init(&this->base);
4602 this->strbuf = streambuf;
4603 this->stream = NULL;
4604 this->fillch = ' ';
4606 if(!streambuf)
4607 ios_base_setstate(&this->base, IOSTATE_badbit);
4609 if(isstd)
4610 FIXME("standard streams not handled yet\n");
4613 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4614 /* ??0?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
4615 DEFINE_THISCALL_WRAPPER(basic_ios_char_ctor_streambuf, 8)
4616 basic_ios_char* __thiscall basic_ios_char_ctor_streambuf(basic_ios_char *this, basic_streambuf_char *strbuf)
4618 TRACE("(%p %p)\n", this, strbuf);
4620 basic_ios_char_ctor(this);
4621 basic_ios_char_init(this, strbuf, FALSE);
4622 return this;
4625 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UAE@XZ */
4626 /* ??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ */
4627 DEFINE_THISCALL_WRAPPER(basic_ios_char_dtor, 4)
4628 void __thiscall basic_ios_char_dtor(basic_ios_char *this)
4630 TRACE("(%p)\n", this);
4631 ios_base_dtor(&this->base);
4634 DEFINE_THISCALL_WRAPPER(basic_ios_char_vector_dtor, 8)
4635 basic_ios_char* __thiscall basic_ios_char_vector_dtor(basic_ios_char *this, unsigned int flags)
4637 TRACE("(%p %x)\n", this, flags);
4638 if(flags & 2) {
4639 /* we have an array, with the number of elements stored before the first object */
4640 INT_PTR i, *ptr = (INT_PTR *)this-1;
4642 for(i=*ptr-1; i>=0; i--)
4643 basic_ios_char_dtor(this+i);
4644 MSVCRT_operator_delete(ptr);
4645 } else {
4646 basic_ios_char_dtor(this);
4647 if(flags & 1)
4648 MSVCRT_operator_delete(this);
4651 return this;
4654 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4655 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4656 DEFINE_THISCALL_WRAPPER(basic_ios_char_clear_reraise, 12)
4657 void __thiscall basic_ios_char_clear_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4659 TRACE("(%p %x %x)\n", this, state, reraise);
4660 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4663 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4664 /* ?clear@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4665 static void basic_ios_char_clear(basic_ios_char *this, unsigned int state)
4667 basic_ios_char_clear_reraise(this, (IOSB_iostate)state, FALSE);
4670 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEAAV12@ABV12@@Z */
4671 /* ?copyfmt@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4672 DEFINE_THISCALL_WRAPPER(basic_ios_char_copyfmt, 8)
4673 basic_ios_char* __thiscall basic_ios_char_copyfmt(basic_ios_char *this, basic_ios_char *copy)
4675 TRACE("(%p %p)\n", this, copy);
4676 if(this == copy)
4677 return this;
4679 this->stream = copy->stream;
4680 this->fillch = copy->fillch;
4681 ios_base_copyfmt(&this->base, &copy->base);
4682 return this;
4685 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEDD@Z */
4686 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAADD@Z */
4687 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_set, 8)
4688 char __thiscall basic_ios_char_fill_set(basic_ios_char *this, char fill)
4690 char ret = this->fillch;
4692 TRACE("(%p %c)\n", this, fill);
4694 this->fillch = fill;
4695 return ret;
4698 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDXZ */
4699 /* ?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADXZ */
4700 DEFINE_THISCALL_WRAPPER(basic_ios_char_fill_get, 4)
4701 char __thiscall basic_ios_char_fill_get(basic_ios_char *this)
4703 TRACE("(%p)\n", this);
4704 return this->fillch;
4707 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4708 /* ?imbue@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4709 DEFINE_THISCALL_WRAPPER(basic_ios_char_imbue, 12)
4710 locale *__thiscall basic_ios_char_imbue(basic_ios_char *this, locale *ret, const locale *loc)
4712 TRACE("(%p %p %p)\n", this, ret, loc);
4714 if(this->strbuf) {
4715 basic_streambuf_char_pubimbue(this->strbuf, ret, loc);
4716 locale_dtor(ret);
4719 return ios_base_imbue(&this->base, ret, loc);
4722 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDDD@Z */
4723 /* ?narrow@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADDD@Z */
4724 DEFINE_THISCALL_WRAPPER(basic_ios_char_narrow, 12)
4725 char __thiscall basic_ios_char_narrow(basic_ios_char *this, char ch, char def)
4727 TRACE("(%p %c %c)\n", this, ch, def);
4728 return ctype_char_narrow_ch(ctype_char_use_facet(&this->strbuf->loc), ch, def);
4731 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PAV32@@Z */
4732 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4733 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_set, 8)
4734 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_set(basic_ios_char *this, basic_streambuf_char *streambuf)
4736 basic_streambuf_char *ret = this->strbuf;
4738 TRACE("(%p %p)\n", this, streambuf);
4740 this->strbuf = streambuf;
4741 basic_ios_char_clear(this, IOSTATE_goodbit);
4742 return ret;
4745 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4746 /* ?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@XZ */
4747 DEFINE_THISCALL_WRAPPER(basic_ios_char_rdbuf_get, 4)
4748 basic_streambuf_char* __thiscall basic_ios_char_rdbuf_get(const basic_ios_char *this)
4750 TRACE("(%p)\n", this);
4751 return this->strbuf;
4754 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXH_N@Z */
4755 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z */
4756 DEFINE_THISCALL_WRAPPER(basic_ios_char_setstate_reraise, 12)
4757 void __thiscall basic_ios_char_setstate_reraise(basic_ios_char *this, IOSB_iostate state, MSVCP_bool reraise)
4759 TRACE("(%p %x %x)\n", this, state, reraise);
4761 if(state != IOSTATE_goodbit)
4762 basic_ios_char_clear_reraise(this, this->base.state | state, reraise);
4765 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEXI@Z */
4766 /* ?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXI@Z */
4767 static void basic_ios_char_setstate(basic_ios_char *this, unsigned int state)
4769 basic_ios_char_setstate_reraise(this, (IOSB_iostate)state, FALSE);
4772 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QAEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@PAV32@@Z */
4773 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@PEAV32@@Z */
4774 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_set, 8)
4775 basic_ostream_char* __thiscall basic_ios_char_tie_set(basic_ios_char *this, basic_ostream_char *ostream)
4777 basic_ostream_char *ret = this->stream;
4779 TRACE("(%p %p)\n", this, ostream);
4781 this->stream = ostream;
4782 return ret;
4785 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4786 /* ?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ */
4787 DEFINE_THISCALL_WRAPPER(basic_ios_char_tie_get, 4)
4788 basic_ostream_char* __thiscall basic_ios_char_tie_get(const basic_ios_char *this)
4790 TRACE("(%p)\n", this);
4791 return this->stream;
4794 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QBEDD@Z */
4795 /* ?widen@?$basic_ios@DU?$char_traits@D@std@@@std@@QEBADD@Z */
4796 DEFINE_THISCALL_WRAPPER(basic_ios_char_widen, 8)
4797 char __thiscall basic_ios_char_widen(basic_ios_char *this, char ch)
4799 TRACE("(%p %c)\n", this, ch);
4800 return ctype_char_widen_ch(ctype_char_use_facet(&this->strbuf->loc), ch);
4804 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAE@XZ */
4805 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAA@XZ */
4806 static basic_ios_wchar* basic_ios_wchar_ctor(basic_ios_wchar *this)
4808 TRACE("(%p)\n", this);
4810 ios_base_ctor(&this->base);
4811 this->base.vtable = &MSVCP_basic_ios_wchar_vtable;
4812 return this;
4815 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IAE@XZ */
4816 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@IEAA@XZ */
4817 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor, 4)
4818 basic_ios_wchar* __thiscall basic_ios_short_ctor(basic_ios_wchar *this)
4820 basic_ios_wchar_ctor(this);
4821 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4822 return this;
4825 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IAEXPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4826 /* ?init@?$basic_ios@_WU?$char_traits@_W@std@@@std@@IEAAXPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_N@Z */
4827 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IAEXPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4828 /* ?init@?$basic_ios@GU?$char_traits@G@std@@@std@@IEAAXPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@_N@Z */
4829 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_init, 12)
4830 void __thiscall basic_ios_wchar_init(basic_ios_wchar *this, basic_streambuf_wchar *streambuf, MSVCP_bool isstd)
4832 TRACE("(%p %p %x)\n", this, streambuf, isstd);
4833 ios_base__Init(&this->base);
4834 this->strbuf = streambuf;
4835 this->stream = NULL;
4836 this->fillch = ' ';
4838 if(!streambuf)
4839 ios_base_setstate(&this->base, IOSTATE_badbit);
4841 if(isstd)
4842 FIXME("standard streams not handled yet\n");
4845 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4846 /* ??0?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
4847 static basic_ios_wchar* basic_ios_wchar_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4849 TRACE("(%p %p)\n", this, strbuf);
4851 basic_ios_wchar_ctor(this);
4852 basic_ios_wchar_init(this, strbuf, FALSE);
4853 return this;
4856 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4857 /* ??0?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
4858 DEFINE_THISCALL_WRAPPER(basic_ios_short_ctor_streambuf, 8)
4859 basic_ios_wchar* __thiscall basic_ios_short_ctor_streambuf(basic_ios_wchar *this, basic_streambuf_wchar *strbuf)
4861 basic_ios_wchar_ctor_streambuf(this, strbuf);
4862 this->base.vtable = &MSVCP_basic_ios_short_vtable;
4863 return this;
4866 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
4867 /* ??1?$basic_ios@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
4868 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UAE@XZ */
4869 /* ??1?$basic_ios@GU?$char_traits@G@std@@@std@@UEAA@XZ */
4870 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_dtor, 4)
4871 void __thiscall basic_ios_wchar_dtor(basic_ios_wchar *this)
4873 TRACE("(%p)\n", this);
4874 ios_base_dtor(&this->base);
4877 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_vector_dtor, 8)
4878 basic_ios_wchar* __thiscall basic_ios_wchar_vector_dtor(basic_ios_wchar *this, unsigned int flags)
4880 TRACE("(%p %x)\n", this, flags);
4881 if(flags & 2) {
4882 /* we have an array, with the number of elements stored before the first object */
4883 INT_PTR i, *ptr = (INT_PTR *)this-1;
4885 for(i=*ptr-1; i>=0; i--)
4886 basic_ios_wchar_dtor(this+i);
4887 MSVCRT_operator_delete(ptr);
4888 } else {
4889 basic_ios_wchar_dtor(this);
4890 if(flags & 1)
4891 MSVCRT_operator_delete(this);
4894 return this;
4897 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
4898 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
4899 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
4900 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
4901 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_clear_reraise, 12)
4902 void __thiscall basic_ios_wchar_clear_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
4904 TRACE("(%p %x %x)\n", this, state, reraise);
4905 ios_base_clear_reraise(&this->base, state | (this->strbuf ? IOSTATE_goodbit : IOSTATE_badbit), reraise);
4908 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
4909 /* ?clear@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
4910 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
4911 /* ?clear@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
4912 static void basic_ios_wchar_clear(basic_ios_wchar *this, unsigned int state)
4914 basic_ios_wchar_clear_reraise(this, (IOSB_iostate)state, FALSE);
4917 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEAAV12@ABV12@@Z */
4918 /* ?copyfmt@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4919 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEAAV12@ABV12@@Z */
4920 /* ?copyfmt@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEBV12@@Z */
4921 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_copyfmt, 8)
4922 basic_ios_wchar* __thiscall basic_ios_wchar_copyfmt(basic_ios_wchar *this, basic_ios_wchar *copy)
4924 TRACE("(%p %p)\n", this, copy);
4925 if(this == copy)
4926 return this;
4928 this->stream = copy->stream;
4929 this->fillch = copy->fillch;
4930 ios_base_copyfmt(&this->base, &copy->base);
4931 return this;
4934 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE_W_W@Z */
4935 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA_W_W@Z */
4936 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEGG@Z */
4937 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAGG@Z */
4938 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_set, 8)
4939 wchar_t __thiscall basic_ios_wchar_fill_set(basic_ios_wchar *this, wchar_t fill)
4941 wchar_t ret = this->fillch;
4943 TRACE("(%p %c)\n", this, fill);
4945 this->fillch = fill;
4946 return ret;
4949 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WXZ */
4950 /* ?fill@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WXZ */
4951 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGXZ */
4952 /* ?fill@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGXZ */
4953 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_fill_get, 4)
4954 wchar_t __thiscall basic_ios_wchar_fill_get(basic_ios_wchar *this)
4956 TRACE("(%p)\n", this);
4957 return this->fillch;
4960 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4961 /* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4962 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QAE?AVlocale@2@ABV32@@Z */
4963 /* ?imbue@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */
4964 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 12)
4965 locale *__thiscall basic_ios_wchar_imbue(basic_ios_wchar *this, locale *ret, const locale *loc)
4967 TRACE("(%p %p %p)\n", this, ret, loc);
4969 if(this->strbuf) {
4970 basic_streambuf_wchar_pubimbue(this->strbuf, ret, loc);
4971 locale_dtor(ret);
4974 return ios_base_imbue(&this->base, ret, loc);
4977 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBED_WD@Z */
4978 /* ?narrow@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAD_WD@Z */
4979 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEDGD@Z */
4980 /* ?narrow@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBADGD@Z */
4981 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_narrow, 12)
4982 char __thiscall basic_ios_wchar_narrow(basic_ios_wchar *this, wchar_t ch, char def)
4984 TRACE("(%p %c %c)\n", this, ch, def);
4985 return ctype_wchar_narrow_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch, def);
4988 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
4989 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
4990 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PAV32@@Z */
4991 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@PEAV32@@Z */
4992 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_set, 8)
4993 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_set(basic_ios_wchar *this, basic_streambuf_wchar *streambuf)
4995 basic_streambuf_wchar *ret = this->strbuf;
4997 TRACE("(%p %p)\n", this, streambuf);
4999 this->strbuf = streambuf;
5000 basic_ios_wchar_clear(this, IOSTATE_goodbit);
5001 return ret;
5004 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5005 /* ?rdbuf@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@XZ */
5006 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5007 /* ?rdbuf@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@XZ */
5008 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_rdbuf_get, 4)
5009 basic_streambuf_wchar* __thiscall basic_ios_wchar_rdbuf_get(const basic_ios_wchar *this)
5011 TRACE("(%p)\n", this);
5012 return this->strbuf;
5015 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXH_N@Z */
5016 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXH_N@Z */
5017 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXH_N@Z */
5018 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXH_N@Z */
5019 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_setstate_reraise, 12)
5020 void __thiscall basic_ios_wchar_setstate_reraise(basic_ios_wchar *this, IOSB_iostate state, MSVCP_bool reraise)
5022 TRACE("(%p %x %x)\n", this, state, reraise);
5024 if(state != IOSTATE_goodbit)
5025 basic_ios_wchar_clear_reraise(this, this->base.state | state, reraise);
5028 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEXI@Z */
5029 /* ?setstate@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAXI@Z */
5030 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEXI@Z */
5031 /* ?setstate@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAXI@Z */
5032 static void basic_ios_wchar_setstate(basic_ios_wchar *this, IOSB_iostate state)
5034 basic_ios_wchar_setstate_reraise(this, state, FALSE);
5037 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PAV32@@Z */
5038 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@PEAV32@@Z */
5039 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QAEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@PAV32@@Z */
5040 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEAAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@PEAV32@@Z */
5041 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_set, 8)
5042 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_set(basic_ios_wchar *this, basic_ostream_wchar *ostream)
5044 basic_ostream_wchar *ret = this->stream;
5046 TRACE("(%p %p)\n", this, ostream);
5048 this->stream = ostream;
5049 return ret;
5052 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5053 /* ?tie@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_ostream@_WU?$char_traits@_W@std@@@2@XZ */
5054 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5055 /* ?tie@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_ostream@GU?$char_traits@G@std@@@2@XZ */
5056 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_tie_get, 4)
5057 basic_ostream_wchar* __thiscall basic_ios_wchar_tie_get(const basic_ios_wchar *this)
5059 TRACE("(%p)\n", this);
5060 return this->stream;
5063 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QBE_WD@Z */
5064 /* ?widen@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEBA_WD@Z */
5065 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QBEGD@Z */
5066 /* ?widen@?$basic_ios@GU?$char_traits@G@std@@@std@@QEBAGD@Z */
5067 DEFINE_THISCALL_WRAPPER(basic_ios_wchar_widen, 8)
5068 wchar_t __thiscall basic_ios_wchar_widen(basic_ios_wchar *this, char ch)
5070 TRACE("(%p %c)\n", this, ch);
5071 return ctype_wchar_widen_ch(ctype_wchar_use_facet(&this->strbuf->loc), ch);
5074 /* Caution: basic_ostream uses virtual inheritance.
5075 * All constructors have additional parameter that says if base class should be initialized.
5076 * Base class needs to be accessed using vbtable.
5078 static inline basic_ios_char* basic_ostream_char_get_basic_ios(basic_ostream_char *this)
5080 return (basic_ios_char*)((char*)this+this->vbtable[1]);
5083 static inline basic_ios_char* basic_ostream_char_to_basic_ios(basic_ostream_char *ptr)
5085 return (basic_ios_char*)((char*)ptr+basic_ostream_char_vbtable[1]);
5088 static inline basic_ostream_char* basic_ostream_char_from_basic_ios(basic_ios_char *ptr)
5090 return (basic_ostream_char*)((char*)ptr-basic_ostream_char_vbtable[1]);
5093 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5094 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
5095 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor, 20)
5096 basic_ostream_char* __thiscall basic_ostream_char_ctor(basic_ostream_char *this,
5097 basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool init, MSVCP_bool virt_init)
5099 basic_ios_char *base;
5101 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, init, virt_init);
5103 if(virt_init) {
5104 this->vbtable = basic_ostream_char_vbtable;
5105 base = basic_ostream_char_get_basic_ios(this);
5106 basic_ios_char_ctor(base);
5107 }else {
5108 base = basic_ostream_char_get_basic_ios(this);
5111 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5112 if(init)
5113 basic_ios_char_init(base, strbuf, isstd);
5114 return this;
5117 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5118 /* ??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5119 DEFINE_THISCALL_WRAPPER(basic_ostream_char_ctor_uninitialized, 12)
5120 basic_ostream_char* __thiscall basic_ostream_char_ctor_uninitialized(basic_ostream_char *this,
5121 int uninitialized, MSVCP_bool virt_init)
5123 basic_ios_char *base;
5125 TRACE("(%p %d)\n", this, uninitialized);
5127 if(virt_init) {
5128 this->vbtable = basic_ostream_char_vbtable;
5129 base = basic_ostream_char_get_basic_ios(this);
5130 basic_ios_char_ctor(base);
5131 }else {
5132 base = basic_ostream_char_get_basic_ios(this);
5135 base->base.vtable = &MSVCP_basic_ostream_char_vtable;
5136 ios_base_Addstd(&base->base);
5137 return this;
5140 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
5141 /* ??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
5142 DEFINE_THISCALL_WRAPPER(basic_ostream_char_dtor, 4)
5143 void __thiscall basic_ostream_char_dtor(basic_ios_char *base)
5145 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5147 /* don't destroy virtual base here */
5148 TRACE("(%p)\n", this);
5151 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5152 /* ??_D?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5153 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vbase_dtor, 4)
5154 void __thiscall basic_ostream_char_vbase_dtor(basic_ostream_char *this)
5156 TRACE("(%p)\n", this);
5157 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(this));
5158 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(this));
5161 DEFINE_THISCALL_WRAPPER(basic_ostream_char_vector_dtor, 8)
5162 basic_ostream_char* __thiscall basic_ostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
5164 basic_ostream_char *this = basic_ostream_char_from_basic_ios(base);
5166 TRACE("(%p %x)\n", this, flags);
5168 if(flags & 2) {
5169 /* we have an array, with the number of elements stored before the first object */
5170 INT_PTR i, *ptr = (INT_PTR *)this-1;
5172 for(i=*ptr-1; i>=0; i--)
5173 basic_ostream_char_vbase_dtor(this+i);
5174 MSVCRT_operator_delete(ptr);
5175 } else {
5176 basic_ostream_char_vbase_dtor(this);
5177 if(flags & 1)
5178 MSVCRT_operator_delete(this);
5181 return this;
5184 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
5185 /* ?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
5186 DEFINE_THISCALL_WRAPPER(basic_ostream_char_flush, 4)
5187 basic_ostream_char* __thiscall basic_ostream_char_flush(basic_ostream_char *this)
5189 /* this function is not matching C++ specification */
5190 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5192 TRACE("(%p)\n", this);
5194 if(basic_ios_char_rdbuf_get(base) && ios_base_good(&base->base)
5195 && basic_streambuf_char_pubsync(basic_ios_char_rdbuf_get(base))==-1)
5196 basic_ios_char_setstate(base, IOSTATE_badbit);
5197 return this;
5200 /* ?flush@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5201 /* ?flush@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5202 basic_ostream_char* __cdecl flush_ostream_char(basic_ostream_char *ostream)
5204 return basic_ostream_char_flush(ostream);
5207 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5208 /* ?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5209 static void basic_ostream_char__Osfx(basic_ostream_char *this)
5211 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5213 TRACE("(%p)\n", this);
5215 if(base->base.fmtfl & FMTFLAG_unitbuf)
5216 basic_ostream_char_flush(this);
5219 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
5220 /* ?osfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
5221 DEFINE_THISCALL_WRAPPER(basic_ostream_char_osfx, 4)
5222 void __thiscall basic_ostream_char_osfx(basic_ostream_char *this)
5224 TRACE("(%p)\n", this);
5225 basic_ostream_char__Osfx(this);
5228 static BOOL basic_ostream_char_sentry_create(basic_ostream_char *ostr)
5230 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5232 if(basic_ios_char_rdbuf_get(base))
5233 basic_streambuf_char__Lock(base->strbuf);
5235 if(ios_base_good(&base->base) && base->stream)
5236 basic_ostream_char_flush(base->stream);
5238 return ios_base_good(&base->base);
5241 static void basic_ostream_char_sentry_destroy(basic_ostream_char *ostr)
5243 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5245 if(ios_base_good(&base->base) && !__uncaught_exception())
5246 basic_ostream_char_osfx(ostr);
5248 if(basic_ios_char_rdbuf_get(base))
5249 basic_streambuf_char__Unlock(base->strbuf);
5252 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE_NXZ */
5253 /* ?opfx@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA_NXZ */
5254 DEFINE_THISCALL_WRAPPER(basic_ostream_char_opfx, 4)
5255 MSVCP_bool __thiscall basic_ostream_char_opfx(basic_ostream_char *this)
5257 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5259 TRACE("(%p)\n", this);
5261 if(ios_base_good(&base->base) && base->stream)
5262 basic_ostream_char_flush(base->stream);
5263 return ios_base_good(&base->base);
5266 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
5267 /* ?put@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
5268 DEFINE_THISCALL_WRAPPER(basic_ostream_char_put, 8)
5269 basic_ostream_char* __thiscall basic_ostream_char_put(basic_ostream_char *this, char ch)
5271 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5273 TRACE("(%p %c)\n", this, ch);
5275 if(!basic_ostream_char_sentry_create(this)
5276 || basic_streambuf_char_sputc(base->strbuf, ch)==EOF) {
5277 basic_ostream_char_sentry_destroy(this);
5278 basic_ios_char_setstate(base, IOSTATE_badbit);
5279 return this;
5282 basic_ostream_char_sentry_destroy(this);
5283 return this;
5286 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
5287 /* ?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
5288 DEFINE_THISCALL_WRAPPER(basic_ostream_char_seekp_fpos, 28)
5289 basic_ostream_char* __thiscall basic_ostream_char_seekp_fpos(basic_ostream_char *this, fpos_int pos)
5291 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5293 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
5295 if(!ios_base_fail(&base->base)) {
5296 fpos_int seek;
5298 basic_streambuf_char_pubseekpos(basic_ios_char_rdbuf_get(base),
5299 &seek, pos, OPENMODE_out);
5300 if(seek.off==-1 && seek.pos==0 && seek.state==0)
5301 basic_ios_char_setstate(base, IOSTATE_failbit);
5303 return this;
5306 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
5307 /* ?tellp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
5308 DEFINE_THISCALL_WRAPPER(basic_ostream_char_tellp, 8)
5309 fpos_int* __thiscall basic_ostream_char_tellp(basic_ostream_char *this, fpos_int *ret)
5311 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5313 TRACE("(%p)\n", this);
5315 if(!ios_base_fail(&base->base)) {
5316 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
5317 ret, 0, SEEKDIR_cur, OPENMODE_out);
5318 }else {
5319 ret->off = -1;
5320 ret->pos = 0;
5321 ret->state = 0;
5323 return ret;
5326 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@PBDH@Z */
5327 /* ?write@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEBD_J@Z */
5328 DEFINE_THISCALL_WRAPPER(basic_ostream_char_write, 12)
5329 basic_ostream_char* __thiscall basic_ostream_char_write(basic_ostream_char *this, const char *str, streamsize count)
5331 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5333 TRACE("(%p %s %ld)\n", this, debugstr_a(str), count);
5335 if(!basic_ostream_char_sentry_create(this)
5336 || basic_streambuf_char_sputn(base->strbuf, str, count)!=count) {
5337 basic_ostream_char_sentry_destroy(this);
5338 basic_ios_char_setstate(base, IOSTATE_badbit);
5339 return this;
5342 basic_ostream_char_sentry_destroy(this);
5343 return this;
5346 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@F@Z */
5347 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@F@Z */
5348 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_short, 8)
5349 basic_ostream_char* __thiscall basic_ostream_char_print_short(basic_ostream_char *this, short val)
5351 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5352 int state = IOSTATE_goodbit;
5354 TRACE("(%p %d)\n", this, val);
5356 if(basic_ostream_char_sentry_create(this)) {
5357 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5358 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5359 ostreambuf_iterator_char dest = {0, strbuf};
5361 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base),
5362 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
5363 ? (LONG)((unsigned short)val) : (LONG)val);
5365 basic_ostream_char_sentry_destroy(this);
5367 basic_ios_char_setstate(base, state);
5368 return this;
5371 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@G@Z */
5372 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@G@Z */
5373 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ushort, 8)
5374 basic_ostream_char* __thiscall basic_ostream_char_print_ushort(basic_ostream_char *this, unsigned short val)
5376 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5377 int state = IOSTATE_goodbit;
5379 TRACE("(%p %u)\n", this, val);
5381 if(basic_ostream_char_sentry_create(this)) {
5382 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5383 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5384 ostreambuf_iterator_char dest = {0, strbuf};
5386 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5388 basic_ostream_char_sentry_destroy(this);
5390 basic_ios_char_setstate(base, state);
5391 return this;
5394 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z */
5395 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z */
5396 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z */
5397 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@J@Z */
5398 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int, 8)
5399 basic_ostream_char* __thiscall basic_ostream_char_print_int(basic_ostream_char *this, int val)
5401 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5402 int state = IOSTATE_goodbit;
5404 TRACE("(%p %d)\n", this, val);
5406 if(basic_ostream_char_sentry_create(this)) {
5407 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5408 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5409 ostreambuf_iterator_char dest = {0, strbuf};
5411 num_put_char_put_long(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5413 basic_ostream_char_sentry_destroy(this);
5415 basic_ios_char_setstate(base, state);
5416 return this;
5419 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@I@Z */
5420 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@I@Z */
5421 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@K@Z */
5422 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@K@Z */
5423 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint, 8)
5424 basic_ostream_char* __thiscall basic_ostream_char_print_uint(basic_ostream_char *this, unsigned int val)
5426 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5427 int state = IOSTATE_goodbit;
5429 TRACE("(%p %u)\n", this, val);
5431 if(basic_ostream_char_sentry_create(this)) {
5432 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5433 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5434 ostreambuf_iterator_char dest = {0, strbuf};
5436 num_put_char_put_ulong(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5438 basic_ostream_char_sentry_destroy(this);
5440 basic_ios_char_setstate(base, state);
5441 return this;
5444 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z */
5445 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z */
5446 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_float, 8)
5447 basic_ostream_char* __thiscall basic_ostream_char_print_float(basic_ostream_char *this, float val)
5449 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5450 int state = IOSTATE_goodbit;
5452 TRACE("(%p %f)\n", this, val);
5454 if(basic_ostream_char_sentry_create(this)) {
5455 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5456 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5457 ostreambuf_iterator_char dest = {0, strbuf};
5459 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5461 basic_ostream_char_sentry_destroy(this);
5463 basic_ios_char_setstate(base, state);
5464 return this;
5467 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z */
5468 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z */
5469 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_double, 12)
5470 basic_ostream_char* __thiscall basic_ostream_char_print_double(basic_ostream_char *this, double val)
5472 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5473 int state = IOSTATE_goodbit;
5475 TRACE("(%p %lf)\n", this, val);
5477 if(basic_ostream_char_sentry_create(this)) {
5478 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5479 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5480 ostreambuf_iterator_char dest = {0, strbuf};
5482 num_put_char_put_double(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5484 basic_ostream_char_sentry_destroy(this);
5486 basic_ios_char_setstate(base, state);
5487 return this;
5490 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@O@Z */
5491 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@O@Z */
5492 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ldouble, 12)
5493 basic_ostream_char* __thiscall basic_ostream_char_print_ldouble(basic_ostream_char *this, double val)
5495 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5496 int state = IOSTATE_goodbit;
5498 TRACE("(%p %lf)\n", this, val);
5500 if(basic_ostream_char_sentry_create(this)) {
5501 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5502 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5503 ostreambuf_iterator_char dest = {0, strbuf};
5505 num_put_char_put_ldouble(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5507 basic_ostream_char_sentry_destroy(this);
5509 basic_ios_char_setstate(base, state);
5510 return this;
5513 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5514 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
5515 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_streambuf, 8)
5516 basic_ostream_char* __thiscall basic_ostream_char_print_streambuf(basic_ostream_char *this, basic_streambuf_char *val)
5518 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5519 IOSB_iostate state = IOSTATE_badbit;
5520 int c = '\n';
5522 TRACE("(%p %p)\n", this, val);
5524 if(basic_ostream_char_sentry_create(this)) {
5525 for(c = basic_streambuf_char_sgetc(val); c!=EOF;
5526 c = basic_streambuf_char_snextc(val)) {
5527 state = IOSTATE_goodbit;
5529 if(basic_streambuf_char_sputc(base->strbuf, c) == EOF) {
5530 state = IOSTATE_badbit;
5531 break;
5534 }else {
5535 state = IOSTATE_badbit;
5537 basic_ostream_char_sentry_destroy(this);
5539 ios_base_width_set(&base->base, 0);
5540 basic_ios_char_setstate(base, state);
5541 return this;
5544 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z */
5545 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z */
5546 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_ptr, 8)
5547 basic_ostream_char* __thiscall basic_ostream_char_print_ptr(basic_ostream_char *this, const void *val)
5549 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5550 int state = IOSTATE_goodbit;
5552 TRACE("(%p %p)\n", this, val);
5554 if(basic_ostream_char_sentry_create(this)) {
5555 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5556 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5557 ostreambuf_iterator_char dest = {0, strbuf};
5559 num_put_char_put_ptr(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5561 basic_ostream_char_sentry_destroy(this);
5563 basic_ios_char_setstate(base, state);
5564 return this;
5567 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_J@Z */
5568 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_J@Z */
5569 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_int64, 12)
5570 basic_ostream_char* __thiscall basic_ostream_char_print_int64(basic_ostream_char *this, __int64 val)
5572 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5573 int state = IOSTATE_goodbit;
5575 TRACE("(%p)\n", this);
5577 if(basic_ostream_char_sentry_create(this)) {
5578 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5579 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5580 ostreambuf_iterator_char dest = {0, strbuf};
5582 num_put_char_put_int64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5584 basic_ostream_char_sentry_destroy(this);
5586 basic_ios_char_setstate(base, state);
5587 return this;
5590 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z */
5591 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z */
5592 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_uint64, 12)
5593 basic_ostream_char* __thiscall basic_ostream_char_print_uint64(basic_ostream_char *this, unsigned __int64 val)
5595 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5596 int state = IOSTATE_goodbit;
5598 TRACE("(%p)\n", this);
5600 if(basic_ostream_char_sentry_create(this)) {
5601 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5602 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5603 ostreambuf_iterator_char dest = {0, strbuf};
5605 num_put_char_put_uint64(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5607 basic_ostream_char_sentry_destroy(this);
5609 basic_ios_char_setstate(base, state);
5610 return this;
5613 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_N@Z */
5614 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_N@Z */
5615 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_bool, 8)
5616 basic_ostream_char* __thiscall basic_ostream_char_print_bool(basic_ostream_char *this, MSVCP_bool val)
5618 basic_ios_char *base = basic_ostream_char_get_basic_ios(this);
5619 int state = IOSTATE_goodbit;
5621 TRACE("(%p %x)\n", this, val);
5623 if(basic_ostream_char_sentry_create(this)) {
5624 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
5625 const num_put *numput = num_put_char_use_facet(&strbuf->loc);
5626 ostreambuf_iterator_char dest = {0, strbuf};
5628 num_put_char_put_bool(numput, &dest, dest, &base->base, basic_ios_char_fill_get(base), val);
5630 basic_ostream_char_sentry_destroy(this);
5632 basic_ios_char_setstate(base, state);
5633 return this;
5636 /* ?ends@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5637 /* ?ends@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5638 basic_ostream_char* __cdecl basic_ostream_char_ends(basic_ostream_char *ostr)
5640 TRACE("(%p)\n", ostr);
5642 basic_ostream_char_put(ostr, 0);
5643 return ostr;
5646 /* ?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@1@AAV21@@Z */
5647 /* ?endl@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
5648 basic_ostream_char* __cdecl basic_ostream_char_endl(basic_ostream_char *ostr)
5650 TRACE("(%p)\n", ostr);
5652 basic_ostream_char_put(ostr, '\n');
5653 basic_ostream_char_flush(ostr);
5654 return ostr;
5657 /* $?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
5658 /* ??$?6DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
5659 basic_ostream_char* __cdecl basic_ostream_char_print_bstr(basic_ostream_char *ostr, const basic_string_char *str)
5661 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5662 IOSB_iostate state = IOSTATE_goodbit;
5664 TRACE("(%p %p)\n", ostr, str);
5666 if(basic_ostream_char_sentry_create(ostr)) {
5667 MSVCP_size_t len = basic_string_char_length(str);
5668 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5670 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5671 for(; pad!=0; pad--) {
5672 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5673 state = IOSTATE_badbit;
5674 break;
5679 if(state == IOSTATE_goodbit) {
5680 if(basic_streambuf_char_sputn(base->strbuf, basic_string_char_c_str(str), len) != len)
5681 state = IOSTATE_badbit;
5684 if(state == IOSTATE_goodbit) {
5685 for(; pad!=0; pad--) {
5686 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5687 state = IOSTATE_badbit;
5688 break;
5693 base->base.wide = 0;
5694 }else {
5695 state = IOSTATE_badbit;
5697 basic_ostream_char_sentry_destroy(ostr);
5699 basic_ios_char_setstate(base, state);
5700 return ostr;
5703 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@C@Z */
5704 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@C@Z */
5705 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z */
5706 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z */
5707 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@E@Z */
5708 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@E@Z */
5709 basic_ostream_char* __cdecl basic_ostream_char_print_ch(basic_ostream_char *ostr, char ch)
5711 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5712 IOSB_iostate state = IOSTATE_goodbit;
5714 TRACE("(%p %d)\n", ostr, ch);
5716 if(basic_ostream_char_sentry_create(ostr)) {
5717 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
5719 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5720 for(; pad!=0; pad--) {
5721 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5722 state = IOSTATE_badbit;
5723 break;
5728 if(state == IOSTATE_goodbit) {
5729 if(basic_streambuf_char_sputc(base->strbuf, ch) == EOF)
5730 state = IOSTATE_badbit;
5733 if(state == IOSTATE_goodbit) {
5734 for(; pad!=0; pad--) {
5735 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5736 state = IOSTATE_badbit;
5737 break;
5742 base->base.wide = 0;
5743 }else {
5744 state = IOSTATE_badbit;
5746 basic_ostream_char_sentry_destroy(ostr);
5748 basic_ios_char_setstate(base, state);
5749 return ostr;
5752 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBC@Z */
5753 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBC@Z */
5754 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z */
5755 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z */
5756 /* ??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBE@Z */
5757 /* ??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBE@Z */
5758 basic_ostream_char* __cdecl basic_ostream_char_print_str(basic_ostream_char *ostr, const char *str)
5760 basic_ios_char *base = basic_ostream_char_get_basic_ios(ostr);
5761 IOSB_iostate state = IOSTATE_goodbit;
5763 TRACE("(%p %s)\n", ostr, str);
5765 if(basic_ostream_char_sentry_create(ostr)) {
5766 MSVCP_size_t len = strlen(str);
5767 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
5769 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5770 for(; pad!=0; pad--) {
5771 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5772 state = IOSTATE_badbit;
5773 break;
5778 if(state == IOSTATE_goodbit) {
5779 if(basic_streambuf_char_sputn(base->strbuf, str, len) != len)
5780 state = IOSTATE_badbit;
5783 if(state == IOSTATE_goodbit) {
5784 for(; pad!=0; pad--) {
5785 if(basic_streambuf_char_sputc(base->strbuf, base->fillch) == EOF) {
5786 state = IOSTATE_badbit;
5787 break;
5792 base->base.wide = 0;
5793 }else {
5794 state = IOSTATE_badbit;
5796 basic_ostream_char_sentry_destroy(ostr);
5798 basic_ios_char_setstate(base, state);
5799 return ostr;
5802 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
5803 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
5804 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func, 8)
5805 basic_ostream_char* __thiscall basic_ostream_char_print_func(basic_ostream_char *this,
5806 basic_ostream_char* (__cdecl *pfunc)(basic_ostream_char*))
5808 TRACE("(%p %p)\n", this, pfunc);
5809 pfunc(this);
5810 return this;
5813 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
5814 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
5815 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_basic_ios, 8)
5816 basic_ostream_char* __thiscall basic_ostream_char_print_func_basic_ios(basic_ostream_char *this,
5817 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
5819 TRACE("(%p %p)\n", this, pfunc);
5820 pfunc(basic_ostream_char_get_basic_ios(this));
5821 return this;
5824 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
5825 /* ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
5826 DEFINE_THISCALL_WRAPPER(basic_ostream_char_print_func_ios_base, 8)
5827 basic_ostream_char* __thiscall basic_ostream_char_print_func_ios_base(
5828 basic_ostream_char *this, ios_base* (__cdecl *pfunc)(ios_base*))
5830 TRACE("(%p %p)\n", this, pfunc);
5831 pfunc(&basic_ostream_char_get_basic_ios(this)->base);
5832 return this;
5835 /* Caution: basic_ostream uses virtual inheritance. */
5836 static inline basic_ios_wchar* basic_ostream_wchar_get_basic_ios(basic_ostream_wchar *this)
5838 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
5841 static inline basic_ios_wchar* basic_ostream_wchar_to_basic_ios(basic_ostream_wchar *ptr)
5843 return (basic_ios_wchar*)((char*)ptr+basic_ostream_wchar_vbtable[1]);
5846 static inline basic_ostream_wchar* basic_ostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
5848 return (basic_ostream_wchar*)((char*)ptr-basic_ostream_wchar_vbtable[1]);
5851 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5852 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
5853 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor, 20)
5854 basic_ostream_wchar* __thiscall basic_ostream_short_ctor(basic_ostream_wchar *this,
5855 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool init, MSVCP_bool virt_init)
5857 basic_ios_wchar *base;
5859 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, init, virt_init);
5861 if(virt_init) {
5862 this->vbtable = basic_ostream_wchar_vbtable;
5863 base = basic_ostream_wchar_get_basic_ios(this);
5864 basic_ios_wchar_ctor(base);
5865 }else {
5866 base = basic_ostream_wchar_get_basic_ios(this);
5869 base->base.vtable = &MSVCP_basic_ostream_short_vtable;
5870 if(init)
5871 basic_ios_wchar_init(base, strbuf, isstd);
5872 return this;
5875 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
5876 /* ??0?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
5877 DEFINE_THISCALL_WRAPPER(basic_ostream_short_ctor_uninitialized, 12)
5878 basic_ostream_wchar* __thiscall basic_ostream_short_ctor_uninitialized(basic_ostream_wchar *this,
5879 int uninitialized, MSVCP_bool virt_init)
5881 basic_ios_wchar *base;
5883 TRACE("(%p %d)\n", this, uninitialized);
5885 if(virt_init) {
5886 this->vbtable = basic_ostream_wchar_vbtable;
5887 base = basic_ostream_wchar_get_basic_ios(this);
5888 basic_ios_wchar_ctor(base);
5889 }else {
5890 base = basic_ostream_wchar_get_basic_ios(this);
5893 base->base.vtable = &MSVCP_basic_ostream_short_vtable;
5894 ios_base_Addstd(&base->base);
5895 return this;
5898 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
5899 /* ??1?$basic_ostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
5900 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
5901 /* ??1?$basic_ostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
5902 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_dtor, 4)
5903 void __thiscall basic_ostream_wchar_dtor(basic_ios_wchar *base)
5905 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5907 /* don't destroy virtual base here */
5908 TRACE("(%p)\n", this);
5911 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5912 /* ??_D?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5913 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5914 /* ??_D?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5915 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vbase_dtor, 4)
5916 void __thiscall basic_ostream_wchar_vbase_dtor(basic_ostream_wchar *this)
5918 TRACE("(%p)\n", this);
5919 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(this));
5920 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(this));
5923 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_vector_dtor, 8)
5924 basic_ostream_wchar* __thiscall basic_ostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
5926 basic_ostream_wchar *this = basic_ostream_wchar_from_basic_ios(base);
5928 TRACE("(%p %x)\n", this, flags);
5930 if(flags & 2) {
5931 /* we have an array, with the number of elements stored before the first object */
5932 INT_PTR i, *ptr = (INT_PTR *)this-1;
5934 for(i=*ptr-1; i>=0; i--)
5935 basic_ostream_wchar_vbase_dtor(this+i);
5936 MSVCRT_operator_delete(ptr);
5937 } else {
5938 basic_ostream_wchar_vbase_dtor(this);
5939 if(flags & 1)
5940 MSVCRT_operator_delete(this);
5943 return this;
5946 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
5947 /* ?flush@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
5948 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
5949 /* ?flush@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
5950 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_flush, 4)
5951 basic_ostream_wchar* __thiscall basic_ostream_wchar_flush(basic_ostream_wchar *this)
5953 /* this function is not matching C++ specification */
5954 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5956 TRACE("(%p)\n", this);
5958 if(basic_ios_wchar_rdbuf_get(base) && ios_base_good(&base->base)
5959 && basic_streambuf_wchar_pubsync(basic_ios_wchar_rdbuf_get(base))==-1)
5960 basic_ios_wchar_setstate(base, IOSTATE_badbit);
5961 return this;
5964 /* ?flush@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
5965 /* ?flush@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
5966 /* ?flush@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
5967 /* ?flush@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
5968 basic_ostream_wchar* __cdecl flush_ostream_wchar(basic_ostream_wchar *ostream)
5970 return basic_ostream_wchar_flush(ostream);
5973 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5974 /* ?_Osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5975 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5976 /* ?_Osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5977 static void basic_ostream_wchar__Osfx(basic_ostream_wchar *this)
5979 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
5981 TRACE("(%p)\n", this);
5983 if(base->base.fmtfl & FMTFLAG_unitbuf)
5984 basic_ostream_wchar_flush(this);
5987 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
5988 /* ?osfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
5989 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
5990 /* ?osfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
5991 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_osfx, 4)
5992 void __thiscall basic_ostream_wchar_osfx(basic_ostream_wchar *this)
5994 TRACE("(%p)\n", this);
5995 basic_ostream_wchar__Osfx(this);
5998 static BOOL basic_ostream_wchar_sentry_create(basic_ostream_wchar *ostr)
6000 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6002 if(basic_ios_wchar_rdbuf_get(base))
6003 basic_streambuf_wchar__Lock(base->strbuf);
6005 if(ios_base_good(&base->base) && base->stream)
6006 basic_ostream_wchar_flush(base->stream);
6008 return ios_base_good(&base->base);
6011 static void basic_ostream_wchar_sentry_destroy(basic_ostream_wchar *ostr)
6013 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6015 if(ios_base_good(&base->base) && !__uncaught_exception())
6016 basic_ostream_wchar_osfx(ostr);
6018 if(basic_ios_wchar_rdbuf_get(base))
6019 basic_streambuf_wchar__Unlock(base->strbuf);
6022 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE_NXZ */
6023 /* ?opfx@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA_NXZ */
6024 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE_NXZ */
6025 /* ?opfx@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA_NXZ */
6026 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_opfx, 4)
6027 MSVCP_bool __thiscall basic_ostream_wchar_opfx(basic_ostream_wchar *this)
6029 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6031 TRACE("(%p)\n", this);
6033 if(ios_base_good(&base->base) && base->stream)
6034 basic_ostream_wchar_flush(base->stream);
6035 return ios_base_good(&base->base);
6038 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
6039 /* ?put@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
6040 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
6041 /* ?put@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
6042 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_put, 8)
6043 basic_ostream_wchar* __thiscall basic_ostream_wchar_put(basic_ostream_wchar *this, wchar_t ch)
6045 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6047 TRACE("(%p %c)\n", this, ch);
6049 if(!basic_ostream_wchar_sentry_create(this)
6050 || basic_streambuf_wchar_sputc(base->strbuf, ch)==WEOF) {
6051 basic_ostream_wchar_sentry_destroy(this);
6052 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6053 return this;
6056 basic_ostream_wchar_sentry_destroy(this);
6057 return this;
6060 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6061 /* ?seekp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6062 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
6063 /* ?seekp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
6064 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_seekp_fpos, 28)
6065 basic_ostream_wchar* __thiscall basic_ostream_wchar_seekp_fpos(basic_ostream_wchar *this, fpos_int pos)
6067 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6069 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
6071 if(!ios_base_fail(&base->base)) {
6072 fpos_int seek;
6074 basic_streambuf_wchar_pubseekpos(basic_ios_wchar_rdbuf_get(base),
6075 &seek, pos, OPENMODE_out);
6076 if(seek.off==-1 && seek.pos==0 && seek.state==0)
6077 basic_ios_wchar_setstate(base, IOSTATE_failbit);
6079 return this;
6082 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6083 /* ?tellp@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6084 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
6085 /* ?tellp@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
6086 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_tellp, 8)
6087 fpos_int* __thiscall basic_ostream_wchar_tellp(basic_ostream_wchar *this, fpos_int *ret)
6089 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6091 TRACE("(%p)\n", this);
6093 if(!ios_base_fail(&base->base)) {
6094 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
6095 ret, 0, SEEKDIR_cur, OPENMODE_out);
6096 }else {
6097 ret->off = -1;
6098 ret->pos = 0;
6099 ret->state = 0;
6101 return ret;
6104 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PB_WH@Z */
6105 /* ?write@?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEB_W_J@Z */
6106 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV12@PBGH@Z */
6107 /* ?write@?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEBG_J@Z */
6108 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_write, 12)
6109 basic_ostream_wchar* __thiscall basic_ostream_wchar_write(basic_ostream_wchar *this, const wchar_t *str, streamsize count)
6111 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6113 TRACE("(%p %s %ld)\n", this, debugstr_w(str), count);
6115 if(!basic_ostream_wchar_sentry_create(this)
6116 || basic_streambuf_wchar_sputn(base->strbuf, str, count)!=count) {
6117 basic_ostream_wchar_sentry_destroy(this);
6118 basic_ios_wchar_setstate(base, IOSTATE_badbit);
6119 return this;
6122 basic_ostream_wchar_sentry_destroy(this);
6123 return this;
6126 static basic_ostream_wchar* basic_ostream_print_short(basic_ostream_wchar *this, short val, const num_put *numput)
6128 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6129 int state = IOSTATE_goodbit;
6131 TRACE("(%p %d)\n", this, val);
6133 if(basic_ostream_wchar_sentry_create(this)) {
6134 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6135 ostreambuf_iterator_wchar dest = {0, strbuf};
6137 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base),
6138 (ios_base_flags_get(&base->base) & FMTFLAG_basefield & (FMTFLAG_oct | FMTFLAG_hex))
6139 ? (LONG)((unsigned short)val) : (LONG)val);
6141 basic_ostream_wchar_sentry_destroy(this);
6143 basic_ios_wchar_setstate(base, state);
6144 return this;
6147 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@F@Z */
6148 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@F@Z */
6149 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_short, 8)
6150 basic_ostream_wchar* __thiscall basic_ostream_short_print_short(basic_ostream_wchar *this, short val)
6152 return basic_ostream_print_short(this, val, num_put_short_use_facet(
6153 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6156 static basic_ostream_wchar* basic_ostream_print_ushort(basic_ostream_wchar *this, unsigned short val, const num_put *numput)
6158 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6159 int state = IOSTATE_goodbit;
6161 TRACE("(%p %d)\n", this, val);
6163 if(basic_ostream_wchar_sentry_create(this)) {
6164 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6165 ostreambuf_iterator_wchar dest = {0, strbuf};
6167 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6169 basic_ostream_wchar_sentry_destroy(this);
6171 basic_ios_wchar_setstate(base, state);
6172 return this;
6175 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@G@Z */
6176 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@G@Z */
6177 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ushort, 8)
6178 basic_ostream_wchar* __thiscall basic_ostream_short_print_ushort(basic_ostream_wchar *this, unsigned short val)
6180 return basic_ostream_print_ushort(this, val, num_put_short_use_facet(
6181 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6184 static basic_ostream_wchar* basic_ostream_print_int(basic_ostream_wchar *this, int val, const num_put *numput)
6186 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6187 int state = IOSTATE_goodbit;
6189 TRACE("(%p %d)\n", this, val);
6191 if(basic_ostream_wchar_sentry_create(this)) {
6192 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6193 ostreambuf_iterator_wchar dest = {0, strbuf};
6195 num_put_wchar_put_long(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6197 basic_ostream_wchar_sentry_destroy(this);
6199 basic_ios_wchar_setstate(base, state);
6200 return this;
6203 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@H@Z */
6204 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@H@Z */
6205 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@J@Z */
6206 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@J@Z */
6207 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int, 8)
6208 basic_ostream_wchar* __thiscall basic_ostream_short_print_int(basic_ostream_wchar *this, int val)
6210 return basic_ostream_print_int(this, val, num_put_short_use_facet(
6211 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6214 static basic_ostream_wchar* basic_ostream_print_uint(basic_ostream_wchar *this, unsigned int val, const num_put *numput)
6216 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6217 int state = IOSTATE_goodbit;
6219 TRACE("(%p %u)\n", this, val);
6221 if(basic_ostream_wchar_sentry_create(this)) {
6222 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6223 ostreambuf_iterator_wchar dest = {0, strbuf};
6225 num_put_wchar_put_ulong(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6227 basic_ostream_wchar_sentry_destroy(this);
6229 basic_ios_wchar_setstate(base, state);
6230 return this;
6233 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@I@Z */
6234 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@I@Z */
6235 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@K@Z */
6236 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@K@Z */
6237 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint, 8)
6238 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint(basic_ostream_wchar *this, unsigned int val)
6240 return basic_ostream_print_uint(this, val, num_put_short_use_facet(
6241 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6244 static basic_ostream_wchar* basic_ostream_print_float(basic_ostream_wchar *this, float val, const num_put *numput)
6246 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6247 int state = IOSTATE_goodbit;
6249 TRACE("(%p %f)\n", this, val);
6251 if(basic_ostream_wchar_sentry_create(this)) {
6252 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6253 ostreambuf_iterator_wchar dest = {0, strbuf};
6255 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6257 basic_ostream_wchar_sentry_destroy(this);
6259 basic_ios_wchar_setstate(base, state);
6260 return this;
6263 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@M@Z */
6264 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@M@Z */
6265 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_float, 8)
6266 basic_ostream_wchar* __thiscall basic_ostream_short_print_float(basic_ostream_wchar *this, float val)
6268 return basic_ostream_print_float(this, val, num_put_short_use_facet(
6269 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6272 static basic_ostream_wchar* basic_ostream_print_double(basic_ostream_wchar *this, double val, const num_put *numput)
6274 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6275 int state = IOSTATE_goodbit;
6277 TRACE("(%p %lf)\n", this, val);
6279 if(basic_ostream_wchar_sentry_create(this)) {
6280 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6281 ostreambuf_iterator_wchar dest = {0, strbuf};
6283 num_put_wchar_put_double(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6285 basic_ostream_wchar_sentry_destroy(this);
6287 basic_ios_wchar_setstate(base, state);
6288 return this;
6291 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@N@Z */
6292 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@N@Z */
6293 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_double, 12)
6294 basic_ostream_wchar* __thiscall basic_ostream_short_print_double(basic_ostream_wchar *this, double val)
6296 return basic_ostream_print_double(this, val, num_put_short_use_facet(
6297 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6300 static basic_ostream_wchar* basic_ostream_print_ldouble(basic_ostream_wchar *this, double val, const num_put *numput)
6302 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6303 int state = IOSTATE_goodbit;
6305 TRACE("(%p %lf)\n", this, val);
6307 if(basic_ostream_wchar_sentry_create(this)) {
6308 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6309 ostreambuf_iterator_wchar dest = {0, strbuf};
6311 num_put_wchar_put_ldouble(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6313 basic_ostream_wchar_sentry_destroy(this);
6315 basic_ios_wchar_setstate(base, state);
6316 return this;
6319 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@O@Z */
6320 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@O@Z */
6321 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ldouble, 12)
6322 basic_ostream_wchar* __thiscall basic_ostream_short_print_ldouble(basic_ostream_wchar *this, double val)
6324 return basic_ostream_print_ldouble(this, val, num_put_short_use_facet(
6325 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6328 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6329 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
6330 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6331 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
6332 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_streambuf, 8)
6333 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_streambuf(basic_ostream_wchar *this, basic_streambuf_wchar *val)
6335 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6336 IOSB_iostate state = IOSTATE_badbit;
6337 unsigned short c = '\n';
6339 TRACE("(%p %p)\n", this, val);
6341 if(basic_ostream_wchar_sentry_create(this)) {
6342 for(c = basic_streambuf_wchar_sgetc(val); c!=WEOF;
6343 c = basic_streambuf_wchar_snextc(val)) {
6344 state = IOSTATE_goodbit;
6346 if(basic_streambuf_wchar_sputc(base->strbuf, c) == WEOF) {
6347 state = IOSTATE_badbit;
6348 break;
6351 }else {
6352 state = IOSTATE_badbit;
6354 basic_ostream_wchar_sentry_destroy(this);
6356 ios_base_width_set(&base->base, 0);
6357 basic_ios_wchar_setstate(base, state);
6358 return this;
6361 static basic_ostream_wchar* basic_ostream_print_ptr(basic_ostream_wchar *this, const void *val, const num_put *numput)
6363 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6364 int state = IOSTATE_goodbit;
6366 TRACE("(%p %p)\n", this, val);
6368 if(basic_ostream_wchar_sentry_create(this)) {
6369 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6370 ostreambuf_iterator_wchar dest = {0, strbuf};
6372 num_put_wchar_put_ptr(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6374 basic_ostream_wchar_sentry_destroy(this);
6376 basic_ios_wchar_setstate(base, state);
6377 return this;
6380 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@PBX@Z */
6381 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEBX@Z */
6382 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_ptr, 8)
6383 basic_ostream_wchar* __thiscall basic_ostream_short_print_ptr(basic_ostream_wchar *this, const void *val)
6385 return basic_ostream_print_ptr(this, val, num_put_short_use_facet(
6386 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6389 static basic_ostream_wchar* basic_ostream_print_int64(basic_ostream_wchar *this, __int64 val, const num_put *numput)
6391 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6392 int state = IOSTATE_goodbit;
6394 TRACE("(%p)\n", this);
6396 if(basic_ostream_wchar_sentry_create(this)) {
6397 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6398 ostreambuf_iterator_wchar dest = {0, strbuf};
6400 num_put_wchar_put_int64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6402 basic_ostream_wchar_sentry_destroy(this);
6404 basic_ios_wchar_setstate(base, state);
6405 return this;
6408 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_J@Z */
6409 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_J@Z */
6410 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_int64, 12)
6411 basic_ostream_wchar* __thiscall basic_ostream_short_print_int64(basic_ostream_wchar *this, __int64 val)
6413 return basic_ostream_print_int64(this, val, num_put_short_use_facet(
6414 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6417 static basic_ostream_wchar* basic_ostream_print_uint64(basic_ostream_wchar *this, unsigned __int64 val, const num_put *numput)
6419 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6420 int state = IOSTATE_goodbit;
6422 TRACE("(%p)\n", this);
6424 if(basic_ostream_wchar_sentry_create(this)) {
6425 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6426 ostreambuf_iterator_wchar dest = {0, strbuf};
6428 num_put_wchar_put_uint64(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6430 basic_ostream_wchar_sentry_destroy(this);
6432 basic_ios_wchar_setstate(base, state);
6433 return this;
6436 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_K@Z */
6437 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_K@Z */
6438 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_uint64, 12)
6439 basic_ostream_wchar* __thiscall basic_ostream_short_print_uint64(basic_ostream_wchar *this, unsigned __int64 val)
6441 return basic_ostream_print_uint64(this, val, num_put_short_use_facet(
6442 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6445 static basic_ostream_wchar* basic_ostream_print_bool(basic_ostream_wchar *this, MSVCP_bool val, const num_put *numput)
6447 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(this);
6448 int state = IOSTATE_goodbit;
6450 TRACE("(%p %x)\n", this, val);
6452 if(basic_ostream_wchar_sentry_create(this)) {
6453 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
6454 ostreambuf_iterator_wchar dest = {0, strbuf};
6456 num_put_wchar_put_bool(numput, &dest, dest, &base->base, basic_ios_wchar_fill_get(base), val);
6458 basic_ostream_wchar_sentry_destroy(this);
6460 basic_ios_wchar_setstate(base, state);
6461 return this;
6464 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@_N@Z */
6465 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@_N@Z */
6466 DEFINE_THISCALL_WRAPPER(basic_ostream_short_print_bool, 8)
6467 basic_ostream_wchar* __thiscall basic_ostream_short_print_bool(basic_ostream_wchar *this, MSVCP_bool val)
6469 return basic_ostream_print_bool(this, val, num_put_short_use_facet(
6470 &basic_ios_wchar_rdbuf_get(basic_ostream_wchar_get_basic_ios(this))->loc));
6473 /* ?ends@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6474 /* ?ends@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6475 /* ?ends@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6476 /* ?ends@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6477 basic_ostream_wchar* __cdecl basic_ostream_wchar_ends(basic_ostream_wchar *ostr)
6479 TRACE("(%p)\n", ostr);
6481 basic_ostream_wchar_put(ostr, 0);
6482 return ostr;
6485 /* ?endl@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
6486 /* ?endl@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
6487 /* ?endl@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@1@AAV21@@Z */
6488 /* ?endl@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
6489 basic_ostream_wchar* __cdecl basic_ostream_wchar_endl(basic_ostream_wchar *ostr)
6491 TRACE("(%p)\n", ostr);
6493 basic_ostream_wchar_put(ostr, '\n');
6494 basic_ostream_wchar_flush(ostr);
6495 return ostr;
6498 /* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
6499 /* ??$?6_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
6500 /* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
6501 /* ??$?6GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
6502 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_bstr(basic_ostream_wchar *ostr, const basic_string_wchar *str)
6504 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6505 IOSB_iostate state = IOSTATE_goodbit;
6507 TRACE("(%p %p)\n", ostr, str);
6509 if(basic_ostream_wchar_sentry_create(ostr)) {
6510 MSVCP_size_t len = basic_string_wchar_length(str);
6511 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6513 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6514 for(; pad!=0; pad--) {
6515 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6516 state = IOSTATE_badbit;
6517 break;
6522 if(state == IOSTATE_goodbit) {
6523 if(basic_streambuf_wchar_sputn(base->strbuf, basic_string_wchar_c_str(str), len) != len)
6524 state = IOSTATE_badbit;
6527 if(state == IOSTATE_goodbit) {
6528 for(; pad!=0; pad--) {
6529 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6530 state = IOSTATE_badbit;
6531 break;
6536 base->base.wide = 0;
6537 }else {
6538 state = IOSTATE_badbit;
6540 basic_ostream_wchar_sentry_destroy(ostr);
6542 basic_ios_wchar_setstate(base, state);
6543 return ostr;
6546 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@_W@Z */
6547 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@_W@Z */
6548 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@G@Z */
6549 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@G@Z */
6550 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_ch(basic_ostream_wchar *ostr, wchar_t ch)
6552 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6553 IOSB_iostate state = IOSTATE_goodbit;
6555 TRACE("(%p %d)\n", ostr, ch);
6557 if(basic_ostream_wchar_sentry_create(ostr)) {
6558 streamsize pad = (base->base.wide>1 ? base->base.wide-1 : 0);
6560 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6561 for(; pad!=0; pad--) {
6562 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6563 state = IOSTATE_badbit;
6564 break;
6569 if(state == IOSTATE_goodbit) {
6570 if(basic_streambuf_wchar_sputc(base->strbuf, ch) == WEOF)
6571 state = IOSTATE_badbit;
6574 if(state == IOSTATE_goodbit) {
6575 for(; pad!=0; pad--) {
6576 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6577 state = IOSTATE_badbit;
6578 break;
6583 base->base.wide = 0;
6584 }else {
6585 state = IOSTATE_badbit;
6587 basic_ostream_wchar_sentry_destroy(ostr);
6589 basic_ios_wchar_setstate(base, state);
6590 return ostr;
6593 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AAV10@PB_W@Z */
6594 /* ??$?6_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_ostream@_WU?$char_traits@_W@std@@@0@AEAV10@PEB_W@Z */
6595 /* ??$?6GU?$char_traits@G@std@@@std@@YAAAV?$basic_ostream@GU?$char_traits@G@std@@@0@AAV10@PBG@Z */
6596 /* ??$?6GU?$char_traits@G@std@@@std@@YAAEAV?$basic_ostream@GU?$char_traits@G@std@@@0@AEAV10@PEBG@Z */
6597 basic_ostream_wchar* __cdecl basic_ostream_wchar_print_str(basic_ostream_wchar *ostr, const wchar_t *str)
6599 basic_ios_wchar *base = basic_ostream_wchar_get_basic_ios(ostr);
6600 IOSB_iostate state = IOSTATE_goodbit;
6602 TRACE("(%p %s)\n", ostr, debugstr_w(str));
6604 if(basic_ostream_wchar_sentry_create(ostr)) {
6605 MSVCP_size_t len = wcslen(str);
6606 streamsize pad = (base->base.wide>len ? base->base.wide-len : 0);
6608 if((base->base.fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
6609 for(; pad!=0; pad--) {
6610 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6611 state = IOSTATE_badbit;
6612 break;
6617 if(state == IOSTATE_goodbit) {
6618 if(basic_streambuf_wchar_sputn(base->strbuf, str, len) != len)
6619 state = IOSTATE_badbit;
6622 if(state == IOSTATE_goodbit) {
6623 for(; pad!=0; pad--) {
6624 if(basic_streambuf_wchar_sputc(base->strbuf, base->fillch) == WEOF) {
6625 state = IOSTATE_badbit;
6626 break;
6631 base->base.wide = 0;
6632 }else {
6633 state = IOSTATE_badbit;
6635 basic_ostream_wchar_sentry_destroy(ostr);
6637 basic_ios_wchar_setstate(base, state);
6638 return ostr;
6641 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6642 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6643 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
6644 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
6645 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func, 8)
6646 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func(basic_ostream_wchar *this,
6647 basic_ostream_wchar* (__cdecl *pfunc)(basic_ostream_wchar*))
6649 TRACE("(%p %p)\n", this, pfunc);
6650 pfunc(this);
6651 return this;
6654 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
6655 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
6656 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
6657 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
6658 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_basic_ios, 8)
6659 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_basic_ios(basic_ostream_wchar *this,
6660 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
6662 TRACE("(%p %p)\n", this, pfunc);
6663 pfunc(basic_ostream_wchar_get_basic_ios(this));
6664 return this;
6667 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6668 /* ??6?$basic_ostream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6669 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
6670 /* ??6?$basic_ostream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
6671 DEFINE_THISCALL_WRAPPER(basic_ostream_wchar_print_func_ios_base, 8)
6672 basic_ostream_wchar* __thiscall basic_ostream_wchar_print_func_ios_base(
6673 basic_ostream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
6675 TRACE("(%p %p)\n", this, pfunc);
6676 pfunc(&basic_ostream_wchar_get_basic_ios(this)->base);
6677 return this;
6680 /* Caution: basic_istream uses virtual inheritance. */
6681 static inline basic_ios_char* basic_istream_char_get_basic_ios(basic_istream_char *this)
6683 return (basic_ios_char*)((char*)this+this->vbtable[1]);
6686 static inline basic_ios_char* basic_istream_char_to_basic_ios(basic_istream_char *ptr)
6688 return (basic_ios_char*)((char*)ptr+basic_istream_char_vbtable[1]);
6691 static inline basic_istream_char* basic_istream_char_from_basic_ios(basic_ios_char *ptr)
6693 return (basic_istream_char*)((char*)ptr-basic_istream_char_vbtable[1]);
6696 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6697 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z */
6698 static basic_istream_char* basic_istream_char_ctor_init(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
6700 basic_ios_char *base;
6702 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
6704 if(virt_init) {
6705 this->vbtable = basic_istream_char_vbtable;
6706 base = basic_istream_char_get_basic_ios(this);
6707 basic_ios_char_ctor(base);
6708 }else {
6709 base = basic_istream_char_get_basic_ios(this);
6712 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6713 this->count = 0;
6714 if(!noinit)
6715 basic_ios_char_init(base, strbuf, isstd);
6716 return this;
6719 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6720 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z */
6721 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor, 16)
6722 basic_istream_char* __thiscall basic_istream_char_ctor(basic_istream_char *this, basic_streambuf_char *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
6724 return basic_istream_char_ctor_init(this, strbuf, isstd, FALSE, virt_init);
6727 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QAE@W4_Uninitialized@1@@Z */
6728 /* ??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
6729 DEFINE_THISCALL_WRAPPER(basic_istream_char_ctor_uninitialized, 12)
6730 basic_istream_char* __thiscall basic_istream_char_ctor_uninitialized(basic_istream_char *this, int uninitialized, MSVCP_bool virt_init)
6732 basic_ios_char *base;
6734 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
6736 if(virt_init) {
6737 this->vbtable = basic_istream_char_vbtable;
6738 base = basic_istream_char_get_basic_ios(this);
6739 basic_ios_char_ctor(base);
6740 }else {
6741 base = basic_istream_char_get_basic_ios(this);
6744 base->base.vtable = &MSVCP_basic_istream_char_vtable;
6745 ios_base_Addstd(&base->base);
6746 return this;
6749 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UAE@XZ */
6750 /* ??1?$basic_istream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
6751 DEFINE_THISCALL_WRAPPER(basic_istream_char_dtor, 4)
6752 void __thiscall basic_istream_char_dtor(basic_ios_char *base)
6754 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6756 /* don't destroy virtual base here */
6757 TRACE("(%p)\n", this);
6760 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6761 /* ??_D?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6762 DEFINE_THISCALL_WRAPPER(basic_istream_char_vbase_dtor, 4)
6763 void __thiscall basic_istream_char_vbase_dtor(basic_istream_char *this)
6765 TRACE("(%p)\n", this);
6766 basic_istream_char_dtor(basic_istream_char_to_basic_ios(this));
6767 basic_ios_char_dtor(basic_istream_char_get_basic_ios(this));
6770 DEFINE_THISCALL_WRAPPER(basic_istream_char_vector_dtor, 8)
6771 basic_istream_char* __thiscall basic_istream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
6773 basic_istream_char *this = basic_istream_char_from_basic_ios(base);
6775 TRACE("(%p %x)\n", this, flags);
6777 if(flags & 2) {
6778 /* we have an array, with the number of elements stored before the first object */
6779 INT_PTR i, *ptr = (INT_PTR *)this-1;
6781 for(i=*ptr-1; i>=0; i--)
6782 basic_istream_char_vbase_dtor(this+i);
6783 MSVCRT_operator_delete(ptr);
6784 } else {
6785 basic_istream_char_vbase_dtor(this);
6786 if(flags & 1)
6787 MSVCRT_operator_delete(this);
6790 return this;
6793 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6794 /* ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6795 static MSVCP_bool basic_istream_char__Ipfx(basic_istream_char *this, MSVCP_bool noskip)
6797 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6799 TRACE("(%p %d)\n", this, noskip);
6801 if(ios_base_good(&base->base)) {
6802 if(basic_ios_char_tie_get(base))
6803 basic_ostream_char_flush(basic_ios_char_tie_get(base));
6805 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
6806 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6807 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
6808 int ch;
6810 for(ch = basic_streambuf_char_sgetc(strbuf); ;
6811 ch = basic_streambuf_char_snextc(strbuf)) {
6812 if(ch==EOF || !ctype_char_is_ch(ctype, _SPACE|_BLANK, ch))
6813 break;
6818 if(!ios_base_good(&base->base)) {
6819 basic_ios_char_setstate(base, IOSTATE_failbit);
6820 return FALSE;
6823 return TRUE;
6826 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE_N_N@Z */
6827 /* ?ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_N_N@Z */
6828 DEFINE_THISCALL_WRAPPER(basic_istream_char_ipfx, 8)
6829 MSVCP_bool __thiscall basic_istream_char_ipfx(basic_istream_char *this, MSVCP_bool noskip)
6831 return basic_istream_char__Ipfx(this, noskip);
6834 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEXXZ */
6835 /* ?isfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
6836 DEFINE_THISCALL_WRAPPER(basic_istream_char_isfx, 4)
6837 void __thiscall basic_istream_char_isfx(basic_istream_char *this)
6839 TRACE("(%p)\n", this);
6842 static BOOL basic_istream_char_sentry_create(basic_istream_char *istr, MSVCP_bool noskip)
6844 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6846 if(basic_ios_char_rdbuf_get(base))
6847 basic_streambuf_char__Lock(base->strbuf);
6849 return basic_istream_char_ipfx(istr, noskip);
6852 static void basic_istream_char_sentry_destroy(basic_istream_char *istr)
6854 basic_ios_char *base = basic_istream_char_get_basic_ios(istr);
6856 if(basic_ios_char_rdbuf_get(base))
6857 basic_streambuf_char__Unlock(base->strbuf);
6860 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QBEHXZ */
6861 /* ?gcount@?$basic_istream@DU?$char_traits@D@std@@@std@@QEBA_JXZ */
6862 DEFINE_THISCALL_WRAPPER(basic_istream_char_gcount, 4)
6863 int __thiscall basic_istream_char_gcount(const basic_istream_char *this)
6865 TRACE("(%p)\n", this);
6866 return this->count;
6869 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
6870 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
6871 DEFINE_THISCALL_WRAPPER(basic_istream_char_get, 4)
6872 int __thiscall basic_istream_char_get(basic_istream_char *this)
6874 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6875 int ret;
6877 TRACE("(%p)\n", this);
6879 this->count = 0;
6881 if(!basic_istream_char_sentry_create(this, TRUE)) {
6882 basic_istream_char_sentry_destroy(this);
6883 return EOF;
6886 ret = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(base));
6887 basic_istream_char_sentry_destroy(this);
6888 if(ret == EOF)
6889 basic_ios_char_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
6890 else
6891 this->count++;
6893 return ret;
6896 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAD@Z */
6897 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAD@Z */
6898 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_ch, 8)
6899 basic_istream_char* __thiscall basic_istream_char_get_ch(basic_istream_char *this, char *ch)
6901 int ret;
6903 TRACE("(%p %p)\n", this, ch);
6905 ret = basic_istream_char_get(this);
6906 if(ret != EOF)
6907 *ch = (char)ret;
6908 return this;
6911 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6912 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6913 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str_delim, 16)
6914 basic_istream_char* __thiscall basic_istream_char_get_str_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6916 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6917 int ch = delim;
6919 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
6921 this->count = 0;
6923 if(basic_istream_char_sentry_create(this, TRUE)) {
6924 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
6926 for(ch = basic_streambuf_char_sgetc(strbuf); count>1;
6927 ch = basic_streambuf_char_snextc(strbuf)) {
6928 if(ch==EOF || ch==delim)
6929 break;
6931 *str++ = ch;
6932 this->count++;
6933 count--;
6936 basic_istream_char_sentry_destroy(this);
6938 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6939 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6940 if(count > 0)
6941 *str = 0;
6942 return this;
6945 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
6946 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
6947 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_str, 12)
6948 basic_istream_char* __thiscall basic_istream_char_get_str(basic_istream_char *this, char *str, streamsize count)
6950 return basic_istream_char_get_str_delim(this, str, count, '\n');
6953 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6954 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@D@Z */
6955 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf_delim, 12)
6956 basic_istream_char* __thiscall basic_istream_char_get_streambuf_delim(basic_istream_char *this, basic_streambuf_char *strbuf, char delim)
6958 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6959 int ch = delim;
6961 TRACE("(%p %p %c)\n", this, strbuf, delim);
6963 this->count = 0;
6965 if(basic_istream_char_sentry_create(this, TRUE)) {
6966 basic_streambuf_char *strbuf_read = basic_ios_char_rdbuf_get(base);
6968 for(ch = basic_streambuf_char_sgetc(strbuf_read); ;
6969 ch = basic_streambuf_char_snextc(strbuf_read)) {
6970 if(ch==EOF || ch==delim)
6971 break;
6973 if(basic_streambuf_char_sputc(strbuf, ch) == EOF)
6974 break;
6975 this->count++;
6978 basic_istream_char_sentry_destroy(this);
6980 basic_ios_char_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
6981 (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
6982 return this;
6985 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@AAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6986 /* ?get@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@@Z */
6987 DEFINE_THISCALL_WRAPPER(basic_istream_char_get_streambuf, 8)
6988 basic_istream_char* __thiscall basic_istream_char_get_streambuf(basic_istream_char *this, basic_streambuf_char *strbuf)
6990 return basic_istream_char_get_streambuf_delim(this, strbuf, '\n');
6993 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADHD@Z */
6994 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_JD@Z */
6995 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline_delim, 16)
6996 basic_istream_char* __thiscall basic_istream_char_getline_delim(basic_istream_char *this, char *str, streamsize count, char delim)
6998 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
6999 int ch = (unsigned char)delim;
7001 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
7003 this->count = 0;
7005 if(basic_istream_char_sentry_create(this, TRUE) && count>0) {
7006 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7008 while(count > 1) {
7009 ch = basic_streambuf_char_sbumpc(strbuf);
7011 if(ch==EOF || ch==(unsigned char)delim)
7012 break;
7014 *str++ = ch;
7015 this->count++;
7016 count--;
7019 if(ch == (unsigned char)delim)
7020 this->count++;
7021 else if(ch != EOF) {
7022 ch = basic_streambuf_char_sgetc(strbuf);
7024 if(ch == (unsigned char)delim) {
7025 basic_streambuf_char__Gninc(strbuf);
7026 this->count++;
7030 basic_istream_char_sentry_destroy(this);
7032 basic_ios_char_setstate(base, (ch==EOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
7033 (!this->count || (ch!=(unsigned char)delim && ch!=EOF) ? IOSTATE_failbit : IOSTATE_goodbit));
7034 if(count > 0)
7035 *str = 0;
7036 return this;
7039 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7040 /* ?getline@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7041 DEFINE_THISCALL_WRAPPER(basic_istream_char_getline, 12)
7042 basic_istream_char* __thiscall basic_istream_char_getline(basic_istream_char *this, char *str, streamsize count)
7044 return basic_istream_char_getline_delim(this, str, count, '\n');
7047 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@HH@Z */
7048 /* ?ignore@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JH@Z */
7049 DEFINE_THISCALL_WRAPPER(basic_istream_char_ignore, 12)
7050 basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *this, streamsize count, int delim)
7052 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7053 int ch = (unsigned char)delim;
7054 unsigned int state;
7056 TRACE("(%p %ld %d)\n", this, count, delim);
7058 this->count = 0;
7060 if(basic_istream_char_sentry_create(this, TRUE)) {
7061 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7062 state = IOSTATE_goodbit;
7064 while(count > 0) {
7065 ch = basic_streambuf_char_sbumpc(strbuf);
7067 if(ch==EOF) {
7068 state = IOSTATE_eofbit;
7069 break;
7072 if(ch==(unsigned char)delim)
7073 break;
7075 this->count++;
7076 if(count != INT_MAX)
7077 count--;
7079 }else
7080 state = IOSTATE_failbit;
7081 basic_istream_char_sentry_destroy(this);
7083 basic_ios_char_setstate(base, state);
7084 return this;
7087 /* ?ws@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@1@AAV21@@Z */
7088 /* ?ws@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@1@AEAV21@@Z */
7089 basic_istream_char* __cdecl ws_basic_istream_char(basic_istream_char *istream)
7091 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7092 int ch = '\n';
7094 TRACE("(%p)\n", istream);
7096 if(basic_istream_char_sentry_create(istream, TRUE)) {
7097 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7098 const ctype_char *ctype = ctype_char_use_facet(&strbuf->loc);
7100 for(ch = basic_streambuf_char_sgetc(strbuf); ctype_char_is_ch(ctype, _SPACE, ch);
7101 ch = basic_streambuf_char_snextc(strbuf)) {
7102 if(ch == EOF)
7103 break;
7106 basic_istream_char_sentry_destroy(istream);
7108 if(ch == EOF)
7109 basic_ios_char_setstate(base, IOSTATE_eofbit);
7110 return istream;
7113 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7114 /* ?peek@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7115 DEFINE_THISCALL_WRAPPER(basic_istream_char_peek, 4)
7116 int __thiscall basic_istream_char_peek(basic_istream_char *this)
7118 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7119 int ret = EOF;
7121 TRACE("(%p)\n", this);
7123 this->count = 0;
7125 if(basic_istream_char_sentry_create(this, TRUE))
7126 ret = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7127 basic_istream_char_sentry_destroy(this);
7129 if (ret == EOF)
7130 basic_ios_char_setstate(base, IOSTATE_eofbit);
7132 return ret;
7135 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z */
7136 /* ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z */
7137 static basic_istream_char* basic_istream_char__Read_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7139 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7140 IOSB_iostate state = IOSTATE_goodbit;
7142 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7144 if(basic_istream_char_sentry_create(this, TRUE)) {
7145 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7147 this->count = basic_streambuf_char__Sgetn_s(strbuf, str, size, count);
7148 if(this->count != count)
7149 state |= IOSTATE_failbit | IOSTATE_eofbit;
7150 }else {
7151 this->count = 0;
7153 basic_istream_char_sentry_destroy(this);
7155 basic_ios_char_setstate(base, state);
7156 return this;
7159 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADH@Z */
7160 /* ?read@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_J@Z */
7161 DEFINE_THISCALL_WRAPPER(basic_istream_char_read, 12)
7162 basic_istream_char* __thiscall basic_istream_char_read(basic_istream_char *this, char *str, streamsize count)
7164 return basic_istream_char__Read_s(this, str, -1, count);
7167 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */
7168 /* ?_Readsome_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_K_J@Z */
7169 static streamsize basic_istream_char__Readsome_s(basic_istream_char *this, char *str, MSVCP_size_t size, streamsize count)
7171 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7172 IOSB_iostate state = IOSTATE_goodbit;
7174 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
7176 this->count = 0;
7178 if(basic_istream_char_sentry_create(this, TRUE)) {
7179 streamsize avail = basic_streambuf_char_in_avail(basic_ios_char_rdbuf_get(base));
7180 if(avail > count)
7181 avail = count;
7183 if(avail == -1)
7184 state |= IOSTATE_eofbit;
7185 else if(avail > 0)
7186 basic_istream_char__Read_s(this, str, size, avail);
7187 }else {
7188 state |= IOSTATE_failbit;
7190 basic_istream_char_sentry_destroy(this);
7192 basic_ios_char_setstate(base, state);
7193 return this->count;
7196 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHPADH@Z */
7197 /* ?readsome@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA_JPEAD_J@Z */
7198 DEFINE_THISCALL_WRAPPER(basic_istream_char_readsome, 12)
7199 streamsize __thiscall basic_istream_char_readsome(basic_istream_char *this, char *str, streamsize count)
7201 return basic_istream_char__Readsome_s(this, str, count, count);
7204 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@D@Z */
7205 /* ?putback@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@D@Z */
7206 DEFINE_THISCALL_WRAPPER(basic_istream_char_putback, 8)
7207 basic_istream_char* __thiscall basic_istream_char_putback(basic_istream_char *this, char ch)
7209 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7210 IOSB_iostate state = IOSTATE_goodbit;
7212 TRACE("(%p %c)\n", this, ch);
7214 this->count = 0;
7216 if(basic_istream_char_sentry_create(this, TRUE)) {
7217 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7219 if(!ios_base_good(&base->base))
7220 state |= IOSTATE_failbit;
7221 else if(!strbuf || basic_streambuf_char_sputbackc(strbuf, ch)==EOF)
7222 state |= IOSTATE_badbit;
7224 basic_istream_char_sentry_destroy(this);
7226 basic_ios_char_setstate(base, state);
7227 return this;
7230 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@XZ */
7231 /* ?unget@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ */
7232 DEFINE_THISCALL_WRAPPER(basic_istream_char_unget, 4)
7233 basic_istream_char* __thiscall basic_istream_char_unget(basic_istream_char *this)
7235 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7236 IOSB_iostate state = IOSTATE_goodbit;
7238 TRACE("(%p)\n", this);
7240 this->count = 0;
7242 if(basic_istream_char_sentry_create(this, TRUE)) {
7243 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7245 if(!ios_base_good(&base->base))
7246 state |= IOSTATE_failbit;
7247 else if(!strbuf || basic_streambuf_char_sungetc(strbuf)==EOF)
7248 state |= IOSTATE_badbit;
7250 basic_istream_char_sentry_destroy(this);
7252 basic_ios_char_setstate(base, state);
7253 return this;
7256 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEHXZ */
7257 /* ?sync@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAHXZ */
7258 DEFINE_THISCALL_WRAPPER(basic_istream_char_sync, 4)
7259 int __thiscall basic_istream_char_sync(basic_istream_char *this)
7261 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7262 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7264 TRACE("(%p)\n", this);
7266 if(!strbuf)
7267 return -1;
7269 if(basic_istream_char_sentry_create(this, TRUE)) {
7270 if(basic_streambuf_char_pubsync(strbuf) != -1) {
7271 basic_istream_char_sentry_destroy(this);
7272 return 0;
7275 basic_istream_char_sentry_destroy(this);
7277 basic_ios_char_setstate(base, IOSTATE_badbit);
7278 return -1;
7281 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAE?AV?$fpos@H@2@XZ */
7282 /* ?tellg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
7283 DEFINE_THISCALL_WRAPPER(basic_istream_char_tellg, 8)
7284 fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int *ret)
7286 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7288 TRACE("(%p %p)\n", this, ret);
7290 if(ios_base_fail(&base->base)) {
7291 ret->off = -1;
7292 ret->pos = 0;
7293 ret->state = 0;
7294 return ret;
7297 basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
7298 ret, 0, SEEKDIR_cur, OPENMODE_in);
7300 if(ret->off==-1 && ret->pos==0 && ret->state==0)
7301 basic_ios_char_setstate(base, IOSTATE_failbit);
7303 return ret;
7306 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
7307 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
7308 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg, 12)
7309 basic_istream_char* __thiscall basic_istream_char_seekg(basic_istream_char *this, streamoff off, int dir)
7311 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7313 TRACE("(%p %ld %d)\n", this, off, dir);
7315 if(!ios_base_fail(&base->base)) {
7316 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7317 fpos_int ret;
7319 basic_streambuf_char_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
7322 return this;
7325 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
7326 /* ?seekg@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
7327 DEFINE_THISCALL_WRAPPER(basic_istream_char_seekg_fpos, 28)
7328 basic_istream_char* __thiscall basic_istream_char_seekg_fpos(basic_istream_char *this, fpos_int pos)
7330 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7332 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
7334 if(!ios_base_fail(&base->base)) {
7335 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7336 fpos_int ret;
7338 basic_streambuf_char_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
7341 return this;
7344 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAF@Z */
7345 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAF@Z */
7346 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_short, 8)
7347 basic_istream_char* __thiscall basic_istream_char_read_short(basic_istream_char *this, short *v)
7349 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7350 int state = IOSTATE_goodbit;
7352 TRACE("(%p %p)\n", this, v);
7354 if(basic_istream_char_sentry_create(this, FALSE)) {
7355 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7356 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7357 istreambuf_iterator_char first={0}, last={0};
7358 LONG tmp;
7360 first.strbuf = strbuf;
7361 num_get_char_get_long(numget, &last, first, last, &base->base, &state, &tmp);
7363 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
7364 *v = tmp;
7365 else
7366 state |= IOSTATE_failbit;
7368 basic_istream_char_sentry_destroy(this);
7370 basic_ios_char_setstate(base, state);
7371 return this;
7374 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAG@Z */
7375 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAG@Z */
7376 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ushort, 8)
7377 basic_istream_char* __thiscall basic_istream_char_read_ushort(basic_istream_char *this, unsigned short *v)
7379 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7380 int state = IOSTATE_goodbit;
7382 TRACE("(%p %p)\n", this, v);
7384 if(basic_istream_char_sentry_create(this, FALSE)) {
7385 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7386 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7387 istreambuf_iterator_char first={0}, last={0};
7389 first.strbuf = strbuf;
7390 num_get_char_get_ushort(numget, &last, first, last, &base->base, &state, v);
7392 basic_istream_char_sentry_destroy(this);
7394 basic_ios_char_setstate(base, state);
7395 return this;
7398 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAH@Z */
7399 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAH@Z */
7400 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int, 8)
7401 basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *this, int *v)
7403 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7404 int state = IOSTATE_goodbit;
7406 TRACE("(%p %p)\n", this, v);
7408 if(basic_istream_char_sentry_create(this, FALSE)) {
7409 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7410 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7411 istreambuf_iterator_char first={0}, last={0};
7413 first.strbuf = strbuf;
7414 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7416 basic_istream_char_sentry_destroy(this);
7418 basic_ios_char_setstate(base, state);
7419 return this;
7422 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAI@Z */
7423 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAI@Z */
7424 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint, 8)
7425 basic_istream_char* __thiscall basic_istream_char_read_uint(basic_istream_char *this, unsigned int *v)
7427 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7428 int state = IOSTATE_goodbit;
7430 TRACE("(%p %p)\n", this, v);
7432 if(basic_istream_char_sentry_create(this, FALSE)) {
7433 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7434 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7435 istreambuf_iterator_char first={0}, last={0};
7437 first.strbuf = strbuf;
7438 num_get_char_get_uint(numget, &last, first, last, &base->base, &state, v);
7440 basic_istream_char_sentry_destroy(this);
7442 basic_ios_char_setstate(base, state);
7443 return this;
7446 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAJ@Z */
7447 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAJ@Z */
7448 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_long, 8)
7449 basic_istream_char* __thiscall basic_istream_char_read_long(basic_istream_char *this, LONG *v)
7451 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7452 int state = IOSTATE_goodbit;
7454 TRACE("(%p %p)\n", this, v);
7456 if(basic_istream_char_sentry_create(this, FALSE)) {
7457 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7458 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7459 istreambuf_iterator_char first={0}, last={0};
7461 first.strbuf = strbuf;
7462 num_get_char_get_long(numget, &last, first, last, &base->base, &state, v);
7464 basic_istream_char_sentry_destroy(this);
7466 basic_ios_char_setstate(base, state);
7467 return this;
7470 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAK@Z */
7471 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAK@Z */
7472 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ulong, 8)
7473 basic_istream_char* __thiscall basic_istream_char_read_ulong(basic_istream_char *this, ULONG *v)
7475 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7476 int state = IOSTATE_goodbit;
7478 TRACE("(%p %p)\n", this, v);
7480 if(basic_istream_char_sentry_create(this, FALSE)) {
7481 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7482 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7483 istreambuf_iterator_char first={0}, last={0};
7485 first.strbuf = strbuf;
7486 num_get_char_get_ulong(numget, &last, first, last, &base->base, &state, v);
7488 basic_istream_char_sentry_destroy(this);
7490 basic_ios_char_setstate(base, state);
7491 return this;
7494 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAM@Z */
7495 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAM@Z */
7496 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_float, 8)
7497 basic_istream_char* __thiscall basic_istream_char_read_float(basic_istream_char *this, float *v)
7499 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7500 int state = IOSTATE_goodbit;
7502 TRACE("(%p %p)\n", this, v);
7504 if(basic_istream_char_sentry_create(this, FALSE)) {
7505 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7506 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7507 istreambuf_iterator_char first={0}, last={0};
7509 first.strbuf = strbuf;
7510 num_get_char_get_float(numget, &last, first, last, &base->base, &state, v);
7512 basic_istream_char_sentry_destroy(this);
7514 basic_ios_char_setstate(base, state);
7515 return this;
7518 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAN@Z */
7519 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAN@Z */
7520 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_double, 8)
7521 basic_istream_char* __thiscall basic_istream_char_read_double(basic_istream_char *this, double *v)
7523 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7524 int state = IOSTATE_goodbit;
7526 TRACE("(%p %p)\n", this, v);
7528 if(basic_istream_char_sentry_create(this, FALSE)) {
7529 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7530 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7531 istreambuf_iterator_char first={0}, last={0};
7533 first.strbuf = strbuf;
7534 num_get_char_get_double(numget, &last, first, last, &base->base, &state, v);
7536 basic_istream_char_sentry_destroy(this);
7538 basic_ios_char_setstate(base, state);
7539 return this;
7542 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAO@Z */
7543 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAO@Z */
7544 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ldouble, 8)
7545 basic_istream_char* __thiscall basic_istream_char_read_ldouble(basic_istream_char *this, double *v)
7547 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7548 int state = IOSTATE_goodbit;
7550 TRACE("(%p %p)\n", this, v);
7552 if(basic_istream_char_sentry_create(this, FALSE)) {
7553 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7554 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7555 istreambuf_iterator_char first={0}, last={0};
7557 first.strbuf = strbuf;
7558 num_get_char_get_ldouble(numget, &last, first, last, &base->base, &state, v);
7560 basic_istream_char_sentry_destroy(this);
7562 basic_ios_char_setstate(base, state);
7563 return this;
7566 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AAPAX@Z */
7567 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
7568 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_ptr, 8)
7569 basic_istream_char* __thiscall basic_istream_char_read_ptr(basic_istream_char *this, void **v)
7571 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7572 int state = IOSTATE_goodbit;
7574 TRACE("(%p %p)\n", this, v);
7576 if(basic_istream_char_sentry_create(this, FALSE)) {
7577 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7578 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7579 istreambuf_iterator_char first={0}, last={0};
7581 first.strbuf = strbuf;
7582 num_get_char_get_void(numget, &last, first, last, &base->base, &state, v);
7584 basic_istream_char_sentry_destroy(this);
7586 basic_ios_char_setstate(base, state);
7587 return this;
7590 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_J@Z */
7591 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_J@Z */
7592 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_int64, 8)
7593 basic_istream_char* __thiscall basic_istream_char_read_int64(basic_istream_char *this, __int64 *v)
7595 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7596 int state = IOSTATE_goodbit;
7598 TRACE("(%p %p)\n", this, v);
7600 if(basic_istream_char_sentry_create(this, FALSE)) {
7601 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7602 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7603 istreambuf_iterator_char first={0}, last={0};
7605 first.strbuf = strbuf;
7606 num_get_char_get_int64(numget, &last, first, last, &base->base, &state, v);
7608 basic_istream_char_sentry_destroy(this);
7610 basic_ios_char_setstate(base, state);
7611 return this;
7614 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z */
7615 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_K@Z */
7616 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_uint64, 8)
7617 basic_istream_char* __thiscall basic_istream_char_read_uint64(basic_istream_char *this, unsigned __int64 *v)
7619 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7620 int state = IOSTATE_goodbit;
7622 TRACE("(%p %p)\n", this, v);
7624 if(basic_istream_char_sentry_create(this, FALSE)) {
7625 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7626 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7627 istreambuf_iterator_char first={0}, last={0};
7629 first.strbuf = strbuf;
7630 num_get_char_get_uint64(numget, &last, first, last, &base->base, &state, v);
7632 basic_istream_char_sentry_destroy(this);
7634 basic_ios_char_setstate(base, state);
7635 return this;
7638 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_N@Z */
7639 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@AEA_N@Z */
7640 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_bool, 8)
7641 basic_istream_char* __thiscall basic_istream_char_read_bool(basic_istream_char *this, MSVCP_bool *v)
7643 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7644 int state = IOSTATE_goodbit;
7646 TRACE("(%p %p)\n", this, v);
7648 if(basic_istream_char_sentry_create(this, FALSE)) {
7649 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7650 const num_get *numget = num_get_char_use_facet(&strbuf->loc);
7651 istreambuf_iterator_char first={0}, last={0};
7653 first.strbuf = strbuf;
7654 num_get_char_get_bool(numget, &last, first, last, &base->base, &state, v);
7656 basic_istream_char_sentry_destroy(this);
7658 basic_ios_char_setstate(base, state);
7659 return this;
7662 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
7663 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@D@Z */
7664 basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
7665 basic_istream_char *istream, basic_string_char *str, char delim)
7667 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7668 IOSB_iostate state = IOSTATE_goodbit;
7669 int c = (unsigned char)delim;
7671 TRACE("(%p %p %c)\n", istream, str, delim);
7673 basic_string_char_clear(str);
7674 if(basic_istream_char_sentry_create(istream, TRUE)) {
7675 basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
7677 c = basic_streambuf_char_sgetc(strbuf);
7678 for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
7679 basic_string_char_append_ch(str, c);
7680 if(c==EOF) state |= IOSTATE_eofbit;
7681 else if(c==(unsigned char)delim) basic_streambuf_char_sbumpc(strbuf);
7683 if(!basic_string_char_length(str) && c!=(unsigned char)delim) state |= IOSTATE_failbit;
7685 basic_istream_char_sentry_destroy(istream);
7687 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream), state);
7688 return istream;
7691 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
7692 /* ??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
7693 basic_istream_char* __cdecl basic_istream_char_getline_bstr(
7694 basic_istream_char *istream, basic_string_char *str)
7696 return basic_istream_char_getline_bstr_delim(istream, str, '\n');
7699 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
7700 /* ??$?5DU?$char_traits@D@std@@V?$allocator@D@1@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z */
7701 basic_istream_char* __cdecl basic_istream_char_read_bstr(
7702 basic_istream_char *istream, basic_string_char *str)
7704 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7705 IOSB_iostate state = IOSTATE_failbit;
7706 int c = '\n';
7708 TRACE("(%p %p)\n", istream, str);
7710 if(basic_istream_char_sentry_create(istream, FALSE)) {
7711 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7712 MSVCP_size_t count = ios_base_width_get(&base->base);
7714 if(!count)
7715 count = -1;
7717 basic_string_char_clear(str);
7719 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7720 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7721 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7722 state = IOSTATE_goodbit;
7723 basic_string_char_append_ch(str, c);
7726 basic_istream_char_sentry_destroy(istream);
7728 ios_base_width_set(&base->base, 0);
7729 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7730 return istream;
7733 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAD@Z */
7734 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAD@Z */
7735 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAC@Z */
7736 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAC@Z */
7737 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@PAE@Z */
7738 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@PEAE@Z */
7739 basic_istream_char* __cdecl basic_istream_char_read_str(basic_istream_char *istream, char *str)
7741 basic_ios_char *base = basic_istream_char_get_basic_ios(istream);
7742 IOSB_iostate state = IOSTATE_failbit;
7743 int c = '\n';
7745 TRACE("(%p %p)\n", istream, str);
7747 if(basic_istream_char_sentry_create(istream, FALSE)) {
7748 const ctype_char *ctype = ctype_char_use_facet(&base->strbuf->loc);
7749 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
7751 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base));
7752 c!=EOF && !ctype_char_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
7753 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base)), count--) {
7754 state = IOSTATE_goodbit;
7755 *str++ = c;
7758 basic_istream_char_sentry_destroy(istream);
7760 *str = 0;
7761 ios_base_width_set(&base->base, 0);
7762 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7763 return istream;
7766 /* ??$?5DU?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAD@Z */
7767 /* ??$?5DU?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAD@Z */
7768 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAC@Z */
7769 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAC@Z */
7770 /* ??$?5U?$char_traits@D@std@@@std@@YAAAV?$basic_istream@DU?$char_traits@D@std@@@0@AAV10@AAE@Z */
7771 /* ??$?5U?$char_traits@D@std@@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAE@Z */
7772 basic_istream_char* __cdecl basic_istream_char_read_ch(basic_istream_char *istream, char *ch)
7774 IOSB_iostate state = IOSTATE_failbit;
7775 int c = 0;
7777 TRACE("(%p %p)\n", istream, ch);
7779 if(basic_istream_char_sentry_create(istream, FALSE)) {
7780 c = basic_streambuf_char_sbumpc(basic_ios_char_rdbuf_get(
7781 basic_istream_char_get_basic_ios(istream)));
7782 if(c != EOF) {
7783 state = IOSTATE_goodbit;
7784 *ch = c;
7787 basic_istream_char_sentry_destroy(istream);
7789 basic_ios_char_setstate(basic_istream_char_get_basic_ios(istream),
7790 state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7791 return istream;
7794 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7795 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
7796 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_streambuf, 8)
7797 basic_istream_char* __thiscall basic_istream_char_read_streambuf(
7798 basic_istream_char *this, basic_streambuf_char *streambuf)
7800 basic_ios_char *base = basic_istream_char_get_basic_ios(this);
7801 IOSB_iostate state = IOSTATE_failbit;
7802 int c = '\n';
7804 TRACE("(%p %p)\n", this, streambuf);
7806 if(basic_istream_char_sentry_create(this, FALSE)) {
7807 for(c = basic_streambuf_char_sgetc(basic_ios_char_rdbuf_get(base)); c!=EOF;
7808 c = basic_streambuf_char_snextc(basic_ios_char_rdbuf_get(base))) {
7809 state = IOSTATE_goodbit;
7810 if(basic_streambuf_char_sputc(streambuf, c) == EOF)
7811 break;
7814 basic_istream_char_sentry_destroy(this);
7816 basic_ios_char_setstate(base, state | (c==EOF ? IOSTATE_eofbit : IOSTATE_goodbit));
7817 return this;
7820 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
7821 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
7822 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func, 8)
7823 basic_istream_char* __thiscall basic_istream_char_read_func(basic_istream_char *this,
7824 basic_istream_char* (__cdecl *pfunc)(basic_istream_char*))
7826 TRACE("(%p %p)\n", this, pfunc);
7827 pfunc(this);
7828 return this;
7831 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@DU?$char_traits@D@std@@@1@AAV21@@Z@Z */
7832 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@DU?$char_traits@D@std@@@1@AEAV21@@Z@Z */
7833 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_basic_ios, 8)
7834 basic_istream_char* __thiscall basic_istream_char_read_func_basic_ios(basic_istream_char *this,
7835 basic_ios_char* (__cdecl *pfunc)(basic_ios_char*))
7837 TRACE("(%p %p)\n", this, pfunc);
7838 pfunc(basic_istream_char_get_basic_ios(this));
7839 return this;
7842 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
7843 /* ??5?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
7844 DEFINE_THISCALL_WRAPPER(basic_istream_char_read_func_ios_base, 8)
7845 basic_istream_char* __thiscall basic_istream_char_read_func_ios_base(basic_istream_char *this,
7846 ios_base* (__cdecl *pfunc)(ios_base*))
7848 TRACE("(%p %p)\n", this, pfunc);
7849 pfunc(&basic_istream_char_get_basic_ios(this)->base);
7850 return this;
7853 /* Caution: basic_istream uses virtual inheritance. */
7854 static inline basic_ios_wchar* basic_istream_wchar_get_basic_ios(basic_istream_wchar *this)
7856 return (basic_ios_wchar*)((char*)this+this->vbtable[1]);
7859 static inline basic_ios_wchar* basic_istream_wchar_to_basic_ios(basic_istream_wchar *ptr)
7861 return (basic_ios_wchar*)((char*)ptr+basic_istream_wchar_vbtable[1]);
7864 static inline basic_istream_wchar* basic_istream_wchar_from_basic_ios(basic_ios_wchar *ptr)
7866 return (basic_istream_wchar*)((char*)ptr-basic_istream_wchar_vbtable[1]);
7869 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7870 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N1@Z */
7871 static basic_istream_wchar* basic_istream_wchar_ctor_init(basic_istream_wchar *this,
7872 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7874 basic_ios_wchar *base;
7876 TRACE("(%p %p %d %d %d)\n", this, strbuf, isstd, noinit, virt_init);
7878 if(virt_init) {
7879 this->vbtable = basic_istream_wchar_vbtable;
7880 base = basic_istream_wchar_get_basic_ios(this);
7881 basic_ios_wchar_ctor(base);
7882 }else {
7883 base = basic_istream_wchar_get_basic_ios(this);
7886 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7887 this->count = 0;
7888 if(!noinit)
7889 basic_ios_wchar_init(base, strbuf, isstd);
7890 return this;
7893 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7894 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N1@Z */
7895 static basic_istream_wchar* basic_istream_short_ctor_init(basic_istream_wchar *this,
7896 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool noinit, MSVCP_bool virt_init)
7898 basic_istream_wchar_ctor_init(this, strbuf, isstd, noinit, virt_init);
7899 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7900 return this;
7903 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7904 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@_N@Z */
7905 static basic_istream_wchar* basic_istream_wchar_ctor(basic_istream_wchar *this,
7906 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7908 return basic_istream_wchar_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7911 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7912 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@_N@Z */
7913 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor, 16)
7914 basic_istream_wchar* __thiscall basic_istream_short_ctor(basic_istream_wchar *this,
7915 basic_streambuf_wchar *strbuf, MSVCP_bool isstd, MSVCP_bool virt_init)
7917 return basic_istream_short_ctor_init(this, strbuf, isstd, FALSE, virt_init);
7920 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7921 /* ??0?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7922 static basic_istream_wchar* basic_istream_wchar_ctor_uninitialized(
7923 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7925 basic_ios_wchar *base;
7927 TRACE("(%p %d %d)\n", this, uninitialized, virt_init);
7929 if(virt_init) {
7930 this->vbtable = basic_istream_wchar_vbtable;
7931 base = basic_istream_wchar_get_basic_ios(this);
7932 basic_ios_wchar_ctor(base);
7933 }else {
7934 base = basic_istream_wchar_get_basic_ios(this);
7937 base->base.vtable = &MSVCP_basic_istream_wchar_vtable;
7938 ios_base_Addstd(&base->base);
7939 return this;
7942 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QAE@W4_Uninitialized@1@@Z */
7943 /* ??0?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA@W4_Uninitialized@1@@Z */
7944 DEFINE_THISCALL_WRAPPER(basic_istream_short_ctor_uninitialized, 12)
7945 basic_istream_wchar* __thiscall basic_istream_short_ctor_uninitialized(
7946 basic_istream_wchar *this, int uninitialized, MSVCP_bool virt_init)
7948 basic_istream_wchar_ctor_uninitialized(this, uninitialized, virt_init);
7949 basic_istream_wchar_get_basic_ios(this)->base.vtable = &MSVCP_basic_istream_short_vtable;
7950 return this;
7953 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
7954 /* ??1?$basic_istream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
7955 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UAE@XZ */
7956 /* ??1?$basic_istream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
7957 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_dtor, 4)
7958 void __thiscall basic_istream_wchar_dtor(basic_ios_wchar *base)
7960 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7962 /* don't destroy virtual base here */
7963 TRACE("(%p)\n", this);
7966 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
7967 /* ??_D?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
7968 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
7969 /* ??_D?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
7970 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vbase_dtor, 4)
7971 void __thiscall basic_istream_wchar_vbase_dtor(basic_istream_wchar *this)
7973 TRACE("(%p)\n", this);
7974 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(this));
7975 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(this));
7978 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_vector_dtor, 8)
7979 basic_istream_wchar* __thiscall basic_istream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
7981 basic_istream_wchar *this = basic_istream_wchar_from_basic_ios(base);
7983 TRACE("(%p %x)\n", this, flags);
7985 if(flags & 2) {
7986 /* we have an array, with the number of elements stored before the first object */
7987 INT_PTR i, *ptr = (INT_PTR *)this-1;
7989 for(i=*ptr-1; i>=0; i--)
7990 basic_istream_wchar_vbase_dtor(this+i);
7991 MSVCRT_operator_delete(ptr);
7992 } else {
7993 basic_istream_wchar_vbase_dtor(this);
7994 if(flags & 1)
7995 MSVCRT_operator_delete(this);
7998 return this;
8001 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8002 /* ?_Ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8003 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8004 /* ?_Ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8005 static MSVCP_bool basic_istream_wchar__Ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8007 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8009 TRACE("(%p %d)\n", this, noskip);
8011 if(ios_base_good(&base->base)) {
8012 if(basic_ios_wchar_tie_get(base))
8013 basic_ostream_wchar_flush(basic_ios_wchar_tie_get(base));
8015 if(!noskip && (ios_base_flags_get(&base->base) & FMTFLAG_skipws)) {
8016 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8017 const ctype_wchar *ctype = ctype_wchar_use_facet(&base->strbuf->loc);
8018 int ch;
8020 for(ch = basic_streambuf_wchar_sgetc(strbuf); ;
8021 ch = basic_streambuf_wchar_snextc(strbuf)) {
8022 if(ch==WEOF || !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, ch))
8023 break;
8028 if(!ios_base_good(&base->base)) {
8029 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8030 return FALSE;
8032 return TRUE;
8035 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE_N_N@Z */
8036 /* ?ipfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_N_N@Z */
8037 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE_N_N@Z */
8038 /* ?ipfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_N_N@Z */
8039 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ipfx, 8)
8040 MSVCP_bool __thiscall basic_istream_wchar_ipfx(basic_istream_wchar *this, MSVCP_bool noskip)
8042 return basic_istream_wchar__Ipfx(this, noskip);
8045 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
8046 /* ?isfx@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
8047 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEXXZ */
8048 /* ?isfx@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
8049 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_isfx, 4)
8050 void __thiscall basic_istream_wchar_isfx(basic_istream_wchar *this)
8052 TRACE("(%p)\n", this);
8055 static BOOL basic_istream_wchar_sentry_create(basic_istream_wchar *istr, MSVCP_bool noskip)
8057 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8059 if(basic_ios_wchar_rdbuf_get(base))
8060 basic_streambuf_wchar__Lock(base->strbuf);
8062 return basic_istream_wchar_ipfx(istr, noskip);
8065 static void basic_istream_wchar_sentry_destroy(basic_istream_wchar *istr)
8067 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istr);
8069 if(basic_ios_wchar_rdbuf_get(base))
8070 basic_streambuf_wchar__Unlock(base->strbuf);
8073 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QBEHXZ */
8074 /* ?gcount@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEBA_JXZ */
8075 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QBEHXZ */
8076 /* ?gcount@?$basic_istream@GU?$char_traits@G@std@@@std@@QEBA_JXZ */
8077 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_gcount, 4)
8078 int __thiscall basic_istream_wchar_gcount(const basic_istream_wchar *this)
8080 TRACE("(%p)\n", this);
8081 return this->count;
8084 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8085 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8086 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8087 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8088 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get, 4)
8089 unsigned short __thiscall basic_istream_wchar_get(basic_istream_wchar *this)
8091 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8092 int ret;
8094 TRACE("(%p)\n", this);
8096 this->count = 0;
8098 if(!basic_istream_wchar_sentry_create(this, TRUE)) {
8099 basic_istream_wchar_sentry_destroy(this);
8100 return WEOF;
8103 ret = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(base));
8104 basic_istream_wchar_sentry_destroy(this);
8105 if(ret == WEOF)
8106 basic_ios_wchar_setstate(base, IOSTATE_eofbit|IOSTATE_failbit);
8107 else
8108 this->count++;
8110 return ret;
8113 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AA_W@Z */
8114 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEA_W@Z */
8115 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAG@Z */
8116 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAG@Z */
8117 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_ch, 8)
8118 basic_istream_wchar* __thiscall basic_istream_wchar_get_ch(basic_istream_wchar *this, wchar_t *ch)
8120 unsigned short ret;
8122 TRACE("(%p %p)\n", this, ch);
8124 ret = basic_istream_wchar_get(this);
8125 if(ret != WEOF)
8126 *ch = (wchar_t)ret;
8127 return this;
8130 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8131 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8132 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8133 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8134 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str_delim, 16)
8135 basic_istream_wchar* __thiscall basic_istream_wchar_get_str_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8137 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8138 unsigned short ch = delim;
8140 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8142 this->count = 0;
8144 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8145 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8147 for(ch = basic_streambuf_wchar_sgetc(strbuf); count>1;
8148 ch = basic_streambuf_wchar_snextc(strbuf)) {
8149 if(ch==WEOF || ch==delim)
8150 break;
8152 *str++ = ch;
8153 this->count++;
8154 count--;
8157 basic_istream_wchar_sentry_destroy(this);
8159 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8160 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8161 if(count > 0)
8162 *str = 0;
8163 return this;
8166 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8167 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8168 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8169 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8170 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_str, 12)
8171 basic_istream_wchar* __thiscall basic_istream_wchar_get_str(basic_istream_wchar *this, wchar_t *str, streamsize count)
8173 return basic_istream_wchar_get_str_delim(this, str, count, '\n');
8176 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8177 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@_W@Z */
8178 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8179 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@G@Z */
8180 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf_delim, 12)
8181 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf_delim(basic_istream_wchar *this, basic_streambuf_wchar *strbuf, wchar_t delim)
8183 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8184 unsigned short ch = delim;
8186 TRACE("(%p %p %c)\n", this, strbuf, delim);
8188 this->count = 0;
8190 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8191 basic_streambuf_wchar *strbuf_read = basic_ios_wchar_rdbuf_get(base);
8193 for(ch = basic_streambuf_wchar_sgetc(strbuf_read); ;
8194 ch = basic_streambuf_wchar_snextc(strbuf_read)) {
8195 if(ch==WEOF || ch==delim)
8196 break;
8198 if(basic_streambuf_wchar_sputc(strbuf, ch) == WEOF)
8199 break;
8200 this->count++;
8203 basic_istream_wchar_sentry_destroy(this);
8205 basic_ios_wchar_setstate(base, (!this->count ? IOSTATE_failbit : IOSTATE_goodbit) |
8206 (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
8207 return this;
8210 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@AAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8211 /* ?get@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@2@@Z */
8212 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@AAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8213 /* ?get@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@AEAV?$basic_streambuf@GU?$char_traits@G@std@@@2@@Z */
8214 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_get_streambuf, 8)
8215 basic_istream_wchar* __thiscall basic_istream_wchar_get_streambuf(basic_istream_wchar *this, basic_streambuf_wchar *strbuf)
8217 return basic_istream_wchar_get_streambuf_delim(this, strbuf, '\n');
8220 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH_W@Z */
8221 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J_W@Z */
8222 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGHG@Z */
8223 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_JG@Z */
8224 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline_delim, 16)
8225 basic_istream_wchar* __thiscall basic_istream_wchar_getline_delim(basic_istream_wchar *this, wchar_t *str, streamsize count, wchar_t delim)
8227 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8228 unsigned short ch = delim;
8230 TRACE("(%p %p %ld %c)\n", this, str, count, delim);
8232 this->count = 0;
8234 if(basic_istream_wchar_sentry_create(this, TRUE) && count>0) {
8235 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8237 while(count > 1) {
8238 ch = basic_streambuf_wchar_sbumpc(strbuf);
8240 if(ch==WEOF || ch==delim)
8241 break;
8243 *str++ = ch;
8244 this->count++;
8245 count--;
8248 if(ch == delim)
8249 this->count++;
8250 else if(ch != WEOF) {
8251 ch = basic_streambuf_wchar_sgetc(strbuf);
8253 if(ch == delim) {
8254 basic_streambuf_wchar__Gninc(strbuf);
8255 this->count++;
8259 basic_istream_wchar_sentry_destroy(this);
8261 basic_ios_wchar_setstate(base, (ch==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit) |
8262 (!this->count || (ch!=delim && ch!=WEOF) ? IOSTATE_failbit : IOSTATE_goodbit));
8263 if(count > 0)
8264 *str = 0;
8265 return this;
8268 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8269 /* ?getline@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8270 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8271 /* ?getline@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8272 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_getline, 12)
8273 basic_istream_wchar* __thiscall basic_istream_wchar_getline(basic_istream_wchar *this, wchar_t *str, streamsize count)
8275 return basic_istream_wchar_getline_delim(this, str, count, '\n');
8278 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@HG@Z */
8279 /* ?ignore@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_JG@Z */
8280 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@HG@Z */
8281 /* ?ignore@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JG@Z */
8282 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_ignore, 12)
8283 basic_istream_wchar* __thiscall basic_istream_wchar_ignore(basic_istream_wchar *this, streamsize count, unsigned short delim)
8285 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8286 unsigned short ch = delim;
8287 unsigned int state;
8289 TRACE("(%p %ld %d)\n", this, count, delim);
8291 this->count = 0;
8293 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8294 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8295 state = IOSTATE_goodbit;
8297 while(count > 0) {
8298 ch = basic_streambuf_wchar_sbumpc(strbuf);
8300 if(ch==WEOF) {
8301 state = IOSTATE_eofbit;
8302 break;
8305 if(ch==delim)
8306 break;
8308 this->count++;
8309 if(count != INT_MAX)
8310 count--;
8312 }else
8313 state = IOSTATE_failbit;
8314 basic_istream_wchar_sentry_destroy(this);
8316 basic_ios_wchar_setstate(base, state);
8317 return this;
8320 /* ?ws@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AAV21@@Z */
8321 /* ?ws@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@AEAV21@@Z */
8322 /* ?ws@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@1@AAV21@@Z */
8323 /* ?ws@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@1@AEAV21@@Z */
8324 basic_istream_wchar* __cdecl ws_basic_istream_wchar(basic_istream_wchar *istream)
8326 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8327 unsigned short ch = '\n';
8329 TRACE("(%p)\n", istream);
8331 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8332 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8333 const ctype_wchar *ctype = ctype_wchar_use_facet(&strbuf->loc);
8335 for(ch = basic_streambuf_wchar_sgetc(strbuf); ctype_wchar_is_ch(ctype, _SPACE, ch);
8336 ch = basic_streambuf_wchar_snextc(strbuf)) {
8337 if(ch == WEOF)
8338 break;
8341 basic_istream_wchar_sentry_destroy(istream);
8343 if(ch == WEOF)
8344 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8345 return istream;
8348 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEGXZ */
8349 /* ?peek@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAGXZ */
8350 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEGXZ */
8351 /* ?peek@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAGXZ */
8352 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_peek, 4)
8353 unsigned short __thiscall basic_istream_wchar_peek(basic_istream_wchar *this)
8355 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8356 unsigned short ret = WEOF;
8358 TRACE("(%p)\n", this);
8360 this->count = 0;
8362 if(basic_istream_wchar_sentry_create(this, TRUE))
8363 ret = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
8364 basic_istream_wchar_sentry_destroy(this);
8366 if (ret == WEOF)
8367 basic_ios_wchar_setstate(base, IOSTATE_eofbit);
8369 return ret;
8372 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WIH@Z */
8373 /* ?_Read_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_K_J@Z */
8374 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z */
8375 /* ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_K_J@Z */
8376 static basic_istream_wchar* basic_istream_wchar__Read_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8378 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8379 IOSB_iostate state = IOSTATE_goodbit;
8381 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8383 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8384 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8386 this->count = basic_streambuf_wchar__Sgetn_s(strbuf, str, size, count);
8387 if(this->count != count)
8388 state |= IOSTATE_failbit | IOSTATE_eofbit;
8389 }else {
8390 this->count = 0;
8392 basic_istream_wchar_sentry_destroy(this);
8394 basic_ios_wchar_setstate(base, state);
8395 return this;
8398 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@PA_WH@Z */
8399 /* ?read@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@PEA_W_J@Z */
8400 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGH@Z */
8401 /* ?read@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@PEAG_J@Z */
8402 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read, 12)
8403 basic_istream_wchar* __thiscall basic_istream_wchar_read(basic_istream_wchar *this, wchar_t *str, streamsize count)
8405 return basic_istream_wchar__Read_s(this, str, -1, count);
8408 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WIH@Z */
8409 /* ?_Readsome_s@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_K_J@Z */
8410 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGIH@Z */
8411 /* ?_Readsome_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_K_J@Z */
8412 static streamsize basic_istream_wchar__Readsome_s(basic_istream_wchar *this, wchar_t *str, MSVCP_size_t size, streamsize count)
8414 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8415 IOSB_iostate state = IOSTATE_goodbit;
8417 TRACE("(%p %p %lu %ld)\n", this, str, size, count);
8419 this->count = 0;
8421 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8422 streamsize avail = basic_streambuf_wchar_in_avail(basic_ios_wchar_rdbuf_get(base));
8423 if(avail > count)
8424 avail = count;
8426 if(avail == -1)
8427 state |= IOSTATE_eofbit;
8428 else if(avail > 0)
8429 basic_istream_wchar__Read_s(this, str, size, avail);
8430 }else {
8431 state |= IOSTATE_failbit;
8433 basic_istream_wchar_sentry_destroy(this);
8435 basic_ios_wchar_setstate(base, state);
8436 return this->count;
8439 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHPA_WH@Z */
8440 /* ?readsome@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA_JPEA_W_J@Z */
8441 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z */
8442 /* ?readsome@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z */
8443 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_readsome, 12)
8444 streamsize __thiscall basic_istream_wchar_readsome(basic_istream_wchar *this, wchar_t *str, streamsize count)
8446 return basic_istream_wchar__Readsome_s(this, str, count, count);
8449 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@_W@Z */
8450 /* ?putback@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@_W@Z */
8451 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@G@Z */
8452 /* ?putback@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@G@Z */
8453 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_putback, 8)
8454 basic_istream_wchar* __thiscall basic_istream_wchar_putback(basic_istream_wchar *this, wchar_t ch)
8456 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8457 IOSB_iostate state = IOSTATE_goodbit;
8459 TRACE("(%p %c)\n", this, ch);
8461 this->count = 0;
8463 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8464 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8466 if(!ios_base_good(&base->base))
8467 state |= IOSTATE_failbit;
8468 else if(!strbuf || basic_streambuf_wchar_sputbackc(strbuf, ch)==WEOF)
8469 state |= IOSTATE_badbit;
8471 basic_istream_wchar_sentry_destroy(this);
8473 basic_ios_wchar_setstate(base, state);
8474 return this;
8477 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@XZ */
8478 /* ?unget@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@XZ */
8479 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@XZ */
8480 /* ?unget@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@XZ */
8481 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_unget, 4)
8482 basic_istream_wchar* __thiscall basic_istream_wchar_unget(basic_istream_wchar *this)
8484 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8485 IOSB_iostate state = IOSTATE_goodbit;
8487 TRACE("(%p)\n", this);
8489 this->count = 0;
8491 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8492 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8494 if(!ios_base_good(&base->base))
8495 state |= IOSTATE_failbit;
8496 else if(!strbuf || basic_streambuf_wchar_sungetc(strbuf)==WEOF)
8497 state |= IOSTATE_badbit;
8499 basic_istream_wchar_sentry_destroy(this);
8501 basic_ios_wchar_setstate(base, state);
8502 return this;
8505 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEHXZ */
8506 /* ?sync@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAHXZ */
8507 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEHXZ */
8508 /* ?sync@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAHXZ */
8509 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_sync, 4)
8510 int __thiscall basic_istream_wchar_sync(basic_istream_wchar *this)
8512 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8513 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8515 TRACE("(%p)\n", this);
8517 if(!strbuf)
8518 return -1;
8520 if(basic_istream_wchar_sentry_create(this, TRUE)) {
8521 if(basic_streambuf_wchar_pubsync(strbuf) != -1) {
8522 basic_istream_wchar_sentry_destroy(this);
8523 return 0;
8526 basic_istream_wchar_sentry_destroy(this);
8528 basic_ios_wchar_setstate(base, IOSTATE_badbit);
8529 return -1;
8532 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8533 /* ?tellg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8534 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAE?AV?$fpos@H@2@XZ */
8535 /* ?tellg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAA?AV?$fpos@H@2@XZ */
8536 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_tellg, 8)
8537 fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_int *ret)
8539 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8541 TRACE("(%p %p)\n", this, ret);
8543 if(ios_base_fail(&base->base)) {
8544 ret->off = -1;
8545 ret->pos = 0;
8546 ret->state = 0;
8547 return ret;
8550 basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
8551 ret, 0, SEEKDIR_cur, OPENMODE_in);
8552 if(ret->off==-1 && ret->pos==0 && ret->state==0)
8553 basic_ios_wchar_setstate(base, IOSTATE_failbit);
8555 return ret;
8558 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@JW4seekdir@ios_base@2@@Z */
8559 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@_JW4seekdir@ios_base@2@@Z */
8560 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg, 12)
8561 basic_istream_wchar* __thiscall basic_istream_wchar_seekg(basic_istream_wchar *this, streamoff off, int dir)
8563 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8565 TRACE("(%p %ld %d)\n", this, off, dir);
8567 if(!ios_base_fail(&base->base)) {
8568 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8569 fpos_int ret;
8571 basic_streambuf_wchar_pubseekoff(strbuf, &ret, off, dir, OPENMODE_in);
8574 return this;
8577 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8578 /* ?seekg@?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8579 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@V?$fpos@H@2@@Z */
8580 /* ?seekg@?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV12@V?$fpos@H@2@@Z */
8581 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_seekg_fpos, 28)
8582 basic_istream_wchar* __thiscall basic_istream_wchar_seekg_fpos(basic_istream_wchar *this, fpos_int pos)
8584 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8586 TRACE("(%p %s)\n", this, debugstr_fpos_int(&pos));
8588 if(!ios_base_fail(&base->base)) {
8589 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8590 fpos_int ret;
8592 basic_streambuf_wchar_pubseekpos(strbuf, &ret, pos, OPENMODE_in);
8595 return this;
8598 static basic_istream_wchar* basic_istream_read_short(basic_istream_wchar *this, short *v, const num_get *numget)
8600 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8601 int state = IOSTATE_goodbit;
8603 TRACE("(%p %p)\n", this, v);
8605 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8606 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8607 istreambuf_iterator_wchar first={0}, last={0};
8608 LONG tmp;
8610 first.strbuf = strbuf;
8611 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, &tmp);
8613 if(!(state&IOSTATE_failbit) && tmp==(LONG)((short)tmp))
8614 *v = tmp;
8615 else
8616 state |= IOSTATE_failbit;
8618 basic_istream_wchar_sentry_destroy(this);
8620 basic_ios_wchar_setstate(base, state);
8621 return this;
8624 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAF@Z */
8625 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAF@Z */
8626 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_short, 8)
8627 basic_istream_wchar* __thiscall basic_istream_short_read_short(basic_istream_wchar *this, short *v)
8629 return basic_istream_read_short(this, v, num_get_short_use_facet(
8630 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8633 static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, int *v, const num_get *numget)
8635 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8636 int state = IOSTATE_goodbit;
8638 TRACE("(%p %p)\n", this, v);
8640 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8641 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8642 istreambuf_iterator_wchar first={0}, last={0};
8644 first.strbuf = strbuf;
8645 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8647 basic_istream_wchar_sentry_destroy(this);
8649 basic_ios_wchar_setstate(base, state);
8650 return this;
8653 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAH@Z */
8654 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAH@Z */
8655 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int, 8)
8656 basic_istream_wchar* __thiscall basic_istream_short_read_int(basic_istream_wchar *this, int *v)
8658 return basic_istream_read_int(this, v, num_get_short_use_facet(
8659 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8662 static basic_istream_wchar* basic_istream_read_uint(basic_istream_wchar *this, unsigned int *v, const num_get *numget)
8664 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8665 int state = IOSTATE_goodbit;
8667 TRACE("(%p %p)\n", this, v);
8669 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8670 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8671 istreambuf_iterator_wchar first={0}, last={0};
8673 first.strbuf = strbuf;
8674 num_get_wchar_get_uint(numget, &last, first, last, &base->base, &state, v);
8676 basic_istream_wchar_sentry_destroy(this);
8678 basic_ios_wchar_setstate(base, state);
8679 return this;
8682 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAI@Z */
8683 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAI@Z */
8684 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint, 8)
8685 basic_istream_wchar* __thiscall basic_istream_short_read_uint(basic_istream_wchar *this, unsigned int *v)
8687 return basic_istream_read_uint(this, v, num_get_short_use_facet(
8688 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8691 static basic_istream_wchar* basic_istream_read_long(basic_istream_wchar *this, LONG *v, const num_get *numget)
8693 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8694 int state = IOSTATE_goodbit;
8696 TRACE("(%p %p)\n", this, v);
8698 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8699 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8700 istreambuf_iterator_wchar first={0}, last={0};
8702 first.strbuf = strbuf;
8703 num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v);
8705 basic_istream_wchar_sentry_destroy(this);
8707 basic_ios_wchar_setstate(base, state);
8708 return this;
8711 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@AAJ@Z */
8712 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@AEAJ@Z */
8713 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_long, 8)
8714 basic_istream_wchar* __thiscall basic_istream_short_read_long(basic_istream_wchar *this, LONG *v)
8716 return basic_istream_read_long(this, v, num_get_short_use_facet(
8717 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8720 static basic_istream_wchar* basic_istream_read_ulong(basic_istream_wchar *this, ULONG *v, const num_get *numget)
8722 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8723 int state = IOSTATE_goodbit;
8725 TRACE("(%p %p)\n", this, v);
8727 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8728 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8729 istreambuf_iterator_wchar first={0}, last={0};
8731 first.strbuf = strbuf;
8732 num_get_wchar_get_ulong(numget, &last, first, last, &base->base, &state, v);
8734 basic_istream_wchar_sentry_destroy(this);
8736 basic_ios_wchar_setstate(base, state);
8737 return this;
8740 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAK@Z */
8741 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAK@Z */
8742 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ulong, 8)
8743 basic_istream_wchar* __thiscall basic_istream_short_read_ulong(basic_istream_wchar *this, ULONG *v)
8745 return basic_istream_read_ulong(this, v, num_get_short_use_facet(
8746 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8749 static basic_istream_wchar* basic_istream_read_float(basic_istream_wchar *this, float *v, const num_get *numget)
8751 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8752 int state = IOSTATE_goodbit;
8754 TRACE("(%p %p)\n", this, v);
8756 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8757 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8758 istreambuf_iterator_wchar first={0}, last={0};
8760 first.strbuf = strbuf;
8761 num_get_wchar_get_float(numget, &last, first, last, &base->base, &state, v);
8763 basic_istream_wchar_sentry_destroy(this);
8765 basic_ios_wchar_setstate(base, state);
8766 return this;
8769 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAM@Z */
8770 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAM@Z */
8771 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_float, 8)
8772 basic_istream_wchar* __thiscall basic_istream_short_read_float(basic_istream_wchar *this, float *v)
8774 return basic_istream_read_float(this, v, num_get_short_use_facet(
8775 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8778 static basic_istream_wchar* basic_istream_read_double(basic_istream_wchar *this, double *v, const num_get *numget)
8780 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8781 int state = IOSTATE_goodbit;
8783 TRACE("(%p %p)\n", this, v);
8785 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8786 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8787 istreambuf_iterator_wchar first={0}, last={0};
8789 first.strbuf = strbuf;
8790 num_get_wchar_get_double(numget, &last, first, last, &base->base, &state, v);
8792 basic_istream_wchar_sentry_destroy(this);
8794 basic_ios_wchar_setstate(base, state);
8795 return this;
8798 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAN@Z */
8799 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAN@Z */
8800 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_double, 8)
8801 basic_istream_wchar* __thiscall basic_istream_short_read_double(basic_istream_wchar *this, double *v)
8803 return basic_istream_read_double(this, v, num_get_short_use_facet(
8804 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8807 static basic_istream_wchar* basic_istream_read_ldouble(basic_istream_wchar *this, double *v, const num_get *numget)
8809 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8810 int state = IOSTATE_goodbit;
8812 TRACE("(%p %p)\n", this, v);
8814 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8815 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8816 istreambuf_iterator_wchar first={0}, last={0};
8818 first.strbuf = strbuf;
8819 num_get_wchar_get_ldouble(numget, &last, first, last, &base->base, &state, v);
8821 basic_istream_wchar_sentry_destroy(this);
8823 basic_ios_wchar_setstate(base, state);
8824 return this;
8827 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAO@Z */
8828 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAO@Z */
8829 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ldouble, 8)
8830 basic_istream_wchar* __thiscall basic_istream_short_read_ldouble(basic_istream_wchar *this, double *v)
8832 return basic_istream_read_ldouble(this, v, num_get_short_use_facet(
8833 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8836 static basic_istream_wchar* basic_istream_read_ptr(basic_istream_wchar *this, void **v, const num_get *numget)
8838 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8839 int state = IOSTATE_goodbit;
8841 TRACE("(%p %p)\n", this, v);
8843 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8844 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8845 istreambuf_iterator_wchar first={0}, last={0};
8847 first.strbuf = strbuf;
8848 num_get_wchar_get_void(numget, &last, first, last, &base->base, &state, v);
8850 basic_istream_wchar_sentry_destroy(this);
8852 basic_ios_wchar_setstate(base, state);
8853 return this;
8856 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AAPAX@Z */
8857 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEAPEAX@Z */
8858 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_ptr, 8)
8859 basic_istream_wchar* __thiscall basic_istream_short_read_ptr(basic_istream_wchar *this, void **v)
8861 return basic_istream_read_ptr(this, v, num_get_short_use_facet(
8862 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8865 static basic_istream_wchar* basic_istream_read_int64(basic_istream_wchar *this, __int64 *v, const num_get *numget)
8867 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8868 int state = IOSTATE_goodbit;
8870 TRACE("(%p %p)\n", this, v);
8872 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8873 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8874 istreambuf_iterator_wchar first={0}, last={0};
8876 first.strbuf = strbuf;
8877 num_get_wchar_get_int64(numget, &last, first, last, &base->base, &state, v);
8879 basic_istream_wchar_sentry_destroy(this);
8881 basic_ios_wchar_setstate(base, state);
8882 return this;
8885 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_J@Z */
8886 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_J@Z */
8887 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_int64, 8)
8888 basic_istream_wchar* __thiscall basic_istream_short_read_int64(basic_istream_wchar *this, __int64 *v)
8890 return basic_istream_read_int64(this, v, num_get_short_use_facet(
8891 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8894 static basic_istream_wchar* basic_istream_read_uint64(basic_istream_wchar *this, unsigned __int64 *v, const num_get *numget)
8896 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8897 int state = IOSTATE_goodbit;
8899 TRACE("(%p %p)\n", this, v);
8901 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8902 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8903 istreambuf_iterator_wchar first={0}, last={0};
8905 first.strbuf = strbuf;
8906 num_get_wchar_get_uint64(numget, &last, first, last, &base->base, &state, v);
8908 basic_istream_wchar_sentry_destroy(this);
8910 basic_ios_wchar_setstate(base, state);
8911 return this;
8914 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_K@Z */
8915 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_K@Z */
8916 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_uint64, 8)
8917 basic_istream_wchar* __thiscall basic_istream_short_read_uint64(basic_istream_wchar *this, unsigned __int64 *v)
8919 return basic_istream_read_uint64(this, v, num_get_short_use_facet(
8920 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8923 static basic_istream_wchar* basic_istream_read_bool(basic_istream_wchar *this, MSVCP_bool *v, const num_get *numget)
8925 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
8926 int state = IOSTATE_goodbit;
8928 TRACE("(%p %p)\n", this, v);
8930 if(basic_istream_wchar_sentry_create(this, FALSE)) {
8931 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8932 istreambuf_iterator_wchar first={0}, last={0};
8934 first.strbuf = strbuf;
8935 num_get_wchar_get_bool(numget, &last, first, last, &base->base, &state, v);
8937 basic_istream_wchar_sentry_destroy(this);
8939 basic_ios_wchar_setstate(base, state);
8940 return this;
8943 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@AA_N@Z */
8944 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@AEA_N@Z */
8945 DEFINE_THISCALL_WRAPPER(basic_istream_short_read_bool, 8)
8946 basic_istream_wchar* __thiscall basic_istream_short_read_bool(basic_istream_wchar *this, MSVCP_bool *v)
8948 return basic_istream_read_bool(this, v, num_get_short_use_facet(
8949 &basic_istream_wchar_get_basic_ios(this)->strbuf->loc));
8952 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
8953 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@_W@Z */
8954 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */
8955 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@G@Z */
8956 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
8957 basic_istream_wchar *istream, basic_string_wchar *str, wchar_t delim)
8959 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8960 IOSB_iostate state = IOSTATE_goodbit;
8961 int c = delim;
8963 TRACE("(%p %p %c)\n", istream, str, delim);
8965 basic_string_wchar_clear(str);
8966 if(basic_istream_wchar_sentry_create(istream, TRUE)) {
8967 basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
8969 c = basic_streambuf_wchar_sgetc(strbuf);
8970 for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
8971 basic_string_wchar_append_ch(str, c);
8972 if(c==delim) basic_streambuf_wchar_sbumpc(strbuf);
8973 else if(c==WEOF) state |= IOSTATE_eofbit;
8975 if(!basic_string_wchar_length(str) && c!=delim) state |= IOSTATE_failbit;
8977 basic_istream_wchar_sentry_destroy(istream);
8979 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream), state);
8980 return istream;
8983 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
8984 /* ??$getline@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
8985 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8986 /* ??$getline@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
8987 basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr(
8988 basic_istream_wchar *istream, basic_string_wchar *str)
8990 return basic_istream_wchar_getline_bstr_delim(istream, str, '\n');
8993 static basic_istream_wchar* basic_istream_read_bstr(basic_istream_wchar *istream,
8994 basic_string_wchar *str, const ctype_wchar *ctype)
8996 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
8997 IOSB_iostate state = IOSTATE_failbit;
8998 int c = '\n';
9000 TRACE("(%p %p)\n", istream, str);
9002 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9003 MSVCP_size_t count = ios_base_width_get(&base->base);
9005 if(!count)
9006 count = -1;
9008 basic_string_wchar_clear(str);
9010 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9011 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9012 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9013 state = IOSTATE_goodbit;
9014 basic_string_wchar_append_ch(str, c);
9017 basic_istream_wchar_sentry_destroy(istream);
9019 ios_base_width_set(&base->base, 0);
9020 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9021 return istream;
9024 /* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
9025 /* ??$?5_WU?$char_traits@_W@std@@V?$allocator@_W@1@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@0@@Z */
9026 basic_istream_wchar* __cdecl basic_istream_wchar_read_bstr(
9027 basic_istream_wchar *istream, basic_string_wchar *str)
9029 return basic_istream_read_bstr(istream, str, ctype_wchar_use_facet(
9030 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9033 /* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
9034 /* ??$?5GU?$char_traits@G@std@@V?$allocator@G@1@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@0@@Z */
9035 basic_istream_wchar* __cdecl basic_istream_short_read_bstr(
9036 basic_istream_wchar *istream, basic_string_wchar *str)
9038 return basic_istream_read_bstr(istream, str, ctype_short_use_facet(
9039 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9042 static basic_istream_wchar* basic_istream_read_str(basic_istream_wchar *istream, wchar_t *str, const ctype_wchar *ctype)
9044 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(istream);
9045 IOSB_iostate state = IOSTATE_failbit;
9046 unsigned short c = '\n';
9048 TRACE("(%p %p)\n", istream, str);
9050 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9051 MSVCP_size_t count = ios_base_width_get(&base->base)-1;
9053 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base));
9054 c!=WEOF && !ctype_wchar_is_ch(ctype, _SPACE|_BLANK, c) && count>0;
9055 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base)), count--) {
9056 state = IOSTATE_goodbit;
9057 *str++ = c;
9060 basic_istream_wchar_sentry_destroy(istream);
9062 *str = 0;
9063 ios_base_width_set(&base->base, 0);
9064 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9065 return istream;
9068 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@PAG@Z */
9069 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@PEAG@Z */
9070 basic_istream_wchar* __cdecl basic_istream_short_read_str(basic_istream_wchar *istream, wchar_t *str)
9072 return basic_istream_read_str(istream, str, ctype_short_use_facet(
9073 &basic_istream_wchar_get_basic_ios(istream)->strbuf->loc));
9076 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AAV10@AA_W@Z */
9077 /* ??$?5_WU?$char_traits@_W@std@@@std@@YAAEAV?$basic_istream@_WU?$char_traits@_W@std@@@0@AEAV10@AEA_W@Z */
9078 /* ??$?5GU?$char_traits@G@std@@@std@@YAAAV?$basic_istream@GU?$char_traits@G@std@@@0@AAV10@AAG@Z */
9079 /* ??$?5GU?$char_traits@G@std@@@std@@YAAEAV?$basic_istream@GU?$char_traits@G@std@@@0@AEAV10@AEAG@Z */
9080 basic_istream_wchar* __cdecl basic_istream_wchar_read_ch(basic_istream_wchar *istream, wchar_t *ch)
9082 IOSB_iostate state = IOSTATE_failbit;
9083 unsigned short c = 0;
9085 TRACE("(%p %p)\n", istream, ch);
9087 if(basic_istream_wchar_sentry_create(istream, FALSE)) {
9088 c = basic_streambuf_wchar_sbumpc(basic_ios_wchar_rdbuf_get(
9089 basic_istream_wchar_get_basic_ios(istream)));
9090 if(c != WEOF) {
9091 state = IOSTATE_goodbit;
9092 *ch = c;
9095 basic_istream_wchar_sentry_destroy(istream);
9097 basic_ios_wchar_setstate(basic_istream_wchar_get_basic_ios(istream),
9098 state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9099 return istream;
9102 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9103 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9104 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9105 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9106 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_streambuf, 8)
9107 basic_istream_wchar* __thiscall basic_istream_wchar_read_streambuf(
9108 basic_istream_wchar *this, basic_streambuf_wchar *streambuf)
9110 basic_ios_wchar *base = basic_istream_wchar_get_basic_ios(this);
9111 IOSB_iostate state = IOSTATE_failbit;
9112 unsigned short c = '\n';
9114 TRACE("(%p %p)\n", this, streambuf);
9116 if(basic_istream_wchar_sentry_create(this, FALSE)) {
9117 for(c = basic_streambuf_wchar_sgetc(basic_ios_wchar_rdbuf_get(base)); c!=WEOF;
9118 c = basic_streambuf_wchar_snextc(basic_ios_wchar_rdbuf_get(base))) {
9119 state = IOSTATE_goodbit;
9120 if(basic_streambuf_wchar_sputc(streambuf, c) == WEOF)
9121 break;
9124 basic_istream_wchar_sentry_destroy(this);
9126 basic_ios_wchar_setstate(base, state | (c==WEOF ? IOSTATE_eofbit : IOSTATE_goodbit));
9127 return this;
9130 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9131 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9132 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z */
9133 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z */
9134 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func, 8)
9135 basic_istream_wchar* __thiscall basic_istream_wchar_read_func(basic_istream_wchar *this,
9136 basic_istream_wchar* (__cdecl *pfunc)(basic_istream_wchar*))
9138 TRACE("(%p %p)\n", this, pfunc);
9139 pfunc(this);
9140 return this;
9143 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AAV21@@Z@Z */
9144 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@_WU?$char_traits@_W@std@@@1@AEAV21@@Z@Z */
9145 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAV?$basic_ios@GU?$char_traits@G@std@@@1@AAV21@@Z@Z */
9146 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAV?$basic_ios@GU?$char_traits@G@std@@@1@AEAV21@@Z@Z */
9147 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_basic_ios, 8)
9148 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_basic_ios(basic_istream_wchar *this,
9149 basic_ios_wchar* (__cdecl *pfunc)(basic_ios_wchar*))
9151 TRACE("(%p %p)\n", this, pfunc);
9152 pfunc(basic_istream_wchar_get_basic_ios(this));
9153 return this;
9156 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9157 /* ??5?$basic_istream@_WU?$char_traits@_W@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9158 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV01@P6AAAVios_base@1@AAV21@@Z@Z */
9159 /* ??5?$basic_istream@GU?$char_traits@G@std@@@std@@QEAAAEAV01@P6AAEAVios_base@1@AEAV21@@Z@Z */
9160 DEFINE_THISCALL_WRAPPER(basic_istream_wchar_read_func_ios_base, 8)
9161 basic_istream_wchar* __thiscall basic_istream_wchar_read_func_ios_base(
9162 basic_istream_wchar *this, ios_base* (__cdecl *pfunc)(ios_base*))
9164 TRACE("(%p %p)\n", this, pfunc);
9165 pfunc(&basic_istream_wchar_get_basic_ios(this)->base);
9166 return this;
9169 static inline basic_ios_char* basic_iostream_char_to_basic_ios(basic_iostream_char *ptr)
9171 return (basic_ios_char*)((char*)ptr+basic_iostream_char_vbtable1[1]);
9174 static inline basic_iostream_char* basic_iostream_char_from_basic_ios(basic_ios_char *ptr)
9176 return (basic_iostream_char*)((char*)ptr-basic_iostream_char_vbtable1[1]);
9179 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9180 /* ??0?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@@Z */
9181 DEFINE_THISCALL_WRAPPER(basic_iostream_char_ctor, 12)
9182 basic_iostream_char* __thiscall basic_iostream_char_ctor(basic_iostream_char *this, basic_streambuf_char *strbuf, MSVCP_bool virt_init)
9184 basic_ios_char *basic_ios;
9186 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9188 if(virt_init) {
9189 this->base1.vbtable = basic_iostream_char_vbtable1;
9190 this->base2.vbtable = basic_iostream_char_vbtable2;
9191 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9192 basic_ios_char_ctor(basic_ios);
9193 }else {
9194 basic_ios = basic_istream_char_get_basic_ios(&this->base1);
9197 basic_ios->base.vtable = &MSVCP_basic_iostream_char_vtable;
9199 basic_istream_char_ctor(&this->base1, strbuf, FALSE, FALSE);
9200 basic_ostream_char_ctor(&this->base2, NULL, FALSE, FALSE, FALSE);
9201 return this;
9204 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9205 /* ??1?$basic_iostream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9206 DEFINE_THISCALL_WRAPPER(basic_iostream_char_dtor, 4)
9207 void __thiscall basic_iostream_char_dtor(basic_ios_char *base)
9209 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9211 TRACE("(%p)\n", this);
9212 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base2));
9213 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base1));
9216 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9217 /* ??_D?$basic_iostream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9218 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vbase_dtor, 4)
9219 void __thiscall basic_iostream_char_vbase_dtor(basic_iostream_char *this)
9221 TRACE("(%p)\n", this);
9222 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(this));
9223 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base1));
9226 DEFINE_THISCALL_WRAPPER(basic_iostream_char_vector_dtor, 8)
9227 basic_iostream_char* __thiscall basic_iostream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9229 basic_iostream_char *this = basic_iostream_char_from_basic_ios(base);
9231 TRACE("(%p %x)\n", this, flags);
9233 if(flags & 2) {
9234 /* we have an array, with the number of elements stored before the first object */
9235 INT_PTR i, *ptr = (INT_PTR *)this-1;
9237 for(i=*ptr-1; i>=0; i--)
9238 basic_iostream_char_vbase_dtor(this+i);
9239 MSVCRT_operator_delete(ptr);
9240 } else {
9241 basic_iostream_char_vbase_dtor(this);
9242 if(flags & 1)
9243 MSVCRT_operator_delete(this);
9246 return this;
9249 static inline basic_ios_wchar* basic_iostream_wchar_to_basic_ios(basic_iostream_wchar *ptr)
9251 return (basic_ios_wchar*)((char*)ptr+basic_iostream_wchar_vbtable1[1]);
9254 static inline basic_iostream_wchar* basic_iostream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9256 return (basic_iostream_wchar*)((char*)ptr-basic_iostream_wchar_vbtable1[1]);
9259 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAE@PAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9260 /* ??0?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAV?$basic_streambuf@_WU?$char_traits@_W@std@@@1@@Z */
9261 static basic_iostream_wchar* basic_iostream_wchar_ctor(basic_iostream_wchar *this,
9262 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9264 basic_ios_wchar *basic_ios;
9266 TRACE("(%p %p %d)\n", this, strbuf, virt_init);
9268 if(virt_init) {
9269 this->base1.vbtable = basic_iostream_wchar_vbtable1;
9270 this->base2.vbtable = basic_iostream_wchar_vbtable2;
9271 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9272 basic_ios_wchar_ctor(basic_ios);
9273 }else {
9274 basic_ios = basic_istream_wchar_get_basic_ios(&this->base1);
9277 basic_istream_wchar_ctor(&this->base1, strbuf, FALSE, FALSE);
9278 basic_ostream_short_ctor(&this->base2, NULL, FALSE, FALSE, FALSE);
9280 basic_ios->base.vtable = &MSVCP_basic_iostream_wchar_vtable;
9281 return this;
9284 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QAE@PAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9285 /* ??0?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAA@PEAV?$basic_streambuf@GU?$char_traits@G@std@@@1@@Z */
9286 DEFINE_THISCALL_WRAPPER(basic_iostream_short_ctor, 12)
9287 basic_iostream_wchar* __thiscall basic_iostream_short_ctor(basic_iostream_wchar *this,
9288 basic_streambuf_wchar *strbuf, MSVCP_bool virt_init)
9290 basic_iostream_wchar_ctor(this, strbuf, virt_init);
9291 basic_istream_wchar_get_basic_ios(&this->base1)->base.vtable = &MSVCP_basic_iostream_short_vtable;
9292 return this;
9295 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9296 /* ??1?$basic_iostream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9297 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9298 /* ??1?$basic_iostream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9299 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_dtor, 4)
9300 void __thiscall basic_iostream_wchar_dtor(basic_ios_wchar *base)
9302 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9304 TRACE("(%p)\n", this);
9305 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base2));
9306 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base1));
9309 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9310 /* ??_D?$basic_iostream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9311 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9312 /* ??_D?$basic_iostream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9313 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vbase_dtor, 4)
9314 void __thiscall basic_iostream_wchar_vbase_dtor(basic_iostream_wchar *this)
9316 TRACE("(%p)\n", this);
9317 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(this));
9318 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base1));
9321 DEFINE_THISCALL_WRAPPER(basic_iostream_wchar_vector_dtor, 8)
9322 basic_iostream_wchar* __thiscall basic_iostream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9324 basic_iostream_wchar *this = basic_iostream_wchar_from_basic_ios(base);
9326 TRACE("(%p %x)\n", this, flags);
9328 if(flags & 2) {
9329 /* we have an array, with the number of elements stored before the first object */
9330 INT_PTR i, *ptr = (INT_PTR *)this-1;
9332 for(i=*ptr-1; i>=0; i--)
9333 basic_iostream_wchar_vbase_dtor(this+i);
9334 MSVCRT_operator_delete(ptr);
9335 } else {
9336 basic_iostream_wchar_vbase_dtor(this);
9337 if(flags & 1)
9338 MSVCRT_operator_delete(this);
9341 return this;
9344 static inline basic_ios_char* basic_ofstream_char_to_basic_ios(basic_ofstream_char *ptr)
9346 return (basic_ios_char*)((char*)ptr+basic_ofstream_char_vbtable[1]);
9349 static inline basic_ofstream_char* basic_ofstream_char_from_basic_ios(basic_ios_char *ptr)
9351 return (basic_ofstream_char*)((char*)ptr-basic_ofstream_char_vbtable[1]);
9354 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9355 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9356 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor, 8)
9357 basic_ofstream_char* __thiscall basic_ofstream_char_ctor(basic_ofstream_char *this, MSVCP_bool virt_init)
9359 basic_ios_char *basic_ios;
9361 TRACE("(%p %d)\n", this, virt_init);
9363 if(virt_init) {
9364 this->base.vbtable = basic_ofstream_char_vbtable;
9365 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9366 basic_ios_char_ctor(basic_ios);
9367 }else {
9368 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9371 basic_filebuf_char_ctor(&this->filebuf);
9372 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9373 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9374 return this;
9377 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9378 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9379 static basic_ofstream_char* basic_ofstream_char_ctor_file(
9380 basic_ofstream_char *this, FILE *file, MSVCP_bool virt_init)
9382 basic_ios_char *basic_ios;
9384 TRACE("(%p %p %d)\n", this, file, virt_init);
9386 if(virt_init) {
9387 this->base.vbtable = basic_ofstream_char_vbtable;
9388 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9389 basic_ios_char_ctor(basic_ios);
9390 }else {
9391 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9394 basic_filebuf_char_ctor_file(&this->filebuf, file);
9395 basic_ostream_char_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9396 basic_ios->base.vtable = &MSVCP_basic_ofstream_char_vtable;
9397 return this;
9400 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9401 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9402 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_copy_ctor, 12)
9403 basic_ofstream_char* __thiscall basic_ofstream_char_copy_ctor(basic_ofstream_char *this,
9404 basic_ofstream_char *copy, MSVCP_bool virt_init)
9406 TRACE("(%p %p %d)\n", this, copy, virt_init);
9407 return basic_ofstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9410 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9411 /* ??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9412 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_ctor_name, 16)
9413 basic_ofstream_char* __thiscall basic_ofstream_char_ctor_name(basic_ofstream_char *this,
9414 const char *name, int mode, MSVCP_bool virt_init)
9416 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9418 basic_ofstream_char_ctor(this, virt_init);
9420 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9421 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9422 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9424 return this;
9427 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9428 /* ??1?$basic_ofstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9429 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_dtor, 4)
9430 void __thiscall basic_ofstream_char_dtor(basic_ios_char *base)
9432 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9434 TRACE("(%p)\n", this);
9436 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
9437 basic_filebuf_char_dtor(&this->filebuf);
9440 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9441 /* ??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9442 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vbase_dtor, 4)
9443 void __thiscall basic_ofstream_char_vbase_dtor(basic_ofstream_char *this)
9445 TRACE("(%p)\n", this);
9447 basic_ofstream_char_dtor(basic_ofstream_char_to_basic_ios(this));
9448 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
9451 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_vector_dtor, 8)
9452 basic_ofstream_char* __thiscall basic_ofstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9454 basic_ofstream_char *this = basic_ofstream_char_from_basic_ios(base);
9456 TRACE("(%p %x)\n", this, flags);
9458 if(flags & 2) {
9459 /* we have an array, with the number of elements stored before the first object */
9460 INT_PTR i, *ptr = (INT_PTR *)this-1;
9462 for(i=*ptr-1; i>=0; i--)
9463 basic_ofstream_char_vbase_dtor(this+i);
9464 MSVCRT_operator_delete(ptr);
9465 } else {
9466 basic_ofstream_char_vbase_dtor(this);
9467 if(flags & 1)
9468 MSVCRT_operator_delete(this);
9471 return this;
9474 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9475 /* ?close@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9476 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_close, 4)
9477 void __thiscall basic_ofstream_char_close(basic_ofstream_char *this)
9479 TRACE("(%p)\n", this);
9481 if(!basic_filebuf_char_close(&this->filebuf)) {
9482 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9483 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9487 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9488 /* ?is_open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9489 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_is_open, 4)
9490 MSVCP_bool __thiscall basic_ofstream_char_is_open(const basic_ofstream_char *this)
9492 TRACE("(%p)\n", this);
9493 return basic_filebuf_char_is_open(&this->filebuf);
9496 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9497 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9498 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open, 12)
9499 void __thiscall basic_ofstream_char_open(basic_ofstream_char *this,
9500 const char *name, int mode)
9502 TRACE("(%p %s %d)\n", this, name, mode);
9504 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9505 basic_ios_char *basic_ios = basic_ostream_char_get_basic_ios(&this->base);
9506 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9510 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9511 /* ?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9512 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_open_old, 12)
9513 void __thiscall basic_ofstream_char_open_old(basic_ofstream_char *this,
9514 const char *name, short mode)
9516 basic_ofstream_char_open(this, name, mode);
9519 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9520 /* ?rdbuf@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9521 DEFINE_THISCALL_WRAPPER(basic_ofstream_char_rdbuf, 4)
9522 basic_filebuf_char* __thiscall basic_ofstream_char_rdbuf(const basic_ofstream_char *this)
9524 TRACE("(%p)\n", this);
9525 return (basic_filebuf_char*)&this->filebuf;
9528 static inline basic_ios_wchar* basic_ofstream_wchar_to_basic_ios(basic_ofstream_wchar *ptr)
9530 return (basic_ios_wchar*)((char*)ptr+basic_ofstream_wchar_vbtable[1]);
9533 static inline basic_ofstream_wchar* basic_ofstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9535 return (basic_ofstream_wchar*)((char*)ptr-basic_ofstream_wchar_vbtable[1]);
9538 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9539 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9540 static basic_ofstream_wchar* basic_ofstream_wchar_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9542 basic_ios_wchar *basic_ios;
9544 TRACE("(%p %d)\n", this, virt_init);
9546 if(virt_init) {
9547 this->base.vbtable = basic_ofstream_wchar_vbtable;
9548 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9549 basic_ios_wchar_ctor(basic_ios);
9550 }else {
9551 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9554 basic_filebuf_wchar_ctor(&this->filebuf);
9555 basic_ostream_short_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9556 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9557 return this;
9560 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9561 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9562 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor, 8)
9563 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor(basic_ofstream_wchar *this, MSVCP_bool virt_init)
9565 basic_ofstream_wchar_ctor(this, virt_init);
9566 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9567 return this;
9570 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9571 /* ??0?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9572 static basic_ofstream_wchar* basic_ofstream_wchar_ctor_file(
9573 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9575 basic_ios_wchar *basic_ios;
9577 TRACE("(%p %p %d)\n", this, file, virt_init);
9579 if(virt_init) {
9580 this->base.vbtable = basic_ofstream_wchar_vbtable;
9581 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9582 basic_ios_wchar_ctor(basic_ios);
9583 }else {
9584 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9587 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9588 basic_ostream_short_ctor(&this->base, &this->filebuf.base, FALSE, TRUE, FALSE);
9589 basic_ios->base.vtable = &MSVCP_basic_ofstream_wchar_vtable;
9590 return this;
9593 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9594 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9595 static basic_ofstream_wchar* basic_ofstream_short_ctor_file(
9596 basic_ofstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9598 basic_ofstream_wchar_ctor_file(this, file, virt_init);
9599 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ofstream_short_vtable;
9600 return this;
9603 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
9604 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
9605 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_copy_ctor, 12)
9606 basic_ofstream_wchar* __thiscall basic_ofstream_short_copy_ctor(basic_ofstream_wchar *this,
9607 basic_ofstream_wchar *copy, MSVCP_bool virt_init)
9609 TRACE("(%p %p %d)\n", this, copy, virt_init);
9610 return basic_ofstream_short_ctor_file(this, copy->filebuf.file, virt_init);
9613 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
9614 /* ??0?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
9615 DEFINE_THISCALL_WRAPPER(basic_ofstream_short_ctor_name, 16)
9616 basic_ofstream_wchar* __thiscall basic_ofstream_short_ctor_name(basic_ofstream_wchar *this,
9617 const char *name, int mode, MSVCP_bool virt_init)
9619 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9621 basic_ofstream_short_ctor(this, virt_init);
9623 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9624 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9625 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9627 return this;
9630 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
9631 /* ??1?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
9632 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
9633 /* ??1?$basic_ofstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
9634 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_dtor, 4)
9635 void __thiscall basic_ofstream_wchar_dtor(basic_ios_wchar *base)
9637 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9639 TRACE("(%p)\n", this);
9641 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
9642 basic_filebuf_wchar_dtor(&this->filebuf);
9645 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9646 /* ??_D?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9647 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9648 /* ??_D?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9649 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vbase_dtor, 4)
9650 void __thiscall basic_ofstream_wchar_vbase_dtor(basic_ofstream_wchar *this)
9652 TRACE("(%p)\n", this);
9654 basic_ofstream_wchar_dtor(basic_ofstream_wchar_to_basic_ios(this));
9655 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
9658 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_vector_dtor, 8)
9659 basic_ofstream_wchar* __thiscall basic_ofstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
9661 basic_ofstream_wchar *this = basic_ofstream_wchar_from_basic_ios(base);
9663 TRACE("(%p %x)\n", this, flags);
9665 if(flags & 2) {
9666 /* we have an array, with the number of elements stored before the first object */
9667 INT_PTR i, *ptr = (INT_PTR *)this-1;
9669 for(i=*ptr-1; i>=0; i--)
9670 basic_ofstream_wchar_vbase_dtor(this+i);
9671 MSVCRT_operator_delete(ptr);
9672 } else {
9673 basic_ofstream_wchar_vbase_dtor(this);
9674 if(flags & 1)
9675 MSVCRT_operator_delete(this);
9678 return this;
9681 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
9682 /* ?close@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
9683 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
9684 /* ?close@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
9685 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_close, 4)
9686 void __thiscall basic_ofstream_wchar_close(basic_ofstream_wchar *this)
9688 TRACE("(%p)\n", this);
9690 if(!basic_filebuf_wchar_close(&this->filebuf)) {
9691 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9692 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9696 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
9697 /* ?is_open@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
9698 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
9699 /* ?is_open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
9700 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_is_open, 4)
9701 MSVCP_bool __thiscall basic_ofstream_wchar_is_open(const basic_ofstream_wchar *this)
9703 TRACE("(%p)\n", this);
9704 return basic_filebuf_wchar_is_open(&this->filebuf);
9707 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
9708 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
9709 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open, 12)
9710 void __thiscall basic_ofstream_wchar_open(basic_ofstream_wchar *this,
9711 const char *name, int mode)
9713 TRACE("(%p %s %d)\n", this, name, mode);
9715 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_out, _SH_DENYNO)) {
9716 basic_ios_wchar *basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
9717 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
9721 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
9722 /* ?open@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
9723 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_open_old, 12)
9724 void __thiscall basic_ofstream_wchar_open_old(basic_ofstream_wchar *this,
9725 const char *name, int mode)
9727 basic_ofstream_wchar_open(this, name, mode);
9730 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9731 /* ?rdbuf@?$basic_ofstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
9732 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9733 /* ?rdbuf@?$basic_ofstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
9734 DEFINE_THISCALL_WRAPPER(basic_ofstream_wchar_rdbuf, 4)
9735 basic_filebuf_wchar* __thiscall basic_ofstream_wchar_rdbuf(const basic_ofstream_wchar *this)
9737 TRACE("(%p)\n", this);
9738 return (basic_filebuf_wchar*)&this->filebuf;
9741 static inline basic_ios_char* basic_ifstream_char_to_basic_ios(basic_ifstream_char *ptr)
9743 return (basic_ios_char*)((char*)ptr+basic_ifstream_char_vbtable[1]);
9746 static inline basic_ifstream_char* basic_ifstream_char_from_basic_ios(basic_ios_char *ptr)
9748 return (basic_ifstream_char*)((char*)ptr-basic_ifstream_char_vbtable[1]);
9751 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
9752 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
9753 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor, 8)
9754 basic_ifstream_char* __thiscall basic_ifstream_char_ctor(basic_ifstream_char *this, MSVCP_bool virt_init)
9756 basic_ios_char *basic_ios;
9758 TRACE("(%p %d)\n", this, virt_init);
9760 if(virt_init) {
9761 this->base.vbtable = basic_ifstream_char_vbtable;
9762 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9763 basic_ios_char_ctor(basic_ios);
9764 }else {
9765 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9768 basic_filebuf_char_ctor(&this->filebuf);
9769 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9770 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9771 return this;
9774 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
9775 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9776 static basic_ifstream_char* basic_ifstream_char_ctor_file(
9777 basic_ifstream_char *this, FILE *file, MSVCP_bool virt_init)
9779 basic_ios_char *basic_ios;
9781 TRACE("(%p %p %d)\n", this, file, virt_init);
9783 if(virt_init) {
9784 this->base.vbtable = basic_ifstream_char_vbtable;
9785 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9786 basic_ios_char_ctor(basic_ios);
9787 }else {
9788 basic_ios = basic_istream_char_get_basic_ios(&this->base);
9791 basic_filebuf_char_ctor_file(&this->filebuf, file);
9792 basic_istream_char_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9793 basic_ios->base.vtable = &MSVCP_basic_ifstream_char_vtable;
9794 return this;
9797 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
9798 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
9799 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_copy_ctor, 12)
9800 basic_ifstream_char* __thiscall basic_ifstream_char_copy_ctor(basic_ifstream_char *this,
9801 const basic_ifstream_char *copy, MSVCP_bool virt_init)
9803 TRACE("(%p %p %d)\n", this, copy, virt_init);
9804 return basic_ifstream_char_ctor_file(this, copy->filebuf.file, virt_init);
9807 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
9808 /* ??0?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
9809 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name, 16)
9810 basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_char *this,
9811 const char *name, int mode, MSVCP_bool virt_init)
9813 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
9815 basic_ifstream_char_ctor(this, virt_init);
9817 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9818 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9819 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9821 return this;
9824 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
9825 /* ??1?$basic_ifstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
9826 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_dtor, 4)
9827 void __thiscall basic_ifstream_char_dtor(basic_ios_char *base)
9829 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9831 TRACE("(%p)\n", this);
9833 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
9834 basic_filebuf_char_dtor(&this->filebuf);
9837 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9838 /* ??_D?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9839 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vbase_dtor, 4)
9840 void __thiscall basic_ifstream_char_vbase_dtor(basic_ifstream_char *this)
9842 TRACE("(%p)\n", this);
9844 basic_ifstream_char_dtor(basic_ifstream_char_to_basic_ios(this));
9845 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
9848 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_vector_dtor, 8)
9849 basic_ifstream_char* __thiscall basic_ifstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
9851 basic_ifstream_char *this = basic_ifstream_char_from_basic_ios(base);
9853 TRACE("(%p %x)\n", this, flags);
9855 if(flags & 2) {
9856 /* we have an array, with the number of elements stored before the first object */
9857 INT_PTR i, *ptr = (INT_PTR *)this-1;
9859 for(i=*ptr-1; i>=0; i--)
9860 basic_ifstream_char_vbase_dtor(this+i);
9861 MSVCRT_operator_delete(ptr);
9862 } else {
9863 basic_ifstream_char_vbase_dtor(this);
9864 if(flags & 1)
9865 MSVCRT_operator_delete(this);
9868 return this;
9871 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
9872 /* ?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
9873 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_close, 4)
9874 void __thiscall basic_ifstream_char_close(basic_ifstream_char *this)
9876 TRACE("(%p)\n", this);
9878 if(!basic_filebuf_char_close(&this->filebuf)) {
9879 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9880 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9884 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
9885 /* ?is_open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
9886 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_is_open, 4)
9887 MSVCP_bool __thiscall basic_ifstream_char_is_open(const basic_ifstream_char *this)
9889 TRACE("(%p)\n", this);
9890 return basic_filebuf_char_is_open(&this->filebuf);
9893 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
9894 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
9895 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open, 12)
9896 void __thiscall basic_ifstream_char_open(basic_ifstream_char *this,
9897 const char *name, int mode)
9899 TRACE("(%p %s %d)\n", this, name, mode);
9901 if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
9902 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base);
9903 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
9907 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
9908 /* ?open@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
9909 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12)
9910 void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this,
9911 const char *name, short mode)
9913 basic_ifstream_char_open(this, name, mode);
9916 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9917 /* ?rdbuf@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
9918 DEFINE_THISCALL_WRAPPER(basic_ifstream_char_rdbuf, 4)
9919 basic_filebuf_char* __thiscall basic_ifstream_char_rdbuf(const basic_ifstream_char *this)
9921 TRACE("(%p)\n", this);
9922 return (basic_filebuf_char*)&this->filebuf;
9925 static inline basic_ios_wchar* basic_ifstream_wchar_to_basic_ios(basic_ifstream_wchar *ptr)
9927 return (basic_ios_wchar*)((char*)ptr+basic_ifstream_wchar_vbtable[1]);
9930 static inline basic_ifstream_wchar* basic_ifstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
9932 return (basic_ifstream_wchar*)((char*)ptr-basic_ifstream_wchar_vbtable[1]);
9935 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
9936 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
9937 static basic_ifstream_wchar* basic_ifstream_wchar_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9939 basic_ios_wchar *basic_ios;
9941 TRACE("(%p %d)\n", this, virt_init);
9943 if(virt_init) {
9944 this->base.vbtable = basic_ifstream_wchar_vbtable;
9945 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9946 basic_ios_wchar_ctor(basic_ios);
9947 }else {
9948 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9951 basic_filebuf_wchar_ctor(&this->filebuf);
9952 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9953 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9954 return this;
9957 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
9958 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
9959 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor, 8)
9960 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor(basic_ifstream_wchar *this, MSVCP_bool virt_init)
9962 basic_ifstream_wchar_ctor(this, virt_init);
9963 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9964 return this;
9967 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
9968 /* ??0?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9969 static basic_ifstream_wchar* basic_ifstream_wchar_ctor_file(
9970 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9972 basic_ios_wchar *basic_ios;
9974 TRACE("(%p %p %d)\n", this, file, virt_init);
9976 if(virt_init) {
9977 this->base.vbtable = basic_ifstream_wchar_vbtable;
9978 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9979 basic_ios_wchar_ctor(basic_ios);
9980 }else {
9981 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
9984 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
9985 basic_istream_wchar_ctor(&this->base, &this->filebuf.base, FALSE, FALSE);
9986 basic_ios->base.vtable = &MSVCP_basic_ifstream_wchar_vtable;
9987 return this;
9990 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
9991 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
9992 static basic_ifstream_wchar* basic_ifstream_short_ctor_file(
9993 basic_ifstream_wchar *this, FILE *file, MSVCP_bool virt_init)
9995 basic_ifstream_wchar_ctor_file(this, file, virt_init);
9996 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ifstream_short_vtable;
9997 return this;
10000 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10001 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10002 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_copy_ctor, 12)
10003 basic_ifstream_wchar* __thiscall basic_ifstream_short_copy_ctor(basic_ifstream_wchar *this,
10004 basic_ifstream_wchar *copy, MSVCP_bool virt_init)
10006 TRACE("(%p %p %d)\n", this, copy, virt_init);
10007 return basic_ifstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10010 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAE@PBDH@Z */
10011 /* ??0?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAA@PEBDH@Z */
10012 DEFINE_THISCALL_WRAPPER(basic_ifstream_short_ctor_name, 16)
10013 basic_ifstream_wchar* __thiscall basic_ifstream_short_ctor_name(basic_ifstream_wchar *this,
10014 const char *name, int mode, MSVCP_bool virt_init)
10016 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10018 basic_ifstream_short_ctor(this, virt_init);
10020 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10021 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10022 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10024 return this;
10027 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10028 /* ??1?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10029 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10030 /* ??1?$basic_ifstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10031 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_dtor, 4)
10032 void __thiscall basic_ifstream_wchar_dtor(basic_ios_wchar *base)
10034 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10036 TRACE("(%p)\n", this);
10038 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
10039 basic_filebuf_wchar_dtor(&this->filebuf);
10042 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10043 /* ??_D?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10044 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10045 /* ??_D?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10046 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vbase_dtor, 4)
10047 void __thiscall basic_ifstream_wchar_vbase_dtor(basic_ifstream_wchar *this)
10049 TRACE("(%p)\n", this);
10051 basic_ifstream_wchar_dtor(basic_ifstream_wchar_to_basic_ios(this));
10052 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
10055 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_vector_dtor, 8)
10056 basic_ifstream_wchar* __thiscall basic_ifstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10058 basic_ifstream_wchar *this = basic_ifstream_wchar_from_basic_ios(base);
10060 TRACE("(%p %x)\n", this, flags);
10062 if(flags & 2) {
10063 /* we have an array, with the number of elements stored before the first object */
10064 INT_PTR i, *ptr = (INT_PTR *)this-1;
10066 for(i=*ptr-1; i>=0; i--)
10067 basic_ifstream_wchar_vbase_dtor(this+i);
10068 MSVCRT_operator_delete(ptr);
10069 } else {
10070 basic_ifstream_wchar_vbase_dtor(this);
10071 if(flags & 1)
10072 MSVCRT_operator_delete(this);
10075 return this;
10078 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10079 /* ?close@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10080 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10081 /* ?close@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10082 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_close, 4)
10083 void __thiscall basic_ifstream_wchar_close(basic_ifstream_wchar *this)
10085 TRACE("(%p)\n", this);
10087 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10088 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10089 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10093 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10094 /* ?is_open@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10095 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10096 /* ?is_open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10097 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_is_open, 4)
10098 MSVCP_bool __thiscall basic_ifstream_wchar_is_open(const basic_ifstream_wchar *this)
10100 TRACE("(%p)\n", this);
10101 return basic_filebuf_wchar_is_open(&this->filebuf);
10104 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDH@Z */
10105 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDH@Z */
10106 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open, 12)
10107 void __thiscall basic_ifstream_wchar_open(basic_ifstream_wchar *this,
10108 const char *name, int mode)
10110 TRACE("(%p %s %d)\n", this, name, mode);
10112 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode|OPENMODE_in, _SH_DENYNO)) {
10113 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
10114 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10118 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QAEXPBDF@Z */
10119 /* ?open@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEAAXPEBDF@Z */
10120 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_open_old, 12)
10121 void __thiscall basic_ifstream_wchar_open_old(basic_ifstream_wchar *this,
10122 const char *name, short mode)
10124 basic_ifstream_wchar_open(this, name, mode);
10127 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10128 /* ?rdbuf@?$basic_ifstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10129 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10130 /* ?rdbuf@?$basic_ifstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10131 DEFINE_THISCALL_WRAPPER(basic_ifstream_wchar_rdbuf, 4)
10132 basic_filebuf_wchar* __thiscall basic_ifstream_wchar_rdbuf(const basic_ifstream_wchar *this)
10134 TRACE("(%p)\n", this);
10135 return (basic_filebuf_wchar*)&this->filebuf;
10138 static inline basic_ios_char* basic_fstream_char_to_basic_ios(basic_fstream_char *ptr)
10140 return (basic_ios_char*)((char*)ptr+basic_fstream_char_vbtable1[1]);
10143 static inline basic_fstream_char* basic_fstream_char_from_basic_ios(basic_ios_char *ptr)
10145 return (basic_fstream_char*)((char*)ptr-basic_fstream_char_vbtable1[1]);
10148 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@XZ */
10149 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@XZ */
10150 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor, 8)
10151 basic_fstream_char* __thiscall basic_fstream_char_ctor(basic_fstream_char *this, MSVCP_bool virt_init)
10153 basic_ios_char *basic_ios;
10155 TRACE("(%p %d)\n", this, virt_init);
10157 if(virt_init) {
10158 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10159 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10160 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10161 basic_ios_char_ctor(basic_ios);
10162 }else {
10163 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10166 basic_filebuf_char_ctor(&this->filebuf);
10167 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10168 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10169 return this;
10172 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PAU_iobuf@@@Z */
10173 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10174 static basic_fstream_char* basic_fstream_char_ctor_file(basic_fstream_char *this,
10175 FILE *file, MSVCP_bool virt_init)
10177 basic_ios_char *basic_ios;
10179 TRACE("(%p %p %d)\n", this, file, virt_init);
10181 if(virt_init) {
10182 this->base.base1.vbtable = basic_fstream_char_vbtable1;
10183 this->base.base2.vbtable = basic_fstream_char_vbtable2;
10184 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10185 basic_ios_char_ctor(basic_ios);
10186 }else {
10187 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10190 basic_filebuf_char_ctor_file(&this->filebuf, file);
10191 basic_iostream_char_ctor(&this->base, &this->filebuf.base, FALSE);
10192 basic_ios->base.vtable = &MSVCP_basic_fstream_char_vtable;
10193 return this;
10196 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@ABV01@@Z */
10197 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@AEBV01@@Z */
10198 DEFINE_THISCALL_WRAPPER(basic_fstream_char_copy_ctor, 12)
10199 basic_fstream_char* __thiscall basic_fstream_char_copy_ctor(basic_fstream_char *this,
10200 basic_fstream_char *copy, MSVCP_bool virt_init)
10202 TRACE("(%p %p %d)\n", this, copy, virt_init);
10203 return basic_fstream_char_ctor_file(this, copy->filebuf.file, virt_init);
10206 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QAE@PBDH@Z */
10207 /* ??0?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAA@PEBDH@Z */
10208 DEFINE_THISCALL_WRAPPER(basic_fstream_char_ctor_name, 16)
10209 basic_fstream_char* __thiscall basic_fstream_char_ctor_name(basic_fstream_char *this,
10210 const char *name, int mode, MSVCP_bool virt_init)
10212 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10214 basic_fstream_char_ctor(this, virt_init);
10216 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10217 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10218 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10220 return this;
10223 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UAE@XZ */
10224 /* ??1?$basic_fstream@DU?$char_traits@D@std@@@std@@UEAA@XZ */
10225 DEFINE_THISCALL_WRAPPER(basic_fstream_char_dtor, 4)
10226 void __thiscall basic_fstream_char_dtor(basic_ios_char *base)
10228 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10230 TRACE("(%p)\n", this);
10232 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
10233 basic_filebuf_char_dtor(&this->filebuf);
10236 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10237 /* ??_D?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10238 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vbase_dtor, 4)
10239 void __thiscall basic_fstream_char_vbase_dtor(basic_fstream_char *this)
10241 TRACE("(%p)\n", this);
10243 basic_fstream_char_dtor(basic_fstream_char_to_basic_ios(this));
10244 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
10247 DEFINE_THISCALL_WRAPPER(basic_fstream_char_vector_dtor, 8)
10248 basic_fstream_char* __thiscall basic_fstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10250 basic_fstream_char *this = basic_fstream_char_from_basic_ios(base);
10252 TRACE("(%p %x)\n", this, flags);
10254 if(flags & 2) {
10255 /* we have an array, with the number of elements stored before the first object */
10256 INT_PTR i, *ptr = (INT_PTR *)this-1;
10258 for(i=*ptr-1; i>=0; i--)
10259 basic_fstream_char_vbase_dtor(this+i);
10260 MSVCRT_operator_delete(ptr);
10261 } else {
10262 basic_fstream_char_vbase_dtor(this);
10263 if(flags & 1)
10264 MSVCRT_operator_delete(this);
10267 return this;
10270 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXXZ */
10271 /* ?close@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXXZ */
10272 DEFINE_THISCALL_WRAPPER(basic_fstream_char_close, 4)
10273 void __thiscall basic_fstream_char_close(basic_fstream_char *this)
10275 TRACE("(%p)\n", this);
10277 if(!basic_filebuf_char_close(&this->filebuf)) {
10278 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10279 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10283 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBE_NXZ */
10284 /* ?is_open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBA_NXZ */
10285 DEFINE_THISCALL_WRAPPER(basic_fstream_char_is_open, 4)
10286 MSVCP_bool __thiscall basic_fstream_char_is_open(const basic_fstream_char *this)
10288 TRACE("(%p)\n", this);
10289 return basic_filebuf_char_is_open(&this->filebuf);
10292 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDH@Z */
10293 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDH@Z */
10294 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open, 12)
10295 void __thiscall basic_fstream_char_open(basic_fstream_char *this,
10296 const char *name, int mode)
10298 TRACE("(%p %s %d)\n", this, name, mode);
10300 if(!basic_filebuf_char_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10301 basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
10302 basic_ios_char_setstate(basic_ios, IOSTATE_failbit);
10306 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QAEXPBDF@Z */
10307 /* ?open@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEAAXPEBDF@Z */
10308 DEFINE_THISCALL_WRAPPER(basic_fstream_char_open_old, 12)
10309 void __thiscall basic_fstream_char_open_old(basic_fstream_char *this,
10310 const char *name, int mode)
10312 basic_fstream_char_open(this, name, mode);
10315 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QBEPAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10316 /* ?rdbuf@?$basic_fstream@DU?$char_traits@D@std@@@std@@QEBAPEAV?$basic_filebuf@DU?$char_traits@D@std@@@2@XZ */
10317 DEFINE_THISCALL_WRAPPER(basic_fstream_char_rdbuf, 4)
10318 basic_filebuf_char* __thiscall basic_fstream_char_rdbuf(const basic_fstream_char *this)
10320 TRACE("(%p)\n", this);
10321 return (basic_filebuf_char*)&this->filebuf;
10324 static inline basic_ios_wchar* basic_fstream_wchar_to_basic_ios(basic_fstream_wchar *ptr)
10326 return (basic_ios_wchar*)((char*)ptr+basic_fstream_wchar_vbtable1[1]);
10329 static inline basic_fstream_wchar* basic_fstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10331 return (basic_fstream_wchar*)((char*)ptr-basic_fstream_wchar_vbtable1[1]);
10334 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@XZ */
10335 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@XZ */
10336 static basic_fstream_wchar* basic_fstream_wchar_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10338 basic_ios_wchar *basic_ios;
10340 TRACE("(%p %d)\n", this, virt_init);
10342 if(virt_init) {
10343 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10344 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10345 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10346 basic_ios_wchar_ctor(basic_ios);
10347 }else {
10348 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10351 basic_filebuf_wchar_ctor(&this->filebuf);
10352 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10353 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10354 return this;
10357 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@XZ */
10358 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@XZ */
10359 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor, 8)
10360 basic_fstream_wchar* __thiscall basic_fstream_short_ctor(basic_fstream_wchar *this, MSVCP_bool virt_init)
10362 basic_fstream_wchar_ctor(this, virt_init);
10363 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10364 return this;
10367 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PAU_iobuf@@@Z */
10368 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10369 static basic_fstream_wchar* basic_fstream_wchar_ctor_file(basic_fstream_wchar *this,
10370 FILE *file, MSVCP_bool virt_init)
10372 basic_ios_wchar *basic_ios;
10374 TRACE("(%p %p %d)\n", this, file, virt_init);
10376 if(virt_init) {
10377 this->base.base1.vbtable = basic_fstream_wchar_vbtable1;
10378 this->base.base2.vbtable = basic_fstream_wchar_vbtable2;
10379 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10380 basic_ios_wchar_ctor(basic_ios);
10381 }else {
10382 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10385 basic_filebuf_wchar_ctor_file(&this->filebuf, file);
10386 basic_iostream_wchar_ctor(&this->base, &this->filebuf.base, FALSE);
10387 basic_ios->base.vtable = &MSVCP_basic_fstream_wchar_vtable;
10388 return this;
10391 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@PAU_iobuf@@@Z */
10392 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@PEAU_iobuf@@@Z */
10393 static basic_fstream_wchar* basic_fstream_short_ctor_file(basic_fstream_wchar *this,
10394 FILE *file, MSVCP_bool virt_init)
10396 basic_fstream_wchar_ctor_file(this, file, virt_init);
10397 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_fstream_short_vtable;
10398 return this;
10401 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QAE@ABV01@@Z */
10402 /* ??0?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAA@AEBV01@@Z */
10403 DEFINE_THISCALL_WRAPPER(basic_fstream_short_copy_ctor, 12)
10404 basic_fstream_wchar* __thiscall basic_fstream_short_copy_ctor(basic_fstream_wchar *this,
10405 basic_fstream_wchar *copy, MSVCP_bool virt_init)
10407 TRACE("(%p %p %d)\n", this, copy, virt_init);
10408 return basic_fstream_short_ctor_file(this, copy->filebuf.file, virt_init);
10411 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAE@PB_WHH@Z */
10412 /* ??0?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAA@PEB_WHH@Z */
10413 DEFINE_THISCALL_WRAPPER(basic_fstream_short_ctor_name, 16)
10414 basic_fstream_wchar* __thiscall basic_fstream_short_ctor_name(basic_fstream_wchar *this,
10415 const char *name, int mode, MSVCP_bool virt_init)
10417 TRACE("(%p %s %d %d)\n", this, name, mode, virt_init);
10419 basic_fstream_short_ctor(this, virt_init);
10421 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10422 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10423 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10425 return this;
10428 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UAE@XZ */
10429 /* ??1?$basic_fstream@_WU?$char_traits@_W@std@@@std@@UEAA@XZ */
10430 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UAE@XZ */
10431 /* ??1?$basic_fstream@GU?$char_traits@G@std@@@std@@UEAA@XZ */
10432 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_dtor, 4)
10433 void __thiscall basic_fstream_wchar_dtor(basic_ios_wchar *base)
10435 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10437 TRACE("(%p)\n", this);
10439 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
10440 basic_filebuf_wchar_dtor(&this->filebuf);
10443 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10444 /* ??_D?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10445 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10446 /* ??_D?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10447 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vbase_dtor, 4)
10448 void __thiscall basic_fstream_wchar_vbase_dtor(basic_fstream_wchar *this)
10450 TRACE("(%p)\n", this);
10452 basic_fstream_wchar_dtor(basic_fstream_wchar_to_basic_ios(this));
10453 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
10456 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_vector_dtor, 8)
10457 basic_fstream_wchar* __thiscall basic_fstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10459 basic_fstream_wchar *this = basic_fstream_wchar_from_basic_ios(base);
10461 TRACE("(%p %x)\n", this, flags);
10463 if(flags & 2) {
10464 /* we have an array, with the number of elements stored before the first object */
10465 INT_PTR i, *ptr = (INT_PTR *)this-1;
10467 for(i=*ptr-1; i>=0; i--)
10468 basic_fstream_wchar_vbase_dtor(this+i);
10469 MSVCRT_operator_delete(ptr);
10470 } else {
10471 basic_fstream_wchar_vbase_dtor(this);
10472 if(flags & 1)
10473 MSVCRT_operator_delete(this);
10476 return this;
10479 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QAEXXZ */
10480 /* ?close@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEAAXXZ */
10481 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QAEXXZ */
10482 /* ?close@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEAAXXZ */
10483 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_close, 4)
10484 void __thiscall basic_fstream_wchar_close(basic_fstream_wchar *this)
10486 TRACE("(%p)\n", this);
10488 if(!basic_filebuf_wchar_close(&this->filebuf)) {
10489 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10490 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10494 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBE_NXZ */
10495 /* ?is_open@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBA_NXZ */
10496 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBE_NXZ */
10497 /* ?is_open@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBA_NXZ */
10498 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_is_open, 4)
10499 MSVCP_bool __thiscall basic_fstream_wchar_is_open(const basic_fstream_wchar *this)
10501 TRACE("(%p)\n", this);
10502 return basic_filebuf_wchar_is_open(&this->filebuf);
10505 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDH@Z */
10506 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDH@Z */
10507 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open, 12)
10508 void __thiscall basic_fstream_wchar_open(basic_fstream_wchar *this,
10509 const char *name, int mode)
10511 TRACE("(%p %s %d)\n", this, name, mode);
10513 if(!basic_filebuf_wchar_open(&this->filebuf, name, mode, _SH_DENYNO)) {
10514 basic_ios_wchar *basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
10515 basic_ios_wchar_setstate(basic_ios, IOSTATE_failbit);
10519 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QAEPAV12@PBDF@Z */
10520 /* ?open@?$basic_filebuf@GU?$char_traits@G@std@@@std@@QEAAPEAV12@PEBDF@Z */
10521 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_open_old, 12)
10522 void __thiscall basic_fstream_wchar_open_old(basic_fstream_wchar *this,
10523 const char *name, int mode)
10525 basic_fstream_wchar_open(this, name, mode);
10528 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QBEPAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10529 /* ?rdbuf@?$basic_fstream@_WU?$char_traits@_W@std@@@std@@QEBAPEAV?$basic_filebuf@_WU?$char_traits@_W@std@@@2@XZ */
10530 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QBEPAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10531 /* ?rdbuf@?$basic_fstream@GU?$char_traits@G@std@@@std@@QEBAPEAV?$basic_filebuf@GU?$char_traits@G@std@@@2@XZ */
10532 DEFINE_THISCALL_WRAPPER(basic_fstream_wchar_rdbuf, 4)
10533 basic_filebuf_wchar* __thiscall basic_fstream_wchar_rdbuf(const basic_fstream_wchar *this)
10535 TRACE("(%p)\n", this);
10536 return (basic_filebuf_wchar*)&this->filebuf;
10539 static inline basic_ios_char* basic_ostringstream_char_to_basic_ios(basic_ostringstream_char *ptr)
10541 return (basic_ios_char*)((char*)ptr+basic_ostringstream_char_vbtable[1]);
10544 static inline basic_ostringstream_char* basic_ostringstream_char_from_basic_ios(basic_ios_char *ptr)
10546 return (basic_ostringstream_char*)((char*)ptr-basic_ostringstream_char_vbtable[1]);
10549 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10550 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10551 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_str, 16)
10552 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_str(basic_ostringstream_char *this,
10553 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10555 basic_ios_char *basic_ios;
10557 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10559 if(virt_init) {
10560 this->base.vbtable = basic_ostringstream_char_vbtable;
10561 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10562 basic_ios_char_ctor(basic_ios);
10563 }else {
10564 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10567 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10568 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10569 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10570 return this;
10573 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10574 /* ??0?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10575 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor_mode, 12)
10576 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor_mode(
10577 basic_ostringstream_char *this, int mode, MSVCP_bool virt_init)
10579 basic_ios_char *basic_ios;
10581 TRACE("(%p %d %d)\n", this, mode, virt_init);
10583 if(virt_init) {
10584 this->base.vbtable = basic_ostringstream_char_vbtable;
10585 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10586 basic_ios_char_ctor(basic_ios);
10587 }else {
10588 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
10591 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10592 basic_ostream_char_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10593 basic_ios->base.vtable = &MSVCP_basic_ostringstream_char_vtable;
10594 return this;
10597 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10598 /* ??_F?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10599 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_ctor, 4)
10600 basic_ostringstream_char* __thiscall basic_ostringstream_char_ctor(
10601 basic_ostringstream_char *this)
10603 return basic_ostringstream_char_ctor_mode(this, 0, TRUE);
10606 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10607 /* ??1?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10608 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_dtor, 4)
10609 void __thiscall basic_ostringstream_char_dtor(basic_ios_char *base)
10611 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10613 TRACE("(%p)\n", this);
10615 basic_stringbuf_char_dtor(&this->strbuf);
10616 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
10619 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10620 /* ??_D?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10621 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vbase_dtor, 4)
10622 void __thiscall basic_ostringstream_char_vbase_dtor(basic_ostringstream_char *this)
10624 TRACE("(%p)\n", this);
10626 basic_ostringstream_char_dtor(basic_ostringstream_char_to_basic_ios(this));
10627 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
10630 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_vector_dtor, 8)
10631 basic_ostringstream_char* __thiscall basic_ostringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10633 basic_ostringstream_char *this = basic_ostringstream_char_from_basic_ios(base);
10635 TRACE("(%p %x)\n", this, flags);
10637 if(flags & 2) {
10638 /* we have an array, with the number of elements stored before the first object */
10639 INT_PTR i, *ptr = (INT_PTR *)this-1;
10641 for(i=*ptr-1; i>=0; i--)
10642 basic_ostringstream_char_vbase_dtor(this+i);
10643 MSVCRT_operator_delete(ptr);
10644 } else {
10645 basic_ostringstream_char_vbase_dtor(this);
10646 if(flags & 1)
10647 MSVCRT_operator_delete(this);
10650 return this;
10653 /* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10654 /* ?rdbuf@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10655 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_rdbuf, 4)
10656 basic_stringbuf_char* __thiscall basic_ostringstream_char_rdbuf(const basic_ostringstream_char *this)
10658 TRACE("(%p)\n", this);
10659 return (basic_stringbuf_char*)&this->strbuf;
10662 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10663 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10664 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_set, 8)
10665 void __thiscall basic_ostringstream_char_str_set(basic_ostringstream_char *this, const basic_string_char *str)
10667 TRACE("(%p %p)\n", this, str);
10668 basic_stringbuf_char_str_set(&this->strbuf, str);
10671 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10672 /* ?str@?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10673 DEFINE_THISCALL_WRAPPER(basic_ostringstream_char_str_get, 8)
10674 basic_string_char* __thiscall basic_ostringstream_char_str_get(const basic_ostringstream_char *this, basic_string_char *ret)
10676 TRACE("(%p %p)\n", this, ret);
10677 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10680 static inline basic_ios_wchar* basic_ostringstream_wchar_to_basic_ios(basic_ostringstream_wchar *ptr)
10682 return (basic_ios_wchar*)((char*)ptr+basic_ostringstream_wchar_vbtable[1]);
10685 static inline basic_ostringstream_wchar* basic_ostringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10687 return (basic_ostringstream_wchar*)((char*)ptr-basic_ostringstream_wchar_vbtable[1]);
10690 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
10691 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
10692 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_str(basic_ostringstream_wchar *this,
10693 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10695 basic_ios_wchar *basic_ios;
10697 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10699 if(virt_init) {
10700 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10701 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10702 basic_ios_wchar_ctor(basic_ios);
10703 }else {
10704 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10707 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_out);
10708 basic_ostream_short_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10709 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10710 return this;
10713 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
10714 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
10715 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_str, 16)
10716 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_str(basic_ostringstream_wchar *this,
10717 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
10719 basic_ostringstream_wchar_ctor_str(this, str, mode, virt_init);
10720 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10721 return this;
10724 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
10725 /* ??0?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
10726 static basic_ostringstream_wchar* basic_ostringstream_wchar_ctor_mode(
10727 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10729 basic_ios_wchar *basic_ios;
10731 TRACE("(%p %d %d)\n", this, mode, virt_init);
10733 if(virt_init) {
10734 this->base.vbtable = basic_ostringstream_wchar_vbtable;
10735 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10736 basic_ios_wchar_ctor(basic_ios);
10737 }else {
10738 basic_ios = basic_ostream_wchar_get_basic_ios(&this->base);
10741 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_out);
10742 basic_ostream_short_ctor(&this->base, &this->strbuf.base, FALSE, TRUE, FALSE);
10743 basic_ios->base.vtable = &MSVCP_basic_ostringstream_wchar_vtable;
10744 return this;
10747 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
10748 /* ??0?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
10749 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor_mode, 12)
10750 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor_mode(
10751 basic_ostringstream_wchar *this, int mode, MSVCP_bool virt_init)
10753 basic_ostringstream_wchar_ctor_mode(this, mode, virt_init);
10754 basic_ostream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_ostringstream_short_vtable;
10755 return this;
10758 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10759 /* ??_F?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10760 DEFINE_THISCALL_WRAPPER(basic_ostringstream_short_ctor, 4)
10761 basic_ostringstream_wchar* __thiscall basic_ostringstream_short_ctor(
10762 basic_ostringstream_wchar *this)
10764 return basic_ostringstream_short_ctor_mode(this, 0, TRUE);
10767 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
10768 /* ??1?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
10769 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
10770 /* ??1?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
10771 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_dtor, 4)
10772 void __thiscall basic_ostringstream_wchar_dtor(basic_ios_wchar *base)
10774 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10776 TRACE("(%p)\n", this);
10778 basic_stringbuf_wchar_dtor(&this->strbuf);
10779 basic_ostream_wchar_dtor(basic_ostream_wchar_to_basic_ios(&this->base));
10782 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
10783 /* ??_D?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
10784 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
10785 /* ??_D?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
10786 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vbase_dtor, 4)
10787 void __thiscall basic_ostringstream_wchar_vbase_dtor(basic_ostringstream_wchar *this)
10789 TRACE("(%p)\n", this);
10791 basic_ostringstream_wchar_dtor(basic_ostringstream_wchar_to_basic_ios(this));
10792 basic_ios_wchar_dtor(basic_ostream_wchar_get_basic_ios(&this->base));
10795 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_vector_dtor, 8)
10796 basic_ostringstream_wchar* __thiscall basic_ostringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
10798 basic_ostringstream_wchar *this = basic_ostringstream_wchar_from_basic_ios(base);
10800 TRACE("(%p %x)\n", this, flags);
10802 if(flags & 2) {
10803 /* we have an array, with the number of elements stored before the first object */
10804 INT_PTR i, *ptr = (INT_PTR *)this-1;
10806 for(i=*ptr-1; i>=0; i--)
10807 basic_ostringstream_wchar_vbase_dtor(this+i);
10808 MSVCRT_operator_delete(ptr);
10809 } else {
10810 basic_ostringstream_wchar_vbase_dtor(this);
10811 if(flags & 1)
10812 MSVCRT_operator_delete(this);
10815 return this;
10818 /* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
10819 /* ?rdbuf@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
10820 /* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10821 /* ?rdbuf@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10822 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_rdbuf, 4)
10823 basic_stringbuf_wchar* __thiscall basic_ostringstream_wchar_rdbuf(const basic_ostringstream_wchar *this)
10825 TRACE("(%p)\n", this);
10826 return (basic_stringbuf_wchar*)&this->strbuf;
10829 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
10830 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
10831 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10832 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
10833 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_set, 8)
10834 void __thiscall basic_ostringstream_wchar_str_set(basic_ostringstream_wchar *this, const basic_string_wchar *str)
10836 TRACE("(%p %p)\n", this, str);
10837 basic_stringbuf_wchar_str_set(&this->strbuf, str);
10840 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
10841 /* ?str@?$basic_ostringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
10842 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10843 /* ?str@?$basic_ostringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
10844 DEFINE_THISCALL_WRAPPER(basic_ostringstream_wchar_str_get, 8)
10845 basic_string_wchar* __thiscall basic_ostringstream_wchar_str_get(const basic_ostringstream_wchar *this, basic_string_wchar *ret)
10847 TRACE("(%p %p)\n", this, ret);
10848 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
10851 static inline basic_ios_char* basic_istringstream_char_to_basic_ios(basic_istringstream_char *ptr)
10853 return (basic_ios_char*)((char*)ptr+basic_istringstream_char_vbtable[1]);
10856 static inline basic_istringstream_char* basic_istringstream_char_from_basic_ios(basic_ios_char *ptr)
10858 return (basic_istringstream_char*)((char*)ptr-basic_istringstream_char_vbtable[1]);
10861 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10862 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
10863 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_str, 16)
10864 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_str(basic_istringstream_char *this,
10865 const basic_string_char *str, int mode, MSVCP_bool virt_init)
10867 basic_ios_char *basic_ios;
10869 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
10871 if(virt_init) {
10872 this->base.vbtable = basic_istringstream_char_vbtable;
10873 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10874 basic_ios_char_ctor(basic_ios);
10875 }else {
10876 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10879 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
10880 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10881 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10882 return this;
10885 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
10886 /* ??0?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
10887 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor_mode, 12)
10888 basic_istringstream_char* __thiscall basic_istringstream_char_ctor_mode(
10889 basic_istringstream_char *this, int mode, MSVCP_bool virt_init)
10891 basic_ios_char *basic_ios;
10893 TRACE("(%p %d %d)\n", this, mode, virt_init);
10895 if(virt_init) {
10896 this->base.vbtable = basic_istringstream_char_vbtable;
10897 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10898 basic_ios_char_ctor(basic_ios);
10899 }else {
10900 basic_ios = basic_istream_char_get_basic_ios(&this->base);
10903 basic_stringbuf_char_ctor_mode(&this->strbuf, mode|OPENMODE_in);
10904 basic_istream_char_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
10905 basic_ios->base.vtable = &MSVCP_basic_istringstream_char_vtable;
10906 return this;
10909 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10910 /* ??_F?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10911 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_ctor, 4)
10912 basic_istringstream_char* __thiscall basic_istringstream_char_ctor(
10913 basic_istringstream_char *this)
10915 return basic_istringstream_char_ctor_mode(this, 0, TRUE);
10918 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
10919 /* ??1?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
10920 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_dtor, 4)
10921 void __thiscall basic_istringstream_char_dtor(basic_ios_char *base)
10923 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10925 TRACE("(%p)\n", this);
10927 basic_stringbuf_char_dtor(&this->strbuf);
10928 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
10931 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
10932 /* ??_D?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
10933 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vbase_dtor, 4)
10934 void __thiscall basic_istringstream_char_vbase_dtor(basic_istringstream_char *this)
10936 TRACE("(%p)\n", this);
10938 basic_istringstream_char_dtor(basic_istringstream_char_to_basic_ios(this));
10939 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base));
10942 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_vector_dtor, 8)
10943 basic_istringstream_char* __thiscall basic_istringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
10945 basic_istringstream_char *this = basic_istringstream_char_from_basic_ios(base);
10947 TRACE("(%p %x)\n", this, flags);
10949 if(flags & 2) {
10950 /* we have an array, with the number of elements stored before the first object */
10951 INT_PTR i, *ptr = (INT_PTR *)this-1;
10953 for(i=*ptr-1; i>=0; i--)
10954 basic_istringstream_char_vbase_dtor(this+i);
10955 MSVCRT_operator_delete(ptr);
10956 } else {
10957 basic_istringstream_char_vbase_dtor(this);
10958 if(flags & 1)
10959 MSVCRT_operator_delete(this);
10962 return this;
10965 /* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10966 /* ?rdbuf@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10967 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_rdbuf, 4)
10968 basic_stringbuf_char* __thiscall basic_istringstream_char_rdbuf(const basic_istringstream_char *this)
10970 TRACE("(%p)\n", this);
10971 return (basic_stringbuf_char*)&this->strbuf;
10974 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10975 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
10976 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_set, 8)
10977 void __thiscall basic_istringstream_char_str_set(basic_istringstream_char *this, const basic_string_char *str)
10979 TRACE("(%p %p)\n", this, str);
10980 basic_stringbuf_char_str_set(&this->strbuf, str);
10983 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10984 /* ?str@?$basic_istringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10985 DEFINE_THISCALL_WRAPPER(basic_istringstream_char_str_get, 8)
10986 basic_string_char* __thiscall basic_istringstream_char_str_get(const basic_istringstream_char *this, basic_string_char *ret)
10988 TRACE("(%p %p)\n", this, ret);
10989 return basic_stringbuf_char_str_get(&this->strbuf, ret);
10992 static inline basic_ios_wchar* basic_istringstream_wchar_to_basic_ios(basic_istringstream_wchar *ptr)
10994 return (basic_ios_wchar*)((char*)ptr+basic_istringstream_wchar_vbtable[1]);
10997 static inline basic_istringstream_wchar* basic_istringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
10999 return (basic_istringstream_wchar*)((char*)ptr-basic_istringstream_wchar_vbtable[1]);
11002 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
11003 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
11004 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_str(basic_istringstream_wchar *this,
11005 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11007 basic_ios_wchar *basic_ios;
11009 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11011 if(virt_init) {
11012 this->base.vbtable = basic_istringstream_wchar_vbtable;
11013 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11014 basic_ios_wchar_ctor(basic_ios);
11015 }else {
11016 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11019 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode|OPENMODE_in);
11020 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11021 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11022 return this;
11025 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
11026 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
11027 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_str, 16)
11028 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_str(basic_istringstream_wchar *this,
11029 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11031 basic_istringstream_wchar_ctor_str(this, str, mode, virt_init);
11032 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11033 return this;
11036 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11037 /* ??0?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11038 static basic_istringstream_wchar* basic_istringstream_wchar_ctor_mode(
11039 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11041 basic_ios_wchar *basic_ios;
11043 TRACE("(%p %d %d)\n", this, mode, virt_init);
11045 if(virt_init) {
11046 this->base.vbtable = basic_istringstream_wchar_vbtable;
11047 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11048 basic_ios_wchar_ctor(basic_ios);
11049 }else {
11050 basic_ios = basic_istream_wchar_get_basic_ios(&this->base);
11053 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode|OPENMODE_in);
11054 basic_istream_wchar_ctor(&this->base, &this->strbuf.base, FALSE, FALSE);
11055 basic_ios->base.vtable = &MSVCP_basic_istringstream_wchar_vtable;
11056 return this;
11059 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11060 /* ??0?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11061 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor_mode, 12)
11062 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor_mode(
11063 basic_istringstream_wchar *this, int mode, MSVCP_bool virt_init)
11065 basic_istringstream_wchar_ctor_mode(this, mode, virt_init);
11066 basic_istream_wchar_get_basic_ios(&this->base)->base.vtable = &MSVCP_basic_istringstream_short_vtable;
11067 return this;
11070 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11071 /* ??_F?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11072 DEFINE_THISCALL_WRAPPER(basic_istringstream_short_ctor, 4)
11073 basic_istringstream_wchar* __thiscall basic_istringstream_short_ctor(
11074 basic_istringstream_wchar *this)
11076 return basic_istringstream_short_ctor_mode(this, 0, TRUE);
11079 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11080 /* ??1?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11081 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11082 /* ??1?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11083 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_dtor, 4)
11084 void __thiscall basic_istringstream_wchar_dtor(basic_ios_wchar *base)
11086 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11088 TRACE("(%p)\n", this);
11090 basic_stringbuf_wchar_dtor(&this->strbuf);
11091 basic_istream_wchar_dtor(basic_istream_wchar_to_basic_ios(&this->base));
11094 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11095 /* ??_D?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11096 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11097 /* ??_D?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11098 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vbase_dtor, 4)
11099 void __thiscall basic_istringstream_wchar_vbase_dtor(basic_istringstream_wchar *this)
11101 TRACE("(%p)\n", this);
11103 basic_istringstream_wchar_dtor(basic_istringstream_wchar_to_basic_ios(this));
11104 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base));
11107 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_vector_dtor, 8)
11108 basic_istringstream_wchar* __thiscall basic_istringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11110 basic_istringstream_wchar *this = basic_istringstream_wchar_from_basic_ios(base);
11112 TRACE("(%p %x)\n", this, flags);
11114 if(flags & 2) {
11115 /* we have an array, with the number of elements stored before the first object */
11116 INT_PTR i, *ptr = (INT_PTR *)this-1;
11118 for(i=*ptr-1; i>=0; i--)
11119 basic_istringstream_wchar_vbase_dtor(this+i);
11120 MSVCRT_operator_delete(ptr);
11121 } else {
11122 basic_istringstream_wchar_vbase_dtor(this);
11123 if(flags & 1)
11124 MSVCRT_operator_delete(this);
11127 return this;
11130 /* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11131 /* ?rdbuf@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11132 /* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11133 /* ?rdbuf@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11134 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_rdbuf, 4)
11135 basic_stringbuf_wchar* __thiscall basic_istringstream_wchar_rdbuf(const basic_istringstream_wchar *this)
11137 TRACE("(%p)\n", this);
11138 return (basic_stringbuf_wchar*)&this->strbuf;
11141 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
11142 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
11143 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
11144 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
11145 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_set, 8)
11146 void __thiscall basic_istringstream_wchar_str_set(basic_istringstream_wchar *this, const basic_string_wchar *str)
11148 TRACE("(%p %p)\n", this, str);
11149 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11152 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11153 /* ?str@?$basic_istringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11154 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11155 /* ?str@?$basic_istringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11156 DEFINE_THISCALL_WRAPPER(basic_istringstream_wchar_str_get, 8)
11157 basic_string_wchar* __thiscall basic_istringstream_wchar_str_get(const basic_istringstream_wchar *this, basic_string_wchar *ret)
11159 TRACE("(%p %p)\n", this, ret);
11160 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11163 static inline basic_ios_char* basic_stringstream_char_to_basic_ios(basic_stringstream_char *ptr)
11165 return (basic_ios_char*)((char*)ptr+basic_stringstream_char_vbtable1[1]);
11168 static inline basic_stringstream_char* basic_stringstream_char_from_basic_ios(basic_ios_char *ptr)
11170 return (basic_stringstream_char*)((char*)ptr-basic_stringstream_char_vbtable1[1]);
11173 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
11174 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@H@Z */
11175 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_str, 16)
11176 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_str(basic_stringstream_char *this,
11177 const basic_string_char *str, int mode, MSVCP_bool virt_init)
11179 basic_ios_char *basic_ios;
11181 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11183 if(virt_init) {
11184 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11185 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11186 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11187 basic_ios_char_ctor(basic_ios);
11188 }else {
11189 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11192 basic_stringbuf_char_ctor_str(&this->strbuf, str, mode);
11193 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11194 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11195 return this;
11198 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@H@Z */
11199 /* ??0?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA@H@Z */
11200 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor_mode, 12)
11201 basic_stringstream_char* __thiscall basic_stringstream_char_ctor_mode(
11202 basic_stringstream_char *this, int mode, MSVCP_bool virt_init)
11204 basic_ios_char *basic_ios;
11206 TRACE("(%p %d %d)\n", this, mode, virt_init);
11208 if(virt_init) {
11209 this->base.base1.vbtable = basic_stringstream_char_vbtable1;
11210 this->base.base2.vbtable = basic_stringstream_char_vbtable2;
11211 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11212 basic_ios_char_ctor(basic_ios);
11213 }else {
11214 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11217 basic_stringbuf_char_ctor_mode(&this->strbuf, mode);
11218 basic_iostream_char_ctor(&this->base, &this->strbuf.base, FALSE);
11219 basic_ios->base.vtable = &MSVCP_basic_stringstream_char_vtable;
11220 return this;
11223 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11224 /* ??_F?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11225 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_ctor, 4)
11226 basic_stringstream_char* __thiscall basic_stringstream_char_ctor(
11227 basic_stringstream_char *this)
11229 return basic_stringstream_char_ctor_mode(
11230 this, OPENMODE_out|OPENMODE_in, TRUE);
11233 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UAE@XZ */
11234 /* ??1?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UEAA@XZ */
11235 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_dtor, 4)
11236 void __thiscall basic_stringstream_char_dtor(basic_ios_char *base)
11238 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11240 TRACE("(%p)\n", this);
11242 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11243 basic_stringbuf_char_dtor(&this->strbuf);
11246 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXXZ */
11247 /* ??_D?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXXZ */
11248 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vbase_dtor, 4)
11249 void __thiscall basic_stringstream_char_vbase_dtor(basic_stringstream_char *this)
11251 TRACE("(%p)\n", this);
11253 basic_stringstream_char_dtor(basic_stringstream_char_to_basic_ios(this));
11254 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11257 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_vector_dtor, 8)
11258 basic_stringstream_char* __thiscall basic_stringstream_char_vector_dtor(basic_ios_char *base, unsigned int flags)
11260 basic_stringstream_char *this = basic_stringstream_char_from_basic_ios(base);
11262 TRACE("(%p %x)\n", this, flags);
11264 if(flags & 2) {
11265 /* we have an array, with the number of elements stored before the first object */
11266 INT_PTR i, *ptr = (INT_PTR *)this-1;
11268 for(i=*ptr-1; i>=0; i--)
11269 basic_stringstream_char_vbase_dtor(this+i);
11270 MSVCRT_operator_delete(ptr);
11271 } else {
11272 basic_stringstream_char_vbase_dtor(this);
11273 if(flags & 1)
11274 MSVCRT_operator_delete(this);
11277 return this;
11280 /* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11281 /* ?rdbuf@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBAPEAV?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11282 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_rdbuf, 4)
11283 basic_stringbuf_char* __thiscall basic_stringstream_char_rdbuf(const basic_stringstream_char *this)
11285 TRACE("(%p)\n", this);
11286 return (basic_stringbuf_char*)&this->strbuf;
11289 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
11290 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
11291 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_set, 8)
11292 void __thiscall basic_stringstream_char_str_set(basic_stringstream_char *this, const basic_string_char *str)
11294 TRACE("(%p %p)\n", this, str);
11295 basic_stringbuf_char_str_set(&this->strbuf, str);
11298 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11299 /* ?str@?$basic_stringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11300 DEFINE_THISCALL_WRAPPER(basic_stringstream_char_str_get, 8)
11301 basic_string_char* __thiscall basic_stringstream_char_str_get(const basic_stringstream_char *this, basic_string_char *ret)
11303 TRACE("(%p %p)\n", this, ret);
11304 return basic_stringbuf_char_str_get(&this->strbuf, ret);
11307 static inline basic_ios_wchar* basic_stringstream_wchar_to_basic_ios(basic_stringstream_wchar *ptr)
11309 return (basic_ios_wchar*)((char*)ptr+basic_stringstream_wchar_vbtable1[1]);
11312 static inline basic_stringstream_wchar* basic_stringstream_wchar_from_basic_ios(basic_ios_wchar *ptr)
11314 return (basic_stringstream_wchar*)((char*)ptr-basic_stringstream_wchar_vbtable1[1]);
11317 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
11318 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@AEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@1@H@Z */
11319 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_str(basic_stringstream_wchar *this,
11320 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11322 basic_ios_wchar *basic_ios;
11324 TRACE("(%p %p %d %d)\n", this, str, mode, virt_init);
11326 if(virt_init) {
11327 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11328 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11329 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11330 basic_ios_wchar_ctor(basic_ios);
11331 }else {
11332 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11335 basic_stringbuf_wchar_ctor_str(&this->strbuf, str, mode);
11336 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11337 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11338 return this;
11341 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@ABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
11342 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@AEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@1@H@Z */
11343 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_str, 16)
11344 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_str(basic_stringstream_wchar *this,
11345 const basic_string_wchar *str, int mode, MSVCP_bool virt_init)
11347 basic_stringstream_wchar_ctor_str(this, str, mode, virt_init);
11348 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11349 return this;
11352 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@H@Z */
11353 /* ??0?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@H@Z */
11354 static basic_stringstream_wchar* basic_stringstream_wchar_ctor_mode(
11355 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11357 basic_ios_wchar *basic_ios;
11359 TRACE("(%p %d %d)\n", this, mode, virt_init);
11361 if(virt_init) {
11362 this->base.base1.vbtable = basic_stringstream_wchar_vbtable1;
11363 this->base.base2.vbtable = basic_stringstream_wchar_vbtable2;
11364 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11365 basic_ios_wchar_ctor(basic_ios);
11366 }else {
11367 basic_ios = basic_istream_wchar_get_basic_ios(&this->base.base1);
11370 basic_stringbuf_wchar_ctor_mode(&this->strbuf, mode);
11371 basic_iostream_wchar_ctor(&this->base, &this->strbuf.base, FALSE);
11372 basic_ios->base.vtable = &MSVCP_basic_stringstream_wchar_vtable;
11373 return this;
11376 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE@H@Z */
11377 /* ??0?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAA@H@Z */
11378 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor_mode, 12)
11379 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor_mode(
11380 basic_stringstream_wchar *this, int mode, MSVCP_bool virt_init)
11382 basic_stringstream_wchar_ctor_mode(this, mode, virt_init);
11383 basic_istream_wchar_get_basic_ios(&this->base.base1)->base.vtable = &MSVCP_basic_stringstream_short_vtable;
11384 return this;
11387 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11388 /* ??_F?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11389 DEFINE_THISCALL_WRAPPER(basic_stringstream_short_ctor, 4)
11390 basic_stringstream_wchar* __thiscall basic_stringstream_short_ctor(
11391 basic_stringstream_wchar *this)
11393 return basic_stringstream_short_ctor_mode(
11394 this, OPENMODE_out|OPENMODE_in, TRUE);
11397 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UAE@XZ */
11398 /* ??1?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@UEAA@XZ */
11399 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UAE@XZ */
11400 /* ??1?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@UEAA@XZ */
11401 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_dtor, 4)
11402 void __thiscall basic_stringstream_wchar_dtor(basic_ios_wchar *base)
11404 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11406 TRACE("(%p)\n", this);
11408 basic_iostream_wchar_dtor(basic_iostream_wchar_to_basic_ios(&this->base));
11409 basic_stringbuf_wchar_dtor(&this->strbuf);
11412 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXXZ */
11413 /* ??_D?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXXZ */
11414 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXXZ */
11415 /* ??_D?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXXZ */
11416 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vbase_dtor, 4)
11417 void __thiscall basic_stringstream_wchar_vbase_dtor(basic_stringstream_wchar *this)
11419 TRACE("(%p)\n", this);
11421 basic_stringstream_wchar_dtor(basic_stringstream_wchar_to_basic_ios(this));
11422 basic_ios_wchar_dtor(basic_istream_wchar_get_basic_ios(&this->base.base1));
11425 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_vector_dtor, 8)
11426 basic_stringstream_wchar* __thiscall basic_stringstream_wchar_vector_dtor(basic_ios_wchar *base, unsigned int flags)
11428 basic_stringstream_wchar *this = basic_stringstream_wchar_from_basic_ios(base);
11430 TRACE("(%p %x)\n", this, flags);
11432 if(flags & 2) {
11433 /* we have an array, with the number of elements stored before the first object */
11434 INT_PTR i, *ptr = (INT_PTR *)this-1;
11436 for(i=*ptr-1; i>=0; i--)
11437 basic_stringstream_wchar_vbase_dtor(this+i);
11438 MSVCRT_operator_delete(ptr);
11439 } else {
11440 basic_stringstream_wchar_vbase_dtor(this);
11441 if(flags & 1)
11442 MSVCRT_operator_delete(this);
11445 return this;
11448 /* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBEPAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11449 /* ?rdbuf@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBAPEAV?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11450 /* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBEPAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11451 /* ?rdbuf@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBAPEAV?$basic_stringbuf@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11452 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_rdbuf, 4)
11453 basic_stringbuf_wchar* __thiscall basic_stringstream_wchar_rdbuf(const basic_stringstream_wchar *this)
11455 TRACE("(%p)\n", this);
11456 return (basic_stringbuf_wchar*)&this->strbuf;
11459 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEXABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
11460 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAXAEBV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z */
11461 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEXABV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
11462 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAXAEBV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@@Z */
11463 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_set, 8)
11464 void __thiscall basic_stringstream_wchar_str_set(basic_stringstream_wchar *this, const basic_string_wchar *str)
11466 TRACE("(%p %p)\n", this, str);
11467 basic_stringbuf_wchar_str_set(&this->strbuf, str);
11470 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11471 /* ?str@?$basic_stringstream@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
11472 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11473 /* ?str@?$basic_stringstream@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
11474 DEFINE_THISCALL_WRAPPER(basic_stringstream_wchar_str_get, 8)
11475 basic_string_wchar* __thiscall basic_stringstream_wchar_str_get(const basic_stringstream_wchar *this, basic_string_wchar *ret)
11477 TRACE("(%p %p)\n", this, ret);
11478 return basic_stringbuf_wchar_str_get(&this->strbuf, ret);
11481 /* ?_Init@strstreambuf@std@@IAEXHPAD0H@Z */
11482 /* ?_Init@strstreambuf@std@@IEAAX_JPEAD1H@Z */
11483 DEFINE_THISCALL_WRAPPER(strstreambuf__Init, 20)
11484 void __thiscall strstreambuf__Init(strstreambuf *this, streamsize len, char *g, char *p, int mode)
11486 TRACE("(%p %ld %p %p %d)\n", this, len, g, p, mode);
11488 this->minsize = 32;
11489 this->endsave = NULL;
11490 this->strmode = mode;
11491 this->palloc = NULL;
11492 this->pfree = NULL;
11494 if(!g) {
11495 this->strmode |= STRSTATE_Dynamic;
11496 if(len > this->minsize)
11497 this->minsize = len;
11498 this->seekhigh = NULL;
11499 return;
11502 if(len < 0)
11503 len = INT_MAX;
11504 else if(!len)
11505 len = strlen(g);
11507 this->seekhigh = g+len;
11508 basic_streambuf_char_setg(&this->base, g, g, p ? p : this->seekhigh);
11509 if(p)
11510 basic_streambuf_char_setp(&this->base, p, this->seekhigh);
11513 /* ??0strstreambuf@std@@QAE@PACH0@Z */
11514 /* ??0strstreambuf@std@@QEAA@PEAC_J0@Z */
11515 /* ??0strstreambuf@std@@QAE@PADH0@Z */
11516 /* ??0strstreambuf@std@@QEAA@PEAD_J0@Z */
11517 /* ??0strstreambuf@std@@QAE@PAEH0@Z */
11518 /* ??0strstreambuf@std@@QEAA@PEAE_J0@Z */
11519 static strstreambuf* strstreambuf_ctor_get_put(strstreambuf *this, char *g, streamsize len, char *p)
11521 TRACE("(%p %p %ld %p)\n", this, g, len, p);
11523 basic_streambuf_char_ctor(&this->base);
11524 this->base.vtable = &MSVCP_strstreambuf_vtable;
11526 strstreambuf__Init(this, len, g, p, 0);
11527 return this;
11530 /* ?_Tidy@strstreambuf@std@@IAEXXZ */
11531 /* ?_Tidy@strstreambuf@std@@IEAAXXZ */
11532 DEFINE_THISCALL_WRAPPER(strstreambuf__Tidy, 4)
11533 void __thiscall strstreambuf__Tidy(strstreambuf *this)
11535 TRACE("(%p)\n", this);
11537 if((this->strmode & STRSTATE_Allocated) && !(this->strmode & STRSTATE_Frozen)) {
11538 if(this->pfree)
11539 this->pfree(basic_streambuf_char_eback(&this->base));
11540 else
11541 MSVCRT_operator_delete(basic_streambuf_char_eback(&this->base));
11544 this->endsave = NULL;
11545 this->seekhigh = NULL;
11546 this->strmode &= ~(STRSTATE_Allocated | STRSTATE_Frozen);
11547 basic_streambuf_char_setg(&this->base, NULL, NULL, NULL);
11548 basic_streambuf_char_setp(&this->base, NULL, NULL);
11551 /* ??1strstreambuf@std@@UAE@XZ */
11552 /* ??1strstreambuf@std@@UEAA@XZ */
11553 DEFINE_THISCALL_WRAPPER(strstreambuf_dtor, 4)
11554 void __thiscall strstreambuf_dtor(strstreambuf *this)
11556 TRACE("(%p)\n", this);
11558 strstreambuf__Tidy(this);
11559 basic_streambuf_char_dtor(&this->base);
11562 DEFINE_THISCALL_WRAPPER(strstreambuf_vector_dtor, 8)
11563 strstreambuf* __thiscall strstreambuf_vector_dtor(strstreambuf *this, unsigned int flags)
11565 TRACE("(%p %x)\n", this, flags);
11566 if(flags & 2) {
11567 /* we have an array, with the number of elements stored before the first object */
11568 INT_PTR i, *ptr = (INT_PTR *)this-1;
11570 for(i=*ptr-1; i>=0; i--)
11571 strstreambuf_dtor(this+i);
11572 MSVCRT_operator_delete(ptr);
11573 } else {
11574 strstreambuf_dtor(this);
11575 if(flags & 1)
11576 MSVCRT_operator_delete(this);
11579 return this;
11582 /* ?freeze@strstreambuf@std@@QAEX_N@Z */
11583 /* ?freeze@strstreambuf@std@@QEAAX_N@Z */
11584 DEFINE_THISCALL_WRAPPER(strstreambuf_freeze, 8)
11585 void __thiscall strstreambuf_freeze(strstreambuf *this, MSVCP_bool freeze)
11587 TRACE("(%p %d)\n", this, freeze);
11589 if(!freeze == !(this->strmode & STRSTATE_Frozen))
11590 return;
11592 if(freeze) {
11593 this->strmode |= STRSTATE_Frozen;
11594 this->endsave = basic_streambuf_char_epptr(&this->base);
11595 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11596 basic_streambuf_char_pptr(&this->base), basic_streambuf_char_eback(&this->base));
11597 }else {
11598 this->strmode &= ~STRSTATE_Frozen;
11599 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base),
11600 basic_streambuf_char_pptr(&this->base), this->endsave);
11604 /* ?overflow@strstreambuf@std@@MAEHH@Z */
11605 /* ?overflow@strstreambuf@std@@MEAAHH@Z */
11606 DEFINE_THISCALL_WRAPPER(strstreambuf_overflow, 8)
11607 int __thiscall strstreambuf_overflow(strstreambuf *this, int c)
11609 MSVCP_size_t old_size, size;
11610 char *ptr, *buf;
11612 TRACE("(%p %d)\n", this, c);
11614 if(c == EOF)
11615 return !EOF;
11617 if(this->strmode & STRSTATE_Frozen)
11618 return EOF;
11620 ptr = basic_streambuf_char_pptr(&this->base);
11621 if(ptr && ptr<basic_streambuf_char_epptr(&this->base))
11622 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11624 if(!(this->strmode & STRSTATE_Dynamic) || (this->strmode & STRSTATE_Constant))
11625 return EOF;
11627 ptr = basic_streambuf_char_eback(&this->base);
11628 old_size = ptr ? basic_streambuf_char_epptr(&this->base) - ptr : 0;
11630 size = old_size + old_size/2;
11631 if(size < this->minsize)
11632 size = this->minsize;
11634 if(this->palloc)
11635 buf = this->palloc(size);
11636 else
11637 buf = MSVCRT_operator_new(size);
11638 if(!buf)
11639 return EOF;
11641 memcpy(buf, ptr, old_size);
11642 if(this->strmode & STRSTATE_Allocated) {
11643 if(this->pfree)
11644 this->pfree(ptr);
11645 else
11646 MSVCRT_operator_delete(ptr);
11649 this->strmode |= STRSTATE_Allocated;
11650 if(!old_size) {
11651 this->seekhigh = buf;
11652 basic_streambuf_char_setp(&this->base, buf, buf+size);
11653 basic_streambuf_char_setg(&this->base, buf, buf, buf);
11654 }else {
11655 this->seekhigh = this->seekhigh-ptr+buf;
11656 basic_streambuf_char_setp_next(&this->base, basic_streambuf_char_pbase(&this->base)-ptr+buf,
11657 basic_streambuf_char_pptr(&this->base)-ptr+buf, buf+size);
11658 basic_streambuf_char_setg(&this->base, buf, basic_streambuf_char_gptr(&this->base)-ptr+buf,
11659 basic_streambuf_char_pptr(&this->base));
11662 return (unsigned char)(*basic_streambuf_char__Pninc(&this->base) = c);
11665 /* ?pbackfail@strstreambuf@std@@MAEHH@Z */
11666 /* ?pbackfail@strstreambuf@std@@MEAAHH@Z */
11667 DEFINE_THISCALL_WRAPPER(strstreambuf_pbackfail, 8)
11668 int __thiscall strstreambuf_pbackfail(strstreambuf *this, int c)
11670 char *ptr = basic_streambuf_char_gptr(&this->base);
11672 TRACE("(%p %d)\n", this, c);
11674 if(ptr<=basic_streambuf_char_eback(&this->base)
11675 || ((this->strmode & STRSTATE_Constant) && c!=ptr[-1]))
11676 return EOF;
11678 basic_streambuf_char_gbump(&this->base, -1);
11679 if(c == EOF)
11680 return !EOF;
11681 if(this->strmode & STRSTATE_Constant)
11682 return (unsigned char)c;
11684 return (unsigned char)(ptr[0] = c);
11687 /* ?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z */
11688 /* ?seekoff@strstreambuf@std@@MEAA?AV?$fpos@H@2@_JW4seekdir@ios_base@2@H@Z */
11689 DEFINE_THISCALL_WRAPPER(strstreambuf_seekoff, 20)
11690 fpos_int* __thiscall strstreambuf_seekoff(strstreambuf *this, fpos_int *ret, streamoff off, int way, int mode)
11692 char *eback = basic_streambuf_char_eback(&this->base);
11693 char *pptr = basic_streambuf_char_pptr(&this->base);
11694 char *gptr = basic_streambuf_char_gptr(&this->base);
11696 TRACE("(%p %p %ld %d %d)\n", this, ret, off, way, mode);
11698 ret->off = 0;
11699 ret->state = 0;
11701 if(pptr > this->seekhigh)
11702 this->seekhigh = pptr;
11704 if((mode & OPENMODE_in) && gptr) {
11705 if(way==SEEKDIR_cur && !(mode & OPENMODE_out))
11706 off += gptr-eback;
11707 else if(way == SEEKDIR_end)
11708 off += this->seekhigh-eback;
11709 else if(way != SEEKDIR_beg)
11710 off = -1;
11712 if(off<0 || off>this->seekhigh-eback) {
11713 off = -1;
11714 }else {
11715 basic_streambuf_char_gbump(&this->base, eback-gptr+off);
11716 if((mode & OPENMODE_out) && pptr) {
11717 basic_streambuf_char_setp_next(&this->base, eback,
11718 gptr, basic_streambuf_char_epptr(&this->base));
11721 }else if((mode & OPENMODE_out) && pptr) {
11722 if(way == SEEKDIR_cur)
11723 off += pptr-eback;
11724 else if(way == SEEKDIR_end)
11725 off += this->seekhigh-eback;
11726 else if(way != SEEKDIR_beg)
11727 off = -1;
11729 if(off<0 || off>this->seekhigh-eback)
11730 off = -1;
11731 else
11732 basic_streambuf_char_pbump(&this->base, eback-pptr+off);
11733 }else {
11734 off = -1;
11737 ret->pos = off;
11738 return ret;
11741 /* ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z */
11742 /* ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z */
11743 DEFINE_THISCALL_WRAPPER(strstreambuf_seekpos, 36)
11744 fpos_int* __thiscall strstreambuf_seekpos(strstreambuf *this, fpos_int *ret, fpos_int pos, int mode)
11746 TRACE("(%p %p %s %d)\n", this, ret, debugstr_fpos_int(&pos), mode);
11748 if(pos.off==-1 && pos.pos==0 && pos.state==0) {
11749 *ret = pos;
11750 return ret;
11753 return strstreambuf_seekoff(this, ret, pos.off, SEEKDIR_beg, mode);
11756 /* ?underflow@strstreambuf@std@@MAEHXZ */
11757 /* ?underflow@strstreambuf@std@@MEAAHXZ */
11758 DEFINE_THISCALL_WRAPPER(strstreambuf_underflow, 4)
11759 int __thiscall strstreambuf_underflow(strstreambuf *this)
11761 char *gptr = basic_streambuf_char_gptr(&this->base);
11762 char *pptr;
11764 TRACE("(%p)\n", this);
11766 if(!gptr)
11767 return EOF;
11769 if(gptr < basic_streambuf_char_egptr(&this->base))
11770 return (unsigned char)(*gptr);
11772 pptr = basic_streambuf_char_gptr(&this->base);
11773 if(pptr > this->seekhigh)
11774 this->seekhigh = pptr;
11776 if(this->seekhigh <= gptr)
11777 return EOF;
11779 basic_streambuf_char_setg(&this->base, basic_streambuf_char_eback(&this->base),
11780 gptr, this->seekhigh);
11781 return (unsigned char)(*gptr);
11784 static inline basic_ios_char* ostrstream_to_basic_ios(ostrstream *ptr)
11786 return (basic_ios_char*)((char*)ptr+ostrstream_vbtable[1]);
11789 static inline ostrstream* ostrstream_from_basic_ios(basic_ios_char *ptr)
11791 return (ostrstream*)((char*)ptr-ostrstream_vbtable[1]);
11794 /* ??0ostrstream@std@@QAE@PADHH@Z */
11795 DEFINE_THISCALL_WRAPPER(ostrstream_ctor, 20)
11796 ostrstream* __thiscall ostrstream_ctor(ostrstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11798 basic_ios_char *basic_ios;
11800 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11802 if(virt_init) {
11803 this->base.vbtable = ostrstream_vbtable;
11804 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11805 basic_ios_char_ctor(basic_ios);
11806 }else {
11807 basic_ios = basic_ostream_char_get_basic_ios(&this->base);
11810 strstreambuf_ctor_get_put(&this->buf, buf, size,
11811 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11812 basic_ostream_char_ctor(&this->base, &this->buf.base, FALSE, TRUE, FALSE);
11813 basic_ios->base.vtable = &MSVCP_ostrstream_vtable;
11814 return this;
11817 /* ??1ostrstream@std@@UAE@XZ */
11818 /* ??1ostrstream@std@@UEAA@XZ */
11819 DEFINE_THISCALL_WRAPPER(ostrstream_dtor, 4)
11820 void __thiscall ostrstream_dtor(basic_ios_char *base)
11822 ostrstream *this = ostrstream_from_basic_ios(base);
11824 TRACE("(%p)\n", this);
11826 basic_ostream_char_dtor(basic_ostream_char_to_basic_ios(&this->base));
11827 strstreambuf_dtor(&this->buf);
11830 static void ostrstream_vbase_dtor(ostrstream *this)
11832 TRACE("(%p)\n", this);
11834 ostrstream_dtor(ostrstream_to_basic_ios(this));
11835 basic_ios_char_dtor(basic_ostream_char_get_basic_ios(&this->base));
11838 DEFINE_THISCALL_WRAPPER(ostrstream_vector_dtor, 8)
11839 ostrstream* __thiscall ostrstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11841 ostrstream *this = ostrstream_from_basic_ios(base);
11843 TRACE("(%p %x)\n", this, flags);
11845 if(flags & 2) {
11846 /* we have an array, with the number of elements stored before the first object */
11847 INT_PTR i, *ptr = (INT_PTR *)this-1;
11849 for(i=*ptr-1; i>=0; i--)
11850 ostrstream_vbase_dtor(this+i);
11851 MSVCRT_operator_delete(ptr);
11852 } else {
11853 ostrstream_vbase_dtor(this);
11854 if(flags & 1)
11855 MSVCRT_operator_delete(this);
11858 return this;
11861 static inline istrstream* istrstream_from_basic_ios(basic_ios_char *ptr)
11863 return (istrstream*)((char*)ptr-istrstream_vbtable[1]);
11866 /* ??1istrstream@std@@UAE@XZ */
11867 /* ??1istrstream@std@@UEAA@XZ */
11868 DEFINE_THISCALL_WRAPPER(istrstream_dtor, 4)
11869 void __thiscall istrstream_dtor(basic_ios_char *base)
11871 istrstream *this = istrstream_from_basic_ios(base);
11873 TRACE("(%p)\n", this);
11875 basic_istream_char_dtor(basic_istream_char_to_basic_ios(&this->base));
11876 strstreambuf_dtor(&this->buf);
11879 static inline basic_ios_char* strstream_to_basic_ios(strstream *ptr)
11881 return (basic_ios_char*)((char*)ptr+strstream_vbtable1[1]);
11884 static inline strstream* strstream_from_basic_ios(basic_ios_char *ptr)
11886 return (strstream*)((char*)ptr-strstream_vbtable1[1]);
11889 /* ??0strstream@std@@QAE@PADHH@Z */
11890 /* ??0strstream@std@@QEAA@PEAD_JH@Z */
11891 DEFINE_THISCALL_WRAPPER(strstream_ctor, 20)
11892 strstream* __thiscall strstream_ctor(strstream *this, char *buf, streamsize size, int mode, MSVCP_bool virt_init)
11894 basic_ios_char *basic_ios;
11896 TRACE("(%p %p %ld %d %d)\n", this, buf, size, mode, virt_init);
11898 if(virt_init) {
11899 this->base.base1.vbtable = strstream_vbtable1;
11900 this->base.base2.vbtable = strstream_vbtable2;
11901 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11902 basic_ios_char_ctor(basic_ios);
11903 }else {
11904 basic_ios = basic_istream_char_get_basic_ios(&this->base.base1);
11907 strstreambuf_ctor_get_put(&this->buf, buf, size,
11908 buf && (mode & OPENMODE_app) ? buf+strlen(buf) : buf);
11909 basic_iostream_char_ctor(&this->base, &this->buf.base, FALSE);
11910 basic_ios->base.vtable = &MSVCP_strstream_vtable;
11911 return this;
11914 /* ??1strstream@std@@UAE@XZ */
11915 /* ??1strstream@std@@UEAA@XZ */
11916 DEFINE_THISCALL_WRAPPER(strstream_dtor, 4)
11917 void __thiscall strstream_dtor(basic_ios_char *base)
11919 strstream *this = strstream_from_basic_ios(base);
11921 TRACE("(%p)\n", this);
11923 basic_iostream_char_dtor(basic_iostream_char_to_basic_ios(&this->base));
11924 strstreambuf_dtor(&this->buf);
11927 static void strstream_vbase_dtor(strstream *this)
11929 TRACE("(%p)\n", this);
11931 strstream_dtor(strstream_to_basic_ios(this));
11932 basic_ios_char_dtor(basic_istream_char_get_basic_ios(&this->base.base1));
11935 DEFINE_THISCALL_WRAPPER(strstream_vector_dtor, 8)
11936 strstream* __thiscall strstream_vector_dtor(basic_ios_char *base, unsigned int flags)
11938 strstream *this = strstream_from_basic_ios(base);
11940 TRACE("(%p %x)\n", this, flags);
11942 if(flags & 2) {
11943 /* we have an array, with the number of elements stored before the first object */
11944 INT_PTR i, *ptr = (INT_PTR *)this-1;
11946 for(i=*ptr-1; i>=0; i--)
11947 strstream_vbase_dtor(this+i);
11948 MSVCRT_operator_delete(ptr);
11949 } else {
11950 strstream_vbase_dtor(this);
11951 if(flags & 1)
11952 MSVCRT_operator_delete(this);
11955 return this;
11958 static void __cdecl setprecision_func(ios_base *base, streamsize prec)
11960 ios_base_precision_set(base, prec);
11963 /* ?setprecision@std@@YA?AU?$_Smanip@H@1@H@Z */
11964 /* ?setprecision@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11965 manip_streamsize* __cdecl setprecision(manip_streamsize *ret, streamsize prec)
11967 TRACE("(%p %ld)\n", ret, prec);
11969 ret->pfunc = setprecision_func;
11970 ret->arg = prec;
11971 return ret;
11974 static void __cdecl setw_func(ios_base *base, streamsize width)
11976 ios_base_width_set(base, width);
11979 /* ?setw@std@@YA?AU?$_Smanip@H@1@H@Z */
11980 /* ?setw@std@@YA?AU?$_Smanip@_J@1@_J@Z */
11981 manip_streamsize* __cdecl setw(manip_streamsize *ret, streamsize width)
11983 TRACE("(%p %ld)\n", ret, width);
11985 ret->pfunc = setw_func;
11986 ret->arg = width;
11987 return ret;
11990 static void __cdecl resetioflags_func(ios_base *base, int mask)
11992 ios_base_setf_mask(base, 0, mask);
11995 /* ?resetiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
11996 manip_int* __cdecl resetiosflags(manip_int *ret, int mask)
11998 TRACE("(%p %d)\n", ret, mask);
12000 ret->pfunc = resetioflags_func;
12001 ret->arg = mask;
12002 return ret;
12005 static void __cdecl setiosflags_func(ios_base *base, int mask)
12007 ios_base_setf_mask(base, FMTFLAG_mask, mask);
12010 /* ?setiosflags@std@@YA?AU?$_Smanip@H@1@H@Z */
12011 manip_int* __cdecl setiosflags(manip_int *ret, int mask)
12013 TRACE("(%p %d)\n", ret, mask);
12015 ret->pfunc = setiosflags_func;
12016 ret->arg = mask;
12017 return ret;
12020 static void __cdecl setbase_func(ios_base *base, int set_base)
12022 if(set_base == 10)
12023 set_base = FMTFLAG_dec;
12024 else if(set_base == 8)
12025 set_base = FMTFLAG_oct;
12026 else if(set_base == 16)
12027 set_base = FMTFLAG_hex;
12028 else
12029 set_base = 0;
12031 ios_base_setf_mask(base, set_base, FMTFLAG_basefield);
12034 /* ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z */
12035 manip_int* __cdecl setbase(manip_int *ret, int base)
12037 TRACE("(%p %d)\n", ret, base);
12039 ret->pfunc = setbase_func;
12040 ret->arg = base;
12041 return ret;
12044 static basic_filebuf_char filebuf_char_stdin;
12045 /* ?cin@std@@3V?$basic_istream@DU?$char_traits@D@std@@@1@A */
12046 struct {
12047 basic_istream_char obj;
12048 basic_ios_char vbase;
12049 } cin = { { 0 } };
12050 /* ?_Ptr_cin@std@@3PAV?$basic_istream@DU?$char_traits@D@std@@@1@A */
12051 /* ?_Ptr_cin@std@@3PEAV?$basic_istream@DU?$char_traits@D@std@@@1@EA */
12052 basic_istream_char *_Ptr_cin = &cin.obj;
12054 static basic_filebuf_wchar filebuf_short_stdin;
12055 /* ?wcin@std@@3V?$basic_istream@GU?$char_traits@G@std@@@1@A */
12056 struct {
12057 basic_istream_wchar obj;
12058 basic_ios_wchar vbase;
12059 } ucin = { { 0 } };
12060 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@GU?$char_traits@G@std@@@1@A */
12061 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@GU?$char_traits@G@std@@@1@EA */
12062 basic_istream_wchar *_Ptr_ucin = &ucin.obj;
12064 static basic_filebuf_wchar filebuf_wchar_stdin;
12065 /* ?wcin@std@@3V?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12066 struct {
12067 basic_istream_wchar obj;
12068 basic_ios_wchar vbase;
12069 } wcin = { { 0 } };
12070 /* ?_Ptr_wcin@std@@3PAV?$basic_istream@_WU?$char_traits@_W@std@@@1@A */
12071 /* ?_Ptr_wcin@std@@3PEAV?$basic_istream@_WU?$char_traits@_W@std@@@1@EA */
12072 basic_istream_wchar *_Ptr_wcin = &wcin.obj;
12074 static basic_filebuf_char filebuf_char_stdout;
12075 /* ?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12076 struct {
12077 basic_ostream_char obj;
12078 basic_ios_char vbase;
12079 } cout = { { 0 } };
12080 /* ?_Ptr_cout@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12081 /* ?_Ptr_cout@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12082 basic_ostream_char *_Ptr_cout = &cout.obj;
12084 static basic_filebuf_wchar filebuf_short_stdout;
12085 /* ?wcout@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12086 struct {
12087 basic_ostream_wchar obj;
12088 basic_ios_wchar vbase;
12089 } ucout = { { 0 } };
12090 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12091 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12092 basic_ostream_wchar *_Ptr_ucout = &ucout.obj;
12094 static basic_filebuf_wchar filebuf_wchar_stdout;
12095 /* ?wcout@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12096 struct {
12097 basic_ostream_wchar obj;
12098 basic_ios_wchar vbase;
12099 } wcout = { { 0 } };
12100 /* ?_Ptr_wcout@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12101 /* ?_Ptr_wcout@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12102 basic_ostream_wchar *_Ptr_wcout = &wcout.obj;
12104 static basic_filebuf_char filebuf_char_stderr;
12105 /* ?cerr@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12106 struct {
12107 basic_ostream_char obj;
12108 basic_ios_char vbase;
12109 } cerr = { { 0 } };
12110 /* ?_Ptr_cerr@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12111 /* ?_Ptr_cerr@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12112 basic_ostream_char *_Ptr_cerr = &cerr.obj;
12114 static basic_filebuf_wchar filebuf_short_stderr;
12115 /* ?wcerr@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12116 struct {
12117 basic_ostream_wchar obj;
12118 basic_ios_wchar vbase;
12119 } ucerr = { { 0 } };
12120 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12121 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12122 basic_ostream_wchar *_Ptr_ucerr = &ucerr.obj;
12124 static basic_filebuf_wchar filebuf_wchar_stderr;
12125 /* ?wcerr@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12126 struct {
12127 basic_ostream_wchar obj;
12128 basic_ios_wchar vbase;
12129 } wcerr = { { 0 } };
12130 /* ?_Ptr_wcerr@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12131 /* ?_Ptr_wcerr@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12132 basic_ostream_wchar *_Ptr_wcerr = &wcerr.obj;
12134 static basic_filebuf_char filebuf_char_log;
12135 /* ?clog@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12136 struct {
12137 basic_ostream_char obj;
12138 basic_ios_char vbase;
12139 } clog = { { 0 } };
12140 /* ?_Ptr_clog@std@@3PAV?$basic_ostream@DU?$char_traits@D@std@@@1@A */
12141 /* ?_Ptr_clog@std@@3PEAV?$basic_ostream@DU?$char_traits@D@std@@@1@EA */
12142 basic_ostream_char *_Ptr_clog = &clog.obj;
12144 static basic_filebuf_wchar filebuf_short_log;
12145 /* ?wclog@std@@3V?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12146 struct {
12147 basic_ostream_wchar obj;
12148 basic_ios_wchar vbase;
12149 } uclog = { { 0 } };
12150 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@GU?$char_traits@G@std@@@1@A */
12151 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@GU?$char_traits@G@std@@@1@EA */
12152 basic_ostream_wchar *_Ptr_uclog = &uclog.obj;
12154 static basic_filebuf_wchar filebuf_wchar_log;
12155 /* ?wclog@std@@3V?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12156 struct {
12157 basic_ostream_wchar obj;
12158 basic_ios_wchar vbase;
12159 } wclog = { { 0 } };
12160 /* ?_Ptr_wclog@std@@3PAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@A */
12161 /* ?_Ptr_wclog@std@@3PEAV?$basic_ostream@_WU?$char_traits@_W@std@@@1@EA */
12162 basic_ostream_wchar *_Ptr_wclog = &wclog.obj;
12164 /* ?_Init_cnt@Init@ios_base@std@@0HA */
12165 int ios_base_Init__Init_cnt = -1;
12167 /* ?_Init_ctor@Init@ios_base@std@@CAXPAV123@@Z */
12168 /* ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z */
12169 static void ios_base_Init__Init_ctor(void *this)
12171 TRACE("(%p)\n", this);
12173 if(ios_base_Init__Init_cnt < 0)
12174 ios_base_Init__Init_cnt = 1;
12175 else
12176 ios_base_Init__Init_cnt++;
12179 /* ??0Init@ios_base@std@@QAE@XZ */
12180 /* ??0Init@ios_base@std@@QEAA@XZ */
12181 DEFINE_THISCALL_WRAPPER(ios_base_Init_ctor, 4)
12182 void* __thiscall ios_base_Init_ctor(void *this)
12184 ios_base_Init__Init_ctor(this);
12185 return this;
12188 /* ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z */
12189 /* ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z */
12190 static void ios_base_Init__Init_dtor(void *this)
12192 TRACE("(%p)\n", this);
12194 ios_base_Init__Init_cnt--;
12195 if(!ios_base_Init__Init_cnt) {
12196 basic_ostream_char_flush(&cout.obj);
12197 basic_ostream_char_flush(&cerr.obj);
12198 basic_ostream_char_flush(&clog.obj);
12202 /* ??1Init@ios_base@std@@QAE@XZ */
12203 /* ??1Init@ios_base@std@@QEAA@XZ */
12204 DEFINE_THISCALL_WRAPPER(ios_base_Init_dtor, 4)
12205 void __thiscall ios_base_Init_dtor(void *this)
12207 ios_base_Init__Init_dtor(this);
12210 /* ??4Init@ios_base@std@@QAEAAV012@ABV012@@Z */
12211 /* ??4Init@ios_base@std@@QEAAAEAV012@AEBV012@@Z */
12212 DEFINE_THISCALL_WRAPPER(ios_base_Init_op_assign, 8)
12213 void* __thiscall ios_base_Init_op_assign(void *this, void *rhs)
12215 TRACE("(%p %p)\n", this, rhs);
12216 return this;
12219 /* ?_Init_cnt@_Winit@std@@0HA */
12220 int _Winit__Init_cnt = -1;
12222 /* ??0_Winit@std@@QAE@XZ */
12223 /* ??0_Winit@std@@QEAA@XZ */
12224 DEFINE_THISCALL_WRAPPER(_Winit_ctor, 4)
12225 void* __thiscall _Winit_ctor(void *this)
12227 TRACE("(%p)\n", this);
12229 if(_Winit__Init_cnt < 0)
12230 _Winit__Init_cnt = 1;
12231 else
12232 _Winit__Init_cnt++;
12234 return this;
12237 /* ??1_Winit@std@@QAE@XZ */
12238 /* ??1_Winit@std@@QAE@XZ */
12239 DEFINE_THISCALL_WRAPPER(_Winit_dtor, 4)
12240 void __thiscall _Winit_dtor(void *this)
12242 TRACE("(%p)\n", this);
12244 _Winit__Init_cnt--;
12245 if(!_Winit__Init_cnt) {
12246 basic_ostream_wchar_flush(&wcout.obj);
12247 basic_ostream_wchar_flush(&wcerr.obj);
12248 basic_ostream_wchar_flush(&wclog.obj);
12252 /* ??4_Winit@std@@QAEAAV01@ABV01@@Z */
12253 /* ??4_Winit@std@@QEAAAEAV01@AEBV01@@Z */
12254 DEFINE_THISCALL_WRAPPER(_Winit_op_assign, 8)
12255 void* __thiscall _Winit_op_assign(void *this, void *rhs)
12257 TRACE("(%p %p)\n", this, rhs);
12258 return this;
12261 void init_io(void *base)
12263 #ifdef __x86_64__
12264 init_iosb_rtti(base);
12265 init_ios_base_rtti(base);
12266 init_basic_ios_char_rtti(base);
12267 init_basic_ios_wchar_rtti(base);
12268 init_basic_ios_short_rtti(base);
12269 init_basic_streambuf_char_rtti(base);
12270 init_basic_streambuf_wchar_rtti(base);
12271 init_basic_streambuf_short_rtti(base);
12272 init_basic_filebuf_char_rtti(base);
12273 init_basic_filebuf_wchar_rtti(base);
12274 init_basic_filebuf_short_rtti(base);
12275 init_basic_stringbuf_char_rtti(base);
12276 init_basic_stringbuf_wchar_rtti(base);
12277 init_basic_stringbuf_short_rtti(base);
12278 init_basic_ostream_char_rtti(base);
12279 init_basic_ostream_wchar_rtti(base);
12280 init_basic_ostream_short_rtti(base);
12281 init_basic_istream_char_rtti(base);
12282 init_basic_istream_wchar_rtti(base);
12283 init_basic_istream_short_rtti(base);
12284 init_basic_iostream_char_rtti(base);
12285 init_basic_iostream_wchar_rtti(base);
12286 init_basic_iostream_short_rtti(base);
12287 init_basic_ofstream_char_rtti(base);
12288 init_basic_ofstream_wchar_rtti(base);
12289 init_basic_ofstream_short_rtti(base);
12290 init_basic_ifstream_char_rtti(base);
12291 init_basic_ifstream_wchar_rtti(base);
12292 init_basic_ifstream_short_rtti(base);
12293 init_basic_fstream_char_rtti(base);
12294 init_basic_fstream_wchar_rtti(base);
12295 init_basic_fstream_short_rtti(base);
12296 init_basic_ostringstream_char_rtti(base);
12297 init_basic_ostringstream_wchar_rtti(base);
12298 init_basic_ostringstream_short_rtti(base);
12299 init_basic_istringstream_char_rtti(base);
12300 init_basic_istringstream_wchar_rtti(base);
12301 init_basic_istringstream_short_rtti(base);
12302 init_basic_stringstream_char_rtti(base);
12303 init_basic_stringstream_wchar_rtti(base);
12304 init_basic_stringstream_short_rtti(base);
12305 init_strstreambuf_rtti(base);
12306 init_strstream_rtti(base);
12307 init_ostrstream_rtti(base);
12308 #endif
12310 basic_filebuf_char_ctor_file(&filebuf_char_stdin, stdin);
12311 basic_istream_char_ctor(&cin.obj, &filebuf_char_stdin.base, FALSE/*FIXME*/, TRUE);
12313 basic_filebuf_short_ctor_file(&filebuf_short_stdin, stdin);
12314 basic_istream_short_ctor(&ucin.obj, &filebuf_short_stdin.base, FALSE/*FIXME*/, TRUE);
12316 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdin, stdin);
12317 basic_istream_wchar_ctor(&wcin.obj, &filebuf_wchar_stdin.base, FALSE/*FIXME*/, TRUE);
12319 basic_filebuf_char_ctor_file(&filebuf_char_stdout, stdout);
12320 basic_ostream_char_ctor(&cout.obj, &filebuf_char_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12322 basic_filebuf_short_ctor_file(&filebuf_short_stdout, stdout);
12323 basic_ostream_short_ctor(&ucout.obj, &filebuf_short_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12325 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stdout, stdout);
12326 basic_ostream_short_ctor(&wcout.obj, &filebuf_wchar_stdout.base, FALSE/*FIXME*/, TRUE, TRUE);
12328 basic_filebuf_char_ctor_file(&filebuf_char_stderr, stderr);
12329 basic_ostream_char_ctor(&cerr.obj, &filebuf_char_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12331 basic_filebuf_short_ctor_file(&filebuf_short_stderr, stderr);
12332 basic_ostream_short_ctor(&ucerr.obj, &filebuf_short_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12334 basic_filebuf_wchar_ctor_file(&filebuf_wchar_stderr, stderr);
12335 basic_ostream_short_ctor(&wcerr.obj, &filebuf_wchar_stderr.base, FALSE/*FIXME*/, TRUE, TRUE);
12337 basic_filebuf_char_ctor_file(&filebuf_char_log, stderr);
12338 basic_ostream_char_ctor(&clog.obj, &filebuf_char_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12340 basic_filebuf_short_ctor_file(&filebuf_short_log, stderr);
12341 basic_ostream_short_ctor(&uclog.obj, &filebuf_short_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12343 basic_filebuf_wchar_ctor_file(&filebuf_wchar_log, stderr);
12344 basic_ostream_short_ctor(&wclog.obj, &filebuf_wchar_log.base, FALSE/*FIXME*/, TRUE, TRUE);
12347 void free_io(void)
12349 basic_istream_char_vbase_dtor(&cin.obj);
12350 basic_filebuf_char_dtor(&filebuf_char_stdin);
12352 basic_istream_wchar_vbase_dtor(&ucin.obj);
12353 basic_filebuf_wchar_dtor(&filebuf_short_stdin);
12355 basic_istream_wchar_vbase_dtor(&wcin.obj);
12356 basic_filebuf_wchar_dtor(&filebuf_wchar_stdin);
12358 basic_ostream_char_vbase_dtor(&cout.obj);
12359 basic_filebuf_char_dtor(&filebuf_char_stdout);
12361 basic_ostream_wchar_vbase_dtor(&ucout.obj);
12362 basic_filebuf_wchar_dtor(&filebuf_short_stdout);
12364 basic_ostream_wchar_vbase_dtor(&wcout.obj);
12365 basic_filebuf_wchar_dtor(&filebuf_wchar_stdout);
12367 basic_ostream_char_vbase_dtor(&cerr.obj);
12368 basic_filebuf_char_dtor(&filebuf_char_stderr);
12370 basic_ostream_wchar_vbase_dtor(&ucerr.obj);
12371 basic_filebuf_wchar_dtor(&filebuf_short_stderr);
12373 basic_ostream_wchar_vbase_dtor(&wcerr.obj);
12374 basic_filebuf_wchar_dtor(&filebuf_wchar_stderr);
12376 basic_ostream_char_vbase_dtor(&clog.obj);
12377 basic_filebuf_char_dtor(&filebuf_char_log);
12379 basic_ostream_wchar_vbase_dtor(&uclog.obj);
12380 basic_filebuf_wchar_dtor(&filebuf_short_log);
12382 basic_ostream_wchar_vbase_dtor(&wclog.obj);
12383 basic_filebuf_wchar_dtor(&filebuf_wchar_log);