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(msvcp
);
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
);
45 const locale
* __cdecl
locale_classic(void);
53 typedef struct _locale__Locimp
{
55 locale_facet
**facetvec
;
56 MSVCP_size_t facet_cnt
;
58 MSVCP_bool transparent
;
59 basic_string_char name
;
68 basic_string_char days
;
69 basic_string_char months
;
70 basic_string_char oldlocname
;
71 basic_string_char newlocname
;
89 const char *false_name
;
90 const char *true_name
;
98 const wchar_t *false_name
;
99 const wchar_t *true_name
;
102 /* ?_Id_cnt@id@locale@std@@0HA */
103 int locale_id__Id_cnt
= 0;
105 static locale__Locimp
*global_locale
;
106 static locale classic_locale
;
108 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
109 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
110 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
112 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
114 if(this->strbuf
&& !this->got
) {
115 int c
= basic_streambuf_char_sgetc(this->strbuf
);
126 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
128 if(this->strbuf
&& !this->got
) {
129 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
140 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
142 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
147 istreambuf_iterator_char_val(this);
151 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
153 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
158 istreambuf_iterator_wchar_val(this);
162 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
164 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
168 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
170 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
174 /* ??1facet@locale@std@@UAE@XZ */
175 /* ??1facet@locale@std@@UEAA@XZ */
176 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
177 void __thiscall
locale_facet_dtor(locale_facet
*this)
179 TRACE("(%p)\n", this);
182 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
183 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
184 locale_facet*, (locale_facet*, unsigned int), (this, flags))
185 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
187 TRACE("(%p %x)\n", this, flags
);
189 /* we have an array, with the number of elements stored before the first object */
190 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
192 for(i
=*ptr
-1; i
>=0; i
--)
193 locale_facet_dtor(this+i
);
194 MSVCRT_operator_delete(ptr
);
196 locale_facet_dtor(this);
198 MSVCRT_operator_delete(this);
209 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
211 /* Not exported from msvcp90 */
212 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
213 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
214 static void locale_facet_register(locale_facet
*add
)
216 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
218 ERR("Out of memory\n");
219 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
223 list_add_head(&lazy_facets
, &head
->entry
);
226 /* Not exported from msvcp90 */
227 /* ?_Register@facet@locale@std@@QAEXXZ */
228 /* ?_Register@facet@locale@std@@QEAAXXZ */
229 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
230 void __thiscall
locale_facet__Register(locale_facet
*this)
232 TRACE("(%p)\n", this);
233 locale_facet_register(this);
236 /* Not exported from msvcp90 */
237 /* ??_7facet@locale@std@@6B@ */
238 extern const vtable_ptr MSVCP_locale_facet_vtable
;
240 /* ??0id@locale@std@@QAE@I@Z */
241 /* ??0id@locale@std@@QEAA@_K@Z */
242 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
243 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
245 TRACE("(%p %lu)\n", this, id
);
251 /* ??_Fid@locale@std@@QAEXXZ */
252 /* ??_Fid@locale@std@@QEAAXXZ */
253 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
254 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
256 TRACE("(%p)\n", this);
262 /* ??Bid@locale@std@@QAEIXZ */
263 /* ??Bid@locale@std@@QEAA_KXZ */
264 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
265 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
269 TRACE("(%p)\n", this);
272 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
273 this->id
= ++locale_id__Id_cnt
;
280 /* ??_Ffacet@locale@std@@QAEXXZ */
281 /* ??_Ffacet@locale@std@@QEAAXXZ */
282 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
283 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
285 TRACE("(%p)\n", this);
286 this->vtable
= &MSVCP_locale_facet_vtable
;
291 /* ??0facet@locale@std@@IAE@I@Z */
292 /* ??0facet@locale@std@@IEAA@_K@Z */
293 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
294 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
296 TRACE("(%p %lu)\n", this, refs
);
297 this->vtable
= &MSVCP_locale_facet_vtable
;
302 /* ?_Incref@facet@locale@std@@QAEXXZ */
303 /* ?_Incref@facet@locale@std@@QEAAXXZ */
304 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
305 void __thiscall
locale_facet__Incref(locale_facet
*this)
309 TRACE("(%p)\n", this);
311 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
316 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
317 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
318 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
319 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
324 TRACE("(%p)\n", this);
326 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
330 ret
= this->refs
? NULL
: this;
336 /* ??0_Timevec@std@@QAE@ABV01@@Z */
337 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
338 /* This copy constructor modifies copied object */
339 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
340 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
342 TRACE("(%p %p)\n", this, copy
);
343 this->timeptr
= copy
->timeptr
;
344 copy
->timeptr
= NULL
;
348 /* ??0_Timevec@std@@QAE@PAX@Z */
349 /* ??0_Timevec@std@@QEAA@PEAX@Z */
350 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
351 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
353 TRACE("(%p %p)\n", this, timeptr
);
354 this->timeptr
= timeptr
;
358 /* ??_F_Timevec@std@@QAEXXZ */
359 /* ??_F_Timevec@std@@QEAAXXZ */
360 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
361 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
363 TRACE("(%p)\n", this);
364 this->timeptr
= NULL
;
368 /* ??1_Timevec@std@@QAE@XZ */
369 /* ??1_Timevec@std@@QEAA@XZ */
370 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
371 void __thiscall
_Timevec_dtor(_Timevec
*this)
373 TRACE("(%p)\n", this);
377 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
378 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
379 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
380 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
382 TRACE("(%p %p)\n", this, right
);
383 this->timeptr
= right
->timeptr
;
384 right
->timeptr
= NULL
;
388 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
389 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
390 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
391 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
393 TRACE("(%p)\n", this);
394 return this->timeptr
;
397 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
398 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
399 static _Locinfo
* _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
401 const char *locale
= NULL
;
403 /* This function is probably modifying more global objects */
404 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
407 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
409 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
410 MSVCP_basic_string_char_ctor_cstr(&locinfo
->days
, "");
411 MSVCP_basic_string_char_ctor_cstr(&locinfo
->months
, "");
412 MSVCP_basic_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
415 locale
= setlocale(LC_ALL
, locstr
);
417 locale
= setlocale(LC_ALL
, NULL
);
420 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
422 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
427 /* ??0_Locinfo@std@@QAE@HPBD@Z */
428 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
429 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
430 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
432 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
435 /* ??0_Locinfo@std@@QAE@PBD@Z */
436 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
437 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
438 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
440 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
443 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
444 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
445 static void _Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
447 TRACE("(%p)\n", locinfo
);
449 setlocale(LC_ALL
, MSVCP_basic_string_char_c_str(&locinfo
->oldlocname
));
450 MSVCP_basic_string_char_dtor(&locinfo
->days
);
451 MSVCP_basic_string_char_dtor(&locinfo
->months
);
452 MSVCP_basic_string_char_dtor(&locinfo
->oldlocname
);
453 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
454 _Lockit_dtor(&locinfo
->lock
);
457 /* ??_F_Locinfo@std@@QAEXXZ */
458 /* ??_F_Locinfo@std@@QEAAXXZ */
459 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
460 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
462 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
465 /* ??1_Locinfo@std@@QAE@XZ */
466 /* ??1_Locinfo@std@@QEAA@XZ */
467 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
468 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
470 _Locinfo__Locinfo_dtor(this);
473 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
474 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
475 static _Locinfo
* _Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
477 const char *locale
= NULL
;
479 /* This function is probably modifying more global objects */
480 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
482 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
484 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
487 locale
= setlocale(LC_ALL
, locstr
);
489 locale
= setlocale(LC_ALL
, NULL
);
492 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
494 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
499 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
500 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
501 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
502 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
504 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
508 ULONGLONG __cdecl
_Getcoll(void)
514 _locale_t locale
= _get_current_locale();
518 ret
.collvec
.page
= locale
->locinfo
->lc_collate_cp
;
519 ret
.collvec
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
520 _free_locale(locale
);
524 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
525 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
526 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
527 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
529 ULONGLONG ull
= _Getcoll();
530 memcpy(ret
, &ull
, sizeof(ull
));
535 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
537 _locale_t locale
= _get_current_locale();
542 ret
->page
= locale
->locinfo
->lc_codepage
;
543 ret
->handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
545 table
= malloc(sizeof(short[256]));
547 _free_locale(locale
);
548 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
550 memcpy(table
, locale
->locinfo
->pctype
, sizeof(short[256]));
552 _free_locale(locale
);
556 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
557 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
558 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
559 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
561 return _Getctype(ret
);
565 ULONGLONG __cdecl
_Getcvt(void)
567 _locale_t locale
= _get_current_locale();
575 ret
.cvtvec
.page
= locale
->locinfo
->lc_codepage
;
576 ret
.cvtvec
.handle
= locale
->locinfo
->lc_handle
[LC_CTYPE
];
577 _free_locale(locale
);
581 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
582 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
583 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
584 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
586 ULONGLONG ull
= _Getcvt();
587 memcpy(ret
, &ull
, sizeof(ull
));
591 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
592 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
593 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
594 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
596 FIXME("(%p) stub\n", this);
600 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
601 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
602 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
603 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
605 char *days
= _Getdays();
607 TRACE("(%p)\n", this);
610 MSVCP_basic_string_char_dtor(&this->days
);
611 MSVCP_basic_string_char_ctor_cstr(&this->days
, days
);
615 return this->days
.size
? MSVCP_basic_string_char_c_str(&this->days
) :
616 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
619 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
620 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
621 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
622 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
624 char *months
= _Getmonths();
626 TRACE("(%p)\n", this);
629 MSVCP_basic_string_char_dtor(&this->months
);
630 MSVCP_basic_string_char_ctor_cstr(&this->months
, months
);
634 return this->months
.size
? MSVCP_basic_string_char_c_str(&this->months
) :
635 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
636 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
639 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
640 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
641 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
642 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
644 TRACE("(%p)\n", this);
648 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
649 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
650 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
651 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
653 TRACE("(%p)\n", this);
657 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
658 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
659 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
660 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
662 TRACE("(%p)\n", this);
666 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
667 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
668 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
669 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
671 TRACE("(%p)\n", this);
673 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
677 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
678 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
679 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
680 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
682 TRACE("(%p)\n", this);
684 _Timevec_ctor_timeptr(ret
, _Gettnames());
688 /* ?id@?$collate@D@std@@2V0locale@2@A */
689 locale_id collate_char_id
= {0};
691 /* ??_7?$collate@D@std@@6B@ */
692 extern const vtable_ptr MSVCP_collate_char_vtable
;
694 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
695 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
696 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
697 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
699 TRACE("(%p %p)\n", this, locinfo
);
700 _Locinfo__Getcoll(locinfo
, &this->coll
);
703 /* ??0?$collate@D@std@@IAE@PBDI@Z */
704 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
705 static collate
* collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
709 TRACE("(%p %s %lu)\n", this, name
, refs
);
711 locale_facet_ctor_refs(&this->facet
, refs
);
712 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
714 _Locinfo_ctor_cstr(&locinfo
, name
);
715 collate_char__Init(this, &locinfo
);
716 _Locinfo_dtor(&locinfo
);
720 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
721 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
722 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
723 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
725 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
727 locale_facet_ctor_refs(&this->facet
, refs
);
728 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
729 collate_char__Init(this, locinfo
);
733 /* ??0?$collate@D@std@@QAE@I@Z */
734 /* ??0?$collate@D@std@@QEAA@_K@Z */
735 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
736 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
738 return collate_char_ctor_name(this, "C", refs
);
741 /* ??1?$collate@D@std@@MAE@XZ */
742 /* ??1?$collate@D@std@@MEAA@XZ */
743 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
744 void __thiscall
collate_char_dtor(collate
*this)
746 TRACE("(%p)\n", this);
749 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
750 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
752 TRACE("(%p %x)\n", this, flags
);
754 /* we have an array, with the number of elements stored before the first object */
755 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
757 for(i
=*ptr
-1; i
>=0; i
--)
758 collate_char_dtor(this+i
);
759 MSVCRT_operator_delete(ptr
);
761 collate_char_dtor(this);
763 MSVCRT_operator_delete(this);
769 /* ??_F?$collate@D@std@@QAEXXZ */
770 /* ??_F?$collate@D@std@@QEAAXXZ */
771 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
772 collate
* __thiscall
collate_char_ctor(collate
*this)
774 return collate_char_ctor_name(this, "C", 0);
777 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
778 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
779 static MSVCP_size_t
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
781 TRACE("(%p %p)\n", facet
, loc
);
783 if(facet
&& !*facet
) {
784 *facet
= MSVCRT_operator_new(sizeof(collate
));
786 ERR("Out of memory\n");
787 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
790 collate_char_ctor_name((collate
*)*facet
,
791 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
797 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
798 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
799 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
801 return collate_char__Getcat(facet
, locale_classic());
805 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
806 const char *last2
, const _Collvec
*coll
)
810 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
815 lcid
= ___lc_handle_func()[LC_COLLATE
];
816 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
819 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
820 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
821 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
822 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
823 (const collate*, const char*, const char*, const char*, const char*), \
824 (this, first1, last1, first2, last2))
825 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
826 const char *last1
, const char *first2
, const char *last2
)
828 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
829 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
832 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
833 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
834 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
835 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
836 const char *last1
, const char *first2
, const char *last2
)
838 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
839 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
842 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
843 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
844 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
845 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
846 (const collate*, const char*, const char*), (this, first, last))
847 LONG __thiscall
collate_char_do_hash(const collate
*this,
848 const char *first
, const char *last
)
852 TRACE("(%p %p %p)\n", this, first
, last
);
854 for(; first
<last
; first
++)
855 ret
= (ret
<<8 | ret
>>24) + *first
;
859 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
860 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
861 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
862 LONG __thiscall
collate_char_hash(const collate
*this,
863 const char *first
, const char *last
)
865 TRACE("(%p %p %p)\n", this, first
, last
);
866 return call_collate_char_do_hash(this, first
, last
);
869 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
870 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
871 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
872 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
873 basic_string_char
*ret
, const char *first
, const char *last
)
875 FIXME("(%p %p %p) stub\n", this, first
, last
);
879 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
880 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
881 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
882 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
883 basic_string_char
*ret
, const char *first
, const char *last
)
885 FIXME("(%p %p %p) stub\n", this, first
, last
);
889 /* ?id@?$collate@_W@std@@2V0locale@2@A */
890 locale_id collate_wchar_id
= {0};
891 /* ?id@?$collate@G@std@@2V0locale@2@A */
892 locale_id collate_short_id
= {0};
894 /* ??_7?$collate@_W@std@@6B@ */
895 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
896 /* ??_7?$collate@G@std@@6B@ */
897 extern const vtable_ptr MSVCP_collate_short_vtable
;
899 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
900 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
901 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
902 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
903 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
904 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
906 TRACE("(%p %p)\n", this, locinfo
);
907 _Locinfo__Getcoll(locinfo
, &this->coll
);
910 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
911 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
912 static collate
* collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
916 TRACE("(%p %s %lu)\n", this, name
, refs
);
918 locale_facet_ctor_refs(&this->facet
, refs
);
919 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
921 _Locinfo_ctor_cstr(&locinfo
, name
);
922 collate_wchar__Init(this, &locinfo
);
923 _Locinfo_dtor(&locinfo
);
927 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
928 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
929 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
930 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
932 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
934 locale_facet_ctor_refs(&this->facet
, refs
);
935 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
936 collate_wchar__Init(this, locinfo
);
940 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
941 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
942 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
943 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
945 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
946 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
950 /* ??0?$collate@_W@std@@QAE@I@Z */
951 /* ??0?$collate@_W@std@@QEAA@_K@Z */
952 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
953 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
955 return collate_wchar_ctor_name(this, "C", refs
);
958 /* ??0?$collate@G@std@@QAE@I@Z */
959 /* ??0?$collate@G@std@@QEAA@_K@Z */
960 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
961 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
963 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
964 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
968 /* ??1?$collate@_W@std@@MAE@XZ */
969 /* ??1?$collate@_W@std@@MEAA@XZ */
970 /* ??1?$collate@G@std@@MAE@XZ */
971 /* ??1?$collate@G@std@@MEAA@XZ */
972 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
973 void __thiscall
collate_wchar_dtor(collate
*this)
975 TRACE("(%p)\n", this);
978 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
979 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
981 TRACE("(%p %x)\n", this, flags
);
983 /* we have an array, with the number of elements stored before the first object */
984 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
986 for(i
=*ptr
-1; i
>=0; i
--)
987 collate_wchar_dtor(this+i
);
988 MSVCRT_operator_delete(ptr
);
990 collate_wchar_dtor(this);
992 MSVCRT_operator_delete(this);
998 /* ??_F?$collate@_W@std@@QAEXXZ */
999 /* ??_F?$collate@_W@std@@QEAAXXZ */
1000 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1001 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1003 return collate_wchar_ctor_name(this, "C", 0);
1006 /* ??_F?$collate@G@std@@QAEXXZ */
1007 /* ??_F?$collate@G@std@@QEAAXXZ */
1008 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1009 collate
* __thiscall
collate_short_ctor(collate
*this)
1011 collate
*ret
= collate_wchar_ctor(this);
1012 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1016 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1017 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1018 static MSVCP_size_t
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1020 TRACE("(%p %p)\n", facet
, loc
);
1022 if(facet
&& !*facet
) {
1023 *facet
= MSVCRT_operator_new(sizeof(collate
));
1025 ERR("Out of memory\n");
1026 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1029 collate_wchar_ctor_name((collate
*)*facet
,
1030 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
1036 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1037 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1038 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1040 return collate_wchar__Getcat(facet
, locale_classic());
1043 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1044 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1045 static MSVCP_size_t
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1047 if(facet
&& !*facet
) {
1048 collate_wchar__Getcat(facet
, loc
);
1049 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1055 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1056 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1057 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1059 return collate_short__Getcat(facet
, locale_classic());
1063 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1064 const wchar_t *last2
, const _Collvec
*coll
)
1068 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1071 lcid
= coll
->handle
;
1073 lcid
= ___lc_handle_func()[LC_COLLATE
];
1074 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1077 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1078 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1079 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1080 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1081 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1082 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1083 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1084 (this, first1, last1, first2, last2))
1085 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1086 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1088 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1089 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1092 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1093 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1094 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1095 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1096 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1097 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1098 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1100 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1101 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1104 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1105 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1106 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1107 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1108 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1109 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1110 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1111 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1112 const wchar_t *first
, const wchar_t *last
)
1116 TRACE("(%p %p %p)\n", this, first
, last
);
1118 for(; first
<last
; first
++)
1119 ret
= (ret
<<8 | ret
>>24) + *first
;
1123 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1124 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1125 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1126 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1127 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1128 LONG __thiscall
collate_wchar_hash(const collate
*this,
1129 const wchar_t *first
, const wchar_t *last
)
1131 TRACE("(%p %p %p)\n", this, first
, last
);
1132 return call_collate_wchar_do_hash(this, first
, last
);
1135 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1136 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1137 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1138 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1139 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1140 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1141 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1143 FIXME("(%p %p %p) stub\n", this, first
, last
);
1147 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1148 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1149 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1150 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1151 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1152 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1153 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1155 FIXME("(%p %p %p) stub\n", this, first
, last
);
1159 /* ??_7ctype_base@std@@6B@ */
1160 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1162 /* ??0ctype_base@std@@QAE@I@Z */
1163 /* ??0ctype_base@std@@QEAA@_K@Z */
1164 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1165 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1167 TRACE("(%p %lu)\n", this, refs
);
1168 locale_facet_ctor_refs(&this->facet
, refs
);
1169 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1173 /* ??_Fctype_base@std@@QAEXXZ */
1174 /* ??_Fctype_base@std@@QEAAXXZ */
1175 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1176 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1178 TRACE("(%p)\n", this);
1179 locale_facet_ctor_refs(&this->facet
, 0);
1180 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1184 /* ??1ctype_base@std@@UAE@XZ */
1185 /* ??1ctype_base@std@@UEAA@XZ */
1186 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1187 void __thiscall
ctype_base_dtor(ctype_base
*this)
1189 TRACE("(%p)\n", this);
1192 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1193 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1195 TRACE("(%p %x)\n", this, flags
);
1197 /* we have an array, with the number of elements stored before the first object */
1198 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1200 for(i
=*ptr
-1; i
>=0; i
--)
1201 ctype_base_dtor(this+i
);
1202 MSVCRT_operator_delete(ptr
);
1204 ctype_base_dtor(this);
1206 MSVCRT_operator_delete(this);
1212 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1213 locale_id ctype_char_id
= {0};
1214 /* ?table_size@?$ctype@D@std@@2IB */
1215 /* ?table_size@?$ctype@D@std@@2_KB */
1216 MSVCP_size_t ctype_char_table_size
= 256;
1218 /* ??_7?$ctype@D@std@@6B@ */
1219 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1221 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1222 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1223 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1224 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1226 TRACE("(%p %p)\n", this, locinfo
);
1227 _Locinfo__Getctype(locinfo
, &this->ctype
);
1230 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1231 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1232 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1233 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1235 TRACE("(%p)\n", this);
1237 if(this->ctype
.delfl
)
1238 free((short*)this->ctype
.table
);
1241 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1242 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1243 const short* __cdecl
ctype_char_classic_table(void)
1246 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1249 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1250 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1251 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1252 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1253 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1255 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1256 ctype_base_ctor_refs(&this->base
, refs
);
1257 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1258 ctype_char__Init(this, locinfo
);
1262 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1263 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1264 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1265 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1266 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1270 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1272 ctype_base_ctor_refs(&this->base
, refs
);
1273 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1275 _Locinfo_ctor(&locinfo
);
1276 ctype_char__Init(this, &locinfo
);
1277 _Locinfo_dtor(&locinfo
);
1280 ctype_char__Tidy(this);
1281 this->ctype
.table
= table
;
1282 this->ctype
.delfl
= delete;
1287 /* ??_F?$ctype@D@std@@QAEXXZ */
1288 /* ??_F?$ctype@D@std@@QEAAXXZ */
1289 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1290 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1292 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1295 /* ??1?$ctype@D@std@@MAE@XZ */
1296 /* ??1?$ctype@D@std@@MEAA@XZ */
1297 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1298 void __thiscall
ctype_char_dtor(ctype_char
*this)
1300 TRACE("(%p)\n", this);
1301 ctype_char__Tidy(this);
1304 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1305 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1307 TRACE("(%p %x)\n", this, flags
);
1309 /* we have an array, with the number of elements stored before the first object */
1310 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1312 for(i
=*ptr
-1; i
>=0; i
--)
1313 ctype_char_dtor(this+i
);
1314 MSVCRT_operator_delete(ptr
);
1316 ctype_char_dtor(this);
1318 MSVCRT_operator_delete(this);
1324 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1325 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1326 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1327 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1328 char, (const ctype_char*, char, char), (this, ch, unused))
1329 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1331 TRACE("(%p %c %c)\n", this, ch
, unused
);
1335 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1336 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1337 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1338 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1339 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1340 (this, first, last, unused, dest))
1341 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1342 const char *first
, const char *last
, char unused
, char *dest
)
1344 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1345 memcpy(dest
, first
, last
-first
);
1349 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1350 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1351 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1352 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1354 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1355 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1358 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1359 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1360 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1361 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1362 const char *first
, const char *last
, char dflt
, char *dest
)
1364 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1365 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1368 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1369 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1370 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1371 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1372 char, (const ctype_char*, char), (this, ch))
1373 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1375 TRACE("(%p %c)\n", this, ch
);
1379 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1380 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1381 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1382 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1383 const char*, (const ctype_char*, const char*, const char*, char*), \
1384 (this, first, last, dest))
1385 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1386 const char *first
, const char *last
, char *dest
)
1388 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1389 memcpy(dest
, first
, last
-first
);
1393 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1394 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1395 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1396 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1398 TRACE("(%p %c)\n", this, ch
);
1399 return call_ctype_char_do_widen_ch(this, ch
);
1402 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1403 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1404 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1405 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1406 const char *first
, const char *last
, char *dest
)
1408 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1409 return call_ctype_char_do_widen(this, first
, last
, dest
);
1412 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1413 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1414 static MSVCP_size_t
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1416 TRACE("(%p %p)\n", facet
, loc
);
1418 if(facet
&& !*facet
) {
1421 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1423 ERR("Out of memory\n");
1424 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1428 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
1429 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1430 _Locinfo_dtor(&locinfo
);
1436 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1437 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1438 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1440 return ctype_char__Getcat(facet
, locale_classic());
1443 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1445 static ctype_char
*obj
= NULL
;
1448 const locale_facet
*fac
;
1450 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1451 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1453 _Lockit_dtor(&lock
);
1454 return (ctype_char
*)fac
;
1458 _Lockit_dtor(&lock
);
1462 ctype_char__Getcat(&fac
, loc
);
1463 obj
= (ctype_char
*)fac
;
1464 locale_facet__Incref(&obj
->base
.facet
);
1465 locale_facet_register(&obj
->base
.facet
);
1466 _Lockit_dtor(&lock
);
1472 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1476 TRACE("%d %p\n", ch
, ctype
);
1481 cp
= ___lc_codepage_func();
1483 /* Don't convert to unicode in case of C locale */
1485 if(ch
>='A' && ch
<='Z')
1494 str
[0] = (ch
>>8) & 255;
1502 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1505 lower
= tolowerW(wide
);
1509 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1511 return str
[0] + (str
[1]<<8);
1515 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1516 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1517 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1518 char, (const ctype_char*, char), (this, ch))
1519 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1520 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1522 TRACE("(%p %c)\n", this, ch
);
1523 return _Tolower(ch
, &this->ctype
);
1526 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1527 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1528 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1529 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1530 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1531 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1533 TRACE("(%p %p %p)\n", this, first
, last
);
1534 for(; first
<last
; first
++)
1535 *first
= _Tolower(*first
, &this->ctype
);
1539 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1540 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1541 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1542 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1544 TRACE("(%p %c)\n", this, ch
);
1545 return call_ctype_char_do_tolower_ch(this, ch
);
1548 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1549 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1550 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1551 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1553 TRACE("(%p %p %p)\n", this, first
, last
);
1554 return call_ctype_char_do_tolower(this, first
, last
);
1558 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1562 TRACE("%d %p\n", ch
, ctype
);
1567 cp
= ___lc_codepage_func();
1569 /* Don't convert to unicode in case of C locale */
1571 if(ch
>='a' && ch
<='z')
1580 str
[0] = (ch
>>8) & 255;
1588 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1591 upper
= toupperW(wide
);
1595 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1597 return str
[0] + (str
[1]<<8);
1601 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1602 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1603 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1604 char, (const ctype_char*, char), (this, ch))
1605 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1606 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1608 TRACE("(%p %c)\n", this, ch
);
1609 return _Toupper(ch
, &this->ctype
);
1612 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1613 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1614 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1615 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1616 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1617 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1618 char *first
, const char *last
)
1620 TRACE("(%p %p %p)\n", this, first
, last
);
1621 for(; first
<last
; first
++)
1622 *first
= _Toupper(*first
, &this->ctype
);
1626 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1627 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1628 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1629 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1631 TRACE("(%p %c)\n", this, ch
);
1632 return call_ctype_char_do_toupper_ch(this, ch
);
1635 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1636 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1637 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1638 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1640 TRACE("(%p %p %p)\n", this, first
, last
);
1641 return call_ctype_char_do_toupper(this, first
, last
);
1644 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1645 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1646 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1647 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1649 TRACE("(%p %x %c)\n", this, mask
, ch
);
1650 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1653 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1654 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1655 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1656 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1658 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1659 for(; first
<last
; first
++)
1660 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1664 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1665 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1666 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1667 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1669 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1670 for(; first
<last
; first
++)
1671 if(!ctype_char_is_ch(this, mask
, *first
))
1676 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1677 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1678 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1679 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1681 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1682 for(; first
<last
; first
++)
1683 if(ctype_char_is_ch(this, mask
, *first
))
1688 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1689 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1690 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
1691 const short* __thiscall
ctype_char_table(const ctype_char
*this)
1693 TRACE("(%p)\n", this);
1694 return this->ctype
.table
;
1697 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1698 locale_id ctype_wchar_id
= {0};
1699 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1700 locale_id ctype_short_id
= {0};
1702 /* ??_7?$ctype@_W@std@@6B@ */
1703 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
1704 /* ??_7?$ctype@G@std@@6B@ */
1705 extern const vtable_ptr MSVCP_ctype_short_vtable
;
1707 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1708 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1709 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1710 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1711 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
1712 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
1714 TRACE("(%p %p)\n", this, locinfo
);
1715 _Locinfo__Getctype(locinfo
, &this->ctype
);
1716 _Locinfo__Getcvt(locinfo
, &this->cvt
);
1719 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1720 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1721 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
1722 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
1723 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1725 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1726 ctype_base_ctor_refs(&this->base
, refs
);
1727 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1728 ctype_wchar__Init(this, locinfo
);
1732 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1733 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1734 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
1735 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
1736 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1738 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
1739 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1743 /* ??0?$ctype@_W@std@@QAE@I@Z */
1744 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1745 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
1746 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1750 TRACE("(%p %lu)\n", this, refs
);
1752 ctype_base_ctor_refs(&this->base
, refs
);
1753 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1755 _Locinfo_ctor(&locinfo
);
1756 ctype_wchar__Init(this, &locinfo
);
1757 _Locinfo_dtor(&locinfo
);
1761 /* ??0?$ctype@G@std@@QAE@I@Z */
1762 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1763 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
1764 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1766 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
1767 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1771 /* ??_F?$ctype@_W@std@@QAEXXZ */
1772 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1773 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
1774 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
1776 TRACE("(%p)\n", this);
1777 return ctype_short_ctor_refs(this, 0);
1780 /* ??_F?$ctype@G@std@@QAEXXZ */
1781 /* ??_F?$ctype@G@std@@QEAAXXZ */
1782 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
1783 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
1785 ctype_wchar
*ret
= ctype_wchar_ctor(this);
1786 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1790 /* ??1?$ctype@_W@std@@MAE@XZ */
1791 /* ??1?$ctype@_W@std@@MEAA@XZ */
1792 /* ??1?$ctype@G@std@@MAE@XZ */
1793 /* ??1?$ctype@G@std@@MEAA@XZ */
1794 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
1795 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
1797 TRACE("(%p)\n", this);
1798 if(this->ctype
.delfl
)
1799 free((void*)this->ctype
.table
);
1802 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
1803 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1805 TRACE("(%p %x)\n", this, flags
);
1807 /* we have an array, with the number of elements stored before the first object */
1808 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1810 for(i
=*ptr
-1; i
>=0; i
--)
1811 ctype_wchar_dtor(this+i
);
1812 MSVCRT_operator_delete(ptr
);
1814 ctype_wchar_dtor(this);
1816 MSVCRT_operator_delete(this);
1823 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
1828 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
1833 cp
= ___lc_codepage_func();
1845 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
1854 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1855 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1856 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1857 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1858 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
1859 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1861 char buf
[MB_LEN_MAX
];
1863 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1865 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
1868 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1869 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1870 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1871 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1872 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
1873 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
1874 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1875 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1877 return ctype_wchar__Donarrow(this, ch
, dflt
);
1880 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1881 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1882 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1883 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1884 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
1885 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
1886 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1887 (this, first, last, dflt, dest))
1888 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
1889 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1891 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1892 for(; first
<last
; first
++)
1893 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
1897 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1898 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1899 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1900 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1901 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
1902 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1904 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1905 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
1908 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1909 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1910 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1911 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
1912 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
1913 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
1914 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1916 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1917 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
1921 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
1927 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
1935 cp
= ___lc_codepage_func();
1939 *out
= (unsigned char)*in
;
1946 ((char*)state
)[1] = *in
;
1948 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
1958 GetCPInfo(cp
, &cp_info
);
1960 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
1961 if(!cp_info
.LeadByte
[i
+1])
1963 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
1971 *state
= (unsigned char)*in
;
1975 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
1982 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
1989 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
1990 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
1991 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
1992 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
1993 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
1994 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
1998 TRACE("(%p %d)\n", this, ch
);
1999 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2002 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2003 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2004 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2005 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2006 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2007 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2008 wchar_t, (const ctype_wchar*, char), (this, ch))
2009 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2011 return ctype_wchar__Dowiden(this, ch
);
2014 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2015 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2016 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2017 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2018 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2019 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2020 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2021 (this, first, last, dest))
2022 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2023 const char *first
, const char *last
, wchar_t *dest
)
2025 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2026 for(; first
<last
; first
++)
2027 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2031 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2032 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2033 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2034 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2035 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2036 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2038 TRACE("(%p %d)\n", this, ch
);
2039 return call_ctype_wchar_do_widen_ch(this, ch
);
2042 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2043 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2044 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2045 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2046 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2047 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2048 const char *first
, const char *last
, wchar_t *dest
)
2050 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2051 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2054 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2055 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2056 static MSVCP_size_t
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2058 TRACE("(%p %p)\n", facet
, loc
);
2060 if(facet
&& !*facet
) {
2063 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2065 ERR("Out of memory\n");
2066 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2070 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2071 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2072 _Locinfo_dtor(&locinfo
);
2078 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2079 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2080 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2082 return ctype_wchar__Getcat(facet
, locale_classic());
2085 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2086 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2087 static MSVCP_size_t
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2089 if(facet
&& !*facet
) {
2090 ctype_wchar__Getcat(facet
, loc
);
2091 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2097 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2098 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2099 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2101 return ctype_short__Getcat(facet
, locale_classic());
2105 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2107 TRACE("(%d %p)\n", ch
, ctype
);
2108 return tolowerW(ch
);
2111 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2113 static ctype_wchar
*obj
= NULL
;
2116 const locale_facet
*fac
;
2118 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2119 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2121 _Lockit_dtor(&lock
);
2122 return (ctype_wchar
*)fac
;
2126 _Lockit_dtor(&lock
);
2130 ctype_wchar__Getcat(&fac
, loc
);
2131 obj
= (ctype_wchar
*)fac
;
2132 locale_facet__Incref(&obj
->base
.facet
);
2133 locale_facet_register(&obj
->base
.facet
);
2134 _Lockit_dtor(&lock
);
2139 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2141 static ctype_wchar
*obj
= NULL
;
2144 const locale_facet
*fac
;
2146 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2147 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2149 _Lockit_dtor(&lock
);
2150 return (ctype_wchar
*)fac
;
2154 _Lockit_dtor(&lock
);
2158 ctype_short__Getcat(&fac
, loc
);
2159 obj
= (ctype_wchar
*)fac
;
2160 locale_facet__Incref(&obj
->base
.facet
);
2161 locale_facet_register(&obj
->base
.facet
);
2162 _Lockit_dtor(&lock
);
2167 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2168 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2169 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2170 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2171 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2172 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2173 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2174 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2176 return _Towlower(ch
, &this->ctype
);
2179 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2180 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2181 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2182 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2183 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2184 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2185 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2186 (this, first, last))
2187 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2188 wchar_t *first
, const wchar_t *last
)
2190 TRACE("(%p %p %p)\n", this, first
, last
);
2191 for(; first
<last
; first
++)
2192 *first
= _Towlower(*first
, &this->ctype
);
2196 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2197 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2198 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2199 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2200 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2201 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2203 TRACE("(%p %d)\n", this, ch
);
2204 return call_ctype_wchar_do_tolower_ch(this, ch
);
2207 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2208 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2209 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2210 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2211 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2212 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2213 wchar_t *first
, const wchar_t *last
)
2215 TRACE("(%p %p %p)\n", this, first
, last
);
2216 return call_ctype_wchar_do_tolower(this, first
, last
);
2220 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2222 TRACE("(%d %p)\n", ch
, ctype
);
2223 return toupperW(ch
);
2226 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2227 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2228 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2229 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2230 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2231 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2232 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2233 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2235 return _Towupper(ch
, &this->ctype
);
2238 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2239 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2240 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2241 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2242 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2243 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2244 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2245 (this, first, last))
2246 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2247 wchar_t *first
, const wchar_t *last
)
2249 TRACE("(%p %p %p)\n", this, first
, last
);
2250 for(; first
<last
; first
++)
2251 *first
= _Towupper(*first
, &this->ctype
);
2255 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2256 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2257 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2258 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2259 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2260 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2262 TRACE("(%p %d)\n", this, ch
);
2263 return call_ctype_wchar_do_toupper_ch(this, ch
);
2266 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2267 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2268 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2269 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2270 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2271 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2272 wchar_t *first
, const wchar_t *last
)
2274 TRACE("(%p %p %p)\n", this, first
, last
);
2275 return call_ctype_wchar_do_toupper(this, first
, last
);
2279 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2280 short *mask
, const _Ctypevec
*ctype
)
2282 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2283 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2288 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2291 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2295 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2296 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2297 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2298 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2299 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2300 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2301 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2302 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2304 TRACE("(%p %x %d)\n", this, mask
, ch
);
2305 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2308 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2309 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2310 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2311 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2312 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2313 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2314 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2315 (this, first, last, dest))
2316 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2317 const wchar_t *first
, const wchar_t *last
, short *dest
)
2319 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2320 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2323 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2324 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2325 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2326 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2327 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2328 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2330 TRACE("(%p %x %d)\n", this, mask
, ch
);
2331 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2334 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2335 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2336 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2337 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2338 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2339 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2340 const wchar_t *first
, const wchar_t *last
, short *dest
)
2342 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2343 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2346 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2347 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2348 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2349 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2350 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2351 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2352 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2353 (this, mask, first, last))
2354 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2355 short mask
, const wchar_t *first
, const wchar_t *last
)
2357 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2358 for(; first
<last
; first
++)
2359 if(!ctype_wchar_is_ch(this, mask
, *first
))
2364 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2365 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2366 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2367 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2368 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2369 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2370 short mask
, const wchar_t *first
, const wchar_t *last
)
2372 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2373 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2376 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2377 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2378 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2379 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2380 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2381 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2382 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2383 (this, mask, first, last))
2384 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2385 short mask
, const wchar_t *first
, const wchar_t *last
)
2387 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2388 for(; first
<last
; first
++)
2389 if(ctype_wchar_is_ch(this, mask
, *first
))
2394 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2395 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2396 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2397 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2398 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2399 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2400 short mask
, const wchar_t *first
, const wchar_t *last
)
2402 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2403 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2406 /* ??_7codecvt_base@std@@6B@ */
2407 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2409 /* ??0codecvt_base@std@@QAE@I@Z */
2410 /* ??0codecvt_base@std@@QEAA@_K@Z */
2411 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2412 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2414 TRACE("(%p %lu)\n", this, refs
);
2415 locale_facet_ctor_refs(&this->facet
, refs
);
2416 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2420 /* ??_Fcodecvt_base@std@@QAEXXZ */
2421 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2422 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2423 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2425 return codecvt_base_ctor_refs(this, 0);
2428 /* ??1codecvt_base@std@@UAE@XZ */
2429 /* ??1codecvt_base@std@@UEAA@XZ */
2430 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2431 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2433 TRACE("(%p)\n", this);
2434 locale_facet_dtor(&this->facet
);
2437 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2438 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2440 TRACE("(%p %x)\n", this, flags
);
2442 /* we have an array, with the number of elements stored before the first object */
2443 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2445 for(i
=*ptr
-1; i
>=0; i
--)
2446 codecvt_base_dtor(this+i
);
2447 MSVCRT_operator_delete(ptr
);
2449 codecvt_base_dtor(this);
2451 MSVCRT_operator_delete(this);
2457 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2458 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2459 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2460 MSVCP_bool, (const codecvt_base*), (this))
2461 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2462 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2464 TRACE("(%p)\n", this);
2468 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2469 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2470 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2471 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2473 TRACE("(%p)\n", this);
2474 return call_codecvt_base_do_always_noconv(this);
2477 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2478 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2479 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2480 int, (const codecvt_base*), (this))
2481 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2482 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2484 TRACE("(%p)\n", this);
2488 /* ?max_length@codecvt_base@std@@QBEHXZ */
2489 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2490 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2491 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2493 TRACE("(%p)\n", this);
2494 return call_codecvt_base_do_max_length(this);
2497 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2498 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2499 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2500 int, (const codecvt_base*), (this))
2501 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
2502 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
2504 TRACE("(%p)\n", this);
2508 /* ?encoding@codecvt_base@std@@QBEHXZ */
2509 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2510 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
2511 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
2513 TRACE("(%p)\n", this);
2514 return call_codecvt_base_do_encoding(this);
2517 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2518 locale_id codecvt_char_id
= {0};
2520 /* ??_7?$codecvt@DDH@std@@6B@ */
2521 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
2523 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2524 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2525 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
2526 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
2528 TRACE("(%p %p)\n", this, locinfo
);
2531 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2532 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2533 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
2534 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2536 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2537 codecvt_base_ctor_refs(&this->base
, refs
);
2538 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
2542 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2543 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2544 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
2545 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
2547 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
2550 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2551 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2552 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
2553 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
2555 return codecvt_char_ctor_locinfo(this, NULL
, 0);
2558 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2559 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2560 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
2561 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
2563 TRACE("(%p)\n", this);
2564 codecvt_base_dtor(&this->base
);
2567 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
2568 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*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_PTR i
, *ptr
= (INT_PTR
*)this-1;
2575 for(i
=*ptr
-1; i
>=0; i
--)
2576 codecvt_char_dtor(this+i
);
2577 MSVCRT_operator_delete(ptr
);
2579 codecvt_char_dtor(this);
2581 MSVCRT_operator_delete(this);
2587 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2588 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2589 static MSVCP_size_t
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
2591 TRACE("(%p %p)\n", facet
, loc
);
2593 if(facet
&& !*facet
) {
2594 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
2596 ERR("Out of memory\n");
2597 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2600 codecvt_char_ctor((codecvt_char
*)*facet
);
2606 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
2607 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2608 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
2610 return codecvt_char__Getcat(facet
, locale_classic());
2613 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
2615 static codecvt_char
*obj
= NULL
;
2618 const locale_facet
*fac
;
2620 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2621 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
2623 _Lockit_dtor(&lock
);
2624 return (codecvt_char
*)fac
;
2628 _Lockit_dtor(&lock
);
2632 codecvt_char__Getcat(&fac
, loc
);
2633 obj
= (codecvt_char
*)fac
;
2634 locale_facet__Incref(&obj
->base
.facet
);
2635 locale_facet_register(&obj
->base
.facet
);
2636 _Lockit_dtor(&lock
);
2641 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2642 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2643 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2644 CALL_VTBL_FUNC(this, 16, int, \
2645 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2646 (this, state, from, from_end, from_next, to, to_end, to_next))
2647 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
2648 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
2649 const char *from
, const char *from_end
, const char **from_next
,
2650 char *to
, char *to_end
, char **to_next
)
2652 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2653 from_next
, to
, to_end
, to_next
);
2656 return CODECVT_noconv
;
2659 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2660 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2661 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
2662 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
2663 const char *from
, const char *from_end
, const char **from_next
,
2664 char *to
, char *to_end
, char **to_next
)
2666 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2667 from_next
, to
, to_end
, to_next
);
2668 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
2669 to
, to_end
, to_next
);
2672 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2673 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2674 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2675 CALL_VTBL_FUNC(this, 20, int, \
2676 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2677 (this, state, from, from_end, from_next, to, to_end, to_next))
2678 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
2679 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
2680 const char *from
, const char *from_end
, const char **from_next
,
2681 char *to
, char *to_end
, char **to_next
)
2683 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2684 from_end
, from_next
, to
, to_end
, to_next
);
2687 return CODECVT_noconv
;
2690 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2691 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2692 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
2693 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
2694 const char *from
, const char *from_end
, const char **from_next
,
2695 char *to
, char *to_end
, char **to_next
)
2697 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2698 from_next
, to
, to_end
, to_next
);
2699 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
2700 to
, to_end
, to_next
);
2703 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2704 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2705 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2706 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2707 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
2708 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
2709 int *state
, char *to
, char *to_end
, char **to_next
)
2711 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2713 return CODECVT_noconv
;
2716 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2717 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2718 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
2719 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
2720 int *state
, char *to
, char *to_end
, char **to_next
)
2722 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2723 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
2726 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2727 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2728 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2729 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2730 (this, state, from, from_end, max))
2731 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
2732 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
2733 const char *from
, const char *from_end
, MSVCP_size_t max
)
2735 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2736 return (from_end
-from
> max
? max
: from_end
-from
);
2739 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2740 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2741 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
2742 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
2743 const char *from
, const char *from_end
, MSVCP_size_t max
)
2745 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2746 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
2749 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2750 locale_id codecvt_wchar_id
= {0};
2751 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2752 locale_id codecvt_short_id
= {0};
2754 /* ??_7?$codecvt@_WDH@std@@6B@ */
2755 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
2756 /* ??_7?$codecvt@GDH@std@@6B@ */
2757 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
2759 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2760 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2761 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2762 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2763 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
2764 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
2766 TRACE("(%p %p)\n", this, locinfo
);
2767 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2770 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2771 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2772 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
2773 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2775 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2777 codecvt_base_ctor_refs(&this->base
, refs
);
2778 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
2780 codecvt_wchar__Init(this, locinfo
);
2784 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2785 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2786 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
2787 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2789 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2791 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
2792 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
2796 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2797 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2798 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
2799 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2803 TRACE("(%p %ld)\n", this, refs
);
2805 _Locinfo_ctor(&locinfo
);
2806 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
2807 _Locinfo_dtor(&locinfo
);
2811 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2812 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2813 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
2814 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2818 TRACE("(%p %ld)\n", this, refs
);
2820 _Locinfo_ctor(&locinfo
);
2821 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2822 _Locinfo_dtor(&locinfo
);
2826 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
2827 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
2828 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
2829 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
2831 return codecvt_wchar_ctor_refs(this, 0);
2834 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2835 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2836 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
2837 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
2839 return codecvt_short_ctor_refs(this, 0);
2842 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2843 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2844 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2845 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2846 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
2847 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
2849 TRACE("(%p)\n", this);
2850 codecvt_base_dtor(&this->base
);
2853 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
2854 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
2856 TRACE("(%p %x)\n", this, flags
);
2858 /* we have an array, with the number of elements stored before the first object */
2859 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2861 for(i
=*ptr
-1; i
>=0; i
--)
2862 codecvt_wchar_dtor(this+i
);
2863 MSVCRT_operator_delete(ptr
);
2865 codecvt_wchar_dtor(this);
2867 MSVCRT_operator_delete(this);
2873 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2874 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2875 static MSVCP_size_t
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2877 TRACE("(%p %p)\n", facet
, loc
);
2879 if(facet
&& !*facet
) {
2882 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2884 ERR("Out of memory\n");
2885 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2889 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2890 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
2891 _Locinfo_dtor(&locinfo
);
2897 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
2898 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2899 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
2901 return codecvt_wchar__Getcat(facet
, locale_classic());
2904 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
2906 static codecvt_wchar
*obj
= NULL
;
2909 const locale_facet
*fac
;
2911 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2912 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
2914 _Lockit_dtor(&lock
);
2915 return (codecvt_wchar
*)fac
;
2919 _Lockit_dtor(&lock
);
2923 codecvt_wchar__Getcat(&fac
, loc
);
2924 obj
= (codecvt_wchar
*)fac
;
2925 locale_facet__Incref(&obj
->base
.facet
);
2926 locale_facet_register(&obj
->base
.facet
);
2927 _Lockit_dtor(&lock
);
2932 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2933 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2934 static MSVCP_size_t
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2936 TRACE("(%p %p)\n", facet
, loc
);
2938 if(facet
&& !*facet
) {
2941 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2943 ERR("Out of memory\n");
2944 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2948 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2949 codecvt_short_ctor((codecvt_wchar
*)*facet
);
2950 _Locinfo_dtor(&locinfo
);
2956 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
2957 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2958 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
2960 return codecvt_short__Getcat(facet
, locale_classic());
2963 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
2965 static codecvt_wchar
*obj
= NULL
;
2968 const locale_facet
*fac
;
2970 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2971 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
2973 _Lockit_dtor(&lock
);
2974 return (codecvt_wchar
*)fac
;
2978 _Lockit_dtor(&lock
);
2982 codecvt_short__Getcat(&fac
, loc
);
2983 obj
= (codecvt_wchar
*)fac
;
2984 locale_facet__Incref(&obj
->base
.facet
);
2985 locale_facet_register(&obj
->base
.facet
);
2986 _Lockit_dtor(&lock
);
2991 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
2992 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
2993 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
2994 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
2995 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
2996 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
2998 TRACE("(%p)\n", this);
3002 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3003 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3004 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3005 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3006 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3007 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3009 TRACE("(%p)\n", this);
3013 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3014 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3015 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3016 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3017 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3018 CALL_VTBL_FUNC(this, 16, int, \
3019 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3020 (this, state, from, from_end, from_next, to, to_end, to_next))
3021 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3022 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3023 const char *from
, const char *from_end
, const char **from_next
,
3024 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3026 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3027 from_end
, from_next
, to
, to_end
, to_next
);
3032 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3033 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3035 *from_next
= from_end
;
3036 return CODECVT_partial
;
3038 return CODECVT_error
;
3052 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3053 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3054 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3055 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3056 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3057 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3058 const char *from
, const char *from_end
, const char **from_next
,
3059 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3061 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3062 from_end
, from_next
, to
, to_end
, to_next
);
3063 return call_codecvt_wchar_do_in(this, state
, from
,
3064 from_end
, from_next
, to
, to_end
, to_next
);
3067 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3068 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3069 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3070 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3071 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3072 CALL_VTBL_FUNC(this, 20, int, \
3073 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3074 (this, state, from, from_end, from_next, to, to_end, to_next))
3075 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3076 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3077 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3078 char *to
, char *to_end
, char **to_next
)
3080 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3081 from_end
, from_next
, to
, to_end
, to_next
);
3086 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3087 int old_state
= *state
, size
;
3088 char buf
[MB_LEN_MAX
];
3090 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3092 return CODECVT_error
;
3094 if(size
> from_end
-*from_next
) {
3096 return CODECVT_partial
;
3107 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3108 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3109 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3110 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3111 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3112 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3113 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3114 char *to
, char *to_end
, char **to_next
)
3116 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3117 from_end
, from_next
, to
, to_end
, to_next
);
3118 return call_codecvt_wchar_do_out(this, state
, from
,
3119 from_end
, from_next
, to
, to_end
, to_next
);
3122 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3123 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3124 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3125 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3126 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3127 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3128 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3129 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3130 int *state
, char *to
, char *to_end
, char **to_next
)
3132 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3134 WARN("unexpected state: %x\n", *state
);
3140 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3141 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3142 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3143 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3144 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3145 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3146 int *state
, char *to
, char *to_end
, char **to_next
)
3148 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3149 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3152 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3153 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3154 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3155 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3156 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3157 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3158 (this, state, from, from_end, max))
3159 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3160 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3161 const char *from
, const char *from_end
, MSVCP_size_t max
)
3163 int tmp_state
= *state
, ret
=0;
3165 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3167 while(ret
<max
&& from
!=from_end
) {
3168 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3185 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3186 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3187 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3188 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3189 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3190 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3191 const char *from
, const char *from_end
, MSVCP_size_t max
)
3193 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3194 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3197 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3198 locale_id numpunct_char_id
= {0};
3200 /* ??_7?$numpunct@D@std@@6B@ */
3201 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3203 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3204 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3205 static void numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3209 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3211 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3212 this->false_name
= MSVCRT_operator_new(len
);
3213 if(this->false_name
)
3214 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3216 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3217 this->true_name
= MSVCRT_operator_new(len
);
3219 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3222 this->grouping
= MSVCRT_operator_new(1);
3224 *(char*)this->grouping
= 0;
3229 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3231 len
= strlen(lc
->grouping
)+1;
3232 this->grouping
= MSVCRT_operator_new(len
);
3234 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3236 this->dp
= lc
->decimal_point
[0];
3237 this->sep
= lc
->thousands_sep
[0];
3240 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3241 MSVCRT_operator_delete((char*)this->grouping
);
3242 MSVCRT_operator_delete((char*)this->false_name
);
3243 MSVCRT_operator_delete((char*)this->true_name
);
3245 ERR("Out of memory\n");
3246 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3250 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3251 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3252 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3253 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3255 TRACE("(%p)\n", this);
3257 MSVCRT_operator_delete((char*)this->grouping
);
3258 MSVCRT_operator_delete((char*)this->false_name
);
3259 MSVCRT_operator_delete((char*)this->true_name
);
3262 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3263 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3264 static numpunct_char
* numpunct_char_ctor_locinfo(numpunct_char
*this,
3265 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3267 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3268 locale_facet_ctor_refs(&this->facet
, refs
);
3269 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3270 numpunct_char__Init(this, locinfo
, usedef
);
3274 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3275 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3276 static numpunct_char
* numpunct_char_ctor_name(numpunct_char
*this,
3277 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3281 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3282 locale_facet_ctor_refs(&this->facet
, refs
);
3283 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3285 _Locinfo_ctor_cstr(&locinfo
, name
);
3286 numpunct_char__Init(this, &locinfo
, usedef
);
3287 _Locinfo_dtor(&locinfo
);
3291 /* ??0?$numpunct@D@std@@QAE@I@Z */
3292 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3293 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3294 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3296 TRACE("(%p %lu)\n", this, refs
);
3297 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3300 /* ??_F?$numpunct@D@std@@QAEXXZ */
3301 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3302 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3303 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3305 return numpunct_char_ctor_refs(this, 0);
3308 /* ??1?$numpunct@D@std@@MAE@XZ */
3309 /* ??1?$numpunct@D@std@@MEAA@XZ */
3310 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3311 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3313 TRACE("(%p)\n", this);
3314 numpunct_char__Tidy(this);
3317 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3318 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3320 TRACE("(%p %x)\n", this, flags
);
3322 /* we have an array, with the number of elements stored before the first object */
3323 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3325 for(i
=*ptr
-1; i
>=0; i
--)
3326 numpunct_char_dtor(this+i
);
3327 MSVCRT_operator_delete(ptr
);
3329 numpunct_char_dtor(this);
3331 MSVCRT_operator_delete(this);
3337 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3338 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3339 static MSVCP_size_t
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3341 TRACE("(%p %p)\n", facet
, loc
);
3343 if(facet
&& !*facet
) {
3344 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3346 ERR("Out of memory\n");
3347 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3350 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3351 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3357 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
3358 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3359 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
3361 return numpunct_char__Getcat(facet
, locale_classic());
3364 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3366 static numpunct_char
*obj
= NULL
;
3369 const locale_facet
*fac
;
3371 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3372 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
3374 _Lockit_dtor(&lock
);
3375 return (numpunct_char
*)fac
;
3379 _Lockit_dtor(&lock
);
3383 numpunct_char__Getcat(&fac
, loc
);
3384 obj
= (numpunct_char
*)fac
;
3385 locale_facet__Incref(&obj
->facet
);
3386 locale_facet_register(&obj
->facet
);
3387 _Lockit_dtor(&lock
);
3392 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3393 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3394 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3395 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3396 char, (const numpunct_char *this), (this))
3397 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3399 TRACE("(%p)\n", this);
3403 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3404 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3405 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
3406 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
3408 TRACE("(%p)\n", this);
3409 return call_numpunct_char_do_decimal_point(this);
3412 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3413 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3414 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
3415 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3416 char, (const numpunct_char*), (this))
3417 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
3419 TRACE("(%p)\n", this);
3423 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3424 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3425 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
3426 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
3428 TRACE("(%p)\n", this);
3429 return call_numpunct_char_do_thousands_sep(this);
3432 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3433 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3434 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
3435 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3436 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3437 basic_string_char
* __thiscall
numpunct_char_do_grouping(
3438 const numpunct_char
*this, basic_string_char
*ret
)
3440 TRACE("(%p)\n", this);
3441 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3444 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3445 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3446 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
3447 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
3449 TRACE("(%p)\n", this);
3450 return call_numpunct_char_do_grouping(this, ret
);
3453 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3454 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3455 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
3456 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3457 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3458 basic_string_char
* __thiscall
numpunct_char_do_falsename(
3459 const numpunct_char
*this, basic_string_char
*ret
)
3461 TRACE("(%p)\n", this);
3462 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
3465 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3466 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3467 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
3468 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
3470 TRACE("(%p)\n", this);
3471 return call_numpunct_char_do_falsename(this, ret
);
3474 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3475 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3476 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
3477 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3478 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3479 basic_string_char
* __thiscall
numpunct_char_do_truename(
3480 const numpunct_char
*this, basic_string_char
*ret
)
3482 TRACE("(%p)\n", this);
3483 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
3486 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3487 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3488 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
3489 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
3491 TRACE("(%p)\n", this);
3492 return call_numpunct_char_do_truename(this, ret
);
3495 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3496 locale_id numpunct_wchar_id
= {0};
3497 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3498 locale_id numpunct_short_id
= {0};
3500 /* ??_7?$numpunct@_W@std@@6B@ */
3501 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
3502 /* ??_7?$numpunct@G@std@@6B@ */
3503 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
3505 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3506 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3507 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3508 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3509 static void numpunct_wchar__Init(numpunct_wchar
*this,
3510 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3512 const char *to_convert
;
3516 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3518 _Locinfo__Getcvt(locinfo
, &cvt
);
3520 to_convert
= _Locinfo__Getfalse(locinfo
);
3521 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3522 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3523 if(this->false_name
)
3524 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3525 (wchar_t*)this->false_name
, len
);
3527 to_convert
= _Locinfo__Gettrue(locinfo
);
3528 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3529 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3531 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3532 (wchar_t*)this->true_name
, len
);
3535 this->grouping
= MSVCRT_operator_new(1);
3537 *(char*)this->grouping
= 0;
3542 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3544 len
= strlen(lc
->grouping
)+1;
3545 this->grouping
= MSVCRT_operator_new(len
);
3547 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3549 this->dp
= lc
->decimal_point
[0];
3550 this->sep
= lc
->thousands_sep
[0];
3553 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3554 MSVCRT_operator_delete((char*)this->grouping
);
3555 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3556 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3558 ERR("Out of memory\n");
3559 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3563 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3564 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3565 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3566 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3567 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
3568 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
3570 TRACE("(%p)\n", this);
3572 MSVCRT_operator_delete((char*)this->grouping
);
3573 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3574 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3577 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3578 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3579 static numpunct_wchar
* numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
3580 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3582 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3583 locale_facet_ctor_refs(&this->facet
, refs
);
3584 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3585 numpunct_wchar__Init(this, locinfo
, usedef
);
3589 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3590 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3591 static numpunct_wchar
* numpunct_short_ctor_locinfo(numpunct_wchar
*this,
3592 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3594 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
3595 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3599 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3600 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3601 static numpunct_wchar
* numpunct_wchar_ctor_name(numpunct_wchar
*this,
3602 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3606 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3607 locale_facet_ctor_refs(&this->facet
, refs
);
3608 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3610 _Locinfo_ctor_cstr(&locinfo
, name
);
3611 numpunct_wchar__Init(this, &locinfo
, usedef
);
3612 _Locinfo_dtor(&locinfo
);
3616 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3617 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3618 static numpunct_wchar
* numpunct_short_ctor_name(numpunct_wchar
*this,
3619 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3621 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
3622 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3626 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3627 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3628 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
3629 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3631 TRACE("(%p %lu)\n", this, refs
);
3632 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
3635 /* ??0?$numpunct@G@std@@QAE@I@Z */
3636 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3637 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
3638 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3640 numpunct_wchar_ctor_refs(this, refs
);
3641 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3645 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3646 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3647 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
3648 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
3650 return numpunct_wchar_ctor_refs(this, 0);
3653 /* ??_F?$numpunct@G@std@@QAEXXZ */
3654 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3655 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
3656 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
3658 return numpunct_short_ctor_refs(this, 0);
3661 /* ??1?$numpunct@_W@std@@MAE@XZ */
3662 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3663 /* ??1?$numpunct@G@std@@MAE@XZ */
3664 /* ??1?$numpunct@G@std@@MEAA@XZ */
3665 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
3666 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
3668 TRACE("(%p)\n", this);
3669 numpunct_wchar__Tidy(this);
3672 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
3673 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3675 TRACE("(%p %x)\n", this, flags
);
3677 /* we have an array, with the number of elements stored before the first object */
3678 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3680 for(i
=*ptr
-1; i
>=0; i
--)
3681 numpunct_wchar_dtor(this+i
);
3682 MSVCRT_operator_delete(ptr
);
3684 numpunct_wchar_dtor(this);
3686 MSVCRT_operator_delete(this);
3692 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3693 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3694 static MSVCP_size_t
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3696 TRACE("(%p %p)\n", facet
, loc
);
3698 if(facet
&& !*facet
) {
3699 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3701 ERR("Out of memory\n");
3702 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3705 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
3706 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3712 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
3713 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3714 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
3716 return numpunct_wchar__Getcat(facet
, locale_classic());
3719 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
3721 static numpunct_wchar
*obj
= NULL
;
3724 const locale_facet
*fac
;
3726 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3727 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
3729 _Lockit_dtor(&lock
);
3730 return (numpunct_wchar
*)fac
;
3734 _Lockit_dtor(&lock
);
3738 numpunct_wchar__Getcat(&fac
, loc
);
3739 obj
= (numpunct_wchar
*)fac
;
3740 locale_facet__Incref(&obj
->facet
);
3741 locale_facet_register(&obj
->facet
);
3742 _Lockit_dtor(&lock
);
3747 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3748 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3749 static MSVCP_size_t
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3751 TRACE("(%p %p)\n", facet
, loc
);
3753 if(facet
&& !*facet
) {
3754 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3756 ERR("Out of memory\n");
3757 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3760 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
3761 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3767 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
3768 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3769 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
3771 return numpunct_short__Getcat(facet
, locale_classic());
3774 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
3776 static numpunct_wchar
*obj
= NULL
;
3779 const locale_facet
*fac
;
3781 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3782 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
3784 _Lockit_dtor(&lock
);
3785 return (numpunct_wchar
*)fac
;
3789 _Lockit_dtor(&lock
);
3793 numpunct_short__Getcat(&fac
, loc
);
3794 obj
= (numpunct_wchar
*)fac
;
3795 locale_facet__Incref(&obj
->facet
);
3796 locale_facet_register(&obj
->facet
);
3797 _Lockit_dtor(&lock
);
3802 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3803 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3804 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3805 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3806 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
3807 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3808 wchar_t, (const numpunct_wchar *this), (this))
3809 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
3811 TRACE("(%p)\n", this);
3815 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3816 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3817 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3818 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3819 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
3820 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
3822 TRACE("(%p)\n", this);
3823 return call_numpunct_wchar_do_decimal_point(this);
3826 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3827 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3828 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3829 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3830 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
3831 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3832 wchar_t, (const numpunct_wchar *this), (this))
3833 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
3835 TRACE("(%p)\n", this);
3839 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3840 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3841 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3842 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3843 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
3844 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
3846 TRACE("(%p)\n", this);
3847 return call_numpunct_wchar_do_thousands_sep(this);
3850 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3851 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3852 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3853 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3854 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
3855 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3856 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3857 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3859 TRACE("(%p)\n", this);
3860 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3863 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3864 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3865 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3866 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3867 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
3868 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3870 TRACE("(%p)\n", this);
3871 return call_numpunct_wchar_do_grouping(this, ret
);
3874 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3875 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3876 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3877 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3878 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
3879 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3880 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3881 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3883 TRACE("(%p)\n", this);
3884 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
3887 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3888 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3889 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3890 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3891 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
3892 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3894 TRACE("(%p)\n", this);
3895 return call_numpunct_wchar_do_falsename(this, ret
);
3898 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3899 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3900 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3901 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3902 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
3903 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3904 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3905 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3907 TRACE("(%p)\n", this);
3908 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
3911 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3912 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3913 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3914 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3915 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
3916 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3918 TRACE("(%p)\n", this);
3919 return call_numpunct_wchar_do_truename(this, ret
);
3922 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
3924 double ret
= strtod(buf
, buf_end
);
3927 ret
*= pow(10, exp
);
3931 static double _Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3937 ret
= _Stod(buf
, buf_end
, exp
);
3947 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
3949 return _Stod(buf
, buf_end
, exp
);
3952 static float _Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3954 return _Stodx(buf
, buf_end
, exp
, err
);
3957 static __int64
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
3963 ret
= _strtoi64(buf
, buf_end
, base
);
3973 static LONG
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
3975 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
3976 if(!*err
&& i
!=(__int64
)((LONG
)i
))
3981 static unsigned __int64
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
3983 unsigned __int64 ret
;
3987 ret
= _strtoui64(buf
, buf_end
, base
);
3997 static ULONG
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
3999 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4000 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4002 return buf
[0]=='-' ? -i
: i
;
4005 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4006 locale_id num_get_wchar_id
= {0};
4007 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4008 locale_id num_get_short_id
= {0};
4010 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4011 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4012 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4013 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4015 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4016 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4017 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4018 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4019 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4020 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4022 TRACE("(%p %p)\n", this, locinfo
);
4023 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4026 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4027 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4028 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4029 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4030 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4032 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4034 locale_facet_ctor_refs(&this->facet
, refs
);
4035 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4037 num_get_wchar__Init(this, locinfo
);
4041 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4042 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4043 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4044 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4045 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4047 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4048 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4052 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4053 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4054 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4055 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4059 TRACE("(%p %lu)\n", this, refs
);
4061 _Locinfo_ctor(&locinfo
);
4062 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4063 _Locinfo_dtor(&locinfo
);
4067 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4068 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4069 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4070 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4072 num_get_wchar_ctor_refs(this, refs
);
4073 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4077 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4078 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4079 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4080 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4082 return num_get_wchar_ctor_refs(this, 0);
4085 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4086 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4087 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4088 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4090 return num_get_short_ctor_refs(this, 0);
4093 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4094 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4095 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4096 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4097 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4098 void __thiscall
num_get_wchar_dtor(num_get
*this)
4100 TRACE("(%p)\n", this);
4101 locale_facet_dtor(&this->facet
);
4104 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4105 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4107 TRACE("(%p %x)\n", this, flags
);
4109 /* we have an array, with the number of elements stored before the first object */
4110 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4112 for(i
=*ptr
-1; i
>=0; i
--)
4113 num_get_wchar_dtor(this+i
);
4114 MSVCRT_operator_delete(ptr
);
4116 num_get_wchar_dtor(this);
4118 MSVCRT_operator_delete(this);
4124 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4125 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4126 static MSVCP_size_t
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4128 TRACE("(%p %p)\n", facet
, loc
);
4130 if(facet
&& !*facet
) {
4133 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4135 ERR("Out of memory\n");
4136 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4140 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
4141 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4142 _Locinfo_dtor(&locinfo
);
4148 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4150 static num_get
*obj
= NULL
;
4153 const locale_facet
*fac
;
4155 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4156 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4158 _Lockit_dtor(&lock
);
4159 return (num_get
*)fac
;
4163 _Lockit_dtor(&lock
);
4167 num_get_wchar__Getcat(&fac
, loc
);
4168 obj
= (num_get
*)fac
;
4169 locale_facet__Incref(&obj
->facet
);
4170 locale_facet_register(&obj
->facet
);
4171 _Lockit_dtor(&lock
);
4176 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4177 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4178 static MSVCP_size_t
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4180 if(facet
&& !*facet
) {
4181 num_get_wchar__Getcat(facet
, loc
);
4182 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4188 num_get
* num_get_short_use_facet(const locale
*loc
)
4190 static num_get
*obj
= NULL
;
4193 const locale_facet
*fac
;
4195 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4196 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4198 _Lockit_dtor(&lock
);
4199 return (num_get
*)fac
;
4203 _Lockit_dtor(&lock
);
4207 num_get_short__Getcat(&fac
, loc
);
4208 obj
= (num_get
*)fac
;
4209 locale_facet__Incref(&obj
->facet
);
4210 locale_facet_register(&obj
->facet
);
4211 _Lockit_dtor(&lock
);
4216 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
4221 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
4224 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4225 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4227 basic_string_char grouping_bstr
;
4228 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4229 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
;
4230 wchar_t sep
, digits
[11], *digits_pos
;
4231 const char *grouping
;
4232 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
4234 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4237 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4240 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4241 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4242 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : (wchar_t)0;
4244 istreambuf_iterator_wchar_val(first
);
4245 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4247 istreambuf_iterator_wchar_inc(first
);
4248 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4250 istreambuf_iterator_wchar_inc(first
);
4254 groups_no
= strlen(grouping
)+2;
4255 groups
= calloc(groups_no
, sizeof(char));
4258 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4259 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4260 if(sep
&& first
->val
==sep
) {
4261 if(cur_group
== groups_no
+1) {
4262 if(groups
[1] != groups
[2]) {
4266 memmove(groups
+1, groups
+2, groups_no
);
4267 groups
[cur_group
] = 0;
4277 if(dest_empty
&& first
->val
== digits
[0])
4281 *dest
++ = '0'+digits_pos
-digits
;
4284 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4285 groups
[cur_group
]++;
4289 if(cur_group
&& !groups
[cur_group
])
4294 for(; cur_group
>=0 && !error
; cur_group
--) {
4295 if(*grouping
== CHAR_MAX
) {
4299 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4300 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4303 }else if(grouping
[1]) {
4307 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4313 }else if(dest_empty
) {
4317 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4319 *dest
++ = *localeconv()->decimal_point
;
4320 istreambuf_iterator_wchar_inc(first
);
4323 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
)) {
4328 if(!first
->strbuf
|| !wcschr(digits
, first
->val
))
4333 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4334 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4336 else if(dest
<num_end
) {
4338 *dest
++ = '0'+digits_pos
-digits
;
4347 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4349 istreambuf_iterator_wchar_inc(first
);
4351 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4353 istreambuf_iterator_wchar_inc(first
);
4354 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4356 istreambuf_iterator_wchar_inc(first
);
4359 error
= dest_empty
= TRUE
;
4360 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4363 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
4364 error
= dest_empty
= FALSE
;
4366 *dest
++ = '0'+digits_pos
-digits
;
4372 }else if(dest_empty
) {
4381 /* ?_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 */
4382 /* ?_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 */
4383 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4384 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4386 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
4389 /* ?_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 */
4390 /* ?_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 */
4391 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4392 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4394 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
4397 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4398 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
4400 wchar_t digits
[23], *digits_pos
, sep
;
4401 basic_string_char grouping_bstr
;
4402 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
4403 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
;
4404 const char *grouping
;
4405 BOOL error
= TRUE
, dest_empty
= TRUE
;
4407 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
4410 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4411 for(i
=0; i
<6; i
++) {
4412 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
4413 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
4416 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4417 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4418 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
4420 basefield
= fmtflags
& FMTFLAG_basefield
;
4421 if(basefield
== FMTFLAG_oct
)
4423 else if(basefield
== FMTFLAG_hex
)
4424 base
= 22; /* equal to the size of digits buffer */
4430 istreambuf_iterator_wchar_val(first
);
4431 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4433 istreambuf_iterator_wchar_inc(first
);
4434 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4436 istreambuf_iterator_wchar_inc(first
);
4439 if(!base
&& first
->strbuf
&& first
->val
==digits
[0]) {
4440 istreambuf_iterator_wchar_inc(first
);
4441 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('x', &this->cvt
))) {
4442 istreambuf_iterator_wchar_inc(first
);
4454 groups_no
= strlen(grouping
)+2;
4455 groups
= calloc(groups_no
, sizeof(char));
4458 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4459 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4460 if(sep
&& first
->val
==sep
) {
4461 if(cur_group
== groups_no
+1) {
4462 if(groups
[1] != groups
[2]) {
4466 memmove(groups
+1, groups
+2, groups_no
);
4467 groups
[cur_group
] = 0;
4477 if(dest_empty
&& first
->val
== digits
[0])
4480 /* skip digits that can't be copied to dest buffer, other
4481 * functions are responsible for detecting overflows */
4483 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
4484 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
4485 'A'+digits_pos
-digits
-16));
4486 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4487 groups
[cur_group
]++;
4491 if(cur_group
&& !groups
[cur_group
])
4496 for(; cur_group
>=0 && !error
; cur_group
--) {
4497 if(*grouping
== CHAR_MAX
) {
4501 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4502 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4505 }else if(grouping
[1]) {
4509 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4518 return (base
==22 ? 16 : base
);
4521 /* ?_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 */
4522 /* ?_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 */
4523 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4524 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4526 return num_get__Getifld(this, dest
, first
, last
,
4527 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
4530 /* ?_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 */
4531 /* ?_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 */
4532 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4533 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4535 return num_get__Getifld(this, dest
, first
, last
,
4536 fmtflags
, loc
, numpunct_short_use_facet(loc
));
4539 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
4540 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4541 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4542 void **pval
, numpunct_wchar
*numpunct
)
4548 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4550 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4551 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
4552 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
4553 *state
|= IOSTATE_failbit
;
4554 else if(end
!=tmp
&& !err
)
4555 *pval
= (void*)((INT_PTR
)v
);
4557 *state
|= IOSTATE_failbit
;
4560 *state
|= IOSTATE_eofbit
;
4566 /* ?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 */
4567 /* ?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 */
4568 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
4569 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
4570 (this, ret, first, last, base, state, pval))
4571 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
4572 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4573 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4575 return num_get_do_get_void(this, ret
, first
, last
, base
,
4576 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4579 /* ?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 */
4580 /* ?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 */
4581 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
4582 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4583 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4585 return num_get_do_get_void(this, ret
, first
, last
, base
,
4586 state
, pval
, numpunct_short_use_facet(base
->loc
));
4589 /* ?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 */
4590 /* ?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 */
4591 /* ?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 */
4592 /* ?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 */
4593 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
4594 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4595 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4597 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4598 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
4601 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
4602 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4603 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4604 double *pval
, numpunct_wchar
*numpunct
)
4610 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4612 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
4613 if(end
!=tmp
&& !err
)
4616 *state
|= IOSTATE_failbit
;
4619 *state
|= IOSTATE_eofbit
;
4625 /* ?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 */
4626 /* ?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 */
4627 /* ?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 */
4628 /* ?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 */
4629 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
4630 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4631 (this, ret, first, last, base, state, pval))
4632 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
4633 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4634 (this, ret, first, last, base, state, pval))
4635 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
4636 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4637 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4639 return num_get_do_get_double(this, ret
, first
, last
, base
,
4640 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4643 /* ?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 */
4644 /* ?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 */
4645 /* ?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 */
4646 /* ?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 */
4647 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
4648 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4649 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4651 return num_get_do_get_double(this, ret
, first
, last
, base
,
4652 state
, pval
, numpunct_short_use_facet(base
->loc
));
4655 /* ?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 */
4656 /* ?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 */
4657 /* ?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 */
4658 /* ?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 */
4659 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
4660 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4661 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4663 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4664 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
4667 /* ?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 */
4668 /* ?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 */
4669 /* ?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 */
4670 /* ?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 */
4671 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
4672 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4673 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4675 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4676 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
4679 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
4680 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4681 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4682 float *pval
, numpunct_wchar
*numpunct
)
4688 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4690 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
4691 &last
, base
->loc
, numpunct
), &err
);
4692 if(end
!=tmp
&& !err
)
4695 *state
|= IOSTATE_failbit
;
4698 *state
|= IOSTATE_eofbit
;
4704 /* ?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 */
4705 /* ?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 */
4706 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
4707 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
4708 (this, ret, first, last, base, state, pval))
4709 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
4710 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4711 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4713 return num_get_do_get_float(this, ret
, first
, last
, base
,
4714 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4717 /* ?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 */
4718 /* ?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 */
4719 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
4720 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4721 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4723 return num_get_do_get_float(this, ret
, first
, last
, base
,
4724 state
, pval
, numpunct_short_use_facet(base
->loc
));
4727 /* ?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 */
4728 /* ?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 */
4729 /* ?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 */
4730 /* ?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 */
4731 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
4732 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4733 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4735 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4736 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
4739 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
4740 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4741 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4742 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
4748 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4750 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4751 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4752 if(end
!=tmp
&& !err
)
4755 *state
|= IOSTATE_failbit
;
4758 *state
|= IOSTATE_eofbit
;
4764 /* ?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 */
4765 /* ?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 */
4766 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
4767 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
4768 (this, ret, first, last, base, state, pval))
4769 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
4770 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4771 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4773 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4774 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4777 /* ?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 */
4778 /* ?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 */
4779 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
4780 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4781 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4783 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4784 state
, pval
, numpunct_short_use_facet(base
->loc
));
4787 /* ?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 */
4788 /* ?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 */
4789 /* ?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 */
4790 /* ?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 */
4791 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
4792 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4793 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4795 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4796 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
4799 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
4800 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4801 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4802 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
4808 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4810 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4811 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4812 if(end
!=tmp
&& !err
)
4815 *state
|= IOSTATE_failbit
;
4818 *state
|= IOSTATE_eofbit
;
4824 /* ?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 */
4825 /* ?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 */
4826 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
4827 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
4828 (this, ret, first, last, base, state, pval))
4829 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
4830 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4831 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4833 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4834 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4837 /* ?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 */
4838 /* ?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 */
4839 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
4840 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4841 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4843 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4844 state
, pval
, numpunct_short_use_facet(base
->loc
));
4847 /* ?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 */
4848 /* ?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 */
4849 /* ?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 */
4850 /* ?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 */
4851 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
4852 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4853 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4855 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4856 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
4859 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
4860 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4861 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4862 ULONG
*pval
, numpunct_wchar
*numpunct
)
4868 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4870 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4871 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4872 if(end
!=tmp
&& !err
)
4875 *state
|= IOSTATE_failbit
;
4878 *state
|= IOSTATE_eofbit
;
4884 /* ?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 */
4885 /* ?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 */
4886 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
4887 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
4888 (this, ret, first, last, base, state, pval))
4889 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
4890 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4891 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4893 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4894 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4897 /* ?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 */
4898 /* ?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 */
4899 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
4900 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4901 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4903 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4904 state
, pval
, numpunct_short_use_facet(base
->loc
));
4907 /* ?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 */
4908 /* ?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 */
4909 /* ?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 */
4910 /* ?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 */
4911 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
4912 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4913 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4915 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4916 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4919 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
4920 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4921 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4922 LONG
*pval
, numpunct_wchar
*numpunct
)
4928 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4930 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4931 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4932 if(end
!=tmp
&& !err
)
4935 *state
|= IOSTATE_failbit
;
4938 *state
|= IOSTATE_eofbit
;
4944 /* ?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 */
4945 /* ?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 */
4946 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
4947 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
4948 (this, ret, first, last, base, state, pval))
4949 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
4950 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4951 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4953 return num_get_do_get_long(this, ret
, first
, last
, base
,
4954 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4957 /* ?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 */
4958 /* ?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 */
4959 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
4960 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4961 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4963 return num_get_do_get_long(this, ret
, first
, last
, base
,
4964 state
, pval
, numpunct_short_use_facet(base
->loc
));
4967 /* ?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 */
4968 /* ?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 */
4969 /* ?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 */
4970 /* ?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 */
4971 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
4972 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4973 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4975 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4976 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
4979 /* ?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 */
4980 /* ?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 */
4981 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
4982 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
4983 (this, ret, first, last, base, state, pval))
4984 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
4985 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4986 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
4988 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4989 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4992 /* ?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 */
4993 /* ?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 */
4994 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
4995 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4996 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
4998 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4999 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5002 /* ?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 */
5003 /* ?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 */
5004 /* ?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 */
5005 /* ?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 */
5006 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5007 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5008 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5010 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5011 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5014 /* ?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 */
5015 /* ?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 */
5016 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5017 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5018 (this, ret, first, last, base, state, pval))
5019 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5020 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5021 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5024 char tmp
[25], *beg
, *end
;
5027 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5029 b
= num_get_wchar__Getifld(this, tmp
,
5030 &first
, &last
, base
->fmtfl
, base
->loc
);
5031 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5032 v
= _Stoulx(beg
, &end
, b
, &err
);
5034 if(v
!= (ULONG
)((unsigned short)v
))
5035 *state
|= IOSTATE_failbit
;
5036 else if(end
!=beg
&& !err
)
5037 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5039 *state
|= IOSTATE_failbit
;
5042 *state
|= IOSTATE_eofbit
;
5048 /* ?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 */
5049 /* ?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 */
5050 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5051 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5052 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5054 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5058 /* ?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 */
5059 /* ?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 */
5060 /* ?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@ */
5061 /* ?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 */
5062 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5063 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5064 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5066 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5067 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5070 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5071 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5072 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5073 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5075 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5077 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5078 basic_string_wchar false_bstr
, true_bstr
;
5079 const wchar_t *pfalse
, *ptrue
;
5081 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5082 numpunct_wchar_truename(numpunct
, &true_bstr
);
5083 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5084 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5086 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;
5087 istreambuf_iterator_wchar_inc(&first
)) {
5088 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5090 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5093 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5095 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5103 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5112 *state
|= IOSTATE_failbit
;
5114 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5115 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5119 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5120 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5122 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5125 *state
|= IOSTATE_failbit
;
5129 *state
|= IOSTATE_eofbit
;
5130 memcpy(ret
, &first
, sizeof(first
));
5134 /* ?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 */
5135 /* ?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 */
5136 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5137 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5138 (this, ret, first, last, base, state, pval))
5139 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5140 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5141 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5143 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5144 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5147 /* ?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 */
5148 /* ?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 */
5149 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5150 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5151 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5153 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5154 state
, pval
, numpunct_short_use_facet(base
->loc
));
5157 /* ?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 */
5158 /* ?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 */
5159 /* ?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 */
5160 /* ?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 */
5161 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
5162 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5163 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5165 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5166 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5169 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5170 locale_id num_get_char_id
= {0};
5172 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5173 extern const vtable_ptr MSVCP_num_get_char_vtable
;
5175 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5176 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5177 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
5178 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
5180 TRACE("(%p %p)\n", this, locinfo
);
5181 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5184 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5185 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5186 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
5187 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
5188 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
5190 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
5192 locale_facet_ctor_refs(&this->facet
, refs
);
5193 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
5195 num_get_char__Init(this, locinfo
);
5199 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5200 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5201 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
5202 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
5206 TRACE("(%p %lu)\n", this, refs
);
5208 _Locinfo_ctor(&locinfo
);
5209 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
5210 _Locinfo_dtor(&locinfo
);
5214 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5215 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5216 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
5217 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
5219 return num_get_char_ctor_refs(this, 0);
5222 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5223 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5224 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
5225 void __thiscall
num_get_char_dtor(num_get
*this)
5227 TRACE("(%p)\n", this);
5228 locale_facet_dtor(&this->facet
);
5231 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
5232 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
5234 TRACE("(%p %x)\n", this, flags
);
5236 /* we have an array, with the number of elements stored before the first object */
5237 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5239 for(i
=*ptr
-1; i
>=0; i
--)
5240 num_get_char_dtor(this+i
);
5241 MSVCRT_operator_delete(ptr
);
5243 num_get_char_dtor(this);
5245 MSVCRT_operator_delete(this);
5251 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5252 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5253 static MSVCP_size_t
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
5255 TRACE("(%p %p)\n", facet
, loc
);
5257 if(facet
&& !*facet
) {
5260 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5262 ERR("Out of memory\n");
5263 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5267 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
5268 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5269 _Locinfo_dtor(&locinfo
);
5275 num_get
* num_get_char_use_facet(const locale
*loc
)
5277 static num_get
*obj
= NULL
;
5280 const locale_facet
*fac
;
5282 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5283 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
5285 _Lockit_dtor(&lock
);
5286 return (num_get
*)fac
;
5290 _Lockit_dtor(&lock
);
5294 num_get_char__Getcat(&fac
, loc
);
5295 obj
= (num_get
*)fac
;
5296 locale_facet__Incref(&obj
->facet
);
5297 locale_facet_register(&obj
->facet
);
5298 _Lockit_dtor(&lock
);
5303 /* ?_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 */
5304 /* ?_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 */
5305 /* Copies number to dest buffer, validates grouping and skips separators.
5306 * Updates first so it points past the number, all digits are skipped.
5307 * Returns how exponent needs to changed.
5308 * Size of dest buffer is not specified, assuming it's not smaller than 32:
5309 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
5311 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5312 istreambuf_iterator_char
*last
, const locale
*loc
)
5314 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5315 basic_string_char grouping_bstr
;
5316 int groups_no
= 0, cur_group
= 0, exp
= 0;
5317 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
, sep
;
5318 const char *grouping
;
5319 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
5321 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5323 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5324 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5325 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5327 istreambuf_iterator_char_val(first
);
5328 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5329 *dest
++ = first
->val
;
5330 istreambuf_iterator_char_inc(first
);
5334 groups_no
= strlen(grouping
)+2;
5335 groups
= calloc(groups_no
, sizeof(char));
5338 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5339 if(first
->val
<'0' || first
->val
>'9') {
5340 if(sep
&& first
->val
==sep
) {
5341 if(cur_group
== groups_no
+1) {
5342 if(groups
[1] != groups
[2]) {
5346 memmove(groups
+1, groups
+2, groups_no
);
5347 groups
[cur_group
] = 0;
5357 if(dest_empty
&& first
->val
== '0')
5361 *dest
++ = first
->val
;
5364 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5365 groups
[cur_group
]++;
5369 if(cur_group
&& !groups
[cur_group
])
5374 for(; cur_group
>=0 && !error
; cur_group
--) {
5375 if(*grouping
== CHAR_MAX
) {
5379 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5380 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5383 }else if(grouping
[1]) {
5387 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5393 }else if(dest_empty
) {
5397 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
5399 *dest
++ = *localeconv()->decimal_point
;
5400 istreambuf_iterator_char_inc(first
);
5403 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
)) {
5408 if(!first
->strbuf
|| first
->val
<'1' || first
->val
>'9')
5413 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5414 if(first
->val
<'0' || first
->val
>'9')
5416 else if(dest
<num_end
) {
5418 *dest
++ = first
->val
;
5427 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
5428 *dest
++ = first
->val
;
5429 istreambuf_iterator_char_inc(first
);
5431 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5432 *dest
++ = first
->val
;
5433 istreambuf_iterator_char_inc(first
);
5436 error
= dest_empty
= TRUE
;
5437 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5440 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
5441 error
= dest_empty
= FALSE
;
5443 *dest
++ = first
->val
;
5449 }else if(dest_empty
) {
5458 /* ?_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 */
5459 /* ?_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 */
5460 /* Copies number to dest buffer, validates grouping and skips separators.
5461 * Updates first so it points past the number, all digits are skipped.
5462 * Returns number base (8, 10 or 16).
5463 * Size of dest buffer is not specified, assuming it's not smaller than 25:
5464 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
5466 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5467 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
5469 static const char digits
[] = "0123456789abcdefABCDEF";
5471 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5472 basic_string_char grouping_bstr
;
5473 int basefield
, base
, groups_no
= 0, cur_group
= 0;
5474 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
, sep
;
5475 const char *grouping
;
5476 BOOL error
= TRUE
, dest_empty
= TRUE
;
5478 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5480 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5481 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5482 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5484 basefield
= fmtflags
& FMTFLAG_basefield
;
5485 if(basefield
== FMTFLAG_oct
)
5487 else if(basefield
== FMTFLAG_hex
)
5488 base
= 22; /* equal to the size of digits buffer */
5494 istreambuf_iterator_char_val(first
);
5495 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5496 *dest
++ = first
->val
;
5497 istreambuf_iterator_char_inc(first
);
5500 if(!base
&& first
->strbuf
&& first
->val
=='0') {
5501 istreambuf_iterator_char_inc(first
);
5502 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
5503 istreambuf_iterator_char_inc(first
);
5514 groups_no
= strlen(grouping
)+2;
5515 groups
= calloc(groups_no
, sizeof(char));
5518 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5519 if(!memchr(digits
, first
->val
, base
)) {
5520 if(sep
&& first
->val
==sep
) {
5521 if(cur_group
== groups_no
+1) {
5522 if(groups
[1] != groups
[2]) {
5526 memmove(groups
+1, groups
+2, groups_no
);
5527 groups
[cur_group
] = 0;
5537 if(dest_empty
&& first
->val
== '0')
5540 /* skip digits that can't be copied to dest buffer, other
5541 * functions are responsible for detecting overflows */
5543 *dest
++ = first
->val
;
5544 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5545 groups
[cur_group
]++;
5549 if(cur_group
&& !groups
[cur_group
])
5554 for(; cur_group
>=0 && !error
; cur_group
--) {
5555 if(*grouping
== CHAR_MAX
) {
5559 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5560 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5563 }else if(grouping
[1]) {
5567 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5576 return (base
==22 ? 16 : base
);
5579 /* ?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 */
5580 /* ?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 */
5581 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
5582 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
5583 (this, ret, first, last, base, state, pval))
5584 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
5585 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5586 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5592 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5594 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5595 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
5596 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5597 *state
|= IOSTATE_failbit
;
5598 else if(end
!=tmp
&& !err
)
5599 *pval
= (void*)((INT_PTR
)v
);
5601 *state
|= IOSTATE_failbit
;
5604 *state
|= IOSTATE_eofbit
;
5610 /* ?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 */
5611 /* ?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 */
5612 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
5613 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5614 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5616 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5617 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5620 /* ?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 */
5621 /* ?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 */
5622 /* ?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 */
5623 /* ?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 */
5624 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
5625 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5626 (this, ret, first, last, base, state, pval))
5627 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
5628 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5629 (this, ret, first, last, base, state, pval))
5630 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
5631 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5632 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5638 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5640 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5641 if(end
!=tmp
&& !err
)
5644 *state
|= IOSTATE_failbit
;
5647 *state
|= IOSTATE_eofbit
;
5653 /* ?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 */
5654 /* ?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 */
5655 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
5656 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
5657 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5659 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5660 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5663 /* ?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 */
5664 /* ?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 */
5665 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
5666 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5667 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5669 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5670 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5673 /* ?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 */
5674 /* ?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 */
5675 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
5676 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
5677 (this, ret, first, last, base, state, pval))
5678 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
5679 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5680 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5686 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5688 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5689 if(end
!=tmp
&& !err
)
5692 *state
|= IOSTATE_failbit
;
5695 *state
|= IOSTATE_eofbit
;
5701 /* ?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 */
5702 /* ?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 */
5703 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
5704 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5705 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5707 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5708 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
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@AAHAA_K@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@AEAHAEA_K@Z */
5713 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5714 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5715 (this, ret, first, last, base, state, pval))
5716 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
5717 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5718 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5724 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5726 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5727 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5728 if(end
!=tmp
&& !err
)
5731 *state
|= IOSTATE_failbit
;
5734 *state
|= IOSTATE_eofbit
;
5740 /* ?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 */
5741 /* ?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 */
5742 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
5743 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5744 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5746 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5747 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5750 /* ?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 */
5751 /* ?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 */
5752 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5753 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5754 (this, ret, first, last, base, state, pval))
5755 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
5756 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5757 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5763 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5765 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5766 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5767 if(end
!=tmp
&& !err
)
5770 *state
|= IOSTATE_failbit
;
5773 *state
|= IOSTATE_eofbit
;
5779 /* ?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 */
5780 /* ?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 */
5781 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
5782 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5783 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5785 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5786 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5789 /* ?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 */
5790 /* ?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 */
5791 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
5792 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
5793 (this, ret, first, last, base, state, pval))
5794 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
5795 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5796 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5802 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5804 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5805 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5806 if(end
!=tmp
&& !err
)
5809 *state
|= IOSTATE_failbit
;
5812 *state
|= IOSTATE_eofbit
;
5818 /* ?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 */
5819 /* ?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 */
5820 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
5821 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5822 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5824 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5825 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5828 /* ?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 */
5829 /* ?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 */
5830 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
5831 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
5832 (this, ret, first, last, base, state, pval))
5833 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
5834 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5835 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5841 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5843 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5844 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5845 if(end
!=tmp
&& !err
)
5848 *state
|= IOSTATE_failbit
;
5851 *state
|= IOSTATE_eofbit
;
5857 /* ?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 */
5858 /* ?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 */
5859 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
5860 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5861 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5863 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5864 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5867 /* ?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 */
5868 /* ?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 */
5869 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
5870 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
5871 (this, ret, first, last, base, state, pval))
5872 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
5873 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5874 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5876 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5877 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5880 /* ?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 */
5881 /* ?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 */
5882 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
5883 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5884 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5886 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5887 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5890 /* ?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 */
5891 /* ?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 */
5892 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
5893 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
5894 (this, ret, first, last, base, state, pval))
5895 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
5896 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5897 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5900 char tmp
[25], *beg
, *end
;
5903 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5905 b
= num_get_char__Getifld(this, tmp
,
5906 &first
, &last
, base
->fmtfl
, base
->loc
);
5907 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5908 v
= _Stoulx(beg
, &end
, b
, &err
);
5910 if(v
!= (ULONG
)((unsigned short)v
))
5911 *state
|= IOSTATE_failbit
;
5912 else if(end
!=beg
&& !err
)
5913 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5915 *state
|= IOSTATE_failbit
;
5918 *state
|= IOSTATE_eofbit
;
5924 /* ?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 */
5925 /* ?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 */
5926 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
5927 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5928 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5930 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5931 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5934 /* ?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 */
5935 /* ?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 */
5936 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
5937 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
5938 (this, ret, first, last, base, state, pval))
5939 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
5940 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
5941 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5943 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5945 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5946 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
5947 basic_string_char false_bstr
, true_bstr
;
5948 const char *pfalse
, *ptrue
;
5950 numpunct_char_falsename(numpunct
, &false_bstr
);
5951 numpunct_char_truename(numpunct
, &true_bstr
);
5952 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
5953 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
5955 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;
5956 istreambuf_iterator_char_inc(&first
)) {
5957 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5959 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5962 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5964 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5972 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5981 *state
|= IOSTATE_failbit
;
5983 MSVCP_basic_string_char_dtor(&false_bstr
);
5984 MSVCP_basic_string_char_dtor(&true_bstr
);
5988 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5989 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5991 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5994 *state
|= IOSTATE_failbit
;
5998 *state
|= IOSTATE_eofbit
;
5999 memcpy(ret
, &first
, sizeof(first
));
6003 /* ?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 */
6004 /* ?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 */
6005 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6006 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6007 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6009 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6010 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6013 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6014 locale_id num_put_char_id
= {0};
6016 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6017 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6019 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6020 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6021 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6022 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6024 TRACE("(%p %p)\n", this, locinfo
);
6025 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6028 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6029 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6030 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6031 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6033 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6035 locale_facet_ctor_refs(&this->facet
, refs
);
6036 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6038 num_put_char__Init(this, locinfo
);
6042 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6043 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6044 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6045 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6049 TRACE("(%p %lu)\n", this, refs
);
6051 _Locinfo_ctor(&locinfo
);
6052 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
6053 _Locinfo_dtor(&locinfo
);
6057 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6058 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6059 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
6060 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
6062 return num_put_char_ctor_refs(this, 0);
6065 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6066 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6067 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
6068 void __thiscall
num_put_char_dtor(num_put
*this)
6070 TRACE("(%p)\n", this);
6071 locale_facet_dtor(&this->facet
);
6074 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
6075 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
6077 TRACE("(%p %x)\n", this, flags
);
6079 /* we have an array, with the number of elements stored before the first object */
6080 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6082 for(i
=*ptr
-1; i
>=0; i
--)
6083 num_put_char_dtor(this+i
);
6084 MSVCRT_operator_delete(ptr
);
6086 num_put_char_dtor(this);
6088 MSVCRT_operator_delete(this);
6094 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6095 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6096 static MSVCP_size_t
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6098 TRACE("(%p %p)\n", facet
, loc
);
6100 if(facet
&& !*facet
) {
6103 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6105 ERR("Out of memory\n");
6106 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6110 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6111 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6112 _Locinfo_dtor(&locinfo
);
6118 num_put
* num_put_char_use_facet(const locale
*loc
)
6120 static num_put
*obj
= NULL
;
6123 const locale_facet
*fac
;
6125 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6126 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
6128 _Lockit_dtor(&lock
);
6129 return (num_put
*)fac
;
6133 _Lockit_dtor(&lock
);
6137 num_put_char__Getcat(&fac
, loc
);
6138 obj
= (num_put
*)fac
;
6139 locale_facet__Incref(&obj
->facet
);
6140 locale_facet_register(&obj
->facet
);
6141 _Lockit_dtor(&lock
);
6146 /* ?_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 */
6147 /* ?_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 */
6148 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
6149 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6151 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6153 for(; count
>0; count
--)
6154 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6160 /* ?_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 */
6161 /* ?_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 */
6162 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
6163 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6165 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6167 for(; count
>0; count
--)
6168 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6174 /* ?_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 */
6175 /* ?_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 */
6176 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
6177 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
6179 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6183 /* ?_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 */
6184 /* ?_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 */
6185 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
6186 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
6188 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6190 for(; count
>0; count
--)
6191 ostreambuf_iterator_char_put(&dest
, c
);
6197 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
6198 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6199 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6201 int type
= fmtfl
& FMTFLAG_floatfield
;
6204 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6207 if(fmtfl
& FMTFLAG_showpos
)
6209 if(fmtfl
& FMTFLAG_showbase
)
6216 if(type
== FMTFLAG_fixed
)
6218 else if(type
== FMTFLAG_scientific
)
6219 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6220 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6221 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6223 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6229 /* ?_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 */
6230 /* ?_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 */
6231 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6232 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
6233 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6235 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6236 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6240 /* TODO: This function should be removed when num_put_char__Fput is implemented */
6241 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6242 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6244 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6245 basic_string_char grouping_bstr
;
6246 const char *grouping
;
6247 char *p
, sep
= *localeconv()->decimal_point
;
6248 int cur_group
= 0, group_size
= 0;
6249 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6252 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6254 /* Change decimal point */
6255 for(p
=buf
; p
<buf
+count
; p
++) {
6257 *p
= numpunct_char_decimal_point(numpunct
);
6263 /* Add separators to number */
6264 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6265 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6266 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6268 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6270 if(group_size
== grouping
[cur_group
]) {
6272 if(grouping
[cur_group
+1])
6275 memmove(p
+1, p
, buf
+count
-p
);
6280 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6282 /* Display number with padding */
6283 if(count
>= base
->wide
)
6286 pad
= base
->wide
-count
;
6289 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6290 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6293 if(adjustfield
!= FMTFLAG_left
) {
6294 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6297 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6298 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6301 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
6302 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6303 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6305 int base
= fmtfl
& FMTFLAG_basefield
;
6308 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6311 if(fmtfl
& FMTFLAG_showpos
)
6313 if(fmtfl
& FMTFLAG_showbase
)
6320 if(base
== FMTFLAG_oct
)
6322 else if(base
== FMTFLAG_hex
)
6323 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6331 /* ?_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 */
6332 /* ?_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 */
6333 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6334 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6336 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6337 basic_string_char grouping_bstr
;
6338 const char *grouping
;
6340 int cur_group
= 0, group_size
= 0;
6341 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6344 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6346 /* Add separators to number */
6347 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6348 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6349 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6351 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6353 if(group_size
== grouping
[cur_group
]) {
6355 if(grouping
[cur_group
+1])
6358 memmove(p
+1, p
, buf
+count
-p
);
6363 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6365 /* Display number with padding */
6366 if(count
>= base
->wide
)
6369 pad
= base
->wide
-count
;
6372 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6373 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6375 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6376 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
6379 if(adjustfield
!= FMTFLAG_left
) {
6380 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6383 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6384 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6387 /* ?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 */
6388 /* ?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 */
6389 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
6390 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
6391 (this, ret, dest, base, fill, v))
6392 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
6393 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6394 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6396 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6397 char fmt
[7]; /* strlen("%+#lld")+1 */
6399 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6401 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6402 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6405 /* ?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 */
6406 /* ?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 */
6407 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
6408 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6409 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6411 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6412 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
6415 /* ?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 */
6416 /* ?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 */
6417 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
6418 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
6419 (this, ret, dest, base, fill, v))
6420 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
6421 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6422 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6424 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6425 char fmt
[7]; /* strlen("%+#lld")+1 */
6427 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6429 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6430 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6433 /* ?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 */
6434 /* ?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 */
6435 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
6436 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6437 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6439 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6440 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6443 /* ?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 */
6444 /* ?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 */
6445 /* ?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 */
6446 /* ?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 */
6447 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
6448 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6449 (this, ret, dest, base, fill, v))
6450 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
6451 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6452 (this, ret, dest, base, fill, v))
6453 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
6454 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6455 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6458 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6461 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6463 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6464 size
= _scprintf(fmt
, base
->prec
, v
);
6466 /* TODO: don't use dynamic allocation */
6467 tmp
= MSVCRT_operator_new(size
*2);
6469 ERR("Out of memory\n");
6470 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6472 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
));
6473 MSVCRT_operator_delete(tmp
);
6477 /* ?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 */
6478 /* ?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 */
6479 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
6480 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6481 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6483 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6484 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
6487 /* ?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 */
6488 /* ?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 */
6489 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
6490 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
6491 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6493 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6494 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6497 /* ?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 */
6498 /* ?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 */
6499 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
6500 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
6501 (this, ret, dest, base, fill, v))
6502 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
6503 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6504 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6506 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6508 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6510 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6513 /* ?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 */
6514 /* ?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 */
6515 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
6516 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6517 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6519 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6520 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
6523 /* ?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 */
6524 /* ?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 */
6525 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
6526 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
6527 (this, ret, dest, base, fill, v))
6528 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
6529 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6530 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6532 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6533 char fmt
[7]; /* strlen("%+#lld")+1 */
6535 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6537 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6538 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
6541 /* ?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 */
6542 /* ?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 */
6543 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
6544 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6545 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6547 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6548 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
6551 /* ?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 */
6552 /* ?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 */
6553 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
6554 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
6555 (this, ret, dest, base, fill, v))
6556 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
6557 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6558 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6560 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6561 char fmt
[7]; /* strlen("%+#lld")+1 */
6563 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6565 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6566 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
6569 /* ?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 */
6570 /* ?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 */
6571 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
6572 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6573 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6575 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6576 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
6579 /* ?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 */
6580 /* ?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 */
6581 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
6582 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
6583 (this, ret, dest, base, fill, v))
6584 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
6585 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6586 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6588 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6590 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6591 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6592 basic_string_char str
;
6593 MSVCP_size_t pad
, len
;
6596 numpunct_char_truename(numpunct
, &str
);
6598 numpunct_char_falsename(numpunct
, &str
);
6600 len
= MSVCP_basic_string_char_length(&str
);
6601 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
6604 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6605 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
6608 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
6609 MSVCP_basic_string_char_dtor(&str
);
6610 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6613 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
6616 /* ?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 */
6617 /* ?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 */
6618 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
6619 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6620 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6622 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6623 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
6626 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
6627 locale_id num_put_wchar_id
= {0};
6628 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
6629 locale_id num_put_short_id
= {0};
6631 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
6632 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
6633 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
6634 extern const vtable_ptr MSVCP_num_put_short_vtable
;
6636 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6637 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6638 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
6639 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
6641 TRACE("(%p %p)\n", this, locinfo
);
6642 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6645 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6646 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6647 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
6648 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6650 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6652 locale_facet_ctor_refs(&this->facet
, refs
);
6653 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
6655 num_put_wchar__Init(this, locinfo
);
6659 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6660 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6661 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
6662 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6664 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
6665 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6669 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
6670 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
6671 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
6672 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6676 TRACE("(%p %lu)\n", this, refs
);
6678 _Locinfo_ctor(&locinfo
);
6679 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
6680 _Locinfo_dtor(&locinfo
);
6684 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
6685 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
6686 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
6687 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6689 num_put_wchar_ctor_refs(this, refs
);
6690 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6694 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
6695 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
6696 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
6697 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
6699 return num_put_wchar_ctor_refs(this, 0);
6702 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
6703 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
6704 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
6705 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
6707 return num_put_short_ctor_refs(this, 0);
6710 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
6711 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
6712 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
6713 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
6714 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
6715 void __thiscall
num_put_wchar_dtor(num_put
*this)
6717 TRACE("(%p)\n", this);
6718 locale_facet_dtor(&this->facet
);
6721 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
6722 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
6724 TRACE("(%p %x)\n", this, flags
);
6726 /* we have an array, with the number of elements stored before the first object */
6727 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6729 for(i
=*ptr
-1; i
>=0; i
--)
6730 num_put_wchar_dtor(this+i
);
6731 MSVCRT_operator_delete(ptr
);
6733 num_put_wchar_dtor(this);
6735 MSVCRT_operator_delete(this);
6741 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6742 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6743 static MSVCP_size_t
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
6745 TRACE("(%p %p)\n", facet
, loc
);
6747 if(facet
&& !*facet
) {
6750 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6752 ERR("Out of memory\n");
6753 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6757 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6758 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6759 _Locinfo_dtor(&locinfo
);
6765 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6766 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6767 static MSVCP_size_t
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
6769 TRACE("(%p %p)\n", facet
, loc
);
6771 if(facet
&& !*facet
) {
6774 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6776 ERR("Out of memory\n");
6777 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6781 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6782 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6783 _Locinfo_dtor(&locinfo
);
6789 num_put
* num_put_wchar_use_facet(const locale
*loc
)
6791 static num_put
*obj
= NULL
;
6794 const locale_facet
*fac
;
6796 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6797 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
6799 _Lockit_dtor(&lock
);
6800 return (num_put
*)fac
;
6804 _Lockit_dtor(&lock
);
6808 num_put_wchar__Getcat(&fac
, loc
);
6809 obj
= (num_put
*)fac
;
6810 locale_facet__Incref(&obj
->facet
);
6811 locale_facet_register(&obj
->facet
);
6812 _Lockit_dtor(&lock
);
6817 num_put
* num_put_short_use_facet(const locale
*loc
)
6819 static num_put
*obj
= NULL
;
6822 const locale_facet
*fac
;
6824 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6825 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
6827 _Lockit_dtor(&lock
);
6828 return (num_put
*)fac
;
6832 _Lockit_dtor(&lock
);
6836 num_put_short__Getcat(&fac
, loc
);
6837 obj
= (num_put
*)fac
;
6838 locale_facet__Incref(&obj
->facet
);
6839 locale_facet_register(&obj
->facet
);
6840 _Lockit_dtor(&lock
);
6845 /* ?_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 */
6846 /* ?_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 */
6847 /* ?_Put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBGI@Z */
6848 /* ?_Put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBG_K@Z */
6849 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6850 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
6852 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
6854 for(; count
>0; count
--)
6855 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
6861 /* ?_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 */
6862 /* ?_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 */
6863 /* ?_Putc@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBDI@Z */
6864 /* ?_Putc@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBD_K@Z */
6865 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6866 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
6871 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
6873 for(; count
>0; count
--) {
6874 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
6875 ostreambuf_iterator_wchar_put(&dest
, ch
);
6882 /* ?_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 */
6883 /* ?_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 */
6884 /* ?_Putgrouped@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBDIG@Z */
6885 /* ?_Putgrouped@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBD_KG@Z */
6886 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6887 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
6889 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6893 /* ?_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 */
6894 /* ?_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 */
6895 /* ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@GI@Z */
6896 /* ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z */
6897 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6898 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
6900 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6902 for(; count
>0; count
--)
6903 ostreambuf_iterator_wchar_put(&dest
, c
);
6909 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
6910 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6911 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
6912 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6913 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6915 int type
= fmtfl
& FMTFLAG_floatfield
;
6918 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6921 if(fmtfl
& FMTFLAG_showpos
)
6923 if(fmtfl
& FMTFLAG_showbase
)
6930 if(type
== FMTFLAG_fixed
)
6932 else if(type
== FMTFLAG_scientific
)
6933 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6934 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6935 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6937 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6943 /* ?_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 */
6944 /* ?_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 */
6945 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6946 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
6947 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6949 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6950 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6954 /* ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBDIIII@Z */
6955 /* ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBD_K333@Z */
6956 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6957 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
6958 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6960 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6961 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6965 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
6966 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6967 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
6968 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
6970 basic_string_char grouping_bstr
;
6971 const char *grouping
;
6972 char *p
, dec_point
= *localeconv()->decimal_point
;
6974 int cur_group
= 0, group_size
= 0;
6975 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6976 MSVCP_size_t i
, pad
;
6978 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6980 for(p
=buf
; p
<buf
+count
; p
++) {
6986 /* Add separators to number */
6987 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
6988 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6989 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
6991 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6993 if(group_size
== grouping
[cur_group
]) {
6995 if(grouping
[cur_group
+1])
6998 memmove(p
+1, p
, buf
+count
-p
);
6999 *p
= '\0'; /* mark thousands separator positions */
7003 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7005 /* Display number with padding */
7006 if(count
>= base
->wide
)
7009 pad
= base
->wide
-count
;
7012 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7013 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7016 if(adjustfield
!= FMTFLAG_left
) {
7017 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7021 for(i
=0; i
<count
; i
++) {
7022 if(buf
[i
] == dec_point
)
7023 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
7025 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7027 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7030 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7033 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
7034 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7035 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
7036 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7037 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7039 int base
= fmtfl
& FMTFLAG_basefield
;
7042 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7045 if(fmtfl
& FMTFLAG_showpos
)
7047 if(fmtfl
& FMTFLAG_showbase
)
7054 if(base
== FMTFLAG_oct
)
7056 else if(base
== FMTFLAG_hex
)
7057 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7065 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7066 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
7067 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7069 basic_string_char grouping_bstr
;
7070 const char *grouping
;
7073 int cur_group
= 0, group_size
= 0;
7074 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7075 MSVCP_size_t i
, pad
;
7077 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7079 /* Add separators to number */
7080 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7081 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7082 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7084 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7086 if(group_size
== grouping
[cur_group
]) {
7088 if(grouping
[cur_group
+1])
7091 memmove(p
+1, p
, buf
+count
-p
);
7092 *p
= '\0'; /* mark thousands separator positions */
7096 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7098 /* Display number with padding */
7099 if(count
>= base
->wide
)
7102 pad
= base
->wide
-count
;
7105 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7106 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7108 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7109 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
7112 if(adjustfield
!= FMTFLAG_left
) {
7113 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7117 for(i
=0; i
<count
; i
++) {
7119 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7121 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7124 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7127 /* ?_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 */
7128 /* ?_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 */
7129 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7130 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7132 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(base
->loc
));
7135 /* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPADI@Z */
7136 /* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEAD_K@Z */
7137 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7138 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7140 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(base
->loc
));
7143 /* ?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 */
7144 /* ?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 */
7145 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
7146 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
7147 (this, ret, dest, base, fill, v))
7148 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
7149 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7150 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7152 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7153 char fmt
[7]; /* strlen("%+#lld")+1 */
7155 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7157 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7158 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7161 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GJ@Z */
7162 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GJ@Z */
7163 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
7164 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7165 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7167 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7168 char fmt
[7]; /* strlen("%+#lld")+1 */
7170 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7172 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7173 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7176 /* ?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 */
7177 /* ?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 */
7178 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GJ@Z */
7179 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GJ@Z */
7180 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
7181 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7182 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7184 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7185 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
7188 /* ?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 */
7189 /* ?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 */
7190 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
7191 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
7192 (this, ret, dest, base, fill, v))
7193 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
7194 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7195 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7197 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7198 char fmt
[7]; /* strlen("%+#lld")+1 */
7200 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7202 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7203 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7206 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GK@Z */
7207 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GK@Z */
7208 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
7209 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7210 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7212 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7213 char fmt
[7]; /* strlen("%+#lld")+1 */
7215 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7217 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7218 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7221 /* ?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 */
7222 /* ?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 */
7223 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GK@Z */
7224 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GK@Z */
7225 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
7226 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7227 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7229 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7230 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7233 /* ?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 */
7234 /* ?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 */
7235 /* ?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 */
7236 /* ?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 */
7237 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
7238 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7239 (this, ret, dest, base, fill, v))
7240 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
7241 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7242 (this, ret, dest, base, fill, v))
7243 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
7244 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7245 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7248 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7251 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7253 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7254 size
= _scprintf(fmt
, base
->prec
, v
);
7256 /* TODO: don't use dynamic allocation */
7257 tmp
= MSVCRT_operator_new(size
*2);
7259 ERR("Out of memory\n");
7260 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7262 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7263 numpunct_wchar_use_facet(base
->loc
));
7264 MSVCRT_operator_delete(tmp
);
7268 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GN@Z */
7269 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GN@Z */
7270 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GO@Z */
7271 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GO@Z */
7272 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
7273 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7274 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7277 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7280 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7282 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7283 size
= _scprintf(fmt
, base
->prec
, v
);
7285 /* TODO: don't use dynamic allocation */
7286 tmp
= MSVCRT_operator_new(size
*2);
7288 ERR("Out of memory\n");
7289 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7291 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7292 numpunct_short_use_facet(base
->loc
));
7293 MSVCRT_operator_delete(tmp
);
7297 /* ?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 */
7298 /* ?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 */
7299 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GN@Z */
7300 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GN@Z */
7301 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
7302 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7303 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7305 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7306 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
7309 /* ?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 */
7310 /* ?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 */
7311 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GO@Z */
7312 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GO@Z */
7313 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
7314 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7315 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7317 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7318 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7321 /* ?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 */
7322 /* ?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 */
7323 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
7324 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
7325 (this, ret, dest, base, fill, v))
7326 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
7327 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7328 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7330 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7332 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7334 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7337 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBX@Z */
7338 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBX@Z */
7339 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
7340 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7341 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7343 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7345 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7347 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7350 /* ?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 */
7351 /* ?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 */
7352 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBX@Z */
7353 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBX@Z */
7354 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
7355 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7356 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7358 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7359 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7362 /* ?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 */
7363 /* ?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 */
7364 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
7365 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
7366 (this, ret, dest, base, fill, v))
7367 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
7368 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7369 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7371 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7372 char fmt
[7]; /* strlen("%+#lld")+1 */
7374 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7376 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7377 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7380 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_J@Z */
7381 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_J@Z */
7382 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
7383 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7384 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7386 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7387 char fmt
[7]; /* strlen("%+#lld")+1 */
7389 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7391 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7392 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7395 /* ?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 */
7396 /* ?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 */
7397 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_J@Z */
7398 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_J@Z */
7399 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
7400 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7401 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7403 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7404 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7407 /* ?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 */
7408 /* ?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 */
7409 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
7410 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
7411 (this, ret, dest, base, fill, v))
7412 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
7413 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7414 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7416 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7417 char fmt
[7]; /* strlen("%+#lld")+1 */
7419 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7421 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7422 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7425 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_K@Z */
7426 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_K@Z */
7427 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
7428 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7429 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7431 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7432 char fmt
[7]; /* strlen("%+#lld")+1 */
7434 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7436 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7437 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7440 /* ?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 */
7441 /* ?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 */
7442 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_K@Z */
7443 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_K@Z */
7444 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
7445 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7446 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7448 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7449 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7452 /* ?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 */
7453 /* ?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 */
7454 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
7455 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
7456 (this, ret, dest, base, fill, v))
7457 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
7458 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7459 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7461 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7463 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7464 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7465 basic_string_wchar str
;
7466 MSVCP_size_t pad
, len
;
7469 numpunct_wchar_truename(numpunct
, &str
);
7471 numpunct_wchar_falsename(numpunct
, &str
);
7473 len
= MSVCP_basic_string_wchar_length(&str
);
7474 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7477 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7478 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7481 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7482 MSVCP_basic_string_wchar_dtor(&str
);
7483 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7486 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7489 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_N@Z */
7490 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_N@Z */
7491 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
7492 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7493 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7495 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7497 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7498 numpunct_wchar
*numpunct
= numpunct_short_use_facet(base
->loc
);
7499 basic_string_wchar str
;
7500 MSVCP_size_t pad
, len
;
7503 numpunct_wchar_truename(numpunct
, &str
);
7505 numpunct_wchar_falsename(numpunct
, &str
);
7507 len
= MSVCP_basic_string_wchar_length(&str
);
7508 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7511 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7512 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7515 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7516 MSVCP_basic_string_wchar_dtor(&str
);
7517 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7520 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7523 /* ?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 */
7524 /* ?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 */
7525 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_N@Z */
7526 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_N@Z */
7527 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
7528 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7529 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7531 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7532 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7535 /* ??0_Locimp@locale@std@@AAE@_N@Z */
7536 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
7537 static locale__Locimp
* locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
7539 TRACE("(%p %d)\n", this, transparent
);
7541 memset(this, 0, sizeof(locale__Locimp
));
7542 locale_facet_ctor_refs(&this->facet
, 1);
7543 this->transparent
= transparent
;
7544 MSVCP_basic_string_char_ctor_cstr(&this->name
, "*");
7548 /* ??_F_Locimp@locale@std@@QAEXXZ */
7549 /* ??_F_Locimp@locale@std@@QEAAXXZ */
7550 static locale__Locimp
* locale__Locimp_ctor(locale__Locimp
*this)
7552 return locale__Locimp_ctor_transparent(this, FALSE
);
7555 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
7556 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
7557 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
7558 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7563 TRACE("(%p %p)\n", this, copy
);
7565 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7566 memcpy(this, copy
, sizeof(locale__Locimp
));
7567 locale_facet_ctor_refs(&this->facet
, 1);
7568 if(copy
->facetvec
) {
7569 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
7570 if(!this->facetvec
) {
7571 _Lockit_dtor(&lock
);
7572 ERR("Out of memory\n");
7573 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7576 for(i
=0; i
<this->facet_cnt
; i
++)
7577 if(this->facetvec
[i
])
7578 locale_facet__Incref(this->facetvec
[i
]);
7580 MSVCP_basic_string_char_copy_ctor(&this->name
, ©
->name
);
7581 _Lockit_dtor(&lock
);
7585 /* ??1_Locimp@locale@std@@MAE@XZ */
7586 /* ??1_Locimp@locale@std@@MEAA@XZ */
7587 static void locale__Locimp_dtor(locale__Locimp
*this)
7589 TRACE("(%p)\n", this);
7591 if(locale_facet__Decref(&this->facet
)) {
7593 for(i
=0; i
<this->facet_cnt
; i
++)
7594 if(this->facetvec
[i
] && locale_facet__Decref(this->facetvec
[i
]))
7595 call_locale_facet_vector_dtor(this->facetvec
[i
], 0);
7597 MSVCRT_operator_delete(this->facetvec
);
7598 MSVCP_basic_string_char_dtor(&this->name
);
7602 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
7603 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
7605 TRACE("(%p %x)\n", this, flags
);
7607 /* we have an array, with the number of elements stored before the first object */
7608 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7610 for(i
=*ptr
-1; i
>=0; i
--)
7611 locale__Locimp_dtor(this+i
);
7612 MSVCRT_operator_delete(ptr
);
7614 locale__Locimp_dtor(this);
7616 MSVCRT_operator_delete(this);
7622 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
7623 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
7624 static void locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
7628 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
7630 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7631 if(id
>= locimp
->facet_cnt
) {
7632 MSVCP_size_t new_size
= id
+1;
7633 locale_facet
**new_facetvec
;
7635 if(new_size
< locale_id__Id_cnt
+1)
7636 new_size
= locale_id__Id_cnt
+1;
7638 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
7640 _Lockit_dtor(&lock
);
7641 ERR("Out of memory\n");
7642 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7646 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
7647 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
7648 MSVCRT_operator_delete(locimp
->facetvec
);
7649 locimp
->facetvec
= new_facetvec
;
7650 locimp
->facet_cnt
= new_size
;
7653 if(locimp
->facetvec
[id
] && locale_facet__Decref(locimp
->facetvec
[id
]))
7654 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 0);
7656 locimp
->facetvec
[id
] = facet
;
7658 locale_facet__Incref(facet
);
7659 _Lockit_dtor(&lock
);
7662 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
7663 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
7664 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
7665 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
7667 locale__Locimp__Locimp_Addfac(this, facet
, id
);
7670 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7671 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7672 /* List of missing facets:
7673 * num_put, collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7675 static void locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7677 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7679 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
7683 ctype
= ctype_short_use_facet(loc
);
7685 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7687 ERR("Out of memory\n");
7688 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7690 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
7692 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
7695 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
7699 numget
= num_get_short_use_facet(loc
);
7701 numget
= MSVCRT_operator_new(sizeof(num_get
));
7703 ERR("Out of memory\n");
7704 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7706 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
7708 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
7711 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
7715 numput
= num_put_short_use_facet(loc
);
7717 numput
= MSVCRT_operator_new(sizeof(num_put
));
7719 ERR("Out of memory\n");
7720 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7722 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
7724 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
7727 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
7728 numpunct_wchar
*numpunct
;
7731 numpunct
= numpunct_short_use_facet(loc
);
7733 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7735 ERR("Out of memory\n");
7736 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7738 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7740 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
7743 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
7744 codecvt_wchar
*codecvt
;
7747 codecvt
= codecvt_short_use_facet(loc
);
7749 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7751 ERR("Out of memory\n");
7752 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7754 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
7756 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
7760 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7761 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7762 /* List of missing facets:
7763 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7765 static void locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7767 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7769 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
7773 ctype
= ctype_wchar_use_facet(loc
);
7775 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7777 ERR("Out of memory\n");
7778 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7780 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
7782 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
7785 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
7789 numget
= num_get_wchar_use_facet(loc
);
7791 numget
= MSVCRT_operator_new(sizeof(num_get
));
7793 ERR("Out of memory\n");
7794 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7796 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
7798 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
7801 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
7805 numput
= num_put_wchar_use_facet(loc
);
7807 numput
= MSVCRT_operator_new(sizeof(num_put
));
7809 ERR("Out of memory\n");
7810 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7812 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
7814 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
7817 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
7818 numpunct_wchar
*numpunct
;
7821 numpunct
= numpunct_wchar_use_facet(loc
);
7823 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7825 ERR("Out of memory\n");
7826 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7828 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7830 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
7833 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
7834 codecvt_wchar
*codecvt
;
7837 codecvt
= codecvt_wchar_use_facet(loc
);
7839 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7841 ERR("Out of memory\n");
7842 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7844 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
7846 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
7850 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7851 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7852 /* List of missing facets:
7853 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7855 static void locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7857 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7859 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
7863 ctype
= ctype_char_use_facet(loc
);
7865 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
7867 ERR("Out of memory\n");
7868 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7870 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
7872 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
7875 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
7879 numget
= num_get_char_use_facet(loc
);
7881 numget
= MSVCRT_operator_new(sizeof(num_get
));
7883 ERR("Out of memory\n");
7884 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7886 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
7888 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
7891 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
7895 numput
= num_put_char_use_facet(loc
);
7897 numput
= MSVCRT_operator_new(sizeof(num_put
));
7899 ERR("Out of memory\n");
7900 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7902 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
7904 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
7907 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
7908 numpunct_char
*numpunct
;
7911 numpunct
= numpunct_char_use_facet(loc
);
7913 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
7915 ERR("Out of memory\n");
7916 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7918 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7920 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
7923 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
7924 codecvt_char
*codecvt
;
7927 codecvt
= codecvt_char_use_facet(loc
);
7929 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
7931 ERR("Out of memory\n");
7932 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7934 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
7936 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
7940 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
7941 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7942 static locale__Locimp
* locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7944 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
7946 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
7947 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
7948 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
7950 locimp
->catmask
|= cat
;
7951 MSVCP_basic_string_char_copy_ctor(&locimp
->name
, &locinfo
->newlocname
);
7955 /* ??_7_Locimp@locale@std@@6B@ */
7956 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
7957 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
7960 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
7961 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
7962 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
7963 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
7965 TRACE("(%p %p)\n", this, locimp
);
7966 /* Don't change locimp reference counter */
7971 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
7972 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
7973 locale__Locimp
* __cdecl
locale__Init(void)
7979 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7981 _Lockit_dtor(&lock
);
7982 return global_locale
;
7985 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7986 if(!global_locale
) {
7987 _Lockit_dtor(&lock
);
7988 ERR("Out of memory\n");
7989 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7993 locale__Locimp_ctor(global_locale
);
7994 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
7995 MSVCP_basic_string_char_dtor(&global_locale
->name
);
7996 MSVCP_basic_string_char_ctor_cstr(&global_locale
->name
, "C");
7998 locale__Locimp__Clocptr
= global_locale
;
7999 global_locale
->facet
.refs
++;
8000 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
8001 _Lockit_dtor(&lock
);
8003 return global_locale
;
8006 /* ??0locale@std@@QAE@ABV01@0H@Z */
8007 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
8008 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
8009 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
8013 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
8015 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8017 ERR("Out of memory\n");
8018 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8020 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
8022 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
8023 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, MSVCP_basic_string_char_c_str(&other
->ptr
->name
));
8024 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
8025 _Locinfo_dtor(&locinfo
);
8030 /* ??0locale@std@@QAE@ABV01@@Z */
8031 /* ??0locale@std@@QEAA@AEBV01@@Z */
8032 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
8033 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
8035 TRACE("(%p %p)\n", this, copy
);
8036 this->ptr
= copy
->ptr
;
8037 locale_facet__Incref(&this->ptr
->facet
);
8041 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
8042 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
8043 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
8044 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
8046 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
8050 /* ??0locale@std@@QAE@PBDH@Z */
8051 /* ??0locale@std@@QEAA@PEBDH@Z */
8052 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
8053 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
8057 TRACE("(%p %s %d)\n", this, locname
, cat
);
8059 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8061 ERR("Out of memory\n");
8062 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8064 locale__Locimp_ctor(this->ptr
);
8068 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
8069 if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
8070 _Locinfo_dtor(&locinfo
);
8071 MSVCRT_operator_delete(this->ptr
);
8072 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
8075 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
8076 _Locinfo_dtor(&locinfo
);
8081 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
8082 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
8083 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
8084 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
8086 TRACE("(%p)\n", this);
8091 /* ??0locale@std@@QAE@XZ */
8092 /* ??0locale@std@@QEAA@XZ */
8093 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
8094 locale
* __thiscall
locale_ctor(locale
*this)
8096 TRACE("(%p)\n", this);
8097 this->ptr
= locale__Init();
8098 locale_facet__Incref(&this->ptr
->facet
);
8102 /* ??1locale@std@@QAE@XZ */
8103 /* ??1locale@std@@QEAA@XZ */
8104 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
8105 void __thiscall
locale_dtor(locale
*this)
8107 TRACE("(%p)\n", this);
8109 locale__Locimp_dtor(this->ptr
);
8112 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
8113 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
8114 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
8115 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
8117 FIXME("(%p %p) stub\n", this, loc
);
8121 /* ??8locale@std@@QBE_NABV01@@Z */
8122 /* ??8locale@std@@QEBA_NAEBV01@@Z */
8123 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
8124 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
8126 FIXME("(%p %p) stub\n", this, loc
);
8130 /* ??9locale@std@@QBE_NABV01@@Z */
8131 /* ??9locale@std@@QEBA_NAEBV01@@Z */
8132 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
8133 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
8135 FIXME("(%p %p) stub\n", this, loc
);
8139 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
8140 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
8141 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
8142 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
8144 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
8146 if(this->ptr
->facet
.refs
> 1) {
8147 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8149 ERR("Out of memory\n");
8150 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8153 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
8154 locale_facet__Decref(&this->ptr
->facet
);
8155 this->ptr
= new_ptr
;
8158 locale__Locimp__Addfac(this->ptr
, facet
, id
);
8161 MSVCP_basic_string_char_dtor(&this->ptr
->name
);
8162 MSVCP_basic_string_char_ctor_cstr(&this->ptr
->name
, "*");
8167 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
8168 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
8169 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
8170 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
8174 TRACE("(%p %lu)\n", this, id
);
8176 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
8177 if(fac
|| !this->ptr
->transparent
)
8180 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
8183 /* ?classic@locale@std@@SAABV12@XZ */
8184 /* ?classic@locale@std@@SAAEBV12@XZ */
8185 const locale
* __cdecl
locale_classic(void)
8189 return &classic_locale
;
8192 /* ?empty@locale@std@@SA?AV12@XZ */
8193 locale
* __cdecl
locale_empty(locale
*ret
)
8199 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8201 ERR("Out of memory\n");
8202 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8204 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
8208 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8209 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8210 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
8211 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
8213 TRACE( "(%p)\n", this);
8214 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
8218 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
8219 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
8220 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
8225 TRACE("(%p %p)\n", loc
, ret
);
8227 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8230 if(loc
->ptr
!= global_locale
) {
8231 locale_facet__Decref(&global_locale
->facet
);
8232 global_locale
= loc
->ptr
;
8233 locale_facet__Incref(&global_locale
->facet
);
8235 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
8236 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
8238 setlocale(i
, MSVCP_basic_string_char_c_str(&global_locale
->name
));
8241 _Lockit_dtor(&lock
);
8245 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@");
8246 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@");
8247 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@");
8248 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@");
8249 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@");
8250 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@");
8251 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@");
8252 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@");
8253 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@");
8254 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@");
8255 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@");
8256 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@");
8257 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@");
8258 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@");
8259 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@");
8260 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@@");
8261 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@@");
8262 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@@");
8263 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@@");
8264 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@@");
8265 DEFINE_RTTI_DATA1(num_put_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@");
8268 void __asm_dummy_vtables(void) {
8270 __ASM_VTABLE(locale_facet
,
8271 VTABLE_ADD_FUNC(locale_facet_vector_dtor
));
8272 __ASM_VTABLE(collate_char
,
8273 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
8274 VTABLE_ADD_FUNC(collate_char_do_compare
)
8275 VTABLE_ADD_FUNC(collate_char_do_transform
)
8276 VTABLE_ADD_FUNC(collate_char_do_hash
));
8277 __ASM_VTABLE(collate_wchar
,
8278 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8279 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8280 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8281 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8282 __ASM_VTABLE(collate_short
,
8283 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8284 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8285 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8286 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8287 __ASM_VTABLE(ctype_base
,
8288 VTABLE_ADD_FUNC(ctype_base_vector_dtor
));
8289 __ASM_VTABLE(ctype_char
,
8290 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
8291 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
8292 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
8293 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
8294 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
8295 VTABLE_ADD_FUNC(ctype_char_do_widen
)
8296 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
8297 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
8298 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
));
8299 __ASM_VTABLE(ctype_wchar
,
8300 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8301 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8302 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8303 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8304 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8305 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8306 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8307 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8308 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8309 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8310 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8311 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8312 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8313 __ASM_VTABLE(ctype_short
,
8314 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8315 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8316 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8317 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8318 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8319 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8320 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8321 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8322 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8323 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8324 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8325 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8326 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8327 __ASM_VTABLE(codecvt_base
,
8328 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
8329 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8330 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8331 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
8332 __ASM_VTABLE(codecvt_char
,
8333 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
8334 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8335 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8336 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8337 VTABLE_ADD_FUNC(codecvt_char_do_in
)
8338 VTABLE_ADD_FUNC(codecvt_char_do_out
)
8339 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
8340 VTABLE_ADD_FUNC(codecvt_char_do_length
));
8341 __ASM_VTABLE(codecvt_wchar
,
8342 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8343 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8344 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8345 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8346 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8347 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8348 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8349 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8350 __ASM_VTABLE(codecvt_short
,
8351 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8352 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8353 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8354 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8355 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8356 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8357 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8358 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8359 __ASM_VTABLE(numpunct_char
,
8360 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
8361 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
8362 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
8363 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
8364 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
8365 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
8366 __ASM_VTABLE(numpunct_wchar
,
8367 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8368 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8369 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8370 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8371 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8372 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8373 __ASM_VTABLE(numpunct_short
,
8374 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8375 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8376 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8377 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8378 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8379 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8380 __ASM_VTABLE(num_get_char
,
8381 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
8382 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
8383 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8384 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8385 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
8386 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
8387 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
8388 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
8389 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
8390 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
8391 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
8392 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
8393 __ASM_VTABLE(num_get_short
,
8394 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8395 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
8396 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8397 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8398 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
8399 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
8400 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
8401 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
8402 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
8403 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
8404 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
8405 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
8406 __ASM_VTABLE(num_get_wchar
,
8407 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8408 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
8409 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8410 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8411 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
8412 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
8413 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
8414 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
8415 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
8416 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
8417 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
8418 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
8419 __ASM_VTABLE(num_put_char
,
8420 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
8421 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
8422 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8423 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8424 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
8425 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
8426 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
8427 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
8428 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
8429 __ASM_VTABLE(num_put_wchar
,
8430 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8431 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
8432 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8433 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8434 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
8435 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
8436 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
8437 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
8438 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
8439 __ASM_VTABLE(num_put_short
,
8440 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8441 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
8442 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8443 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8444 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
8445 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
8446 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
8447 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
8448 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
8453 void init_locale(void *base
)
8456 init_locale_facet_rtti(base
);
8457 init_collate_char_rtti(base
);
8458 init_collate_wchar_rtti(base
);
8459 init_collate_short_rtti(base
);
8460 init_ctype_base_rtti(base
);
8461 init_ctype_char_rtti(base
);
8462 init_ctype_wchar_rtti(base
);
8463 init_ctype_short_rtti(base
);
8464 init_codecvt_base_rtti(base
);
8465 init_codecvt_char_rtti(base
);
8466 init_codecvt_wchar_rtti(base
);
8467 init_codecvt_short_rtti(base
);
8468 init_numpunct_char_rtti(base
);
8469 init_numpunct_wchar_rtti(base
);
8470 init_numpunct_short_rtti(base
);
8471 init_num_get_char_rtti(base
);
8472 init_num_get_wchar_rtti(base
);
8473 init_num_get_short_rtti(base
);
8474 init_num_put_char_rtti(base
);
8475 init_num_put_wchar_rtti(base
);
8476 init_num_put_short_rtti(base
);
8480 void free_locale(void)
8482 facets_elem
*iter
, *safe
;
8485 locale__Locimp_dtor(global_locale
);
8486 locale_dtor(&classic_locale
);
8489 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
8490 list_remove(&iter
->entry
);
8491 if(locale_facet__Decref(iter
->fac
))
8492 call_locale_facet_vector_dtor(iter
->fac
, 1);
8493 MSVCRT_operator_delete(iter
);