2 * Copyright 2010 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
30 #include "wine/list.h"
35 #include "wine/unicode.h"
36 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90
);
39 char* __cdecl
_Getdays(void);
40 char* __cdecl
_Getmonths(void);
41 void* __cdecl
_Gettnames(void);
42 unsigned int __cdecl
___lc_codepage_func(void);
43 LCID
* __cdecl
___lc_handle_func(void);
44 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
52 typedef struct _locale__Locimp
{
54 locale_facet
**facetvec
;
55 MSVCP_size_t facet_cnt
;
57 MSVCP_bool transparent
;
58 basic_string_char name
;
67 basic_string_char days
;
68 basic_string_char months
;
69 basic_string_char oldlocname
;
70 basic_string_char newlocname
;
88 const char *false_name
;
89 const char *true_name
;
97 const wchar_t *false_name
;
98 const wchar_t *true_name
;
101 /* ?_Id_cnt@id@locale@std@@0HA */
102 int locale_id__Id_cnt
= 0;
104 static locale__Locimp
*global_locale
;
105 static locale classic_locale
;
107 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
108 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
109 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
111 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
113 if(this->strbuf
&& !this->got
) {
114 int c
= basic_streambuf_char_sgetc(this->strbuf
);
125 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
127 if(this->strbuf
&& !this->got
) {
128 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
139 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
141 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
146 istreambuf_iterator_char_val(this);
150 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
152 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
157 istreambuf_iterator_wchar_val(this);
161 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
163 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
167 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
169 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
173 /* ??1facet@locale@std@@UAE@XZ */
174 /* ??1facet@locale@std@@UEAA@XZ */
175 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
176 void __thiscall
locale_facet_dtor(locale_facet
*this)
178 TRACE("(%p)\n", this);
181 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor
, 8)
182 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
183 locale_facet*, (locale_facet*, unsigned int), (this, flags))
184 locale_facet
* __thiscall
MSVCP_locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
186 TRACE("(%p %x)\n", this, flags
);
188 /* we have an array, with the number of elements stored before the first object */
189 int i
, *ptr
= (int *)this-1;
191 for(i
=*ptr
-1; i
>=0; i
--)
192 locale_facet_dtor(this+i
);
193 MSVCRT_operator_delete(ptr
);
195 locale_facet_dtor(this);
197 MSVCRT_operator_delete(this);
208 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
210 /* Not exported from msvcp90 */
211 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
212 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
213 void __cdecl
locale_facet_register(locale_facet
*add
)
215 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
217 ERR("Out of memory\n");
218 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
222 list_add_head(&lazy_facets
, &head
->entry
);
225 /* Not exported from msvcp90 */
226 /* ??_7facet@locale@std@@6B@ */
227 extern const vtable_ptr MSVCP_locale_facet_vtable
;
229 /* ??0id@locale@std@@QAE@I@Z */
230 /* ??0id@locale@std@@QEAA@_K@Z */
231 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
232 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
234 TRACE("(%p %lu)\n", this, id
);
240 /* ??_Fid@locale@std@@QAEXXZ */
241 /* ??_Fid@locale@std@@QEAAXXZ */
242 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
243 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
245 TRACE("(%p)\n", this);
251 /* ??Bid@locale@std@@QAEIXZ */
252 /* ??Bid@locale@std@@QEAA_KXZ */
253 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
254 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
258 TRACE("(%p)\n", this);
261 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
262 this->id
= ++locale_id__Id_cnt
;
269 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
270 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
271 int* __cdecl
locale_id__Id_cnt_func(void)
274 return &locale_id__Id_cnt
;
277 /* ??_Ffacet@locale@std@@QAEXXZ */
278 /* ??_Ffacet@locale@std@@QEAAXXZ */
279 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
280 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
282 TRACE("(%p)\n", this);
283 this->vtable
= &MSVCP_locale_facet_vtable
;
288 /* ??0facet@locale@std@@IAE@I@Z */
289 /* ??0facet@locale@std@@IEAA@_K@Z */
290 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
291 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
293 TRACE("(%p %lu)\n", this, refs
);
294 this->vtable
= &MSVCP_locale_facet_vtable
;
299 /* ?_Incref@facet@locale@std@@QAEXXZ */
300 /* ?_Incref@facet@locale@std@@QEAAXXZ */
301 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
302 void __thiscall
locale_facet__Incref(locale_facet
*this)
306 TRACE("(%p)\n", this);
308 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
313 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
314 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
315 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
316 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
321 TRACE("(%p)\n", this);
323 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
327 ret
= this->refs
? NULL
: this;
333 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
334 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
335 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
337 TRACE("(%p %p)\n", facet
, loc
);
341 /* ??0_Timevec@std@@QAE@ABV01@@Z */
342 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
343 /* This copy constructor modifies copied object */
344 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
345 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
347 TRACE("(%p %p)\n", this, copy
);
348 this->timeptr
= copy
->timeptr
;
349 copy
->timeptr
= NULL
;
353 /* ??0_Timevec@std@@QAE@PAX@Z */
354 /* ??0_Timevec@std@@QEAA@PEAX@Z */
355 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
356 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
358 TRACE("(%p %p)\n", this, timeptr
);
359 this->timeptr
= timeptr
;
363 /* ??_F_Timevec@std@@QAEXXZ */
364 /* ??_F_Timevec@std@@QEAAXXZ */
365 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
366 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
368 TRACE("(%p)\n", this);
369 this->timeptr
= NULL
;
373 /* ??1_Timevec@std@@QAE@XZ */
374 /* ??1_Timevec@std@@QEAA@XZ */
375 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
376 void __thiscall
_Timevec_dtor(_Timevec
*this)
378 TRACE("(%p)\n", this);
382 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
383 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
384 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
385 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
387 TRACE("(%p %p)\n", this, right
);
388 this->timeptr
= right
->timeptr
;
389 right
->timeptr
= NULL
;
393 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
394 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
395 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
396 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
398 TRACE("(%p)\n", this);
399 return this->timeptr
;
402 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
403 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
404 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
406 const char *locale
= NULL
;
408 /* This function is probably modifying more global objects */
409 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
412 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
414 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
415 MSVCP_basic_string_char_ctor_cstr(&locinfo
->days
, "");
416 MSVCP_basic_string_char_ctor_cstr(&locinfo
->months
, "");
417 MSVCP_basic_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
420 locale
= setlocale(LC_ALL
, locstr
);
422 locale
= setlocale(LC_ALL
, NULL
);
425 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
427 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
432 /* ??0_Locinfo@std@@QAE@HPBD@Z */
433 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
434 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
435 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
437 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
440 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
441 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
442 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
444 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
447 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
448 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
449 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
450 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
452 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
455 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
456 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
457 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
459 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
462 /* ??0_Locinfo@std@@QAE@PBD@Z */
463 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
464 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
465 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
467 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
470 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
471 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
472 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
474 TRACE("(%p)\n", locinfo
);
476 setlocale(LC_ALL
, MSVCP_basic_string_char_c_str(&locinfo
->oldlocname
));
477 MSVCP_basic_string_char_dtor(&locinfo
->days
);
478 MSVCP_basic_string_char_dtor(&locinfo
->months
);
479 MSVCP_basic_string_char_dtor(&locinfo
->oldlocname
);
480 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
481 _Lockit_dtor(&locinfo
->lock
);
484 /* ??_F_Locinfo@std@@QAEXXZ */
485 /* ??_F_Locinfo@std@@QEAAXXZ */
486 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
487 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
489 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
492 /* ??1_Locinfo@std@@QAE@XZ */
493 /* ??1_Locinfo@std@@QEAA@XZ */
494 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
495 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
497 _Locinfo__Locinfo_dtor(this);
500 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
501 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
502 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
504 const char *locale
= NULL
;
506 /* This function is probably modifying more global objects */
507 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
509 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
511 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
514 locale
= setlocale(LC_ALL
, locstr
);
516 locale
= setlocale(LC_ALL
, NULL
);
519 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
521 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
526 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
527 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
528 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
529 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
531 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
535 _Collvec __cdecl
_Getcoll(void)
538 _locale_t locale
= _get_current_locale();
542 ret
.page
= locale
->locinfo
->lc_collate_cp
;
543 ret
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
544 _free_locale(locale
);
548 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
549 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
550 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
551 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
558 _Ctypevec __cdecl
_Getctype(void)
561 _locale_t locale
= _get_current_locale();
566 ret
.page
= locale
->locinfo
->lc_codepage
;
567 ret
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
569 table
= malloc(sizeof(short[256]));
571 _free_locale(locale
);
572 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
574 memcpy(table
, locale
->locinfo
->pctype
, sizeof(short[256]));
576 _free_locale(locale
);
580 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
581 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
582 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
583 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
590 _Cvtvec __cdecl
_Getcvt(void)
593 _locale_t locale
= _get_current_locale();
597 ret
.page
= locale
->locinfo
->lc_codepage
;
598 ret
.handle
= locale
->locinfo
->lc_handle
[LC_CTYPE
];
599 _free_locale(locale
);
603 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
604 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
605 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
606 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
612 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
613 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
614 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
615 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
617 FIXME("(%p) stub\n", this);
621 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
622 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
623 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
624 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
626 char *days
= _Getdays();
628 TRACE("(%p)\n", this);
631 MSVCP_basic_string_char_dtor(&this->days
);
632 MSVCP_basic_string_char_ctor_cstr(&this->days
, days
);
636 return this->days
.size
? MSVCP_basic_string_char_c_str(&this->days
) :
637 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
640 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
641 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
642 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
643 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
645 char *months
= _Getmonths();
647 TRACE("(%p)\n", this);
650 MSVCP_basic_string_char_dtor(&this->months
);
651 MSVCP_basic_string_char_ctor_cstr(&this->months
, months
);
655 return this->months
.size
? MSVCP_basic_string_char_c_str(&this->months
) :
656 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
657 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
660 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
661 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
662 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
663 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
665 TRACE("(%p)\n", this);
669 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
670 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
671 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
672 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
674 TRACE("(%p)\n", this);
678 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
679 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
680 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
681 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
683 TRACE("(%p)\n", this);
687 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
688 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
689 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
690 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
692 TRACE("(%p)\n", this);
694 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
698 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
699 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
700 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
701 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
703 TRACE("(%p)\n", this);
705 _Timevec_ctor_timeptr(ret
, _Gettnames());
709 /* ?id@?$collate@D@std@@2V0locale@2@A */
710 locale_id collate_char_id
= {0};
712 /* ??_7?$collate@D@std@@6B@ */
713 extern const vtable_ptr MSVCP_collate_char_vtable
;
715 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
716 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
717 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
718 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
720 TRACE("(%p %p)\n", this, locinfo
);
721 _Locinfo__Getcoll(locinfo
, &this->coll
);
724 /* ??0?$collate@D@std@@IAE@PBDI@Z */
725 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
726 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
727 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
731 TRACE("(%p %s %lu)\n", this, name
, refs
);
733 locale_facet_ctor_refs(&this->facet
, refs
);
734 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
736 _Locinfo_ctor_cstr(&locinfo
, name
);
737 collate_char__Init(this, &locinfo
);
738 _Locinfo_dtor(&locinfo
);
742 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
743 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
744 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
745 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
747 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
749 locale_facet_ctor_refs(&this->facet
, refs
);
750 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
751 collate_char__Init(this, locinfo
);
755 /* ??0?$collate@D@std@@QAE@I@Z */
756 /* ??0?$collate@D@std@@QEAA@_K@Z */
757 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
758 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
760 return collate_char_ctor_name(this, "C", refs
);
763 /* ??1?$collate@D@std@@MAE@XZ */
764 /* ??1?$collate@D@std@@MEAA@XZ */
765 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
766 void __thiscall
collate_char_dtor(collate
*this)
768 TRACE("(%p)\n", this);
771 DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor
, 8)
772 collate
* __thiscall
MSVCP_collate_char_vector_dtor(collate
*this, unsigned int flags
)
774 TRACE("(%p %x)\n", this, flags
);
776 /* we have an array, with the number of elements stored before the first object */
777 int i
, *ptr
= (int *)this-1;
779 for(i
=*ptr
-1; i
>=0; i
--)
780 collate_char_dtor(this+i
);
781 MSVCRT_operator_delete(ptr
);
783 collate_char_dtor(this);
785 MSVCRT_operator_delete(this);
791 /* ??_F?$collate@D@std@@QAEXXZ */
792 /* ??_F?$collate@D@std@@QEAAXXZ */
793 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
794 collate
* __thiscall
collate_char_ctor(collate
*this)
796 return collate_char_ctor_name(this, "C", 0);
799 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
800 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
801 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
803 TRACE("(%p %p)\n", facet
, loc
);
805 if(facet
&& !*facet
) {
806 *facet
= MSVCRT_operator_new(sizeof(collate
));
808 ERR("Out of memory\n");
809 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
812 collate_char_ctor_name((collate
*)*facet
,
813 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
820 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
821 const char *last2
, const _Collvec
*coll
)
825 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
830 lcid
= ___lc_handle_func()[LC_COLLATE
];
831 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
834 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
835 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
836 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
837 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
838 (const collate*, const char*, const char*, const char*, const char*), \
839 (this, first1, last1, first2, last2))
840 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
841 const char *last1
, const char *first2
, const char *last2
)
843 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
844 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
847 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
848 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
849 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
850 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
851 const char *last1
, const char *first2
, const char *last2
)
853 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
854 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
857 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
858 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
859 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
860 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
861 (const collate*, const char*, const char*), (this, first, last))
862 LONG __thiscall
collate_char_do_hash(const collate
*this,
863 const char *first
, const char *last
)
867 TRACE("(%p %p %p)\n", this, first
, last
);
869 for(; first
<last
; first
++)
870 ret
= (ret
<<8 | ret
>>24) + *first
;
874 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
875 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
876 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
877 LONG __thiscall
collate_char_hash(const collate
*this,
878 const char *first
, const char *last
)
880 TRACE("(%p %p %p)\n", this, first
, last
);
881 return call_collate_char_do_hash(this, first
, last
);
884 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
885 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
886 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
887 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
888 basic_string_char
*ret
, const char *first
, const char *last
)
890 FIXME("(%p %p %p) stub\n", this, first
, last
);
894 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
895 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
896 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
897 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
898 basic_string_char
*ret
, const char *first
, const char *last
)
900 FIXME("(%p %p %p) stub\n", this, first
, last
);
904 /* ?id@?$collate@_W@std@@2V0locale@2@A */
905 locale_id collate_wchar_id
= {0};
906 /* ?id@?$collate@G@std@@2V0locale@2@A */
907 locale_id collate_short_id
= {0};
909 /* ??_7?$collate@_W@std@@6B@ */
910 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
911 /* ??_7?$collate@G@std@@6B@ */
912 extern const vtable_ptr MSVCP_collate_short_vtable
;
914 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
915 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
916 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
917 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
918 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
919 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
921 TRACE("(%p %p)\n", this, locinfo
);
922 _Locinfo__Getcoll(locinfo
, &this->coll
);
925 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
926 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
927 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
928 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
932 TRACE("(%p %s %lu)\n", this, name
, refs
);
934 locale_facet_ctor_refs(&this->facet
, refs
);
935 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
937 _Locinfo_ctor_cstr(&locinfo
, name
);
938 collate_wchar__Init(this, &locinfo
);
939 _Locinfo_dtor(&locinfo
);
943 /* ??0?$collate@G@std@@IAE@PBDI@Z */
944 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
945 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
946 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
948 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
949 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
953 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
954 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
955 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
956 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
958 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
960 locale_facet_ctor_refs(&this->facet
, refs
);
961 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
962 collate_wchar__Init(this, locinfo
);
966 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
967 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
968 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
969 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
971 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
972 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
976 /* ??0?$collate@_W@std@@QAE@I@Z */
977 /* ??0?$collate@_W@std@@QEAA@_K@Z */
978 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
979 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
981 return collate_wchar_ctor_name(this, "C", refs
);
984 /* ??0?$collate@G@std@@QAE@I@Z */
985 /* ??0?$collate@G@std@@QEAA@_K@Z */
986 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
987 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
989 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
990 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
994 /* ??1?$collate@_W@std@@MAE@XZ */
995 /* ??1?$collate@_W@std@@MEAA@XZ */
996 /* ??1?$collate@G@std@@MAE@XZ */
997 /* ??1?$collate@G@std@@MEAA@XZ */
998 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
999 void __thiscall
collate_wchar_dtor(collate
*this)
1001 TRACE("(%p)\n", this);
1004 DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor
, 8)
1005 collate
* __thiscall
MSVCP_collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1007 TRACE("(%p %x)\n", this, flags
);
1009 /* we have an array, with the number of elements stored before the first object */
1010 int i
, *ptr
= (int *)this-1;
1012 for(i
=*ptr
-1; i
>=0; i
--)
1013 collate_wchar_dtor(this+i
);
1014 MSVCRT_operator_delete(ptr
);
1016 collate_wchar_dtor(this);
1018 MSVCRT_operator_delete(this);
1024 DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor
, 8)
1025 collate
* __thiscall
MSVCP_collate_short_vector_dtor(collate
*this, unsigned int flags
)
1027 return MSVCP_collate_wchar_vector_dtor(this, flags
);
1030 /* ??_F?$collate@_W@std@@QAEXXZ */
1031 /* ??_F?$collate@_W@std@@QEAAXXZ */
1032 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1033 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1035 return collate_wchar_ctor_name(this, "C", 0);
1038 /* ??_F?$collate@G@std@@QAEXXZ */
1039 /* ??_F?$collate@G@std@@QEAAXXZ */
1040 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1041 collate
* __thiscall
collate_short_ctor(collate
*this)
1043 collate
*ret
= collate_wchar_ctor(this);
1044 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1048 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1049 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1050 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1052 TRACE("(%p %p)\n", facet
, loc
);
1054 if(facet
&& !*facet
) {
1055 *facet
= MSVCRT_operator_new(sizeof(collate
));
1057 ERR("Out of memory\n");
1058 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1061 collate_wchar_ctor_name((collate
*)*facet
,
1062 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
1068 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1069 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1070 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1072 if(facet
&& !*facet
) {
1073 collate_wchar__Getcat(facet
, loc
);
1074 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1081 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1082 const wchar_t *last2
, const _Collvec
*coll
)
1086 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1089 lcid
= coll
->handle
;
1091 lcid
= ___lc_handle_func()[LC_COLLATE
];
1092 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1095 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1096 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1097 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1098 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1099 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1100 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1101 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1102 (this, first1, last1, first2, last2))
1103 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1104 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1106 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1107 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1110 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1111 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1112 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1113 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1114 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1115 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1116 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1118 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1119 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1122 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1123 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1124 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1125 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1126 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1127 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1128 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1129 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1130 const wchar_t *first
, const wchar_t *last
)
1134 TRACE("(%p %p %p)\n", this, first
, last
);
1136 for(; first
<last
; first
++)
1137 ret
= (ret
<<8 | ret
>>24) + *first
;
1141 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1142 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1143 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1144 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1145 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1146 LONG __thiscall
collate_wchar_hash(const collate
*this,
1147 const wchar_t *first
, const wchar_t *last
)
1149 TRACE("(%p %p %p)\n", this, first
, last
);
1150 return call_collate_wchar_do_hash(this, first
, last
);
1153 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1154 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1155 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1156 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1157 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1158 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1159 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1161 FIXME("(%p %p %p) stub\n", this, first
, last
);
1165 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1166 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1167 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1168 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1169 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1170 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1171 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1173 FIXME("(%p %p %p) stub\n", this, first
, last
);
1177 /* ??_7ctype_base@std@@6B@ */
1178 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1180 /* ??0ctype_base@std@@QAE@I@Z */
1181 /* ??0ctype_base@std@@QEAA@_K@Z */
1182 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1183 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1185 TRACE("(%p %lu)\n", this, refs
);
1186 locale_facet_ctor_refs(&this->facet
, refs
);
1187 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1191 /* ??_Fctype_base@std@@QAEXXZ */
1192 /* ??_Fctype_base@std@@QEAAXXZ */
1193 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1194 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1196 TRACE("(%p)\n", this);
1197 locale_facet_ctor_refs(&this->facet
, 0);
1198 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1202 /* ??1ctype_base@std@@UAE@XZ */
1203 /* ??1ctype_base@std@@UEAA@XZ */
1204 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1205 void __thiscall
ctype_base_dtor(ctype_base
*this)
1207 TRACE("(%p)\n", this);
1210 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor
, 8)
1211 ctype_base
* __thiscall
MSVCP_ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1213 TRACE("(%p %x)\n", this, flags
);
1215 /* we have an array, with the number of elements stored before the first object */
1216 int i
, *ptr
= (int *)this-1;
1218 for(i
=*ptr
-1; i
>=0; i
--)
1219 ctype_base_dtor(this+i
);
1220 MSVCRT_operator_delete(ptr
);
1222 ctype_base_dtor(this);
1224 MSVCRT_operator_delete(this);
1230 /* ?_Xran@ctype_base@std@@KAXXZ */
1231 void __cdecl
ctype_base__Xran(void)
1233 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1236 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1237 locale_id ctype_char_id
= {0};
1238 /* ?table_size@?$ctype@D@std@@2IB */
1239 /* ?table_size@?$ctype@D@std@@2_KB */
1240 MSVCP_size_t ctype_char_table_size
= 256;
1242 /* ??_7?$ctype@D@std@@6B@ */
1243 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1245 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1246 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1247 locale_id
* __cdecl
ctype_char__Id_func(void)
1250 return &ctype_char_id
;
1253 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1254 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1255 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1256 void __thiscall
ctype_char__Init(ctype_char
*this, _Locinfo
*locinfo
)
1258 TRACE("(%p %p)\n", this, locinfo
);
1259 _Locinfo__Getctype(locinfo
, &this->ctype
);
1262 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1263 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1264 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1265 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1267 TRACE("(%p)\n", this);
1269 if(this->ctype
.delfl
)
1270 free((short*)this->ctype
.table
);
1273 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1274 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1275 const short* __cdecl
ctype_char_classic_table(void)
1278 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1281 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1282 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1283 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1284 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1285 _Locinfo
*locinfo
, MSVCP_size_t refs
)
1287 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1288 ctype_base_ctor_refs(&this->base
, refs
);
1289 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1290 ctype_char__Init(this, locinfo
);
1294 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1295 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1296 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1297 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1298 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1302 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1304 ctype_base_ctor_refs(&this->base
, refs
);
1305 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1307 _Locinfo_ctor(&locinfo
);
1308 ctype_char__Init(this, &locinfo
);
1309 _Locinfo_dtor(&locinfo
);
1312 ctype_char__Tidy(this);
1313 this->ctype
.table
= table
;
1314 this->ctype
.delfl
= delete;
1319 /* ??_F?$ctype@D@std@@QAEXXZ */
1320 /* ??_F?$ctype@D@std@@QEAAXXZ */
1321 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1322 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1324 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1327 /* ??1?$ctype@D@std@@MAE@XZ */
1328 /* ??1?$ctype@D@std@@MEAA@XZ */
1329 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1330 void __thiscall
ctype_char_dtor(ctype_char
*this)
1332 TRACE("(%p)\n", this);
1333 ctype_char__Tidy(this);
1336 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_char_vector_dtor
, 8)
1337 ctype_char
* __thiscall
MSVCP_ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1339 TRACE("(%p %x)\n", this, flags
);
1341 /* we have an array, with the number of elements stored before the first object */
1342 int i
, *ptr
= (int *)this-1;
1344 for(i
=*ptr
-1; i
>=0; i
--)
1345 ctype_char_dtor(this+i
);
1346 MSVCRT_operator_delete(ptr
);
1348 ctype_char_dtor(this);
1350 MSVCRT_operator_delete(this);
1356 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1357 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1358 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1359 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1360 char, (const ctype_char*, char, char), (this, ch, unused))
1361 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1363 TRACE("(%p %c %c)\n", this, ch
, unused
);
1367 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1368 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1369 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1370 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1371 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1372 (this, first, last, unused, dest))
1373 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1374 const char *first
, const char *last
, char unused
, char *dest
)
1376 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1377 memcpy(dest
, first
, last
-first
);
1381 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1382 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1383 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1384 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1385 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1386 (this, first, last, unused, dest, size))
1387 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1388 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1390 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1391 memcpy_s(dest
, size
, first
, last
-first
);
1395 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1396 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1397 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1398 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1400 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1401 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1404 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1405 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1406 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1407 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1408 const char *first
, const char *last
, char dflt
, char *dest
)
1410 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1411 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1414 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1415 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1416 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1417 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1418 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1420 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1421 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1424 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1425 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1426 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1427 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1428 char, (const ctype_char*, char), (this, ch))
1429 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1431 TRACE("(%p %c)\n", this, ch
);
1435 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1436 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1437 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1438 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1439 const char*, (const ctype_char*, const char*, const char*, char*), \
1440 (this, first, last, dest))
1441 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1442 const char *first
, const char *last
, char *dest
)
1444 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1445 memcpy(dest
, first
, last
-first
);
1449 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1450 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1451 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1452 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1453 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1454 (this, first, last, dest, size))
1455 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1456 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1458 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1459 memcpy_s(dest
, size
, first
, last
-first
);
1463 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1464 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1465 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1466 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1468 TRACE("(%p %c)\n", this, ch
);
1469 return call_ctype_char_do_widen_ch(this, ch
);
1472 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1473 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1474 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1475 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1476 const char *first
, const char *last
, char *dest
)
1478 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1479 return call_ctype_char_do_widen(this, first
, last
, dest
);
1482 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1483 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1484 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1485 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1486 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1488 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1489 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1492 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1493 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1494 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1496 TRACE("(%p %p)\n", facet
, loc
);
1498 if(facet
&& !*facet
) {
1501 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1503 ERR("Out of memory\n");
1504 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1508 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
1509 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1510 _Locinfo_dtor(&locinfo
);
1516 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1518 static ctype_char
*obj
= NULL
;
1521 const locale_facet
*fac
;
1523 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1524 fac
= locale__Getfacet(loc
, ctype_char_id
.id
);
1526 _Lockit_dtor(&lock
);
1527 return (ctype_char
*)fac
;
1533 ctype_char__Getcat(&fac
, loc
);
1534 obj
= (ctype_char
*)fac
;
1535 locale_facet__Incref(&obj
->base
.facet
);
1536 locale_facet_register(&obj
->base
.facet
);
1537 _Lockit_dtor(&lock
);
1543 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1547 TRACE("%d %p\n", ch
, ctype
);
1552 cp
= ___lc_codepage_func();
1554 /* Don't convert to unicode in case of C locale */
1556 if(ch
>='A' && ch
<='Z')
1565 str
[0] = (ch
>>8) & 255;
1573 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1576 lower
= tolowerW(wide
);
1580 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1582 return str
[0] + (str
[1]<<8);
1586 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1587 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1588 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1589 char, (const ctype_char*, char), (this, ch))
1590 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1591 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1593 TRACE("(%p %c)\n", this, ch
);
1594 return _Tolower(ch
, &this->ctype
);
1597 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1598 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1599 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1600 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1601 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1602 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1604 TRACE("(%p %p %p)\n", this, first
, last
);
1605 for(; first
<last
; first
++)
1606 *first
= _Tolower(*first
, &this->ctype
);
1610 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1611 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1612 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1613 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1615 TRACE("(%p %c)\n", this, ch
);
1616 return call_ctype_char_do_tolower_ch(this, ch
);
1619 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1620 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1621 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1622 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1624 TRACE("(%p %p %p)\n", this, first
, last
);
1625 return call_ctype_char_do_tolower(this, first
, last
);
1629 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1633 TRACE("%d %p\n", ch
, ctype
);
1638 cp
= ___lc_codepage_func();
1640 /* Don't convert to unicode in case of C locale */
1642 if(ch
>='a' && ch
<='z')
1651 str
[0] = (ch
>>8) & 255;
1659 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1662 upper
= toupperW(wide
);
1666 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1668 return str
[0] + (str
[1]<<8);
1672 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1673 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1674 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1675 char, (const ctype_char*, char), (this, ch))
1676 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1677 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1679 TRACE("(%p %c)\n", this, ch
);
1680 return _Toupper(ch
, &this->ctype
);
1683 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1684 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1685 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1686 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1687 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1688 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1689 char *first
, const char *last
)
1691 TRACE("(%p %p %p)\n", this, first
, last
);
1692 for(; first
<last
; first
++)
1693 *first
= _Toupper(*first
, &this->ctype
);
1697 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1698 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1699 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1700 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1702 TRACE("(%p %c)\n", this, ch
);
1703 return call_ctype_char_do_toupper_ch(this, ch
);
1706 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1707 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1708 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1709 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1711 TRACE("(%p %p %p)\n", this, first
, last
);
1712 return call_ctype_char_do_toupper(this, first
, last
);
1715 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1716 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1717 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1718 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1720 TRACE("(%p %x %c)\n", this, mask
, ch
);
1721 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1724 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1725 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1726 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1727 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1729 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1730 for(; first
<last
; first
++)
1731 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1735 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1736 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1737 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1738 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1740 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1741 for(; first
<last
; first
++)
1742 if(!ctype_char_is_ch(this, mask
, *first
))
1747 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1748 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1749 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1750 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1752 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1753 for(; first
<last
; first
++)
1754 if(ctype_char_is_ch(this, mask
, *first
))
1759 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1760 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1761 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
1762 const short* __thiscall
ctype_char_table(const ctype_char
*this)
1764 TRACE("(%p)\n", this);
1765 return this->ctype
.table
;
1768 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1769 locale_id ctype_wchar_id
= {0};
1770 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1771 locale_id ctype_short_id
= {0};
1773 /* ??_7?$ctype@_W@std@@6B@ */
1774 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
1775 /* ??_7?$ctype@G@std@@6B@ */
1776 extern const vtable_ptr MSVCP_ctype_short_vtable
;
1778 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1779 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1780 locale_id
* __cdecl
ctype_wchar__Id_func(void)
1783 return &ctype_wchar_id
;
1786 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1787 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1788 locale_id
* __cdecl
ctype_short__Id_func(void)
1791 return &ctype_short_id
;
1794 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1795 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1796 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1797 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1798 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
1799 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, _Locinfo
*locinfo
)
1801 TRACE("(%p %p)\n", this, locinfo
);
1802 _Locinfo__Getctype(locinfo
, &this->ctype
);
1803 _Locinfo__Getcvt(locinfo
, &this->cvt
);
1806 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1807 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1808 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
1809 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
1810 _Locinfo
*locinfo
, MSVCP_size_t refs
)
1812 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1813 ctype_base_ctor_refs(&this->base
, refs
);
1814 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1815 ctype_wchar__Init(this, locinfo
);
1819 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1820 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1821 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
1822 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
1823 _Locinfo
*locinfo
, MSVCP_size_t refs
)
1825 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
1826 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1830 /* ??0?$ctype@_W@std@@QAE@I@Z */
1831 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1832 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
1833 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1837 TRACE("(%p %lu)\n", this, refs
);
1839 ctype_base_ctor_refs(&this->base
, refs
);
1840 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1842 _Locinfo_ctor(&locinfo
);
1843 ctype_wchar__Init(this, &locinfo
);
1844 _Locinfo_dtor(&locinfo
);
1848 /* ??0?$ctype@G@std@@QAE@I@Z */
1849 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1850 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
1851 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1853 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
1854 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1858 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1859 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1860 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
1861 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
1862 const char *name
, MSVCP_size_t refs
)
1866 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
1868 ctype_base_ctor_refs(&this->base
, refs
);
1869 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1871 _Locinfo_ctor_cstr(&locinfo
, name
);
1872 ctype_wchar__Init(this, &locinfo
);
1873 _Locinfo_dtor(&locinfo
);
1877 /* ??_F?$ctype@_W@std@@QAEXXZ */
1878 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1879 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
1880 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
1882 TRACE("(%p)\n", this);
1883 return ctype_short_ctor_refs(this, 0);
1886 /* ??_F?$ctype@G@std@@QAEXXZ */
1887 /* ??_F?$ctype@G@std@@QEAAXXZ */
1888 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
1889 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
1891 ctype_wchar
*ret
= ctype_wchar_ctor(this);
1892 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1896 /* ??1?$ctype@_W@std@@MAE@XZ */
1897 /* ??1?$ctype@_W@std@@MEAA@XZ */
1898 /* ??1?$ctype@G@std@@MAE@XZ */
1899 /* ??1?$ctype@G@std@@MEAA@XZ */
1900 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
1901 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
1903 TRACE("(%p)\n", this);
1904 if(this->ctype
.delfl
)
1905 free((void*)this->ctype
.table
);
1908 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor
, 8)
1909 ctype_wchar
* __thiscall
MSVCP_ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1911 TRACE("(%p %x)\n", this, flags
);
1913 /* we have an array, with the number of elements stored before the first object */
1914 int i
, *ptr
= (int *)this-1;
1916 for(i
=*ptr
-1; i
>=0; i
--)
1917 ctype_wchar_dtor(this+i
);
1918 MSVCRT_operator_delete(ptr
);
1920 ctype_wchar_dtor(this);
1922 MSVCRT_operator_delete(this);
1928 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_short_vector_dtor
, 8)
1929 ctype_wchar
* __thiscall
MSVCP_ctype_short_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1931 return MSVCP_ctype_wchar_vector_dtor(this, flags
);
1935 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
1940 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
1945 cp
= ___lc_codepage_func();
1957 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
1966 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1967 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1968 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1969 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1970 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
1971 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1973 char buf
[MB_LEN_MAX
];
1975 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1977 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
1980 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1981 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1982 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1983 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1984 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
1985 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
1986 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1987 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1989 return ctype_wchar__Donarrow(this, ch
, dflt
);
1992 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1993 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1994 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1995 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1996 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
1997 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
1998 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1999 (this, first, last, dflt, dest))
2000 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2001 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2003 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2004 for(; first
<last
; first
++)
2005 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2009 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2010 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2011 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2012 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2013 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2014 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2015 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2016 (this, first, last, dflt, dest, size))
2017 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2018 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2020 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2021 /* This function converts all multi-byte characters to dflt,
2022 * thanks to it result size is known before converting */
2023 if(last
-first
> size
)
2025 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2028 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2029 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2030 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2031 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2032 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2033 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2035 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2036 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2039 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2040 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2041 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2042 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2043 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2044 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2045 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2047 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2048 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2051 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2052 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2053 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2054 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2055 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2056 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2057 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2059 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2060 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2064 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2070 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2078 cp
= ___lc_codepage_func();
2082 *out
= (unsigned char)*in
;
2089 ((char*)state
)[1] = *in
;
2091 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2101 GetCPInfo(cp
, &cp_info
);
2103 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2104 if(!cp_info
.LeadByte
[i
+1])
2106 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2114 *state
= (unsigned char)*in
;
2118 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2125 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2132 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2133 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2134 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2135 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2136 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2137 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2141 TRACE("(%p %d)\n", this, ch
);
2142 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2145 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2146 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2147 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2148 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2149 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2150 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2151 wchar_t, (const ctype_wchar*, char), (this, ch))
2152 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2154 return ctype_wchar__Dowiden(this, ch
);
2157 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2158 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2159 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2160 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2161 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2162 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2163 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2164 (this, first, last, dest))
2165 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2166 const char *first
, const char *last
, wchar_t *dest
)
2168 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2169 for(; first
<last
; first
++)
2170 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2174 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2175 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2176 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2177 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2178 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2179 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2180 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2181 (this, first, last, dest, size))
2182 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2183 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2185 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2186 /* This function converts all multi-byte characters to WEOF,
2187 * thanks to it result size is known before converting */
2188 if(size
< last
-first
)
2190 return ctype_wchar_do_widen(this, first
, last
, dest
);
2193 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2194 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2195 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2196 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2197 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2198 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2200 TRACE("(%p %d)\n", this, ch
);
2201 return call_ctype_wchar_do_widen_ch(this, ch
);
2204 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2205 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2206 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2207 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2208 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2209 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2210 const char *first
, const char *last
, wchar_t *dest
)
2212 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2213 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2216 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2217 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2218 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2219 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2220 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2221 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2222 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2224 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2225 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2228 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2229 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2230 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2232 TRACE("(%p %p)\n", facet
, loc
);
2234 if(facet
&& !*facet
) {
2237 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2239 ERR("Out of memory\n");
2240 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2244 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2245 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2246 _Locinfo_dtor(&locinfo
);
2252 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2253 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2254 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2256 if(facet
&& !*facet
) {
2257 ctype_wchar__Getcat(facet
, loc
);
2258 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2265 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2267 TRACE("(%d %p)\n", ch
, ctype
);
2268 return tolowerW(ch
);
2271 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2273 static ctype_wchar
*obj
= NULL
;
2276 const locale_facet
*fac
;
2278 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2279 fac
= locale__Getfacet(loc
, ctype_wchar_id
.id
);
2281 _Lockit_dtor(&lock
);
2282 return (ctype_wchar
*)fac
;
2288 ctype_wchar__Getcat(&fac
, loc
);
2289 obj
= (ctype_wchar
*)fac
;
2290 locale_facet__Incref(&obj
->base
.facet
);
2291 locale_facet_register(&obj
->base
.facet
);
2292 _Lockit_dtor(&lock
);
2297 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2298 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2299 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2300 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2301 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2302 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2303 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2304 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2306 return _Towlower(ch
, &this->ctype
);
2309 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2310 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2311 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2312 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2313 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2314 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2315 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2316 (this, first, last))
2317 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2318 wchar_t *first
, const wchar_t *last
)
2320 TRACE("(%p %p %p)\n", this, first
, last
);
2321 for(; first
<last
; first
++)
2322 *first
= _Towlower(*first
, &this->ctype
);
2326 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2327 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2328 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2329 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2330 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2331 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2333 TRACE("(%p %d)\n", this, ch
);
2334 return call_ctype_wchar_do_tolower_ch(this, ch
);
2337 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2338 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2339 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2340 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2341 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2342 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2343 wchar_t *first
, const wchar_t *last
)
2345 TRACE("(%p %p %p)\n", this, first
, last
);
2346 return call_ctype_wchar_do_tolower(this, first
, last
);
2350 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2352 TRACE("(%d %p)\n", ch
, ctype
);
2353 return toupperW(ch
);
2356 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2357 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2358 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2359 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2360 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2361 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2362 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2363 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2365 return _Towupper(ch
, &this->ctype
);
2368 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2369 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2370 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2371 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2372 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2373 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2374 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2375 (this, first, last))
2376 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2377 wchar_t *first
, const wchar_t *last
)
2379 TRACE("(%p %p %p)\n", this, first
, last
);
2380 for(; first
<last
; first
++)
2381 *first
= _Towupper(*first
, &this->ctype
);
2385 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2386 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2387 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2388 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2389 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2390 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2392 TRACE("(%p %d)\n", this, ch
);
2393 return call_ctype_wchar_do_toupper_ch(this, ch
);
2396 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2397 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2398 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2399 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2400 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2401 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2402 wchar_t *first
, const wchar_t *last
)
2404 TRACE("(%p %p %p)\n", this, first
, last
);
2405 return call_ctype_wchar_do_toupper(this, first
, last
);
2409 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2410 short *mask
, const _Ctypevec
*ctype
)
2412 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2413 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2418 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2421 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2425 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2426 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2427 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2428 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2429 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2430 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2431 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2432 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2434 TRACE("(%p %x %d)\n", this, mask
, ch
);
2435 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2438 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2439 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2440 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2441 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2442 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2443 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2444 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2445 (this, first, last, dest))
2446 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2447 const wchar_t *first
, const wchar_t *last
, short *dest
)
2449 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2450 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2453 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2454 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2455 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2456 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2457 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2458 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2460 TRACE("(%p %x %d)\n", this, mask
, ch
);
2461 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2464 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2465 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2466 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2467 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2468 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2469 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2470 const wchar_t *first
, const wchar_t *last
, short *dest
)
2472 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2473 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2476 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2477 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2478 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2479 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2480 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2481 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2482 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2483 (this, mask, first, last))
2484 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2485 short mask
, const wchar_t *first
, const wchar_t *last
)
2487 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2488 for(; first
<last
; first
++)
2489 if(!ctype_wchar_is_ch(this, mask
, *first
))
2494 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2495 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2496 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2497 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2498 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2499 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2500 short mask
, const wchar_t *first
, const wchar_t *last
)
2502 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2503 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2506 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2507 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2508 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2509 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2510 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2511 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2512 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2513 (this, mask, first, last))
2514 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2515 short mask
, const wchar_t *first
, const wchar_t *last
)
2517 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2518 for(; first
<last
; first
++)
2519 if(ctype_wchar_is_ch(this, mask
, *first
))
2524 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2525 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2526 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2527 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2528 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2529 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2530 short mask
, const wchar_t *first
, const wchar_t *last
)
2532 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2533 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2536 /* ??_7codecvt_base@std@@6B@ */
2537 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2539 /* ??0codecvt_base@std@@QAE@I@Z */
2540 /* ??0codecvt_base@std@@QEAA@_K@Z */
2541 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2542 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2544 TRACE("(%p %lu)\n", this, refs
);
2545 locale_facet_ctor_refs(&this->facet
, refs
);
2546 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2550 /* ??_Fcodecvt_base@std@@QAEXXZ */
2551 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2552 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2553 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2555 return codecvt_base_ctor_refs(this, 0);
2558 /* ??1codecvt_base@std@@UAE@XZ */
2559 /* ??1codecvt_base@std@@UEAA@XZ */
2560 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2561 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2563 TRACE("(%p)\n", this);
2564 locale_facet_dtor(&this->facet
);
2567 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_base_vector_dtor
, 8)
2568 codecvt_base
* __thiscall
MSVCP_codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2570 TRACE("(%p %x)\n", this, flags
);
2572 /* we have an array, with the number of elements stored before the first object */
2573 int i
, *ptr
= (int *)this-1;
2575 for(i
=*ptr
-1; i
>=0; i
--)
2576 codecvt_base_dtor(this+i
);
2577 MSVCRT_operator_delete(ptr
);
2579 codecvt_base_dtor(this);
2581 MSVCRT_operator_delete(this);
2587 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2588 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2589 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2590 MSVCP_bool, (const codecvt_base*), (this))
2591 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2592 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2594 TRACE("(%p)\n", this);
2598 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2599 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2600 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2601 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2603 TRACE("(%p)\n", this);
2604 return call_codecvt_base_do_always_noconv(this);
2607 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2608 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2609 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2610 int, (const codecvt_base*), (this))
2611 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2612 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2614 TRACE("(%p)\n", this);
2618 /* ?max_length@codecvt_base@std@@QBEHXZ */
2619 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2620 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2621 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2623 TRACE("(%p)\n", this);
2624 return call_codecvt_base_do_max_length(this);
2627 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2628 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2629 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2630 int, (const codecvt_base*), (this))
2631 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
2632 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
2634 TRACE("(%p)\n", this);
2638 /* ?encoding@codecvt_base@std@@QBEHXZ */
2639 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2640 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
2641 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
2643 TRACE("(%p)\n", this);
2644 return call_codecvt_base_do_encoding(this);
2647 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2648 locale_id codecvt_char_id
= {0};
2650 /* ??_7?$codecvt@DDH@std@@6B@ */
2651 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
2653 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2654 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2655 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
2656 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
2658 TRACE("(%p %p)\n", this, locinfo
);
2661 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2662 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2663 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
2664 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2666 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2667 codecvt_base_ctor_refs(&this->base
, refs
);
2668 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
2672 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2673 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2674 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
2675 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
2677 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
2680 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2681 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2682 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
2683 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
2685 return codecvt_char_ctor_locinfo(this, NULL
, 0);
2688 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2689 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2690 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
2691 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
2693 TRACE("(%p)\n", this);
2694 codecvt_base_dtor(&this->base
);
2697 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_char_vector_dtor
, 8)
2698 codecvt_char
* __thiscall
MSVCP_codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
2700 TRACE("(%p %x)\n", this, flags
);
2702 /* we have an array, with the number of elements stored before the first object */
2703 int i
, *ptr
= (int *)this-1;
2705 for(i
=*ptr
-1; i
>=0; i
--)
2706 codecvt_char_dtor(this+i
);
2707 MSVCRT_operator_delete(ptr
);
2709 codecvt_char_dtor(this);
2711 MSVCRT_operator_delete(this);
2717 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2718 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2719 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
2721 TRACE("(%p %p)\n", facet
, loc
);
2723 if(facet
&& !*facet
) {
2724 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
2726 ERR("Out of memory\n");
2727 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2730 codecvt_char_ctor((codecvt_char
*)*facet
);
2736 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
2738 static codecvt_char
*obj
= NULL
;
2741 const locale_facet
*fac
;
2743 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2744 fac
= locale__Getfacet(loc
, codecvt_char_id
.id
);
2746 _Lockit_dtor(&lock
);
2747 return (codecvt_char
*)fac
;
2753 codecvt_char__Getcat(&fac
, loc
);
2754 obj
= (codecvt_char
*)fac
;
2755 locale_facet__Incref(&obj
->base
.facet
);
2756 locale_facet_register(&obj
->base
.facet
);
2757 _Lockit_dtor(&lock
);
2762 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2763 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2764 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2765 CALL_VTBL_FUNC(this, 16, int, \
2766 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2767 (this, state, from, from_end, from_next, to, to_end, to_next))
2768 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
2769 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
2770 const char *from
, const char *from_end
, const char **from_next
,
2771 char *to
, char *to_end
, char **to_next
)
2773 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2774 from_next
, to
, to_end
, to_next
);
2777 return CODECVT_noconv
;
2780 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2781 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2782 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
2783 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
2784 const char *from
, const char *from_end
, const char **from_next
,
2785 char *to
, char *to_end
, char **to_next
)
2787 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2788 from_next
, to
, to_end
, to_next
);
2789 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
2790 to
, to_end
, to_next
);
2793 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2794 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2795 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2796 CALL_VTBL_FUNC(this, 20, int, \
2797 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2798 (this, state, from, from_end, from_next, to, to_end, to_next))
2799 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
2800 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
2801 const char *from
, const char *from_end
, const char **from_next
,
2802 char *to
, char *to_end
, char **to_next
)
2804 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2805 from_end
, from_next
, to
, to_end
, to_next
);
2808 return CODECVT_noconv
;
2811 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2812 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2813 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
2814 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
2815 const char *from
, const char *from_end
, const char **from_next
,
2816 char *to
, char *to_end
, char **to_next
)
2818 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2819 from_next
, to
, to_end
, to_next
);
2820 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
2821 to
, to_end
, to_next
);
2824 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2825 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2826 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2827 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2828 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
2829 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
2830 int *state
, char *to
, char *to_end
, char **to_next
)
2832 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2834 return CODECVT_noconv
;
2837 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2838 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2839 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
2840 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
2841 int *state
, char *to
, char *to_end
, char **to_next
)
2843 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2844 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
2847 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2848 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2849 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2850 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2851 (this, state, from, from_end, max))
2852 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
2853 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
2854 const char *from
, const char *from_end
, MSVCP_size_t max
)
2856 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2857 return (from_end
-from
> max
? max
: from_end
-from
);
2860 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2861 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2862 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
2863 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
2864 const char *from
, const char *from_end
, MSVCP_size_t max
)
2866 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2867 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
2870 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2871 locale_id codecvt_wchar_id
= {0};
2872 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2873 locale_id codecvt_short_id
= {0};
2875 /* ??_7?$codecvt@_WDH@std@@6B@ */
2876 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
2877 /* ??_7?$codecvt@GDH@std@@6B@ */
2878 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
2880 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2881 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2882 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2883 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2884 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
2885 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
2887 TRACE("(%p %p)\n", this, locinfo
);
2888 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2891 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2892 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2893 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
2894 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2896 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2898 codecvt_base_ctor_refs(&this->base
, refs
);
2899 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
2901 codecvt_wchar__Init(this, locinfo
);
2905 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2906 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2907 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
2908 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2910 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2912 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
2913 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
2917 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2918 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2919 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
2920 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2924 TRACE("(%p %ld)\n", this, refs
);
2926 _Locinfo_ctor(&locinfo
);
2927 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
2928 _Locinfo_dtor(&locinfo
);
2932 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2933 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2934 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
2935 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2939 TRACE("(%p %ld)\n", this, refs
);
2941 _Locinfo_ctor(&locinfo
);
2942 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2943 _Locinfo_dtor(&locinfo
);
2947 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
2948 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
2949 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
2950 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
2954 TRACE("(%p %s %ld)\n", this, name
, refs
);
2956 _Locinfo_ctor_cstr(&locinfo
, name
);
2957 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2958 _Locinfo_dtor(&locinfo
);
2962 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
2963 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
2964 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
2965 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
2967 return codecvt_wchar_ctor_refs(this, 0);
2970 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2971 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2972 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
2973 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
2975 return codecvt_short_ctor_refs(this, 0);
2978 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2979 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2980 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2981 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2982 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
2983 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
2985 TRACE("(%p)\n", this);
2986 codecvt_base_dtor(&this->base
);
2989 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_wchar_vector_dtor
, 8)
2990 codecvt_wchar
* __thiscall
MSVCP_codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
2992 TRACE("(%p %x)\n", this, flags
);
2994 /* we have an array, with the number of elements stored before the first object */
2995 int i
, *ptr
= (int *)this-1;
2997 for(i
=*ptr
-1; i
>=0; i
--)
2998 codecvt_wchar_dtor(this+i
);
2999 MSVCRT_operator_delete(ptr
);
3001 codecvt_wchar_dtor(this);
3003 MSVCRT_operator_delete(this);
3009 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_short_vector_dtor
, 8)
3010 codecvt_wchar
* __thiscall
MSVCP_codecvt_short_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3012 return MSVCP_codecvt_wchar_vector_dtor(this, flags
);
3015 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3016 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3017 unsigned int __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3019 TRACE("(%p %p)\n", facet
, loc
);
3021 if(facet
&& !*facet
) {
3024 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3026 ERR("Out of memory\n");
3027 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3031 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
3032 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3033 _Locinfo_dtor(&locinfo
);
3039 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3040 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3041 unsigned int __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3043 TRACE("(%p %p)\n", facet
, loc
);
3045 if(facet
&& !*facet
) {
3048 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3050 ERR("Out of memory\n");
3051 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3055 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
3056 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3057 _Locinfo_dtor(&locinfo
);
3063 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3064 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3065 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3068 return &codecvt_wchar_id
;
3071 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3072 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3073 locale_id
* __cdecl
codecvt_short__Id_func(void)
3076 return &codecvt_short_id
;
3079 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3080 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3081 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3082 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3083 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3084 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3086 TRACE("(%p)\n", this);
3090 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3091 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3092 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3093 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3094 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3095 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3097 TRACE("(%p)\n", this);
3101 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3102 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3103 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3104 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3105 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3106 CALL_VTBL_FUNC(this, 16, int, \
3107 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3108 (this, state, from, from_end, from_next, to, to_end, to_next))
3109 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3110 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3111 const char *from
, const char *from_end
, const char **from_next
,
3112 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3114 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3115 from_end
, from_next
, to
, to_end
, to_next
);
3120 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3121 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3123 *from_next
= from_end
;
3124 return CODECVT_partial
;
3126 return CODECVT_error
;
3140 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3141 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3142 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3143 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3144 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3145 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3146 const char *from
, const char *from_end
, const char **from_next
,
3147 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3149 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3150 from_end
, from_next
, to
, to_end
, to_next
);
3151 return call_codecvt_wchar_do_in(this, state
, from
,
3152 from_end
, from_next
, to
, to_end
, to_next
);
3155 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3156 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3157 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3158 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3159 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3160 CALL_VTBL_FUNC(this, 20, int, \
3161 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3162 (this, state, from, from_end, from_next, to, to_end, to_next))
3163 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3164 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3165 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3166 char *to
, char *to_end
, char **to_next
)
3168 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3169 from_end
, from_next
, to
, to_end
, to_next
);
3174 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3175 int old_state
= *state
, size
;
3176 char buf
[MB_LEN_MAX
];
3178 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3180 return CODECVT_error
;
3182 if(size
> from_end
-*from_next
) {
3184 return CODECVT_partial
;
3195 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3196 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3197 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3198 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3199 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3200 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3201 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3202 char *to
, char *to_end
, char **to_next
)
3204 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3205 from_end
, from_next
, to
, to_end
, to_next
);
3206 return call_codecvt_wchar_do_out(this, state
, from
,
3207 from_end
, from_next
, to
, to_end
, to_next
);
3210 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3211 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3212 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3213 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3214 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3215 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3216 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3217 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3218 int *state
, char *to
, char *to_end
, char **to_next
)
3220 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3222 WARN("unexpected state: %x\n", *state
);
3228 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3229 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3230 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3231 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3232 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3233 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3234 int *state
, char *to
, char *to_end
, char **to_next
)
3236 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3237 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3240 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3241 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3242 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3243 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3244 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3245 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3246 (this, state, from, from_end, max))
3247 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3248 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3249 const char *from
, const char *from_end
, MSVCP_size_t max
)
3251 int tmp_state
= *state
, ret
=0;
3253 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3255 while(ret
<max
&& from
!=from_end
) {
3256 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3273 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3274 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3275 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3276 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3277 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3278 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3279 const char *from
, const char *from_end
, MSVCP_size_t max
)
3281 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3282 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3285 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3286 locale_id numpunct_char_id
= {0};
3288 /* ??_7?$numpunct@D@std@@6B@ */
3289 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3291 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3292 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3293 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3294 void __thiscall
numpunct_char__Init(numpunct_char
*this, _Locinfo
*locinfo
, MSVCP_bool isdef
)
3298 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3300 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3301 this->false_name
= MSVCRT_operator_new(len
);
3302 if(this->false_name
)
3303 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3305 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3306 this->true_name
= MSVCRT_operator_new(len
);
3308 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3311 this->grouping
= MSVCRT_operator_new(1);
3313 *(char*)this->grouping
= 0;
3318 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3320 len
= strlen(lc
->grouping
)+1;
3321 this->grouping
= MSVCRT_operator_new(len
);
3323 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3325 this->dp
= lc
->decimal_point
[0];
3326 this->sep
= lc
->thousands_sep
[0];
3329 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3330 MSVCRT_operator_delete((char*)this->grouping
);
3331 MSVCRT_operator_delete((char*)this->false_name
);
3332 MSVCRT_operator_delete((char*)this->true_name
);
3334 ERR("Out of memory\n");
3335 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3339 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3340 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3341 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3342 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3344 TRACE("(%p)\n", this);
3346 MSVCRT_operator_delete((char*)this->grouping
);
3347 MSVCRT_operator_delete((char*)this->false_name
);
3348 MSVCRT_operator_delete((char*)this->true_name
);
3351 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3352 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3353 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
3354 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
3355 _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3357 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3358 locale_facet_ctor_refs(&this->facet
, refs
);
3359 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3360 numpunct_char__Init(this, locinfo
, usedef
);
3364 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3365 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3366 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
3367 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
3368 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3372 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3373 locale_facet_ctor_refs(&this->facet
, refs
);
3374 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3376 _Locinfo_ctor_cstr(&locinfo
, name
);
3377 numpunct_char__Init(this, &locinfo
, usedef
);
3378 _Locinfo_dtor(&locinfo
);
3382 /* ??0?$numpunct@D@std@@QAE@I@Z */
3383 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3384 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3385 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3387 TRACE("(%p %lu)\n", this, refs
);
3388 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3391 /* ??_F?$numpunct@D@std@@QAEXXZ */
3392 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3393 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3394 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3396 return numpunct_char_ctor_refs(this, 0);
3399 /* ??1?$numpunct@D@std@@MAE@XZ */
3400 /* ??1?$numpunct@D@std@@MEAA@XZ */
3401 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3402 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3404 TRACE("(%p)\n", this);
3405 numpunct_char__Tidy(this);
3408 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_char_vector_dtor
, 8)
3409 numpunct_char
* __thiscall
MSVCP_numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3411 TRACE("(%p %x)\n", this, flags
);
3413 /* we have an array, with the number of elements stored before the first object */
3414 int i
, *ptr
= (int *)this-1;
3416 for(i
=*ptr
-1; i
>=0; i
--)
3417 numpunct_char_dtor(this+i
);
3418 MSVCRT_operator_delete(ptr
);
3420 numpunct_char_dtor(this);
3422 MSVCRT_operator_delete(this);
3428 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3429 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3430 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3432 TRACE("(%p %p)\n", facet
, loc
);
3434 if(facet
&& !*facet
) {
3435 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3437 ERR("Out of memory\n");
3438 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3441 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3442 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3448 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3450 static numpunct_char
*obj
= NULL
;
3453 const locale_facet
*fac
;
3455 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3456 fac
= locale__Getfacet(loc
, numpunct_char_id
.id
);
3458 _Lockit_dtor(&lock
);
3459 return (numpunct_char
*)fac
;
3465 numpunct_char__Getcat(&fac
, loc
);
3466 obj
= (numpunct_char
*)fac
;
3467 locale_facet__Incref(&obj
->facet
);
3468 locale_facet_register(&obj
->facet
);
3469 _Lockit_dtor(&lock
);
3474 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3475 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3476 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3477 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3478 char, (const numpunct_char *this), (this))
3479 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3481 TRACE("(%p)\n", this);
3485 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3486 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3487 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
3488 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
3490 TRACE("(%p)\n", this);
3491 return call_numpunct_char_do_decimal_point(this);
3494 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3495 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3496 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
3497 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3498 char, (const numpunct_char*), (this))
3499 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
3501 TRACE("(%p)\n", this);
3505 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3506 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3507 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
3508 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
3510 TRACE("(%p)\n", this);
3511 return call_numpunct_char_do_thousands_sep(this);
3514 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3515 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3516 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
3517 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3518 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3519 basic_string_char
* __thiscall
numpunct_char_do_grouping(
3520 const numpunct_char
*this, basic_string_char
*ret
)
3522 TRACE("(%p)\n", this);
3523 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3526 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3527 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3528 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
3529 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
3531 TRACE("(%p)\n", this);
3532 return call_numpunct_char_do_grouping(this, ret
);
3535 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3536 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3537 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
3538 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3539 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3540 basic_string_char
* __thiscall
numpunct_char_do_falsename(
3541 const numpunct_char
*this, basic_string_char
*ret
)
3543 TRACE("(%p)\n", this);
3544 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
3547 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3548 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3549 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
3550 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
3552 TRACE("(%p)\n", this);
3553 return call_numpunct_char_do_falsename(this, ret
);
3556 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3557 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3558 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
3559 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3560 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3561 basic_string_char
* __thiscall
numpunct_char_do_truename(
3562 const numpunct_char
*this, basic_string_char
*ret
)
3564 TRACE("(%p)\n", this);
3565 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
3568 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3569 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3570 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
3571 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
3573 TRACE("(%p)\n", this);
3574 return call_numpunct_char_do_truename(this, ret
);
3577 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3578 locale_id numpunct_wchar_id
= {0};
3579 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3580 locale_id numpunct_short_id
= {0};
3582 /* ??_7?$numpunct@_W@std@@6B@ */
3583 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
3584 /* ??_7?$numpunct@G@std@@6B@ */
3585 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
3587 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3588 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3589 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3590 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3591 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
3592 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this, _Locinfo
*locinfo
, MSVCP_bool isdef
)
3594 const char *to_convert
;
3598 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3600 _Locinfo__Getcvt(locinfo
, &cvt
);
3602 to_convert
= _Locinfo__Getfalse(locinfo
);
3603 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3604 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3605 if(this->false_name
)
3606 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3607 (wchar_t*)this->false_name
, len
);
3609 to_convert
= _Locinfo__Gettrue(locinfo
);
3610 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3611 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3613 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3614 (wchar_t*)this->true_name
, len
);
3617 this->grouping
= MSVCRT_operator_new(1);
3619 *(char*)this->grouping
= 0;
3624 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3626 len
= strlen(lc
->grouping
)+1;
3627 this->grouping
= MSVCRT_operator_new(len
);
3629 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3631 this->dp
= lc
->decimal_point
[0];
3632 this->sep
= lc
->thousands_sep
[0];
3635 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3636 MSVCRT_operator_delete((char*)this->grouping
);
3637 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3638 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3640 ERR("Out of memory\n");
3641 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3645 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3646 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3647 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3648 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3649 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
3650 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
3652 TRACE("(%p)\n", this);
3654 MSVCRT_operator_delete((char*)this->grouping
);
3655 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3656 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3659 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3660 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3661 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
3662 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
3663 _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3665 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3666 locale_facet_ctor_refs(&this->facet
, refs
);
3667 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3668 numpunct_wchar__Init(this, locinfo
, usedef
);
3672 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3673 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3674 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
3675 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
3676 _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3678 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
3679 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3683 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3684 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3685 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
3686 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
3687 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3691 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3692 locale_facet_ctor_refs(&this->facet
, refs
);
3693 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3695 _Locinfo_ctor_cstr(&locinfo
, name
);
3696 numpunct_wchar__Init(this, &locinfo
, usedef
);
3697 _Locinfo_dtor(&locinfo
);
3701 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3702 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3703 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
3704 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
3705 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3707 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
3708 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3712 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3713 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3714 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
3715 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3717 TRACE("(%p %lu)\n", this, refs
);
3718 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
3721 /* ??0?$numpunct@G@std@@QAE@I@Z */
3722 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3723 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
3724 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3726 numpunct_wchar_ctor_refs(this, refs
);
3727 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3731 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3732 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3733 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
3734 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
3736 return numpunct_wchar_ctor_refs(this, 0);
3739 /* ??_F?$numpunct@G@std@@QAEXXZ */
3740 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3741 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
3742 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
3744 return numpunct_short_ctor_refs(this, 0);
3747 /* ??1?$numpunct@_W@std@@MAE@XZ */
3748 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3749 /* ??1?$numpunct@G@std@@MAE@XZ */
3750 /* ??1?$numpunct@G@std@@MEAA@XZ */
3751 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
3752 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
3754 TRACE("(%p)\n", this);
3755 numpunct_wchar__Tidy(this);
3758 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_wchar_vector_dtor
, 8)
3759 numpunct_wchar
* __thiscall
MSVCP_numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3761 TRACE("(%p %x)\n", this, flags
);
3763 /* we have an array, with the number of elements stored before the first object */
3764 int i
, *ptr
= (int *)this-1;
3766 for(i
=*ptr
-1; i
>=0; i
--)
3767 numpunct_wchar_dtor(this+i
);
3768 MSVCRT_operator_delete(ptr
);
3770 numpunct_wchar_dtor(this);
3772 MSVCRT_operator_delete(this);
3778 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_short_vector_dtor
, 8)
3779 numpunct_wchar
* __thiscall
MSVCP_numpunct_short_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3781 return MSVCP_numpunct_wchar_vector_dtor(this, flags
);
3784 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3785 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3786 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3788 TRACE("(%p %p)\n", facet
, loc
);
3790 if(facet
&& !*facet
) {
3791 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3793 ERR("Out of memory\n");
3794 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3797 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
3798 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3804 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
3806 static numpunct_wchar
*obj
= NULL
;
3809 const locale_facet
*fac
;
3811 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3812 fac
= locale__Getfacet(loc
, numpunct_wchar_id
.id
);
3814 _Lockit_dtor(&lock
);
3815 return (numpunct_wchar
*)fac
;
3821 numpunct_wchar__Getcat(&fac
, loc
);
3822 obj
= (numpunct_wchar
*)fac
;
3823 locale_facet__Incref(&obj
->facet
);
3824 locale_facet_register(&obj
->facet
);
3825 _Lockit_dtor(&lock
);
3830 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3831 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3832 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3834 TRACE("(%p %p)\n", facet
, loc
);
3836 if(facet
&& !*facet
) {
3837 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3839 ERR("Out of memory\n");
3840 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3843 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
3844 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3850 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
3852 static numpunct_wchar
*obj
= NULL
;
3855 const locale_facet
*fac
;
3857 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3858 fac
= locale__Getfacet(loc
, numpunct_short_id
.id
);
3860 _Lockit_dtor(&lock
);
3861 return (numpunct_wchar
*)fac
;
3867 numpunct_short__Getcat(&fac
, loc
);
3868 obj
= (numpunct_wchar
*)fac
;
3869 locale_facet__Incref(&obj
->facet
);
3870 locale_facet_register(&obj
->facet
);
3871 _Lockit_dtor(&lock
);
3876 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3877 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3878 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3879 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3880 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
3881 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3882 wchar_t, (const numpunct_wchar *this), (this))
3883 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
3885 TRACE("(%p)\n", this);
3889 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3890 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3891 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3892 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3893 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
3894 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
3896 TRACE("(%p)\n", this);
3897 return call_numpunct_wchar_do_decimal_point(this);
3900 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3901 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3902 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3903 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3904 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
3905 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3906 wchar_t, (const numpunct_wchar *this), (this))
3907 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
3909 TRACE("(%p)\n", this);
3913 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3914 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3915 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3916 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3917 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
3918 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
3920 TRACE("(%p)\n", this);
3921 return call_numpunct_wchar_do_thousands_sep(this);
3924 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3925 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3926 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3927 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3928 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
3929 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3930 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3931 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3933 TRACE("(%p)\n", this);
3934 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3937 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3938 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3939 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3940 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3941 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
3942 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3944 TRACE("(%p)\n", this);
3945 return call_numpunct_wchar_do_grouping(this, ret
);
3948 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3949 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3950 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3951 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3952 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
3953 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3954 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3955 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3957 TRACE("(%p)\n", this);
3958 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
3961 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3962 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3963 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3964 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3965 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
3966 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3968 TRACE("(%p)\n", this);
3969 return call_numpunct_wchar_do_falsename(this, ret
);
3972 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3973 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3974 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3975 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3976 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
3977 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3978 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3979 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3981 TRACE("(%p)\n", this);
3982 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
3985 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3986 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3987 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3988 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3989 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
3990 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3992 TRACE("(%p)\n", this);
3993 return call_numpunct_wchar_do_truename(this, ret
);
3996 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
3998 double ret
= strtod(buf
, buf_end
);
4001 ret
*= pow(10, exp
);
4005 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4011 ret
= _Stod(buf
, buf_end
, exp
);
4021 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4023 return _Stod(buf
, buf_end
, exp
);
4026 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4028 return _Stodx(buf
, buf_end
, exp
, err
);
4031 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4033 return _strtoi64(buf
, buf_end
, base
);
4036 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4042 ret
= _strtoi64(buf
, buf_end
, base
);
4052 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4054 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4055 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4060 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4062 return _strtoui64(buf
, buf_end
, base
);
4065 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4067 unsigned __int64 ret
;
4071 ret
= _strtoui64(buf
, buf_end
, base
);
4081 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4084 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4085 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4087 return buf
[0]=='-' ? -i
: i
;
4090 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4092 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4093 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4095 return buf
[0]=='-' ? -i
: i
;
4098 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4099 locale_id num_get_wchar_id
= {0};
4100 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4101 locale_id num_get_short_id
= {0};
4103 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4104 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4105 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4106 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4108 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4109 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4110 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4111 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4112 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4113 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4115 TRACE("(%p %p)\n", this, locinfo
);
4116 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4119 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4120 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4121 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4122 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4123 _Locinfo
*locinfo
, MSVCP_size_t refs
)
4125 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4127 locale_facet_ctor_refs(&this->facet
, refs
);
4128 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4130 num_get_wchar__Init(this, locinfo
);
4134 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4135 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4136 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4137 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4138 _Locinfo
*locinfo
, MSVCP_size_t refs
)
4140 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4141 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4145 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4146 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4147 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4148 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4152 TRACE("(%p %lu)\n", this, refs
);
4154 _Locinfo_ctor(&locinfo
);
4155 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4156 _Locinfo_dtor(&locinfo
);
4160 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4161 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4162 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4163 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4165 num_get_wchar_ctor_refs(this, refs
);
4166 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4170 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4171 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4172 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4173 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4175 return num_get_wchar_ctor_refs(this, 0);
4178 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4179 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4180 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4181 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4183 return num_get_short_ctor_refs(this, 0);
4186 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4187 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4188 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4189 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4190 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4191 void __thiscall
num_get_wchar_dtor(num_get
*this)
4193 TRACE("(%p)\n", this);
4194 locale_facet_dtor(&this->facet
);
4197 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar_vector_dtor
, 8)
4198 num_get
* __thiscall
MSVCP_num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4200 TRACE("(%p %x)\n", this, flags
);
4202 /* we have an array, with the number of elements stored before the first object */
4203 int i
, *ptr
= (int *)this-1;
4205 for(i
=*ptr
-1; i
>=0; i
--)
4206 num_get_wchar_dtor(this+i
);
4207 MSVCRT_operator_delete(ptr
);
4209 num_get_wchar_dtor(this);
4211 MSVCRT_operator_delete(this);
4217 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_short_vector_dtor
, 8)
4218 num_get
* __thiscall
MSVCP_num_get_short_vector_dtor(num_get
*this, unsigned int flags
)
4220 return MSVCP_num_get_wchar_vector_dtor(this, flags
);
4223 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4224 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4225 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4227 TRACE("(%p %p)\n", facet
, loc
);
4229 if(facet
&& !*facet
) {
4232 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4234 ERR("Out of memory\n");
4235 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4239 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
4240 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4241 _Locinfo_dtor(&locinfo
);
4247 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4249 static num_get
*obj
= NULL
;
4252 const locale_facet
*fac
;
4254 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4255 fac
= locale__Getfacet(loc
, num_get_wchar_id
.id
);
4257 _Lockit_dtor(&lock
);
4258 return (num_get
*)fac
;
4264 num_get_wchar__Getcat(&fac
, loc
);
4265 obj
= (num_get
*)fac
;
4266 locale_facet__Incref(&obj
->facet
);
4267 locale_facet_register(&obj
->facet
);
4268 _Lockit_dtor(&lock
);
4273 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4274 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4275 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4277 if(facet
&& !*facet
) {
4278 num_get_wchar__Getcat(facet
, loc
);
4279 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4285 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
4290 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
4293 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4294 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4296 basic_string_char grouping_bstr
;
4297 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4298 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
;
4299 wchar_t sep
, digits
[11], *digits_pos
;
4300 const char *grouping
;
4301 BOOL error
= TRUE
, dest_empty
= TRUE
;
4303 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4306 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4309 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4310 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4311 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : (wchar_t)0;
4313 istreambuf_iterator_wchar_val(first
);
4314 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4316 istreambuf_iterator_wchar_inc(first
);
4317 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4319 istreambuf_iterator_wchar_inc(first
);
4323 groups_no
= strlen(grouping
)+2;
4324 groups
= calloc(groups_no
, sizeof(char));
4327 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4328 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4329 if(sep
&& first
->val
==sep
) {
4330 if(cur_group
== groups_no
+1) {
4331 if(groups
[1] != groups
[2]) {
4335 memmove(groups
+1, groups
+2, groups_no
);
4336 groups
[cur_group
] = 0;
4346 if(dest_empty
&& first
->val
== digits
[0])
4350 *dest
++ = '0'+digits_pos
-digits
;
4353 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4354 groups
[cur_group
]++;
4358 if(cur_group
&& !groups
[cur_group
])
4363 for(; cur_group
>=0 && !error
; cur_group
--) {
4364 if(*grouping
== CHAR_MAX
) {
4368 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4369 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4372 }else if(grouping
[1]) {
4376 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4382 }else if(dest_empty
) {
4386 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4388 *dest
++ = *localeconv()->decimal_point
;
4389 istreambuf_iterator_wchar_inc(first
);
4392 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4395 if(!first
->strbuf
|| !wcschr(digits
, first
->val
))
4400 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4401 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4403 else if(dest
<num_end
)
4404 *dest
++ = '0'+digits_pos
-digits
;
4407 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4409 istreambuf_iterator_wchar_inc(first
);
4411 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4413 istreambuf_iterator_wchar_inc(first
);
4414 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4416 istreambuf_iterator_wchar_inc(first
);
4419 error
= dest_empty
= TRUE
;
4420 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4423 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
4424 error
= dest_empty
= FALSE
;
4426 *dest
++ = '0'+digits_pos
-digits
;
4432 }else if(dest_empty
) {
4441 /* ?_Getffld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1ABVlocale@2@@Z */
4442 /* ?_Getffld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AEBVlocale@2@@Z */
4443 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4444 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4446 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
4449 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1ABVlocale@2@@Z */
4450 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEBVlocale@2@@Z */
4451 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4452 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4454 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
4457 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AAVios_base@2@PAH@Z */
4458 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AEAVios_base@2@PEAH@Z */
4459 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AAVios_base@2@PAH@Z */
4460 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEAVios_base@2@PEAH@Z */
4461 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4462 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
4464 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
4468 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4469 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
4471 wchar_t digits
[23], *digits_pos
, sep
;
4472 basic_string_char grouping_bstr
;
4473 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
4474 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
;
4475 const char *grouping
;
4476 BOOL error
= TRUE
, dest_empty
= TRUE
;
4478 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
4481 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4482 for(i
=0; i
<6; i
++) {
4483 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
4484 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
4487 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4488 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4489 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
4491 basefield
= fmtflags
& FMTFLAG_basefield
;
4492 if(basefield
== FMTFLAG_oct
)
4494 else if(basefield
== FMTFLAG_hex
)
4495 base
= 22; /* equal to the size of digits buffer */
4501 istreambuf_iterator_wchar_val(first
);
4502 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4504 istreambuf_iterator_wchar_inc(first
);
4505 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4507 istreambuf_iterator_wchar_inc(first
);
4510 if(!base
&& first
->strbuf
&& first
->val
==digits
[0]) {
4511 istreambuf_iterator_wchar_inc(first
);
4512 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('x', &this->cvt
))) {
4513 istreambuf_iterator_wchar_inc(first
);
4525 groups_no
= strlen(grouping
)+2;
4526 groups
= calloc(groups_no
, sizeof(char));
4529 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4530 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4531 if(sep
&& first
->val
==sep
) {
4532 if(cur_group
== groups_no
+1) {
4533 if(groups
[1] != groups
[2]) {
4537 memmove(groups
+1, groups
+2, groups_no
);
4538 groups
[cur_group
] = 0;
4548 if(dest_empty
&& first
->val
== digits
[0])
4551 /* skip digits that can't be copied to dest buffer, other
4552 * functions are responsible for detecting overflows */
4554 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
4555 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
4556 'A'+digits_pos
-digits
-16));
4557 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4558 groups
[cur_group
]++;
4562 if(cur_group
&& !groups
[cur_group
])
4567 for(; cur_group
>=0 && !error
; cur_group
--) {
4568 if(*grouping
== CHAR_MAX
) {
4572 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4573 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4576 }else if(grouping
[1]) {
4580 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4589 return (base
==22 ? 16 : base
);
4592 /* ?_Getifld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1HABVlocale@2@@Z */
4593 /* ?_Getifld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1HAEBVlocale@2@@Z */
4594 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4595 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4597 return num_get__Getifld(this, dest
, first
, last
,
4598 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
4601 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HABVlocale@2@@Z */
4602 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HAEBVlocale@2@@Z */
4603 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4604 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4606 return num_get__Getifld(this, dest
, first
, last
,
4607 fmtflags
, loc
, numpunct_short_use_facet(loc
));
4610 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
4611 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
4612 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
4613 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
4614 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
4615 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
4617 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
4621 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
4622 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4623 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4624 void **pval
, numpunct_wchar
*numpunct
)
4630 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4632 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4633 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
4634 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
4635 *state
|= IOSTATE_failbit
;
4636 else if(end
!=tmp
&& !err
)
4637 *pval
= (void*)((INT_PTR
)v
);
4639 *state
|= IOSTATE_failbit
;
4642 *state
|= IOSTATE_eofbit
;
4648 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
4649 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
4650 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
4651 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
4652 (this, ret, first, last, base, state, pval))
4653 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
4654 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4655 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4657 return num_get_do_get_void(this, ret
, first
, last
, base
,
4658 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4661 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
4662 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
4663 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
4664 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4665 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4667 return num_get_do_get_void(this, ret
, first
, last
, base
,
4668 state
, pval
, numpunct_short_use_facet(base
->loc
));
4671 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
4672 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
4673 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
4674 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
4675 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
4676 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4677 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4679 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4680 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
4683 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
4684 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4685 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4686 double *pval
, numpunct_wchar
*numpunct
)
4692 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4694 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
4695 if(end
!=tmp
&& !err
)
4698 *state
|= IOSTATE_failbit
;
4701 *state
|= IOSTATE_eofbit
;
4707 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
4708 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
4709 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
4710 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
4711 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
4712 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4713 (this, ret, first, last, base, state, pval))
4714 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
4715 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4716 (this, ret, first, last, base, state, pval))
4717 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
4718 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4719 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4721 return num_get_do_get_double(this, ret
, first
, last
, base
,
4722 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4725 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
4726 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
4727 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
4728 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
4729 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
4730 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4731 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4733 return num_get_do_get_double(this, ret
, first
, last
, base
,
4734 state
, pval
, numpunct_short_use_facet(base
->loc
));
4737 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
4738 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
4739 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
4740 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
4741 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
4742 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4743 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4745 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4746 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
4749 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
4750 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
4751 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
4752 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
4753 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
4754 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4755 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4757 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4758 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
4761 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
4762 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4763 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4764 float *pval
, numpunct_wchar
*numpunct
)
4770 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4772 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
4773 &last
, base
->loc
, numpunct
), &err
);
4774 if(end
!=tmp
&& !err
)
4777 *state
|= IOSTATE_failbit
;
4780 *state
|= IOSTATE_eofbit
;
4786 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
4787 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
4788 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
4789 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
4790 (this, ret, first, last, base, state, pval))
4791 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
4792 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4793 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4795 return num_get_do_get_float(this, ret
, first
, last
, base
,
4796 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4799 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
4800 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
4801 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
4802 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4803 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4805 return num_get_do_get_float(this, ret
, first
, last
, base
,
4806 state
, pval
, numpunct_short_use_facet(base
->loc
));
4809 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
4810 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
4811 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
4812 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
4813 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
4814 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4815 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4817 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4818 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
4821 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
4822 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4823 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4824 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
4830 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4832 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4833 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4834 if(end
!=tmp
&& !err
)
4837 *state
|= IOSTATE_failbit
;
4840 *state
|= IOSTATE_eofbit
;
4846 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
4847 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
4848 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
4849 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
4850 (this, ret, first, last, base, state, pval))
4851 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
4852 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4853 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4855 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4856 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4859 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
4860 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
4861 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
4862 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4863 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4865 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4866 state
, pval
, numpunct_short_use_facet(base
->loc
));
4869 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
4870 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
4871 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
4872 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
4873 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
4874 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4875 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4877 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4878 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
4881 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
4882 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4883 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4884 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
4890 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4892 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4893 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4894 if(end
!=tmp
&& !err
)
4897 *state
|= IOSTATE_failbit
;
4900 *state
|= IOSTATE_eofbit
;
4906 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
4907 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
4908 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
4909 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
4910 (this, ret, first, last, base, state, pval))
4911 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
4912 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4913 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4915 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4916 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4919 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
4920 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
4921 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
4922 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4923 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4925 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4926 state
, pval
, numpunct_short_use_facet(base
->loc
));
4929 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
4930 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
4931 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
4932 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
4933 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
4934 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4935 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4937 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4938 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
4941 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
4942 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4943 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4944 ULONG
*pval
, numpunct_wchar
*numpunct
)
4950 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4952 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4953 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4954 if(end
!=tmp
&& !err
)
4957 *state
|= IOSTATE_failbit
;
4960 *state
|= IOSTATE_eofbit
;
4966 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
4967 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
4968 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
4969 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
4970 (this, ret, first, last, base, state, pval))
4971 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
4972 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4973 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4975 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4976 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4979 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
4980 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
4981 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
4982 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4983 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4985 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4986 state
, pval
, numpunct_short_use_facet(base
->loc
));
4989 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
4990 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
4991 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
4992 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
4993 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
4994 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4995 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4997 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4998 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5001 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5002 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5003 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5004 LONG
*pval
, numpunct_wchar
*numpunct
)
5010 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5012 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5013 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5014 if(end
!=tmp
&& !err
)
5017 *state
|= IOSTATE_failbit
;
5020 *state
|= IOSTATE_eofbit
;
5026 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5027 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5028 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5029 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5030 (this, ret, first, last, base, state, pval))
5031 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5032 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5033 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5035 return num_get_do_get_long(this, ret
, first
, last
, base
,
5036 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5039 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5040 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5041 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5042 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5043 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5045 return num_get_do_get_long(this, ret
, first
, last
, base
,
5046 state
, pval
, numpunct_short_use_facet(base
->loc
));
5049 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5050 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5051 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5052 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5053 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5054 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5055 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5057 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5058 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5061 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5062 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5063 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5064 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5065 (this, ret, first, last, base, state, pval))
5066 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5067 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5068 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5070 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5071 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5074 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5075 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5076 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5077 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5078 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5080 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5081 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5084 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5085 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5086 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5087 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5088 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5089 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5090 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5092 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5093 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5096 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
5097 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
5098 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5099 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5100 (this, ret, first, last, base, state, pval))
5101 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5102 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5103 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5106 char tmp
[25], *beg
, *end
;
5109 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5111 b
= num_get_wchar__Getifld(this, tmp
,
5112 &first
, &last
, base
->fmtfl
, base
->loc
);
5113 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5114 v
= _Stoulx(beg
, &end
, b
, &err
);
5116 if(v
!= (ULONG
)((unsigned short)v
))
5117 *state
|= IOSTATE_failbit
;
5118 else if(end
!=beg
&& !err
)
5119 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5121 *state
|= IOSTATE_failbit
;
5124 *state
|= IOSTATE_eofbit
;
5130 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
5131 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
5132 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5133 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5134 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5136 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5140 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
5141 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
5142 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAG@ */
5143 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
5144 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5145 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5146 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5148 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5149 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5152 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5153 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5154 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5155 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5157 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5159 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5160 basic_string_wchar false_bstr
, true_bstr
;
5161 const wchar_t *pfalse
, *ptrue
;
5163 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5164 numpunct_wchar_truename(numpunct
, &true_bstr
);
5165 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5166 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5168 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;
5169 istreambuf_iterator_wchar_inc(&first
)) {
5170 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5172 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5175 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5177 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5185 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5194 *state
|= IOSTATE_failbit
;
5196 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5197 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5201 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5202 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5204 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5207 *state
|= IOSTATE_failbit
;
5211 *state
|= IOSTATE_eofbit
;
5212 memcpy(ret
, &first
, sizeof(first
));
5216 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
5217 /* ?do_get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
5218 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5219 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5220 (this, ret, first, last, base, state, pval))
5221 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5222 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5223 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5225 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5226 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5229 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
5230 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
5231 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5232 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5233 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5235 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5236 state
, pval
, numpunct_short_use_facet(base
->loc
));
5239 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
5240 /* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
5241 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
5242 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
5243 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
5244 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5245 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5247 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5248 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5251 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5252 locale_id num_get_char_id
= {0};
5254 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5255 extern const vtable_ptr MSVCP_num_get_char_vtable
;
5257 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5258 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5259 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
5260 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
5262 TRACE("(%p %p)\n", this, locinfo
);
5263 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5266 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5267 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5268 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
5269 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
5270 _Locinfo
*locinfo
, MSVCP_size_t refs
)
5272 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
5274 locale_facet_ctor_refs(&this->facet
, refs
);
5275 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
5277 num_get_char__Init(this, locinfo
);
5281 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5282 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5283 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
5284 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
5288 TRACE("(%p %lu)\n", this, refs
);
5290 _Locinfo_ctor(&locinfo
);
5291 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
5292 _Locinfo_dtor(&locinfo
);
5296 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5297 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5298 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
5299 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
5301 return num_get_char_ctor_refs(this, 0);
5304 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5305 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5306 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
5307 void __thiscall
num_get_char_dtor(num_get
*this)
5309 TRACE("(%p)\n", this);
5310 locale_facet_dtor(&this->facet
);
5313 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char_vector_dtor
, 8)
5314 num_get
* __thiscall
MSVCP_num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
5316 TRACE("(%p %x)\n", this, flags
);
5318 /* we have an array, with the number of elements stored before the first object */
5319 int i
, *ptr
= (int *)this-1;
5321 for(i
=*ptr
-1; i
>=0; i
--)
5322 num_get_char_dtor(this+i
);
5323 MSVCRT_operator_delete(ptr
);
5325 num_get_char_dtor(this);
5327 MSVCRT_operator_delete(this);
5333 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5334 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5335 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
5337 TRACE("(%p %p)\n", facet
, loc
);
5339 if(facet
&& !*facet
) {
5342 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5344 ERR("Out of memory\n");
5345 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5349 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
5350 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5351 _Locinfo_dtor(&locinfo
);
5357 num_get
* num_get_char_use_facet(const locale
*loc
)
5359 static num_get
*obj
= NULL
;
5362 const locale_facet
*fac
;
5364 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5365 fac
= locale__Getfacet(loc
, num_get_char_id
.id
);
5367 _Lockit_dtor(&lock
);
5368 return (num_get
*)fac
;
5374 num_get_char__Getcat(&fac
, loc
);
5375 obj
= (num_get
*)fac
;
5376 locale_facet__Incref(&obj
->facet
);
5377 locale_facet_register(&obj
->facet
);
5378 _Lockit_dtor(&lock
);
5383 /* ?_Getffld@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1ABVlocale@2@@Z */
5384 /* ?_Getffld@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AEBVlocale@2@@Z */
5385 /* Copies number to dest buffer, validates grouping and skips separators.
5386 * Updates first so it points past the number, all digits are skipped.
5387 * Returns how exponent needs to changed.
5388 * Size of dest buffer is not specified, assuming it's not smaller then 32:
5389 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
5391 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5392 istreambuf_iterator_char
*last
, const locale
*loc
)
5394 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5395 basic_string_char grouping_bstr
;
5396 int groups_no
= 0, cur_group
= 0, exp
= 0;
5397 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
, sep
;
5398 const char *grouping
;
5399 BOOL error
= TRUE
, dest_empty
= TRUE
;
5401 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5403 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5404 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5405 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5407 istreambuf_iterator_char_val(first
);
5408 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5409 *dest
++ = first
->val
;
5410 istreambuf_iterator_char_inc(first
);
5414 groups_no
= strlen(grouping
)+2;
5415 groups
= calloc(groups_no
, sizeof(char));
5418 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5419 if(first
->val
<'0' || first
->val
>'9') {
5420 if(sep
&& first
->val
==sep
) {
5421 if(cur_group
== groups_no
+1) {
5422 if(groups
[1] != groups
[2]) {
5426 memmove(groups
+1, groups
+2, groups_no
);
5427 groups
[cur_group
] = 0;
5437 if(dest_empty
&& first
->val
== '0')
5441 *dest
++ = first
->val
;
5444 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5445 groups
[cur_group
]++;
5449 if(cur_group
&& !groups
[cur_group
])
5454 for(; cur_group
>=0 && !error
; cur_group
--) {
5455 if(*grouping
== CHAR_MAX
) {
5459 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5460 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5463 }else if(grouping
[1]) {
5467 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5473 }else if(dest_empty
) {
5477 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
5479 *dest
++ = *localeconv()->decimal_point
;
5480 istreambuf_iterator_char_inc(first
);
5483 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5486 if(!first
->strbuf
|| first
->val
<'1' || first
->val
>'9')
5491 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5492 if(first
->val
<'0' || first
->val
>'9')
5494 else if(dest
<num_end
)
5495 *dest
++ = first
->val
;
5498 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
5499 *dest
++ = first
->val
;
5500 istreambuf_iterator_char_inc(first
);
5502 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5503 *dest
++ = first
->val
;
5504 istreambuf_iterator_char_inc(first
);
5507 error
= dest_empty
= TRUE
;
5508 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5511 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
5512 error
= dest_empty
= FALSE
;
5514 *dest
++ = first
->val
;
5520 }else if(dest_empty
) {
5529 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AAVios_base@2@PAH@Z */
5530 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AEAVios_base@2@PEAH@Z */
5531 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5532 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
5534 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5538 /* ?_Getifld@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1HABVlocale@2@@Z */
5539 /* ?_Getifld@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1HAEBVlocale@2@@Z */
5540 /* Copies number to dest buffer, validates grouping and skips separators.
5541 * Updates first so it points past the number, all digits are skipped.
5542 * Returns number base (8, 10 or 16).
5543 * Size of dest buffer is not specified, assuming it's not smaller then 25:
5544 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
5546 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5547 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
5549 static const char digits
[] = "0123456789abcdefABCDEF";
5551 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5552 basic_string_char grouping_bstr
;
5553 int basefield
, base
, groups_no
= 0, cur_group
= 0;
5554 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
, sep
;
5555 const char *grouping
;
5556 BOOL error
= TRUE
, dest_empty
= TRUE
;
5558 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5560 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5561 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5562 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5564 basefield
= fmtflags
& FMTFLAG_basefield
;
5565 if(basefield
== FMTFLAG_oct
)
5567 else if(basefield
== FMTFLAG_hex
)
5568 base
= 22; /* equal to the size of digits buffer */
5574 istreambuf_iterator_char_val(first
);
5575 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5576 *dest
++ = first
->val
;
5577 istreambuf_iterator_char_inc(first
);
5580 if(!base
&& first
->strbuf
&& first
->val
=='0') {
5581 istreambuf_iterator_char_inc(first
);
5582 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
5583 istreambuf_iterator_char_inc(first
);
5594 groups_no
= strlen(grouping
)+2;
5595 groups
= calloc(groups_no
, sizeof(char));
5598 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5599 if(!memchr(digits
, first
->val
, base
)) {
5600 if(sep
&& first
->val
==sep
) {
5601 if(cur_group
== groups_no
+1) {
5602 if(groups
[1] != groups
[2]) {
5606 memmove(groups
+1, groups
+2, groups_no
);
5607 groups
[cur_group
] = 0;
5617 if(dest_empty
&& first
->val
== '0')
5620 /* skip digits that can't be copied to dest buffer, other
5621 * functions are responsible for detecting overflows */
5623 *dest
++ = first
->val
;
5624 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5625 groups
[cur_group
]++;
5629 if(cur_group
&& !groups
[cur_group
])
5634 for(; cur_group
>=0 && !error
; cur_group
--) {
5635 if(*grouping
== CHAR_MAX
) {
5639 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5640 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5643 }else if(grouping
[1]) {
5647 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5656 return (base
==22 ? 16 : base
);
5659 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
5660 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
5661 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
5662 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
5664 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5668 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
5669 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
5670 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
5671 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
5672 (this, ret, first, last, base, state, pval))
5673 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
5674 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5675 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5681 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5683 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5684 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
5685 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5686 *state
|= IOSTATE_failbit
;
5687 else if(end
!=tmp
&& !err
)
5688 *pval
= (void*)((INT_PTR
)v
);
5690 *state
|= IOSTATE_failbit
;
5693 *state
|= IOSTATE_eofbit
;
5699 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
5700 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
5701 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
5702 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5703 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5705 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5706 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5709 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
5710 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
5711 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
5712 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
5713 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
5714 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5715 (this, ret, first, last, base, state, pval))
5716 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
5717 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5718 (this, ret, first, last, base, state, pval))
5719 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
5720 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5721 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5727 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5729 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5730 if(end
!=tmp
&& !err
)
5733 *state
|= IOSTATE_failbit
;
5736 *state
|= IOSTATE_eofbit
;
5742 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
5743 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
5744 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
5745 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
5746 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5748 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5749 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5752 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
5753 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
5754 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
5755 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5756 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5758 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5759 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5762 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
5763 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
5764 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
5765 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
5766 (this, ret, first, last, base, state, pval))
5767 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
5768 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5769 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5775 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5777 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5778 if(end
!=tmp
&& !err
)
5781 *state
|= IOSTATE_failbit
;
5784 *state
|= IOSTATE_eofbit
;
5790 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
5791 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
5792 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
5793 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5794 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5796 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5797 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5800 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
5801 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
5802 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5803 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5804 (this, ret, first, last, base, state, pval))
5805 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
5806 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5807 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5813 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5815 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5816 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5817 if(end
!=tmp
&& !err
)
5820 *state
|= IOSTATE_failbit
;
5823 *state
|= IOSTATE_eofbit
;
5829 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
5830 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
5831 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
5832 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5833 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5835 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5836 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5839 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
5840 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
5841 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5842 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5843 (this, ret, first, last, base, state, pval))
5844 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
5845 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5846 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5852 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5854 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5855 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5856 if(end
!=tmp
&& !err
)
5859 *state
|= IOSTATE_failbit
;
5862 *state
|= IOSTATE_eofbit
;
5868 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
5869 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
5870 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
5871 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5872 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5874 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5875 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5878 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
5879 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
5880 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
5881 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
5882 (this, ret, first, last, base, state, pval))
5883 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
5884 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5885 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5891 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5893 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5894 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5895 if(end
!=tmp
&& !err
)
5898 *state
|= IOSTATE_failbit
;
5901 *state
|= IOSTATE_eofbit
;
5907 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
5908 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
5909 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
5910 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5911 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5913 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5914 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5917 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5918 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5919 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
5920 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
5921 (this, ret, first, last, base, state, pval))
5922 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
5923 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5924 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5930 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5932 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5933 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5934 if(end
!=tmp
&& !err
)
5937 *state
|= IOSTATE_failbit
;
5940 *state
|= IOSTATE_eofbit
;
5946 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
5947 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
5948 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
5949 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5950 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5952 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5953 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5956 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5957 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5958 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
5959 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
5960 (this, ret, first, last, base, state, pval))
5961 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
5962 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5963 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5965 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5966 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5969 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
5970 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
5971 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
5972 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5973 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5975 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5976 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5979 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
5980 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
5981 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
5982 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
5983 (this, ret, first, last, base, state, pval))
5984 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
5985 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5986 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5989 char tmp
[25], *beg
, *end
;
5992 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5994 b
= num_get_char__Getifld(this, tmp
,
5995 &first
, &last
, base
->fmtfl
, base
->loc
);
5996 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5997 v
= _Stoulx(beg
, &end
, b
, &err
);
5999 if(v
!= (ULONG
)((unsigned short)v
))
6000 *state
|= IOSTATE_failbit
;
6001 else if(end
!=beg
&& !err
)
6002 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6004 *state
|= IOSTATE_failbit
;
6007 *state
|= IOSTATE_eofbit
;
6013 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
6014 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
6015 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6016 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6017 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6019 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6020 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6023 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
6024 /* ?do_get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
6025 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6026 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6027 (this, ret, first, last, base, state, pval))
6028 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
6029 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6030 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6032 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6034 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6035 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6036 basic_string_char false_bstr
, true_bstr
;
6037 const char *pfalse
, *ptrue
;
6039 numpunct_char_falsename(numpunct
, &false_bstr
);
6040 numpunct_char_truename(numpunct
, &true_bstr
);
6041 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
6042 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
6044 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;
6045 istreambuf_iterator_char_inc(&first
)) {
6046 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6048 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6051 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6053 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6061 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6070 *state
|= IOSTATE_failbit
;
6072 MSVCP_basic_string_char_dtor(&false_bstr
);
6073 MSVCP_basic_string_char_dtor(&true_bstr
);
6077 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6078 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6080 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6083 *state
|= IOSTATE_failbit
;
6087 *state
|= IOSTATE_eofbit
;
6088 memcpy(ret
, &first
, sizeof(first
));
6092 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
6093 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
6094 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6095 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6096 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6098 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6099 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6102 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6103 locale_id num_put_char_id
= {0};
6105 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6106 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6108 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6109 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6110 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6111 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6113 TRACE("(%p %p)\n", this, locinfo
);
6114 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6117 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6118 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6119 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6120 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6122 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6124 locale_facet_ctor_refs(&this->facet
, refs
);
6125 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6127 num_put_char__Init(this, locinfo
);
6131 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6132 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6133 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6134 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6138 TRACE("(%p %lu)\n", this, refs
);
6140 _Locinfo_ctor(&locinfo
);
6141 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
6142 _Locinfo_dtor(&locinfo
);
6146 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6147 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6148 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
6149 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
6151 return num_put_char_ctor_refs(this, 0);
6154 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6155 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6156 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
6157 void __thiscall
num_put_char_dtor(num_put
*this)
6159 TRACE("(%p)\n", this);
6160 locale_facet_dtor(&this->facet
);
6163 DEFINE_THISCALL_WRAPPER(MSVCP_num_put_char_vector_dtor
, 8)
6164 num_put
* __thiscall
MSVCP_num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
6166 TRACE("(%p %x)\n", this, flags
);
6168 /* we have an array, with the number of elements stored before the first object */
6169 int i
, *ptr
= (int *)this-1;
6171 for(i
=*ptr
-1; i
>=0; i
--)
6172 num_put_char_dtor(this+i
);
6173 MSVCRT_operator_delete(ptr
);
6175 num_put_char_dtor(this);
6177 MSVCRT_operator_delete(this);
6183 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6184 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6185 unsigned int __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6187 TRACE("(%p %p)\n", facet
, loc
);
6189 if(facet
&& !*facet
) {
6192 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6194 ERR("Out of memory\n");
6195 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6199 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6200 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6201 _Locinfo_dtor(&locinfo
);
6207 num_put
* num_put_char_use_facet(const locale
*loc
)
6209 static num_put
*obj
= NULL
;
6212 const locale_facet
*fac
;
6214 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6215 fac
= locale__Getfacet(loc
, num_put_char_id
.id
);
6217 _Lockit_dtor(&lock
);
6218 return (num_put
*)fac
;
6224 num_put_char__Getcat(&fac
, loc
);
6225 obj
= (num_put
*)fac
;
6226 locale_facet__Incref(&obj
->facet
);
6227 locale_facet_register(&obj
->facet
);
6228 _Lockit_dtor(&lock
);
6233 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDI@Z */
6234 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_K@Z */
6235 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
6236 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6238 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6240 for(; count
>0; count
--)
6241 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6247 /* ?_Putc@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDI@Z */
6248 /* ?_Putc@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_K@Z */
6249 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
6250 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6252 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6254 for(; count
>0; count
--)
6255 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6261 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDID@Z */
6262 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_KD@Z */
6263 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
6264 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
6266 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6270 /* ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@DI@Z */
6271 /* ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@D_K@Z */
6272 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
6273 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
6275 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6277 for(; count
>0; count
--)
6278 ostreambuf_iterator_char_put(&dest
, c
);
6284 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
6285 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6286 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6288 int type
= fmtfl
& FMTFLAG_floatfield
;
6291 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6294 if(fmtfl
& FMTFLAG_showpos
)
6296 if(fmtfl
& FMTFLAG_showbase
)
6303 if(type
== FMTFLAG_fixed
)
6305 else if(type
== FMTFLAG_scientific
)
6306 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6307 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6308 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6310 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6316 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z */
6317 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBD_K333@Z */
6318 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6319 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
6320 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6322 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6323 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6327 /* TODO: This function should be removed when num_put_char__Fput is implemented */
6328 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6329 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6331 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6332 basic_string_char grouping_bstr
;
6333 const char *grouping
;
6334 char *p
, sep
= *localeconv()->decimal_point
;
6335 int cur_group
= 0, group_size
= 0;
6336 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6339 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6341 /* Change decimal point */
6342 for(p
=buf
; p
<buf
+count
; p
++) {
6344 *p
= numpunct_char_decimal_point(numpunct
);
6350 /* Add separators to number */
6351 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6352 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6353 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6355 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6357 if(group_size
== grouping
[cur_group
]) {
6359 if(grouping
[cur_group
+1])
6362 memmove(p
+1, p
, buf
+count
-p
);
6367 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6369 /* Display number with padding */
6370 if(count
>= base
->wide
)
6373 pad
= base
->wide
-count
;
6376 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6377 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6380 if(adjustfield
!= FMTFLAG_left
) {
6381 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6384 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6385 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6388 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
6389 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6390 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6392 int base
= fmtfl
& FMTFLAG_basefield
;
6395 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6398 if(fmtfl
& FMTFLAG_showpos
)
6400 if(fmtfl
& FMTFLAG_showbase
)
6407 if(base
== FMTFLAG_oct
)
6409 else if(base
== FMTFLAG_hex
)
6410 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6418 /* ?_Iput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPADI@Z */
6419 /* ?_Iput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEAD_K@Z */
6420 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6421 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6423 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6424 basic_string_char grouping_bstr
;
6425 const char *grouping
;
6427 int cur_group
= 0, group_size
= 0;
6428 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6431 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6433 /* Add separators to number */
6434 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6435 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6436 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6438 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6440 if(group_size
== grouping
[cur_group
]) {
6442 if(grouping
[cur_group
+1])
6445 memmove(p
+1, p
, buf
+count
-p
);
6450 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6452 /* Display number with padding */
6453 if(count
>= base
->wide
)
6456 pad
= base
->wide
-count
;
6459 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6460 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6462 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6463 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
6466 if(adjustfield
!= FMTFLAG_left
) {
6467 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6470 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6471 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6474 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */
6475 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DJ@Z */
6476 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
6477 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
6478 (this, ret, dest, base, fill, v))
6479 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
6480 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6481 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6483 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6484 char fmt
[7]; /* strlen("%+#lld")+1 */
6486 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6488 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6489 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6492 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */
6493 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DJ@Z */
6494 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
6495 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6496 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6498 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6499 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
6502 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DK@Z */
6503 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DK@Z */
6504 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
6505 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
6506 (this, ret, dest, base, fill, v))
6507 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
6508 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6509 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6511 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6512 char fmt
[7]; /* strlen("%+#lld")+1 */
6514 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6516 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6517 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6520 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DK@Z */
6521 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DK@Z */
6522 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
6523 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6524 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6526 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6527 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6530 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */
6531 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DN@Z */
6532 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DO@Z */
6533 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DO@Z */
6534 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
6535 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6536 (this, ret, dest, base, fill, v))
6537 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
6538 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6539 (this, ret, dest, base, fill, v))
6540 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
6541 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6542 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6545 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6548 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6550 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6551 size
= _scprintf(fmt
, base
->prec
, v
);
6553 /* TODO: don't use dynamic allocation */
6554 tmp
= MSVCRT_operator_new(size
*2);
6556 ERR("Out of memory\n");
6557 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6559 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
));
6560 MSVCRT_operator_delete(tmp
);
6564 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */
6565 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DN@Z */
6566 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
6567 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6568 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6570 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6571 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
6574 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DO@Z */
6575 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DO@Z */
6576 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
6577 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
6578 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6580 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6581 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6584 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBX@Z */
6585 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBX@Z */
6586 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
6587 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
6588 (this, ret, dest, base, fill, v))
6589 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
6590 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6591 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6593 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6595 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6597 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6600 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBX@Z */
6601 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBX@Z */
6602 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
6603 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6604 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6606 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6607 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
6610 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_J@Z */
6611 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_J@Z */
6612 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
6613 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
6614 (this, ret, dest, base, fill, v))
6615 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
6616 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6617 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6619 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6620 char fmt
[7]; /* strlen("%+#lld")+1 */
6622 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6624 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6625 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
6628 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_J@Z */
6629 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_J@Z */
6630 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
6631 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6632 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6634 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6635 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
6638 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_K@Z */
6639 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_K@Z */
6640 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
6641 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
6642 (this, ret, dest, base, fill, v))
6643 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
6644 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6645 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6647 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6648 char fmt
[7]; /* strlen("%+#lld")+1 */
6650 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6652 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6653 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
6656 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_K@Z */
6657 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_K@Z */
6658 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
6659 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6660 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6662 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6663 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
6666 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_N@Z */
6667 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_N@Z */
6668 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
6669 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
6670 (this, ret, dest, base, fill, v))
6671 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
6672 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6673 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6675 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6677 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6678 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6679 basic_string_char str
;
6680 MSVCP_size_t pad
, len
;
6683 numpunct_char_truename(numpunct
, &str
);
6685 numpunct_char_falsename(numpunct
, &str
);
6687 len
= MSVCP_basic_string_char_length(&str
);
6688 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
6691 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6692 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
6695 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
6696 MSVCP_basic_string_char_dtor(&str
);
6697 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6700 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
6703 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_N@Z */
6704 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_N@Z */
6705 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
6706 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6707 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6709 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6710 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
6713 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
6714 locale_id num_put_wchar_id
= {0};
6716 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
6717 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
6719 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6720 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6721 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
6722 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
6724 TRACE("(%p %p)\n", this, locinfo
);
6725 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6728 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6729 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6730 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
6731 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6733 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6735 locale_facet_ctor_refs(&this->facet
, refs
);
6736 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
6738 num_put_wchar__Init(this, locinfo
);
6742 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
6743 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
6744 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
6745 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6749 TRACE("(%p %lu)\n", this, refs
);
6751 _Locinfo_ctor(&locinfo
);
6752 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
6753 _Locinfo_dtor(&locinfo
);
6757 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
6758 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
6759 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
6760 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
6762 return num_put_wchar_ctor_refs(this, 0);
6765 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
6766 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
6767 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
6768 void __thiscall
num_put_wchar_dtor(num_put
*this)
6770 TRACE("(%p)\n", this);
6771 locale_facet_dtor(&this->facet
);
6774 DEFINE_THISCALL_WRAPPER(MSVCP_num_put_wchar_vector_dtor
, 8)
6775 num_put
* __thiscall
MSVCP_num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
6777 TRACE("(%p %x)\n", this, flags
);
6779 /* we have an array, with the number of elements stored before the first object */
6780 int i
, *ptr
= (int *)this-1;
6782 for(i
=*ptr
-1; i
>=0; i
--)
6783 num_put_wchar_dtor(this+i
);
6784 MSVCRT_operator_delete(ptr
);
6786 num_put_wchar_dtor(this);
6788 MSVCRT_operator_delete(this);
6794 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6795 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6796 unsigned int __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
6798 TRACE("(%p %p)\n", facet
, loc
);
6800 if(facet
&& !*facet
) {
6803 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6805 ERR("Out of memory\n");
6806 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6810 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6811 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6812 _Locinfo_dtor(&locinfo
);
6818 num_put
* num_put_wchar_use_facet(const locale
*loc
)
6820 static num_put
*obj
= NULL
;
6823 const locale_facet
*fac
;
6825 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6826 fac
= locale__Getfacet(loc
, num_put_wchar_id
.id
);
6828 _Lockit_dtor(&lock
);
6829 return (num_put
*)fac
;
6835 num_put_wchar__Getcat(&fac
, loc
);
6836 obj
= (num_put
*)fac
;
6837 locale_facet__Incref(&obj
->facet
);
6838 locale_facet_register(&obj
->facet
);
6839 _Lockit_dtor(&lock
);
6844 /* ?_Put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PB_WI@Z */
6845 /* ?_Put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEB_W_K@Z */
6846 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6847 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
6849 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
6851 for(; count
>0; count
--)
6852 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
6858 /* ?_Putc@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PBDI@Z */
6859 /* ?_Putc@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEBD_K@Z */
6860 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6861 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
6866 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
6868 for(; count
>0; count
--) {
6869 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
6870 ostreambuf_iterator_wchar_put(&dest
, ch
);
6877 /* ?_Putgrouped@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PBDI_W@Z */
6878 /* ?_Putgrouped@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEBD_K_W@Z */
6879 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6880 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
6882 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6886 /* ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z */
6887 /* ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z */
6888 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6889 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
6891 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6893 for(; count
>0; count
--)
6894 ostreambuf_iterator_wchar_put(&dest
, c
);
6900 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
6901 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6902 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6904 int type
= fmtfl
& FMTFLAG_floatfield
;
6907 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6910 if(fmtfl
& FMTFLAG_showpos
)
6912 if(fmtfl
& FMTFLAG_showbase
)
6919 if(type
== FMTFLAG_fixed
)
6921 else if(type
== FMTFLAG_scientific
)
6922 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6923 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6924 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6926 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6932 /* ?_Fput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBDIIII@Z */
6933 /* ?_Fput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBD_K444@Z */
6934 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6935 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
6936 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6938 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6939 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6943 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
6944 static ostreambuf_iterator_wchar
* num_put_wchar_fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6945 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
6947 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
6948 basic_string_char grouping_bstr
;
6949 const char *grouping
;
6950 char *p
, dec_point
= *localeconv()->decimal_point
;
6952 int cur_group
= 0, group_size
= 0;
6953 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6954 MSVCP_size_t i
, pad
;
6956 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6958 for(p
=buf
; p
<buf
+count
; p
++) {
6964 /* Add separators to number */
6965 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
6966 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6967 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
6969 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6971 if(group_size
== grouping
[cur_group
]) {
6973 if(grouping
[cur_group
+1])
6976 memmove(p
+1, p
, buf
+count
-p
);
6977 *p
= '\0'; /* mark thousands separator positions */
6981 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6983 /* Display number with padding */
6984 if(count
>= base
->wide
)
6987 pad
= base
->wide
-count
;
6990 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6991 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
6994 if(adjustfield
!= FMTFLAG_left
) {
6995 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
6999 for(i
=0; i
<count
; i
++) {
7000 if(buf
[i
] == dec_point
)
7001 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
7003 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7005 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7008 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7011 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
7012 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7013 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7015 int base
= fmtfl
& FMTFLAG_basefield
;
7018 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7021 if(fmtfl
& FMTFLAG_showpos
)
7023 if(fmtfl
& FMTFLAG_showbase
)
7030 if(base
== FMTFLAG_oct
)
7032 else if(base
== FMTFLAG_hex
)
7033 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7041 /* ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPADI@Z */
7042 /* ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEAD_K@Z */
7043 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7044 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7046 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7047 basic_string_char grouping_bstr
;
7048 const char *grouping
;
7051 int cur_group
= 0, group_size
= 0;
7052 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7053 MSVCP_size_t i
, pad
;
7055 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7057 /* Add separators to number */
7058 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7059 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7060 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7062 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7064 if(group_size
== grouping
[cur_group
]) {
7066 if(grouping
[cur_group
+1])
7069 memmove(p
+1, p
, buf
+count
-p
);
7070 *p
= '\0'; /* mark thousands separator positions */
7074 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7076 /* Display number with padding */
7077 if(count
>= base
->wide
)
7080 pad
= base
->wide
-count
;
7083 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7084 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7086 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7087 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
7090 if(adjustfield
!= FMTFLAG_left
) {
7091 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7095 for(i
=0; i
<count
; i
++) {
7097 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7099 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7102 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7105 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
7106 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WJ@Z */
7107 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
7108 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
7109 (this, ret, dest, base, fill, v))
7110 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
7111 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7112 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7114 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7115 char fmt
[7]; /* strlen("%+#lld")+1 */
7117 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7119 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7120 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7123 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
7124 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WJ@Z */
7125 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
7126 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7127 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7129 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7130 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
7133 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WK@Z */
7134 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WK@Z */
7135 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
7136 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
7137 (this, ret, dest, base, fill, v))
7138 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
7139 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7140 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7142 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7143 char fmt
[7]; /* strlen("%+#lld")+1 */
7145 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7147 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7148 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7151 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WK@Z */
7152 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WK@Z */
7153 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
7154 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7155 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7157 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7158 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7161 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WN@Z */
7162 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WN@Z */
7163 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WO@Z */
7164 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WO@Z */
7165 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
7166 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7167 (this, ret, dest, base, fill, v))
7168 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
7169 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7170 (this, ret, dest, base, fill, v))
7171 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
7172 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7173 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7176 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7179 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7181 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7182 size
= _scprintf(fmt
, base
->prec
, v
);
7184 /* TODO: don't use dynamic allocation */
7185 tmp
= MSVCRT_operator_new(size
*2);
7187 ERR("Out of memory\n");
7188 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7190 num_put_wchar_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
));
7191 MSVCRT_operator_delete(tmp
);
7195 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WN@Z */
7196 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WN@Z */
7197 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
7198 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7199 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7201 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7202 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
7205 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WO@Z */
7206 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WO@Z */
7207 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
7208 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7209 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7211 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7212 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7215 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBX@Z */
7216 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBX@Z */
7217 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
7218 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
7219 (this, ret, dest, base, fill, v))
7220 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
7221 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7222 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7224 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7226 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7228 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7231 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBX@Z */
7232 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBX@Z */
7233 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
7234 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7235 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7237 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7238 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7241 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_J@Z */
7242 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_J@Z */
7243 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
7244 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
7245 (this, ret, dest, base, fill, v))
7246 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
7247 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7248 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7250 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7251 char fmt
[7]; /* strlen("%+#lld")+1 */
7253 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7255 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7256 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7259 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_J@Z */
7260 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_J@Z */
7261 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
7262 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7263 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7265 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7266 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7269 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_K@Z */
7270 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_K@Z */
7271 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
7272 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
7273 (this, ret, dest, base, fill, v))
7274 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
7275 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7276 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7278 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7279 char fmt
[7]; /* strlen("%+#lld")+1 */
7281 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7283 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7284 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7287 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_K@Z */
7288 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_K@Z */
7289 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
7290 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7291 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7293 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7294 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7297 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_N@Z */
7298 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_N@Z */
7299 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
7300 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
7301 (this, ret, dest, base, fill, v))
7302 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
7303 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7304 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7306 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7308 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7309 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7310 basic_string_wchar str
;
7311 MSVCP_size_t pad
, len
;
7314 numpunct_wchar_truename(numpunct
, &str
);
7316 numpunct_wchar_falsename(numpunct
, &str
);
7318 len
= MSVCP_basic_string_wchar_length(&str
);
7319 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7322 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7323 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7326 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7327 MSVCP_basic_string_wchar_dtor(&str
);
7328 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7331 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7334 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_N@Z */
7335 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_N@Z */
7336 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
7337 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7338 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7340 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7341 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7344 /* ??0_Locimp@locale@std@@AAE@_N@Z */
7345 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
7346 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
7347 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
7349 TRACE("(%p %d)\n", this, transparent
);
7351 memset(this, 0, sizeof(locale__Locimp
));
7352 locale_facet_ctor_refs(&this->facet
, 1);
7353 this->transparent
= transparent
;
7354 MSVCP_basic_string_char_ctor_cstr(&this->name
, "*");
7358 /* ??_F_Locimp@locale@std@@QAEXXZ */
7359 /* ??_F_Locimp@locale@std@@QEAAXXZ */
7360 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
7361 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
7363 return locale__Locimp_ctor_transparent(this, FALSE
);
7366 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
7367 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
7368 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
7369 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7374 TRACE("(%p %p)\n", this, copy
);
7376 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7377 memcpy(this, copy
, sizeof(locale__Locimp
));
7378 locale_facet_ctor_refs(&this->facet
, 1);
7379 if(copy
->facetvec
) {
7380 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
7381 if(!this->facetvec
) {
7382 _Lockit_dtor(&lock
);
7383 ERR("Out of memory\n");
7384 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7387 for(i
=0; i
<this->facet_cnt
; i
++)
7388 if(this->facetvec
[i
])
7389 locale_facet__Incref(this->facetvec
[i
]);
7391 MSVCP_basic_string_char_copy_ctor(&this->name
, ©
->name
);
7392 _Lockit_dtor(&lock
);
7396 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
7397 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
7398 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7400 return locale__Locimp_copy_ctor(this, copy
);
7403 /* ??1_Locimp@locale@std@@MAE@XZ */
7404 /* ??1_Locimp@locale@std@@MEAA@XZ */
7405 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
7406 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
7408 TRACE("(%p)\n", this);
7410 if(locale_facet__Decref(&this->facet
)) {
7412 for(i
=0; i
<this->facet_cnt
; i
++)
7413 if(this->facetvec
[i
] && locale_facet__Decref(this->facetvec
[i
]))
7414 call_locale_facet_vector_dtor(this->facetvec
[i
], 0);
7416 MSVCRT_operator_delete(this->facetvec
);
7417 MSVCP_basic_string_char_dtor(&this->name
);
7421 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
7422 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
7423 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
7425 locale__Locimp_dtor(this);
7428 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor
, 8)
7429 locale__Locimp
* __thiscall
MSVCP_locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
7431 TRACE("(%p %x)\n", this, flags
);
7433 /* we have an array, with the number of elements stored before the first object */
7434 int i
, *ptr
= (int *)this-1;
7436 for(i
=*ptr
-1; i
>=0; i
--)
7437 locale__Locimp_dtor(this+i
);
7438 MSVCRT_operator_delete(ptr
);
7440 locale__Locimp_dtor(this);
7442 MSVCRT_operator_delete(this);
7448 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
7449 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
7450 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
7454 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
7456 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7457 if(id
>= locimp
->facet_cnt
) {
7458 MSVCP_size_t new_size
= id
+1;
7459 locale_facet
**new_facetvec
;
7461 if(new_size
< locale_id__Id_cnt
+1)
7462 new_size
= locale_id__Id_cnt
+1;
7464 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
7466 _Lockit_dtor(&lock
);
7467 ERR("Out of memory\n");
7468 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7472 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
7473 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
7474 MSVCRT_operator_delete(locimp
->facetvec
);
7475 locimp
->facetvec
= new_facetvec
;
7476 locimp
->facet_cnt
= new_size
;
7479 if(locimp
->facetvec
[id
] && locale_facet__Decref(locimp
->facetvec
[id
]))
7480 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 0);
7482 locimp
->facetvec
[id
] = facet
;
7484 locale_facet__Incref(facet
);
7485 _Lockit_dtor(&lock
);
7488 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
7489 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
7490 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
7491 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
7493 locale__Locimp__Locimp_Addfac(this, facet
, id
);
7496 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
7497 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
7498 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
7504 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
7505 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7506 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7508 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
7512 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7513 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7514 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7516 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
7519 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7520 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7521 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7523 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
7526 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7527 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7528 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7530 FIXME("(%p %d %p %p) stub\n", locinfo
, cat
, locimp
, loc
);
7533 /* ??_7_Locimp@locale@std@@6B@ */
7534 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
7535 (vtable_ptr
)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor
)
7538 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
7539 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
7540 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
7541 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
7543 TRACE("(%p %p)\n", this, locimp
);
7544 /* Don't change locimp reference counter */
7549 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
7550 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
7551 locale__Locimp
* __cdecl
locale__Init(void)
7557 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7559 _Lockit_dtor(&lock
);
7560 return global_locale
;
7563 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7564 if(!global_locale
) {
7565 _Lockit_dtor(&lock
);
7566 ERR("Out of memory\n");
7567 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7571 locale__Locimp_ctor(global_locale
);
7572 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
7573 MSVCP_basic_string_char_dtor(&global_locale
->name
);
7574 MSVCP_basic_string_char_ctor_cstr(&global_locale
->name
, "C");
7576 locale__Locimp__Clocptr
= global_locale
;
7577 global_locale
->facet
.refs
++;
7578 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
7579 _Lockit_dtor(&lock
);
7581 return global_locale
;
7584 /* ??0locale@std@@QAE@ABV01@0H@Z */
7585 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
7586 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
7587 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
7589 FIXME("(%p %p %p %d) stub\n", this, loc
, other
, cat
);
7593 /* ??0locale@std@@QAE@ABV01@@Z */
7594 /* ??0locale@std@@QEAA@AEBV01@@Z */
7595 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
7596 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
7598 TRACE("(%p %p)\n", this, copy
);
7599 this->ptr
= copy
->ptr
;
7600 locale_facet__Incref(&this->ptr
->facet
);
7604 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
7605 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
7606 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
7607 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
7609 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
7613 /* ??0locale@std@@QAE@PBDH@Z */
7614 /* ??0locale@std@@QEAA@PEBDH@Z */
7615 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
7616 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
7618 FIXME("(%p %s %d) stub\n", this, locname
, cat
);
7622 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
7623 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
7624 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
7625 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
7627 TRACE("(%p)\n", this);
7632 /* ??0locale@std@@QAE@XZ */
7633 /* ??0locale@std@@QEAA@XZ */
7634 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
7635 locale
* __thiscall
locale_ctor(locale
*this)
7637 TRACE("(%p)\n", this);
7638 this->ptr
= locale__Init();
7639 locale_facet__Incref(&this->ptr
->facet
);
7643 /* ??1locale@std@@QAE@XZ */
7644 /* ??1locale@std@@QEAA@XZ */
7645 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
7646 void __thiscall
locale_dtor(locale
*this)
7648 TRACE("(%p)\n", this);
7650 locale__Locimp_dtor(this->ptr
);
7653 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor
, 8)
7654 locale
* __thiscall
MSVCP_locale_vector_dtor(locale
*this, unsigned int flags
)
7656 TRACE("(%p %x)\n", this, flags
);
7658 /* we have an array, with the number of elements stored before the first object */
7659 int i
, *ptr
= (int *)this-1;
7661 for(i
=*ptr
-1; i
>=0; i
--)
7662 locale_dtor(this+i
);
7663 MSVCRT_operator_delete(ptr
);
7667 MSVCRT_operator_delete(this);
7673 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
7674 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
7675 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
7676 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
7678 FIXME("(%p %p) stub\n", this, loc
);
7682 /* ??8locale@std@@QBE_NABV01@@Z */
7683 /* ??8locale@std@@QEBA_NAEBV01@@Z */
7684 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
7685 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
7687 FIXME("(%p %p) stub\n", this, loc
);
7691 /* ??9locale@std@@QBE_NABV01@@Z */
7692 /* ??9locale@std@@QEBA_NAEBV01@@Z */
7693 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
7694 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
7696 FIXME("(%p %p) stub\n", this, loc
);
7700 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
7701 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
7702 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
7703 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
7705 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
7707 if(this->ptr
->facet
.refs
> 1) {
7708 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7710 ERR("Out of memory\n");
7711 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7714 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
7715 locale_facet__Decref(&this->ptr
->facet
);
7716 this->ptr
= new_ptr
;
7719 locale__Locimp__Addfac(this->ptr
, facet
, id
);
7722 MSVCP_basic_string_char_dtor(&this->ptr
->name
);
7723 MSVCP_basic_string_char_ctor_cstr(&this->ptr
->name
, "*");
7728 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
7729 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
7730 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
7731 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
7735 TRACE("(%p %lu)\n", this, id
);
7737 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
7738 if(fac
|| !this->ptr
->transparent
)
7741 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
7744 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
7745 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
7746 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
7749 return global_locale
;
7752 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
7753 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
7754 void __cdecl
locale__Setgloballocale(void *locimp
)
7756 TRACE("(%p)\n", locimp
);
7757 global_locale
= locimp
;
7760 /* ?classic@locale@std@@SAABV12@XZ */
7761 /* ?classic@locale@std@@SAAEBV12@XZ */
7762 const locale
* __cdecl
locale_classic(void)
7766 return &classic_locale
;
7769 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
7770 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
7771 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
7772 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
7774 TRACE( "(%p)\n", this);
7775 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
7779 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
7780 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
7781 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
7786 TRACE("(%p %p)\n", loc
, ret
);
7788 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7791 if(loc
->ptr
!= global_locale
) {
7792 locale_facet__Decref(&global_locale
->facet
);
7793 global_locale
= loc
->ptr
;
7794 locale_facet__Incref(&global_locale
->facet
);
7796 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
7797 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
7799 setlocale(i
, MSVCP_basic_string_char_c_str(&global_locale
->name
));
7802 _Lockit_dtor(&lock
);
7806 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@");
7807 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@");
7808 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@");
7809 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@");
7810 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@");
7811 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@");
7812 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@");
7813 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@");
7814 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@");
7815 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@");
7816 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@");
7817 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@");
7818 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@");
7819 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@");
7820 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@");
7821 DEFINE_RTTI_DATA1(num_get_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@");
7822 DEFINE_RTTI_DATA1(num_get_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@");
7823 DEFINE_RTTI_DATA1(num_get_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@");
7824 DEFINE_RTTI_DATA1(num_put_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@");
7825 DEFINE_RTTI_DATA1(num_put_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@");
7828 void __asm_dummy_vtables(void) {
7830 __ASM_VTABLE(locale_facet
, "");
7831 __ASM_VTABLE(collate_char
,
7832 VTABLE_ADD_FUNC(collate_char_do_compare
)
7833 VTABLE_ADD_FUNC(collate_char_do_transform
)
7834 VTABLE_ADD_FUNC(collate_char_do_hash
));
7835 __ASM_VTABLE(collate_wchar
,
7836 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
7837 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
7838 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
7839 __ASM_VTABLE(collate_short
,
7840 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
7841 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
7842 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
7843 __ASM_VTABLE(ctype_base
, "");
7844 __ASM_VTABLE(ctype_char
,
7845 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
7846 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
7847 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
7848 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
7849 VTABLE_ADD_FUNC(ctype_char_do_widen
)
7850 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
7851 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
7852 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
7853 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
7854 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
));
7855 __ASM_VTABLE(ctype_wchar
,
7856 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
7857 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
7858 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
7859 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
7860 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
7861 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
7862 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
7863 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
7864 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
7865 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
7866 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
7867 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
7868 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
7869 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
));
7870 __ASM_VTABLE(ctype_short
,
7871 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
7872 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
7873 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
7874 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
7875 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
7876 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
7877 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
7878 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
7879 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
7880 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
7881 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
7882 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
7883 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
7884 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
));
7885 __ASM_VTABLE(codecvt_base
,
7886 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
7887 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
7888 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
7889 __ASM_VTABLE(codecvt_char
,
7890 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
7891 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
7892 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
7893 VTABLE_ADD_FUNC(codecvt_char_do_in
)
7894 VTABLE_ADD_FUNC(codecvt_char_do_out
)
7895 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
7896 VTABLE_ADD_FUNC(codecvt_char_do_length
));
7897 __ASM_VTABLE(codecvt_wchar
,
7898 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
7899 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
7900 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
7901 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
7902 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
7903 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
7904 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
7905 __ASM_VTABLE(codecvt_short
,
7906 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
7907 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
7908 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
7909 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
7910 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
7911 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
7912 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
7913 __ASM_VTABLE(numpunct_char
,
7914 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
7915 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
7916 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
7917 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
7918 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
7919 __ASM_VTABLE(numpunct_wchar
,
7920 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
7921 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
7922 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
7923 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
7924 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
7925 __ASM_VTABLE(numpunct_short
,
7926 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
7927 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
7928 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
7929 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
7930 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
7931 __ASM_VTABLE(num_get_char
,
7932 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
7933 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
7934 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
7935 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
7936 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
7937 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
7938 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
7939 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
7940 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
7941 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
7942 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
7943 __ASM_VTABLE(num_get_short
,
7944 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
7945 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
7946 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
7947 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
7948 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
7949 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
7950 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
7951 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
7952 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
7953 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
7954 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
7955 __ASM_VTABLE(num_get_wchar
,
7956 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
7957 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
7958 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
7959 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
7960 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
7961 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
7962 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
7963 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
7964 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
7965 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
7966 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
7967 __ASM_VTABLE(num_put_char
,
7968 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
7969 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
7970 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
7971 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
7972 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
7973 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
7974 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
7975 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
7976 __ASM_VTABLE(num_put_wchar
,
7977 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
7978 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
7979 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
7980 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
7981 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
7982 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
7983 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
7984 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
7989 void free_locale(void)
7991 facets_elem
*iter
, *safe
;
7994 locale__Locimp_dtor(global_locale
);
7995 locale_dtor(&classic_locale
);
7998 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
7999 list_remove(&iter
->entry
);
8000 if(locale_facet__Decref(iter
->fac
))
8001 call_locale_facet_vector_dtor(iter
->fac
, 1);
8002 MSVCRT_operator_delete(iter
);