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 static const locale_facet
* locale__Getfacet(const locale
*, MSVCP_size_t
);
52 typedef struct _locale__Locimp
{
54 locale_facet
**facetvec
;
55 MSVCP_size_t facet_cnt
;
57 MSVCP_bool transparent
;
58 basic_string_char name
;
67 basic_string_char days
;
68 basic_string_char months
;
69 basic_string_char oldlocname
;
70 basic_string_char newlocname
;
88 const char *false_name
;
89 const char *true_name
;
97 const wchar_t *false_name
;
98 const wchar_t *true_name
;
101 /* ?_Id_cnt@id@locale@std@@0HA */
102 int locale_id__Id_cnt
= 0;
104 static locale__Locimp
*global_locale
;
105 static locale classic_locale
;
107 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
108 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
109 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
111 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
113 if(this->strbuf
&& !this->got
) {
114 int c
= basic_streambuf_char_sgetc(this->strbuf
);
125 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
127 if(this->strbuf
&& !this->got
) {
128 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
139 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
141 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
146 istreambuf_iterator_char_val(this);
150 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
152 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
157 istreambuf_iterator_wchar_val(this);
161 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
163 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
167 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
169 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
173 /* ??1facet@locale@std@@UAE@XZ */
174 /* ??1facet@locale@std@@UEAA@XZ */
175 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
176 void __thiscall
locale_facet_dtor(locale_facet
*this)
178 TRACE("(%p)\n", this);
181 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
182 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
183 locale_facet*, (locale_facet*, unsigned int), (this, flags))
184 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
186 TRACE("(%p %x)\n", this, flags
);
188 /* we have an array, with the number of elements stored before the first object */
189 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
191 for(i
=*ptr
-1; i
>=0; i
--)
192 locale_facet_dtor(this+i
);
193 MSVCRT_operator_delete(ptr
);
195 locale_facet_dtor(this);
197 MSVCRT_operator_delete(this);
208 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
210 /* Not exported from msvcp90 */
211 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
212 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
213 static void locale_facet_register(locale_facet
*add
)
215 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
217 ERR("Out of memory\n");
218 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
222 list_add_head(&lazy_facets
, &head
->entry
);
225 /* Not exported from msvcp90 */
226 /* ??_7facet@locale@std@@6B@ */
227 extern const vtable_ptr MSVCP_locale_facet_vtable
;
229 /* ??Bid@locale@std@@QAEIXZ */
230 /* ??Bid@locale@std@@QEAA_KXZ */
231 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
232 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
236 TRACE("(%p)\n", this);
239 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
240 this->id
= ++locale_id__Id_cnt
;
247 /* ??_Ffacet@locale@std@@QAEXXZ */
248 /* ??_Ffacet@locale@std@@QEAAXXZ */
249 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
250 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
252 TRACE("(%p)\n", this);
253 this->vtable
= &MSVCP_locale_facet_vtable
;
258 /* ??0facet@locale@std@@IAE@I@Z */
259 /* ??0facet@locale@std@@IEAA@_K@Z */
260 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
261 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
263 TRACE("(%p %lu)\n", this, refs
);
264 this->vtable
= &MSVCP_locale_facet_vtable
;
269 /* ?_Incref@facet@locale@std@@QAEXXZ */
270 /* ?_Incref@facet@locale@std@@QEAAXXZ */
271 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
272 void __thiscall
locale_facet__Incref(locale_facet
*this)
276 TRACE("(%p)\n", this);
278 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
283 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
284 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
285 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
286 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
291 TRACE("(%p)\n", this);
293 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
297 ret
= this->refs
? NULL
: this;
303 /* ??0_Timevec@std@@QAE@ABV01@@Z */
304 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
305 /* This copy constructor modifies copied object */
306 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
307 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
309 TRACE("(%p %p)\n", this, copy
);
310 this->timeptr
= copy
->timeptr
;
311 copy
->timeptr
= NULL
;
315 /* ??0_Timevec@std@@QAE@PAX@Z */
316 /* ??0_Timevec@std@@QEAA@PEAX@Z */
317 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
318 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
320 TRACE("(%p %p)\n", this, timeptr
);
321 this->timeptr
= timeptr
;
325 /* ??_F_Timevec@std@@QAEXXZ */
326 /* ??_F_Timevec@std@@QEAAXXZ */
327 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
328 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
330 TRACE("(%p)\n", this);
331 this->timeptr
= NULL
;
335 /* ??1_Timevec@std@@QAE@XZ */
336 /* ??1_Timevec@std@@QEAA@XZ */
337 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
338 void __thiscall
_Timevec_dtor(_Timevec
*this)
340 TRACE("(%p)\n", this);
344 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
345 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
346 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
347 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
349 TRACE("(%p %p)\n", this, right
);
350 this->timeptr
= right
->timeptr
;
351 right
->timeptr
= NULL
;
355 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
356 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
357 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
358 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
360 TRACE("(%p)\n", this);
361 return this->timeptr
;
364 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
365 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
366 static _Locinfo
* _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
368 const char *locale
= NULL
;
370 /* This function is probably modifying more global objects */
371 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
374 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
376 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
377 basic_string_char_ctor_cstr(&locinfo
->days
, "");
378 basic_string_char_ctor_cstr(&locinfo
->months
, "");
379 basic_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
382 locale
= setlocale(LC_ALL
, locstr
);
384 locale
= setlocale(LC_ALL
, NULL
);
387 basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
389 basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
394 /* ??0_Locinfo@std@@QAE@HPBD@Z */
395 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
396 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
397 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
399 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
402 /* ??0_Locinfo@std@@QAE@PBD@Z */
403 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
404 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
405 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
407 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
410 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
411 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
412 static void _Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
414 TRACE("(%p)\n", locinfo
);
416 setlocale(LC_ALL
, basic_string_char_c_str(&locinfo
->oldlocname
));
417 basic_string_char_dtor(&locinfo
->days
);
418 basic_string_char_dtor(&locinfo
->months
);
419 basic_string_char_dtor(&locinfo
->oldlocname
);
420 basic_string_char_dtor(&locinfo
->newlocname
);
421 _Lockit_dtor(&locinfo
->lock
);
424 /* ??_F_Locinfo@std@@QAEXXZ */
425 /* ??_F_Locinfo@std@@QEAAXXZ */
426 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
427 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
429 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
432 /* ??1_Locinfo@std@@QAE@XZ */
433 /* ??1_Locinfo@std@@QEAA@XZ */
434 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
435 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
437 _Locinfo__Locinfo_dtor(this);
440 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
441 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
442 static _Locinfo
* _Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
444 const char *locale
= NULL
;
446 /* This function is probably modifying more global objects */
447 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
449 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
451 basic_string_char_dtor(&locinfo
->newlocname
);
454 locale
= setlocale(LC_ALL
, locstr
);
456 locale
= setlocale(LC_ALL
, NULL
);
459 basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
461 basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
466 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
467 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
468 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
469 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
471 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
475 ULONGLONG __cdecl
_Getcoll(void)
481 _locale_t locale
= _get_current_locale();
485 ret
.collvec
.page
= locale
->locinfo
->lc_collate_cp
;
486 ret
.collvec
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
487 _free_locale(locale
);
491 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
492 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
493 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
494 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
496 ULONGLONG ull
= _Getcoll();
497 memcpy(ret
, &ull
, sizeof(ull
));
502 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
504 _locale_t locale
= _get_current_locale();
509 ret
->page
= locale
->locinfo
->lc_codepage
;
510 ret
->handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
512 table
= malloc(sizeof(short[256]));
514 _free_locale(locale
);
515 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
517 memcpy(table
, locale
->locinfo
->pctype
, sizeof(short[256]));
519 _free_locale(locale
);
523 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
524 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
525 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
526 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
528 return _Getctype(ret
);
532 ULONGLONG __cdecl
_Getcvt(void)
534 _locale_t locale
= _get_current_locale();
542 ret
.cvtvec
.page
= locale
->locinfo
->lc_codepage
;
543 ret
.cvtvec
.handle
= locale
->locinfo
->lc_handle
[LC_CTYPE
];
544 _free_locale(locale
);
548 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
549 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
550 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
551 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
553 ULONGLONG ull
= _Getcvt();
554 memcpy(ret
, &ull
, sizeof(ull
));
558 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
559 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
560 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
561 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
563 char *days
= _Getdays();
565 TRACE("(%p)\n", this);
568 basic_string_char_dtor(&this->days
);
569 basic_string_char_ctor_cstr(&this->days
, days
);
573 return this->days
.size
? basic_string_char_c_str(&this->days
) :
574 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
577 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
578 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
579 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
580 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
582 char *months
= _Getmonths();
584 TRACE("(%p)\n", this);
587 basic_string_char_dtor(&this->months
);
588 basic_string_char_ctor_cstr(&this->months
, months
);
592 return this->months
.size
? basic_string_char_c_str(&this->months
) :
593 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
594 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
597 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
598 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
599 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
600 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
602 TRACE("(%p)\n", this);
606 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
607 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
608 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
609 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
611 TRACE("(%p)\n", this);
615 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
616 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
617 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
618 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
620 TRACE("(%p)\n", this);
624 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
625 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
626 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
627 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
629 TRACE("(%p)\n", this);
631 basic_string_char_copy_ctor(ret
, &this->newlocname
);
635 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
636 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
637 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
638 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
640 TRACE("(%p)\n", this);
642 _Timevec_ctor_timeptr(ret
, _Gettnames());
646 /* ?id@?$collate@D@std@@2V0locale@2@A */
647 locale_id collate_char_id
= {0};
649 /* ??_7?$collate@D@std@@6B@ */
650 extern const vtable_ptr MSVCP_collate_char_vtable
;
652 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
653 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
654 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
655 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
657 TRACE("(%p %p)\n", this, locinfo
);
658 _Locinfo__Getcoll(locinfo
, &this->coll
);
661 /* ??0?$collate@D@std@@IAE@PBDI@Z */
662 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
663 static collate
* collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
667 TRACE("(%p %s %lu)\n", this, name
, refs
);
669 locale_facet_ctor_refs(&this->facet
, refs
);
670 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
672 _Locinfo_ctor_cstr(&locinfo
, name
);
673 collate_char__Init(this, &locinfo
);
674 _Locinfo_dtor(&locinfo
);
678 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
679 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
680 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
681 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
683 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
685 locale_facet_ctor_refs(&this->facet
, refs
);
686 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
687 collate_char__Init(this, locinfo
);
691 /* ??0?$collate@D@std@@QAE@I@Z */
692 /* ??0?$collate@D@std@@QEAA@_K@Z */
693 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
694 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
696 return collate_char_ctor_name(this, "C", refs
);
699 /* ??1?$collate@D@std@@MAE@XZ */
700 /* ??1?$collate@D@std@@MEAA@XZ */
701 static void collate_char_dtor(collate
*this)
703 TRACE("(%p)\n", this);
706 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
707 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
709 TRACE("(%p %x)\n", this, flags
);
711 /* we have an array, with the number of elements stored before the first object */
712 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
714 for(i
=*ptr
-1; i
>=0; i
--)
715 collate_char_dtor(this+i
);
716 MSVCRT_operator_delete(ptr
);
718 collate_char_dtor(this);
720 MSVCRT_operator_delete(this);
726 /* ??_F?$collate@D@std@@QAEXXZ */
727 /* ??_F?$collate@D@std@@QEAAXXZ */
728 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
729 collate
* __thiscall
collate_char_ctor(collate
*this)
731 return collate_char_ctor_name(this, "C", 0);
735 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
736 const char *last2
, const _Collvec
*coll
)
740 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
745 lcid
= ___lc_handle_func()[LC_COLLATE
];
746 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
749 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
750 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
751 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
752 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
753 (const collate*, const char*, const char*, const char*, const char*), \
754 (this, first1, last1, first2, last2))
755 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
756 const char *last1
, const char *first2
, const char *last2
)
758 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
759 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
762 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
763 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
764 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
765 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
766 const char *last1
, const char *first2
, const char *last2
)
768 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
769 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
772 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
773 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
774 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
775 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
776 (const collate*, const char*, const char*), (this, first, last))
777 LONG __thiscall
collate_char_do_hash(const collate
*this,
778 const char *first
, const char *last
)
782 TRACE("(%p %p %p)\n", this, first
, last
);
784 for(; first
<last
; first
++)
785 ret
= (ret
<<8 | ret
>>24) + *first
;
789 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
790 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
791 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
792 LONG __thiscall
collate_char_hash(const collate
*this,
793 const char *first
, const char *last
)
795 TRACE("(%p %p %p)\n", this, first
, last
);
796 return call_collate_char_do_hash(this, first
, last
);
799 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
800 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
801 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
802 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
803 basic_string_char
*ret
, const char *first
, const char *last
)
805 FIXME("(%p %p %p) stub\n", this, first
, last
);
809 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
810 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
811 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
812 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
813 basic_string_char
*ret
, const char *first
, const char *last
)
815 FIXME("(%p %p %p) stub\n", this, first
, last
);
819 /* ?id@?$collate@G@std@@2V0locale@2@A */
820 locale_id collate_short_id
= {0};
822 /* ??_7?$collate@_W@std@@6B@ */
823 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
824 /* ??_7?$collate@G@std@@6B@ */
825 extern const vtable_ptr MSVCP_collate_short_vtable
;
827 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
828 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
829 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
830 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
831 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
832 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
834 TRACE("(%p %p)\n", this, locinfo
);
835 _Locinfo__Getcoll(locinfo
, &this->coll
);
838 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
839 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
840 static collate
* collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
844 TRACE("(%p %s %lu)\n", this, name
, refs
);
846 locale_facet_ctor_refs(&this->facet
, refs
);
847 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
849 _Locinfo_ctor_cstr(&locinfo
, name
);
850 collate_wchar__Init(this, &locinfo
);
851 _Locinfo_dtor(&locinfo
);
855 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
856 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
857 static collate
* collate_wchar_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
859 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
861 locale_facet_ctor_refs(&this->facet
, refs
);
862 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
863 collate_wchar__Init(this, locinfo
);
867 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
868 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
869 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
870 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
872 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
873 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
877 /* ??0?$collate@_W@std@@QAE@I@Z */
878 /* ??0?$collate@_W@std@@QEAA@_K@Z */
879 static collate
* collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
881 return collate_wchar_ctor_name(this, "C", refs
);
884 /* ??0?$collate@G@std@@QAE@I@Z */
885 /* ??0?$collate@G@std@@QEAA@_K@Z */
886 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
887 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
889 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
890 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
894 /* ??1?$collate@_W@std@@MAE@XZ */
895 /* ??1?$collate@_W@std@@MEAA@XZ */
896 /* ??1?$collate@G@std@@MAE@XZ */
897 /* ??1?$collate@G@std@@MEAA@XZ */
898 static void collate_wchar_dtor(collate
*this)
900 TRACE("(%p)\n", this);
903 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
904 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
906 TRACE("(%p %x)\n", this, flags
);
908 /* we have an array, with the number of elements stored before the first object */
909 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
911 for(i
=*ptr
-1; i
>=0; i
--)
912 collate_wchar_dtor(this+i
);
913 MSVCRT_operator_delete(ptr
);
915 collate_wchar_dtor(this);
917 MSVCRT_operator_delete(this);
923 /* ??_F?$collate@_W@std@@QAEXXZ */
924 /* ??_F?$collate@_W@std@@QEAAXXZ */
925 static collate
* collate_wchar_ctor(collate
*this)
927 return collate_wchar_ctor_name(this, "C", 0);
930 /* ??_F?$collate@G@std@@QAEXXZ */
931 /* ??_F?$collate@G@std@@QEAAXXZ */
932 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
933 collate
* __thiscall
collate_short_ctor(collate
*this)
935 collate
*ret
= collate_wchar_ctor(this);
936 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
941 static int _Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
942 const wchar_t *last2
, const _Collvec
*coll
)
946 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
951 lcid
= ___lc_handle_func()[LC_COLLATE
];
952 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
955 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
956 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
957 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
958 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
959 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
960 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
961 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
962 (this, first1, last1, first2, last2))
963 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
964 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
966 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
967 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
970 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
971 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
972 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
973 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
974 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
975 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
976 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
978 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
979 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
982 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
983 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
984 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
985 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
986 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
987 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
988 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
989 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
990 const wchar_t *first
, const wchar_t *last
)
994 TRACE("(%p %p %p)\n", this, first
, last
);
996 for(; first
<last
; first
++)
997 ret
= (ret
<<8 | ret
>>24) + *first
;
1001 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1002 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1003 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1004 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1005 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1006 LONG __thiscall
collate_wchar_hash(const collate
*this,
1007 const wchar_t *first
, const wchar_t *last
)
1009 TRACE("(%p %p %p)\n", this, first
, last
);
1010 return call_collate_wchar_do_hash(this, first
, last
);
1013 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1014 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1015 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1016 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1017 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1018 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1019 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1021 FIXME("(%p %p %p) stub\n", this, first
, last
);
1025 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1026 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1027 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1028 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1029 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1030 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1031 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1033 FIXME("(%p %p %p) stub\n", this, first
, last
);
1037 /* ??_7ctype_base@std@@6B@ */
1038 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1040 /* ??0ctype_base@std@@QAE@I@Z */
1041 /* ??0ctype_base@std@@QEAA@_K@Z */
1042 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1043 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1045 TRACE("(%p %lu)\n", this, refs
);
1046 locale_facet_ctor_refs(&this->facet
, refs
);
1047 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1051 /* ??_Fctype_base@std@@QAEXXZ */
1052 /* ??_Fctype_base@std@@QEAAXXZ */
1053 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1054 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1056 TRACE("(%p)\n", this);
1057 locale_facet_ctor_refs(&this->facet
, 0);
1058 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1062 /* ??1ctype_base@std@@UAE@XZ */
1063 /* ??1ctype_base@std@@UEAA@XZ */
1064 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1065 void __thiscall
ctype_base_dtor(ctype_base
*this)
1067 TRACE("(%p)\n", this);
1070 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1071 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1073 TRACE("(%p %x)\n", this, flags
);
1075 /* we have an array, with the number of elements stored before the first object */
1076 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1078 for(i
=*ptr
-1; i
>=0; i
--)
1079 ctype_base_dtor(this+i
);
1080 MSVCRT_operator_delete(ptr
);
1082 ctype_base_dtor(this);
1084 MSVCRT_operator_delete(this);
1090 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1091 locale_id ctype_char_id
= {0};
1092 /* ?table_size@?$ctype@D@std@@2IB */
1093 /* ?table_size@?$ctype@D@std@@2_KB */
1094 MSVCP_size_t ctype_char_table_size
= 256;
1096 /* ??_7?$ctype@D@std@@6B@ */
1097 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1099 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1100 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1101 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1102 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1104 TRACE("(%p %p)\n", this, locinfo
);
1105 _Locinfo__Getctype(locinfo
, &this->ctype
);
1108 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1109 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1110 static void ctype_char__Tidy(ctype_char
*this)
1112 TRACE("(%p)\n", this);
1114 if(this->ctype
.delfl
)
1115 free((short*)this->ctype
.table
);
1118 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1119 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1120 const short* __cdecl
ctype_char_classic_table(void)
1123 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1126 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1127 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1128 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1129 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1130 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1132 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1133 ctype_base_ctor_refs(&this->base
, refs
);
1134 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1135 ctype_char__Init(this, locinfo
);
1139 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1140 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1141 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1142 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1143 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1147 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1149 ctype_base_ctor_refs(&this->base
, refs
);
1150 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1152 _Locinfo_ctor(&locinfo
);
1153 ctype_char__Init(this, &locinfo
);
1154 _Locinfo_dtor(&locinfo
);
1157 ctype_char__Tidy(this);
1158 this->ctype
.table
= table
;
1159 this->ctype
.delfl
= delete;
1164 /* ??_F?$ctype@D@std@@QAEXXZ */
1165 /* ??_F?$ctype@D@std@@QEAAXXZ */
1166 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1167 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1169 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1172 /* ??1?$ctype@D@std@@MAE@XZ */
1173 /* ??1?$ctype@D@std@@MEAA@XZ */
1174 static void ctype_char_dtor(ctype_char
*this)
1176 TRACE("(%p)\n", this);
1177 ctype_char__Tidy(this);
1180 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1181 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1183 TRACE("(%p %x)\n", this, flags
);
1185 /* we have an array, with the number of elements stored before the first object */
1186 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1188 for(i
=*ptr
-1; i
>=0; i
--)
1189 ctype_char_dtor(this+i
);
1190 MSVCRT_operator_delete(ptr
);
1192 ctype_char_dtor(this);
1194 MSVCRT_operator_delete(this);
1200 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1201 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1202 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1203 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1204 char, (const ctype_char*, char, char), (this, ch, unused))
1205 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1207 TRACE("(%p %c %c)\n", this, ch
, unused
);
1211 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1212 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1213 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1214 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1215 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1216 (this, first, last, unused, dest))
1217 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1218 const char *first
, const char *last
, char unused
, char *dest
)
1220 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1221 memcpy(dest
, first
, last
-first
);
1225 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1226 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1227 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1228 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1230 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1231 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1234 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1235 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1236 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1237 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1238 const char *first
, const char *last
, char dflt
, char *dest
)
1240 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1241 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1244 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1245 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1246 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1247 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1248 char, (const ctype_char*, char), (this, ch))
1249 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1251 TRACE("(%p %c)\n", this, ch
);
1255 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1256 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1257 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1258 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1259 const char*, (const ctype_char*, const char*, const char*, char*), \
1260 (this, first, last, dest))
1261 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1262 const char *first
, const char *last
, char *dest
)
1264 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1265 memcpy(dest
, first
, last
-first
);
1269 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1270 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1271 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1272 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1274 TRACE("(%p %c)\n", this, ch
);
1275 return call_ctype_char_do_widen_ch(this, ch
);
1278 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1279 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1280 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1281 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1282 const char *first
, const char *last
, char *dest
)
1284 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1285 return call_ctype_char_do_widen(this, first
, last
, dest
);
1288 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1289 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1290 static MSVCP_size_t
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1292 TRACE("(%p %p)\n", facet
, loc
);
1294 if(facet
&& !*facet
) {
1297 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1299 ERR("Out of memory\n");
1300 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1304 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
1305 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1306 _Locinfo_dtor(&locinfo
);
1312 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1314 static ctype_char
*obj
= NULL
;
1317 const locale_facet
*fac
;
1319 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1320 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1322 _Lockit_dtor(&lock
);
1323 return (ctype_char
*)fac
;
1327 _Lockit_dtor(&lock
);
1331 ctype_char__Getcat(&fac
, loc
);
1332 obj
= (ctype_char
*)fac
;
1333 locale_facet__Incref(&obj
->base
.facet
);
1334 locale_facet_register(&obj
->base
.facet
);
1335 _Lockit_dtor(&lock
);
1341 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1345 TRACE("%d %p\n", ch
, ctype
);
1350 cp
= ___lc_codepage_func();
1352 /* Don't convert to unicode in case of C locale */
1354 if(ch
>='A' && ch
<='Z')
1363 str
[0] = (ch
>>8) & 255;
1371 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1374 lower
= tolowerW(wide
);
1378 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1380 return str
[0] + (str
[1]<<8);
1384 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1385 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1386 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1387 char, (const ctype_char*, char), (this, ch))
1388 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1389 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1391 TRACE("(%p %c)\n", this, ch
);
1392 return _Tolower(ch
, &this->ctype
);
1395 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1396 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1397 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1398 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1399 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1400 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1402 TRACE("(%p %p %p)\n", this, first
, last
);
1403 for(; first
<last
; first
++)
1404 *first
= _Tolower(*first
, &this->ctype
);
1408 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1409 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1410 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1411 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1413 TRACE("(%p %c)\n", this, ch
);
1414 return call_ctype_char_do_tolower_ch(this, ch
);
1417 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1418 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1419 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1420 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1422 TRACE("(%p %p %p)\n", this, first
, last
);
1423 return call_ctype_char_do_tolower(this, first
, last
);
1427 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1431 TRACE("%d %p\n", ch
, ctype
);
1436 cp
= ___lc_codepage_func();
1438 /* Don't convert to unicode in case of C locale */
1440 if(ch
>='a' && ch
<='z')
1449 str
[0] = (ch
>>8) & 255;
1457 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1460 upper
= toupperW(wide
);
1464 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1466 return str
[0] + (str
[1]<<8);
1470 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1471 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1472 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1473 char, (const ctype_char*, char), (this, ch))
1474 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1475 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1477 TRACE("(%p %c)\n", this, ch
);
1478 return _Toupper(ch
, &this->ctype
);
1481 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1482 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1483 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1484 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1485 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1486 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1487 char *first
, const char *last
)
1489 TRACE("(%p %p %p)\n", this, first
, last
);
1490 for(; first
<last
; first
++)
1491 *first
= _Toupper(*first
, &this->ctype
);
1495 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1496 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1497 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1498 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1500 TRACE("(%p %c)\n", this, ch
);
1501 return call_ctype_char_do_toupper_ch(this, ch
);
1504 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1505 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1506 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1507 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1509 TRACE("(%p %p %p)\n", this, first
, last
);
1510 return call_ctype_char_do_toupper(this, first
, last
);
1513 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1514 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1515 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1516 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1518 TRACE("(%p %x %c)\n", this, mask
, ch
);
1519 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1522 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1523 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1524 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1525 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1527 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1528 for(; first
<last
; first
++)
1529 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1533 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1534 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1535 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1536 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1538 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1539 for(; first
<last
; first
++)
1540 if(!ctype_char_is_ch(this, mask
, *first
))
1545 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1546 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1547 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1548 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1550 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1551 for(; first
<last
; first
++)
1552 if(ctype_char_is_ch(this, mask
, *first
))
1557 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1558 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1559 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
1560 const short* __thiscall
ctype_char_table(const ctype_char
*this)
1562 TRACE("(%p)\n", this);
1563 return this->ctype
.table
;
1566 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1567 static locale_id ctype_wchar_id
= {0};
1568 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1569 locale_id ctype_short_id
= {0};
1571 /* ??_7?$ctype@_W@std@@6B@ */
1572 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
1573 /* ??_7?$ctype@G@std@@6B@ */
1574 extern const vtable_ptr MSVCP_ctype_short_vtable
;
1576 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1577 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1578 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1579 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1580 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
1581 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
1583 TRACE("(%p %p)\n", this, locinfo
);
1584 _Locinfo__Getctype(locinfo
, &this->ctype
);
1585 _Locinfo__Getcvt(locinfo
, &this->cvt
);
1588 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1589 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1590 static ctype_wchar
* ctype_wchar_ctor_locinfo(ctype_wchar
*this,
1591 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1593 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1594 ctype_base_ctor_refs(&this->base
, refs
);
1595 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1596 ctype_wchar__Init(this, locinfo
);
1600 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1601 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1602 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
1603 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
1604 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1606 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
1607 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1611 /* ??0?$ctype@_W@std@@QAE@I@Z */
1612 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1613 static ctype_wchar
* ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1617 TRACE("(%p %lu)\n", this, refs
);
1619 ctype_base_ctor_refs(&this->base
, refs
);
1620 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1622 _Locinfo_ctor(&locinfo
);
1623 ctype_wchar__Init(this, &locinfo
);
1624 _Locinfo_dtor(&locinfo
);
1628 /* ??0?$ctype@G@std@@QAE@I@Z */
1629 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1630 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
1631 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1633 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
1634 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1638 /* ??_F?$ctype@_W@std@@QAEXXZ */
1639 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1640 static ctype_wchar
* ctype_wchar_ctor(ctype_wchar
*this)
1642 TRACE("(%p)\n", this);
1643 return ctype_short_ctor_refs(this, 0);
1646 /* ??_F?$ctype@G@std@@QAEXXZ */
1647 /* ??_F?$ctype@G@std@@QEAAXXZ */
1648 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
1649 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
1651 ctype_wchar
*ret
= ctype_wchar_ctor(this);
1652 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1656 /* ??1?$ctype@_W@std@@MAE@XZ */
1657 /* ??1?$ctype@_W@std@@MEAA@XZ */
1658 /* ??1?$ctype@G@std@@MAE@XZ */
1659 /* ??1?$ctype@G@std@@MEAA@XZ */
1660 static void ctype_wchar_dtor(ctype_wchar
*this)
1662 TRACE("(%p)\n", this);
1663 if(this->ctype
.delfl
)
1664 free((void*)this->ctype
.table
);
1667 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
1668 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1670 TRACE("(%p %x)\n", this, flags
);
1672 /* we have an array, with the number of elements stored before the first object */
1673 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1675 for(i
=*ptr
-1; i
>=0; i
--)
1676 ctype_wchar_dtor(this+i
);
1677 MSVCRT_operator_delete(ptr
);
1679 ctype_wchar_dtor(this);
1681 MSVCRT_operator_delete(this);
1688 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
1693 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
1698 cp
= ___lc_codepage_func();
1710 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
1719 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1720 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1721 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1722 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1723 static char ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1725 char buf
[MB_LEN_MAX
];
1727 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1729 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
1732 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1733 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1734 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1735 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1736 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
1737 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
1738 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1739 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1741 return ctype_wchar__Donarrow(this, ch
, dflt
);
1744 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1745 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1746 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1747 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1748 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
1749 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
1750 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1751 (this, first, last, dflt, dest))
1752 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
1753 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1755 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1756 for(; first
<last
; first
++)
1757 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
1761 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1762 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1763 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1764 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1765 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
1766 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1768 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1769 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
1772 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1773 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1774 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1775 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
1776 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
1777 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
1778 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1780 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1781 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
1785 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
1791 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
1799 cp
= ___lc_codepage_func();
1803 *out
= (unsigned char)*in
;
1810 ((char*)state
)[1] = *in
;
1812 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
1822 GetCPInfo(cp
, &cp_info
);
1824 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
1825 if(!cp_info
.LeadByte
[i
+1])
1827 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
1835 *state
= (unsigned char)*in
;
1839 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
1846 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
1853 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
1854 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
1855 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
1856 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
1857 static wchar_t ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
1861 TRACE("(%p %d)\n", this, ch
);
1862 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
1865 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
1866 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
1867 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
1868 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
1869 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
1870 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
1871 wchar_t, (const ctype_wchar*, char), (this, ch))
1872 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
1874 return ctype_wchar__Dowiden(this, ch
);
1877 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
1878 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
1879 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
1880 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
1881 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
1882 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
1883 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
1884 (this, first, last, dest))
1885 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
1886 const char *first
, const char *last
, wchar_t *dest
)
1888 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1889 for(; first
<last
; first
++)
1890 *dest
++ = ctype_wchar__Dowiden(this, *first
);
1894 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
1895 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
1896 /* ?widen@?$ctype@G@std@@QBEGD@Z */
1897 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
1898 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
1899 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
1901 TRACE("(%p %d)\n", this, ch
);
1902 return call_ctype_wchar_do_widen_ch(this, ch
);
1905 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
1906 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
1907 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
1908 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
1909 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
1910 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
1911 const char *first
, const char *last
, wchar_t *dest
)
1913 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1914 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
1917 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1918 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1919 static MSVCP_size_t
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1921 TRACE("(%p %p)\n", facet
, loc
);
1923 if(facet
&& !*facet
) {
1926 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
1928 ERR("Out of memory\n");
1929 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1933 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
1934 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
1935 _Locinfo_dtor(&locinfo
);
1941 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1942 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1943 static MSVCP_size_t
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1945 if(facet
&& !*facet
) {
1946 ctype_wchar__Getcat(facet
, loc
);
1947 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
1954 static wchar_t _Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
1956 TRACE("(%d %p)\n", ch
, ctype
);
1957 return tolowerW(ch
);
1960 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
1962 static ctype_wchar
*obj
= NULL
;
1965 const locale_facet
*fac
;
1967 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1968 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
1970 _Lockit_dtor(&lock
);
1971 return (ctype_wchar
*)fac
;
1975 _Lockit_dtor(&lock
);
1979 ctype_wchar__Getcat(&fac
, loc
);
1980 obj
= (ctype_wchar
*)fac
;
1981 locale_facet__Incref(&obj
->base
.facet
);
1982 locale_facet_register(&obj
->base
.facet
);
1983 _Lockit_dtor(&lock
);
1988 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
1990 static ctype_wchar
*obj
= NULL
;
1993 const locale_facet
*fac
;
1995 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1996 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
1998 _Lockit_dtor(&lock
);
1999 return (ctype_wchar
*)fac
;
2003 _Lockit_dtor(&lock
);
2007 ctype_short__Getcat(&fac
, loc
);
2008 obj
= (ctype_wchar
*)fac
;
2009 locale_facet__Incref(&obj
->base
.facet
);
2010 locale_facet_register(&obj
->base
.facet
);
2011 _Lockit_dtor(&lock
);
2016 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2017 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2018 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2019 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2020 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2021 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2022 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2023 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2025 return _Towlower(ch
, &this->ctype
);
2028 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2029 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2030 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2031 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2032 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2033 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2034 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2035 (this, first, last))
2036 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2037 wchar_t *first
, const wchar_t *last
)
2039 TRACE("(%p %p %p)\n", this, first
, last
);
2040 for(; first
<last
; first
++)
2041 *first
= _Towlower(*first
, &this->ctype
);
2045 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2046 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2047 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2048 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2049 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2050 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2052 TRACE("(%p %d)\n", this, ch
);
2053 return call_ctype_wchar_do_tolower_ch(this, ch
);
2056 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2057 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2058 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2059 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2060 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2061 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2062 wchar_t *first
, const wchar_t *last
)
2064 TRACE("(%p %p %p)\n", this, first
, last
);
2065 return call_ctype_wchar_do_tolower(this, first
, last
);
2069 static wchar_t _Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2071 TRACE("(%d %p)\n", ch
, ctype
);
2072 return toupperW(ch
);
2075 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2076 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2077 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2078 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2079 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2080 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2081 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2082 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2084 return _Towupper(ch
, &this->ctype
);
2087 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2088 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2089 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2090 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2091 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2092 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2093 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2094 (this, first, last))
2095 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2096 wchar_t *first
, const wchar_t *last
)
2098 TRACE("(%p %p %p)\n", this, first
, last
);
2099 for(; first
<last
; first
++)
2100 *first
= _Towupper(*first
, &this->ctype
);
2104 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2105 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2106 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2107 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2108 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2109 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2111 TRACE("(%p %d)\n", this, ch
);
2112 return call_ctype_wchar_do_toupper_ch(this, ch
);
2115 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2116 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2117 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2118 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2119 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2120 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2121 wchar_t *first
, const wchar_t *last
)
2123 TRACE("(%p %p %p)\n", this, first
, last
);
2124 return call_ctype_wchar_do_toupper(this, first
, last
);
2128 static const wchar_t* _Getwctypes(const wchar_t *first
, const wchar_t *last
,
2129 short *mask
, const _Ctypevec
*ctype
)
2131 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2132 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2137 static short _Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2140 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2144 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2145 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2146 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2147 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2148 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2149 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2150 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2151 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2153 TRACE("(%p %x %d)\n", this, mask
, ch
);
2154 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2157 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2158 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2159 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2160 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2161 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2162 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2163 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2164 (this, first, last, dest))
2165 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2166 const wchar_t *first
, const wchar_t *last
, short *dest
)
2168 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2169 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2172 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2173 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2174 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2175 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2176 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2177 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2179 TRACE("(%p %x %d)\n", this, mask
, ch
);
2180 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2183 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2184 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2185 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2186 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2187 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2188 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2189 const wchar_t *first
, const wchar_t *last
, short *dest
)
2191 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2192 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2195 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2196 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2197 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2198 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2199 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2200 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2201 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2202 (this, mask, first, last))
2203 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2204 short mask
, const wchar_t *first
, const wchar_t *last
)
2206 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2207 for(; first
<last
; first
++)
2208 if(!ctype_wchar_is_ch(this, mask
, *first
))
2213 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2214 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2215 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2216 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2217 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2218 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2219 short mask
, const wchar_t *first
, const wchar_t *last
)
2221 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2222 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2225 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2226 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2227 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2228 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2229 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2230 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2231 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2232 (this, mask, first, last))
2233 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2234 short mask
, const wchar_t *first
, const wchar_t *last
)
2236 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2237 for(; first
<last
; first
++)
2238 if(ctype_wchar_is_ch(this, mask
, *first
))
2243 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2244 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2245 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2246 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2247 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2248 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2249 short mask
, const wchar_t *first
, const wchar_t *last
)
2251 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2252 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2255 /* ??_7codecvt_base@std@@6B@ */
2256 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2258 /* ??0codecvt_base@std@@QAE@I@Z */
2259 /* ??0codecvt_base@std@@QEAA@_K@Z */
2260 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2261 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2263 TRACE("(%p %lu)\n", this, refs
);
2264 locale_facet_ctor_refs(&this->facet
, refs
);
2265 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2269 /* ??_Fcodecvt_base@std@@QAEXXZ */
2270 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2271 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2272 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2274 return codecvt_base_ctor_refs(this, 0);
2277 /* ??1codecvt_base@std@@UAE@XZ */
2278 /* ??1codecvt_base@std@@UEAA@XZ */
2279 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2280 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2282 TRACE("(%p)\n", this);
2283 locale_facet_dtor(&this->facet
);
2286 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2287 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2289 TRACE("(%p %x)\n", this, flags
);
2291 /* we have an array, with the number of elements stored before the first object */
2292 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2294 for(i
=*ptr
-1; i
>=0; i
--)
2295 codecvt_base_dtor(this+i
);
2296 MSVCRT_operator_delete(ptr
);
2298 codecvt_base_dtor(this);
2300 MSVCRT_operator_delete(this);
2306 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2307 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2308 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2309 MSVCP_bool, (const codecvt_base*), (this))
2310 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2311 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2313 TRACE("(%p)\n", this);
2317 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2318 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2319 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2320 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2322 TRACE("(%p)\n", this);
2323 return call_codecvt_base_do_always_noconv(this);
2326 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2327 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2328 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2329 int, (const codecvt_base*), (this))
2330 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2331 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2333 TRACE("(%p)\n", this);
2337 /* ?max_length@codecvt_base@std@@QBEHXZ */
2338 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2339 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2340 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2342 TRACE("(%p)\n", this);
2343 return call_codecvt_base_do_max_length(this);
2346 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2347 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2348 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2349 int, (const codecvt_base*), (this))
2350 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
2351 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
2353 TRACE("(%p)\n", this);
2357 /* ?encoding@codecvt_base@std@@QBEHXZ */
2358 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2359 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
2360 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
2362 TRACE("(%p)\n", this);
2363 return call_codecvt_base_do_encoding(this);
2366 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2367 locale_id codecvt_char_id
= {0};
2369 /* ??_7?$codecvt@DDH@std@@6B@ */
2370 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
2372 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2373 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2374 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
2375 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
2377 TRACE("(%p %p)\n", this, locinfo
);
2380 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2381 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2382 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
2383 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2385 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2386 codecvt_base_ctor_refs(&this->base
, refs
);
2387 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
2391 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2392 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2393 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
2394 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
2396 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
2399 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2400 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2401 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
2402 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
2404 return codecvt_char_ctor_locinfo(this, NULL
, 0);
2407 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2408 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2409 static void codecvt_char_dtor(codecvt_char
*this)
2411 TRACE("(%p)\n", this);
2412 codecvt_base_dtor(&this->base
);
2415 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
2416 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
2418 TRACE("(%p %x)\n", this, flags
);
2420 /* we have an array, with the number of elements stored before the first object */
2421 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2423 for(i
=*ptr
-1; i
>=0; i
--)
2424 codecvt_char_dtor(this+i
);
2425 MSVCRT_operator_delete(ptr
);
2427 codecvt_char_dtor(this);
2429 MSVCRT_operator_delete(this);
2435 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2436 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2437 static MSVCP_size_t
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
2439 TRACE("(%p %p)\n", facet
, loc
);
2441 if(facet
&& !*facet
) {
2442 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
2444 ERR("Out of memory\n");
2445 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2448 codecvt_char_ctor((codecvt_char
*)*facet
);
2454 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
2456 static codecvt_char
*obj
= NULL
;
2459 const locale_facet
*fac
;
2461 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2462 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
2464 _Lockit_dtor(&lock
);
2465 return (codecvt_char
*)fac
;
2469 _Lockit_dtor(&lock
);
2473 codecvt_char__Getcat(&fac
, loc
);
2474 obj
= (codecvt_char
*)fac
;
2475 locale_facet__Incref(&obj
->base
.facet
);
2476 locale_facet_register(&obj
->base
.facet
);
2477 _Lockit_dtor(&lock
);
2482 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2483 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2484 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2485 CALL_VTBL_FUNC(this, 16, int, \
2486 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2487 (this, state, from, from_end, from_next, to, to_end, to_next))
2488 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
2489 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
2490 const char *from
, const char *from_end
, const char **from_next
,
2491 char *to
, char *to_end
, char **to_next
)
2493 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2494 from_next
, to
, to_end
, to_next
);
2497 return CODECVT_noconv
;
2500 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2501 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2502 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
2503 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
2504 const char *from
, const char *from_end
, const char **from_next
,
2505 char *to
, char *to_end
, char **to_next
)
2507 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2508 from_next
, to
, to_end
, to_next
);
2509 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
2510 to
, to_end
, to_next
);
2513 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2514 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2515 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2516 CALL_VTBL_FUNC(this, 20, int, \
2517 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2518 (this, state, from, from_end, from_next, to, to_end, to_next))
2519 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
2520 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
2521 const char *from
, const char *from_end
, const char **from_next
,
2522 char *to
, char *to_end
, char **to_next
)
2524 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2525 from_end
, from_next
, to
, to_end
, to_next
);
2528 return CODECVT_noconv
;
2531 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2532 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2533 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
2534 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
2535 const char *from
, const char *from_end
, const char **from_next
,
2536 char *to
, char *to_end
, char **to_next
)
2538 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2539 from_next
, to
, to_end
, to_next
);
2540 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
2541 to
, to_end
, to_next
);
2544 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2545 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2546 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2547 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2548 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
2549 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
2550 int *state
, char *to
, char *to_end
, char **to_next
)
2552 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2554 return CODECVT_noconv
;
2557 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2558 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2559 int codecvt_char_unshift(const codecvt_char
*this,
2560 int *state
, char *to
, char *to_end
, char **to_next
)
2562 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2563 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
2566 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2567 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2568 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2569 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2570 (this, state, from, from_end, max))
2571 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
2572 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
2573 const char *from
, const char *from_end
, MSVCP_size_t max
)
2575 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2576 return (from_end
-from
> max
? max
: from_end
-from
);
2579 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2580 static locale_id codecvt_wchar_id
= {0};
2581 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2582 locale_id codecvt_short_id
= {0};
2584 /* ??_7?$codecvt@_WDH@std@@6B@ */
2585 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
2586 /* ??_7?$codecvt@GDH@std@@6B@ */
2587 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
2589 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2590 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2591 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2592 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2593 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
2594 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
2596 TRACE("(%p %p)\n", this, locinfo
);
2597 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2600 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2601 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2602 static codecvt_wchar
* codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2604 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2606 codecvt_base_ctor_refs(&this->base
, refs
);
2607 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
2609 codecvt_wchar__Init(this, locinfo
);
2613 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2614 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2615 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
2616 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2618 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2620 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
2621 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
2625 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2626 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2627 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
2628 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2632 TRACE("(%p %ld)\n", this, refs
);
2634 _Locinfo_ctor(&locinfo
);
2635 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2636 _Locinfo_dtor(&locinfo
);
2640 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2641 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2642 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
2643 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
2645 return codecvt_short_ctor_refs(this, 0);
2648 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2649 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2650 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2651 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2652 static void codecvt_wchar_dtor(codecvt_wchar
*this)
2654 TRACE("(%p)\n", this);
2655 codecvt_base_dtor(&this->base
);
2658 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
2659 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
2661 TRACE("(%p %x)\n", this, flags
);
2663 /* we have an array, with the number of elements stored before the first object */
2664 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2666 for(i
=*ptr
-1; i
>=0; i
--)
2667 codecvt_wchar_dtor(this+i
);
2668 MSVCRT_operator_delete(ptr
);
2670 codecvt_wchar_dtor(this);
2672 MSVCRT_operator_delete(this);
2678 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2679 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2680 static MSVCP_size_t
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2682 TRACE("(%p %p)\n", facet
, loc
);
2684 if(facet
&& !*facet
) {
2687 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2689 ERR("Out of memory\n");
2690 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2694 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
2695 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
2696 _Locinfo_dtor(&locinfo
);
2702 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
2704 static codecvt_wchar
*obj
= NULL
;
2707 const locale_facet
*fac
;
2709 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2710 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
2712 _Lockit_dtor(&lock
);
2713 return (codecvt_wchar
*)fac
;
2717 _Lockit_dtor(&lock
);
2721 codecvt_wchar__Getcat(&fac
, loc
);
2722 obj
= (codecvt_wchar
*)fac
;
2723 locale_facet__Incref(&obj
->base
.facet
);
2724 locale_facet_register(&obj
->base
.facet
);
2725 _Lockit_dtor(&lock
);
2730 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2731 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2732 static MSVCP_size_t
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2734 TRACE("(%p %p)\n", facet
, loc
);
2736 if(facet
&& !*facet
) {
2739 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2741 ERR("Out of memory\n");
2742 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2746 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
2747 codecvt_short_ctor((codecvt_wchar
*)*facet
);
2748 _Locinfo_dtor(&locinfo
);
2754 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
2756 static codecvt_wchar
*obj
= NULL
;
2759 const locale_facet
*fac
;
2761 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2762 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
2764 _Lockit_dtor(&lock
);
2765 return (codecvt_wchar
*)fac
;
2769 _Lockit_dtor(&lock
);
2773 codecvt_short__Getcat(&fac
, loc
);
2774 obj
= (codecvt_wchar
*)fac
;
2775 locale_facet__Incref(&obj
->base
.facet
);
2776 locale_facet_register(&obj
->base
.facet
);
2777 _Lockit_dtor(&lock
);
2782 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
2783 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
2784 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
2785 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
2786 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
2787 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
2789 TRACE("(%p)\n", this);
2793 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
2794 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
2795 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
2796 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
2797 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
2798 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
2800 TRACE("(%p)\n", this);
2804 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
2805 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
2806 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
2807 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
2808 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2809 CALL_VTBL_FUNC(this, 16, int, \
2810 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
2811 (this, state, from, from_end, from_next, to, to_end, to_next))
2812 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
2813 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
2814 const char *from
, const char *from_end
, const char **from_next
,
2815 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
2817 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2818 from_end
, from_next
, to
, to_end
, to_next
);
2823 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
2824 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
2826 *from_next
= from_end
;
2827 return CODECVT_partial
;
2829 return CODECVT_error
;
2843 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
2844 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
2845 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
2846 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
2847 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
2848 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
2849 const char *from
, const char *from_end
, const char **from_next
,
2850 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
2852 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2853 from_end
, from_next
, to
, to_end
, to_next
);
2854 return call_codecvt_wchar_do_in(this, state
, from
,
2855 from_end
, from_next
, to
, to_end
, to_next
);
2858 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
2859 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
2860 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
2861 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
2862 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2863 CALL_VTBL_FUNC(this, 20, int, \
2864 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
2865 (this, state, from, from_end, from_next, to, to_end, to_next))
2866 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
2867 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
2868 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
2869 char *to
, char *to_end
, char **to_next
)
2871 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2872 from_end
, from_next
, to
, to_end
, to_next
);
2877 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
2878 int old_state
= *state
, size
;
2879 char buf
[MB_LEN_MAX
];
2881 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
2883 return CODECVT_error
;
2885 if(size
> from_end
-*from_next
) {
2887 return CODECVT_partial
;
2891 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
2899 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
2900 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
2901 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
2902 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
2903 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
2904 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
2905 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
2906 char *to
, char *to_end
, char **to_next
)
2908 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2909 from_end
, from_next
, to
, to_end
, to_next
);
2910 return call_codecvt_wchar_do_out(this, state
, from
,
2911 from_end
, from_next
, to
, to_end
, to_next
);
2914 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
2915 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2916 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
2917 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2918 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2919 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2920 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
2921 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
2922 int *state
, char *to
, char *to_end
, char **to_next
)
2924 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2926 WARN("unexpected state: %x\n", *state
);
2932 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
2933 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2934 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
2935 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2936 int codecvt_wchar_unshift(const codecvt_wchar
*this,
2937 int *state
, char *to
, char *to_end
, char **to_next
)
2939 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2940 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
2943 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
2944 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
2945 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
2946 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
2947 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2948 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
2949 (this, state, from, from_end, max))
2950 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
2951 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
2952 const char *from
, const char *from_end
, MSVCP_size_t max
)
2954 int tmp_state
= *state
, ret
=0;
2956 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
2958 while(ret
<max
&& from
!=from_end
) {
2959 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
2976 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
2977 locale_id numpunct_char_id
= {0};
2979 /* ??_7?$numpunct@D@std@@6B@ */
2980 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
2982 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
2983 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2984 static void numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
2988 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
2990 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
2991 this->false_name
= MSVCRT_operator_new(len
);
2992 if(this->false_name
)
2993 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
2995 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
2996 this->true_name
= MSVCRT_operator_new(len
);
2998 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3001 this->grouping
= MSVCRT_operator_new(1);
3003 *(char*)this->grouping
= 0;
3008 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3010 len
= strlen(lc
->grouping
)+1;
3011 this->grouping
= MSVCRT_operator_new(len
);
3013 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3015 this->dp
= lc
->decimal_point
[0];
3016 this->sep
= lc
->thousands_sep
[0];
3019 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3020 MSVCRT_operator_delete((char*)this->grouping
);
3021 MSVCRT_operator_delete((char*)this->false_name
);
3022 MSVCRT_operator_delete((char*)this->true_name
);
3024 ERR("Out of memory\n");
3025 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3029 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3030 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3031 static void numpunct_char__Tidy(numpunct_char
*this)
3033 TRACE("(%p)\n", this);
3035 MSVCRT_operator_delete((char*)this->grouping
);
3036 MSVCRT_operator_delete((char*)this->false_name
);
3037 MSVCRT_operator_delete((char*)this->true_name
);
3040 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3041 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3042 static numpunct_char
* numpunct_char_ctor_locinfo(numpunct_char
*this,
3043 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3045 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3046 locale_facet_ctor_refs(&this->facet
, refs
);
3047 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3048 numpunct_char__Init(this, locinfo
, usedef
);
3052 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3053 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3054 static numpunct_char
* numpunct_char_ctor_name(numpunct_char
*this,
3055 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3059 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3060 locale_facet_ctor_refs(&this->facet
, refs
);
3061 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3063 _Locinfo_ctor_cstr(&locinfo
, name
);
3064 numpunct_char__Init(this, &locinfo
, usedef
);
3065 _Locinfo_dtor(&locinfo
);
3069 /* ??0?$numpunct@D@std@@QAE@I@Z */
3070 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3071 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3072 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3074 TRACE("(%p %lu)\n", this, refs
);
3075 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3078 /* ??_F?$numpunct@D@std@@QAEXXZ */
3079 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3080 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3081 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3083 return numpunct_char_ctor_refs(this, 0);
3086 /* ??1?$numpunct@D@std@@MAE@XZ */
3087 /* ??1?$numpunct@D@std@@MEAA@XZ */
3088 static void numpunct_char_dtor(numpunct_char
*this)
3090 TRACE("(%p)\n", this);
3091 numpunct_char__Tidy(this);
3094 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3095 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3097 TRACE("(%p %x)\n", this, flags
);
3099 /* we have an array, with the number of elements stored before the first object */
3100 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3102 for(i
=*ptr
-1; i
>=0; i
--)
3103 numpunct_char_dtor(this+i
);
3104 MSVCRT_operator_delete(ptr
);
3106 numpunct_char_dtor(this);
3108 MSVCRT_operator_delete(this);
3114 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3115 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3116 static MSVCP_size_t
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3118 TRACE("(%p %p)\n", facet
, loc
);
3120 if(facet
&& !*facet
) {
3121 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3123 ERR("Out of memory\n");
3124 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3127 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3128 basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3134 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3136 static numpunct_char
*obj
= NULL
;
3139 const locale_facet
*fac
;
3141 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3142 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
3144 _Lockit_dtor(&lock
);
3145 return (numpunct_char
*)fac
;
3149 _Lockit_dtor(&lock
);
3153 numpunct_char__Getcat(&fac
, loc
);
3154 obj
= (numpunct_char
*)fac
;
3155 locale_facet__Incref(&obj
->facet
);
3156 locale_facet_register(&obj
->facet
);
3157 _Lockit_dtor(&lock
);
3162 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3163 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3164 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3165 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3166 char, (const numpunct_char *this), (this))
3167 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3169 TRACE("(%p)\n", this);
3173 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3174 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3175 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
3176 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
3178 TRACE("(%p)\n", this);
3179 return call_numpunct_char_do_decimal_point(this);
3182 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3183 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3184 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
3185 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3186 char, (const numpunct_char*), (this))
3187 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
3189 TRACE("(%p)\n", this);
3193 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3194 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3195 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
3196 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
3198 TRACE("(%p)\n", this);
3199 return call_numpunct_char_do_thousands_sep(this);
3202 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3203 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3204 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
3205 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3206 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3207 basic_string_char
* __thiscall
numpunct_char_do_grouping(
3208 const numpunct_char
*this, basic_string_char
*ret
)
3210 TRACE("(%p)\n", this);
3211 return basic_string_char_ctor_cstr(ret
, this->grouping
);
3214 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3215 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3216 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
3217 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
3219 TRACE("(%p)\n", this);
3220 return call_numpunct_char_do_grouping(this, ret
);
3223 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3224 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3225 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
3226 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3227 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3228 basic_string_char
* __thiscall
numpunct_char_do_falsename(
3229 const numpunct_char
*this, basic_string_char
*ret
)
3231 TRACE("(%p)\n", this);
3232 return basic_string_char_ctor_cstr(ret
, this->false_name
);
3235 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3236 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3237 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
3238 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
3240 TRACE("(%p)\n", this);
3241 return call_numpunct_char_do_falsename(this, ret
);
3244 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3245 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3246 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
3247 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3248 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3249 basic_string_char
* __thiscall
numpunct_char_do_truename(
3250 const numpunct_char
*this, basic_string_char
*ret
)
3252 TRACE("(%p)\n", this);
3253 return basic_string_char_ctor_cstr(ret
, this->true_name
);
3256 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3257 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3258 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
3259 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
3261 TRACE("(%p)\n", this);
3262 return call_numpunct_char_do_truename(this, ret
);
3265 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3266 static locale_id numpunct_wchar_id
= {0};
3267 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3268 locale_id numpunct_short_id
= {0};
3270 /* ??_7?$numpunct@_W@std@@6B@ */
3271 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
3272 /* ??_7?$numpunct@G@std@@6B@ */
3273 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
3275 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3276 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3277 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3278 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3279 static void numpunct_wchar__Init(numpunct_wchar
*this,
3280 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3282 const char *to_convert
;
3286 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3288 _Locinfo__Getcvt(locinfo
, &cvt
);
3290 to_convert
= _Locinfo__Getfalse(locinfo
);
3291 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3292 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3293 if(this->false_name
)
3294 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3295 (wchar_t*)this->false_name
, len
);
3297 to_convert
= _Locinfo__Gettrue(locinfo
);
3298 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3299 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3301 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3302 (wchar_t*)this->true_name
, len
);
3305 this->grouping
= MSVCRT_operator_new(1);
3307 *(char*)this->grouping
= 0;
3312 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3314 len
= strlen(lc
->grouping
)+1;
3315 this->grouping
= MSVCRT_operator_new(len
);
3317 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3319 this->dp
= lc
->decimal_point
[0];
3320 this->sep
= lc
->thousands_sep
[0];
3323 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3324 MSVCRT_operator_delete((char*)this->grouping
);
3325 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3326 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3328 ERR("Out of memory\n");
3329 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3333 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3334 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3335 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3336 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3337 static void numpunct_wchar__Tidy(numpunct_wchar
*this)
3339 TRACE("(%p)\n", this);
3341 MSVCRT_operator_delete((char*)this->grouping
);
3342 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3343 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3346 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3347 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3348 static numpunct_wchar
* numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
3349 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3351 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3352 locale_facet_ctor_refs(&this->facet
, refs
);
3353 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3354 numpunct_wchar__Init(this, locinfo
, usedef
);
3358 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3359 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3360 static numpunct_wchar
* numpunct_short_ctor_locinfo(numpunct_wchar
*this,
3361 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3363 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
3364 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3368 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3369 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3370 static numpunct_wchar
* numpunct_wchar_ctor_name(numpunct_wchar
*this,
3371 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3375 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3376 locale_facet_ctor_refs(&this->facet
, refs
);
3377 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3379 _Locinfo_ctor_cstr(&locinfo
, name
);
3380 numpunct_wchar__Init(this, &locinfo
, usedef
);
3381 _Locinfo_dtor(&locinfo
);
3385 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3386 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3387 static numpunct_wchar
* numpunct_short_ctor_name(numpunct_wchar
*this,
3388 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3390 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
3391 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3395 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3396 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3397 static numpunct_wchar
* numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3399 TRACE("(%p %lu)\n", this, refs
);
3400 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
3403 /* ??0?$numpunct@G@std@@QAE@I@Z */
3404 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3405 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
3406 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3408 numpunct_wchar_ctor_refs(this, refs
);
3409 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3413 /* ??_F?$numpunct@G@std@@QAEXXZ */
3414 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3415 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
3416 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
3418 return numpunct_short_ctor_refs(this, 0);
3421 /* ??1?$numpunct@_W@std@@MAE@XZ */
3422 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3423 /* ??1?$numpunct@G@std@@MAE@XZ */
3424 /* ??1?$numpunct@G@std@@MEAA@XZ */
3425 static void numpunct_wchar_dtor(numpunct_wchar
*this)
3427 TRACE("(%p)\n", this);
3428 numpunct_wchar__Tidy(this);
3431 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
3432 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3434 TRACE("(%p %x)\n", this, flags
);
3436 /* we have an array, with the number of elements stored before the first object */
3437 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3439 for(i
=*ptr
-1; i
>=0; i
--)
3440 numpunct_wchar_dtor(this+i
);
3441 MSVCRT_operator_delete(ptr
);
3443 numpunct_wchar_dtor(this);
3445 MSVCRT_operator_delete(this);
3451 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3452 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3453 static MSVCP_size_t
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3455 TRACE("(%p %p)\n", facet
, loc
);
3457 if(facet
&& !*facet
) {
3458 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3460 ERR("Out of memory\n");
3461 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3464 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
3465 basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3471 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
3473 static numpunct_wchar
*obj
= NULL
;
3476 const locale_facet
*fac
;
3478 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3479 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
3481 _Lockit_dtor(&lock
);
3482 return (numpunct_wchar
*)fac
;
3486 _Lockit_dtor(&lock
);
3490 numpunct_wchar__Getcat(&fac
, loc
);
3491 obj
= (numpunct_wchar
*)fac
;
3492 locale_facet__Incref(&obj
->facet
);
3493 locale_facet_register(&obj
->facet
);
3494 _Lockit_dtor(&lock
);
3499 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3500 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3501 static MSVCP_size_t
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3503 TRACE("(%p %p)\n", facet
, loc
);
3505 if(facet
&& !*facet
) {
3506 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3508 ERR("Out of memory\n");
3509 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3512 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
3513 basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3519 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
3521 static numpunct_wchar
*obj
= NULL
;
3524 const locale_facet
*fac
;
3526 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3527 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
3529 _Lockit_dtor(&lock
);
3530 return (numpunct_wchar
*)fac
;
3534 _Lockit_dtor(&lock
);
3538 numpunct_short__Getcat(&fac
, loc
);
3539 obj
= (numpunct_wchar
*)fac
;
3540 locale_facet__Incref(&obj
->facet
);
3541 locale_facet_register(&obj
->facet
);
3542 _Lockit_dtor(&lock
);
3547 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3548 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3549 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3550 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3551 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
3552 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3553 wchar_t, (const numpunct_wchar *this), (this))
3554 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
3556 TRACE("(%p)\n", this);
3560 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3561 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3562 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3563 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3564 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
3565 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
3567 TRACE("(%p)\n", this);
3568 return call_numpunct_wchar_do_decimal_point(this);
3571 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3572 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3573 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3574 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3575 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
3576 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3577 wchar_t, (const numpunct_wchar *this), (this))
3578 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
3580 TRACE("(%p)\n", this);
3584 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3585 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3586 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3587 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3588 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
3589 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
3591 TRACE("(%p)\n", this);
3592 return call_numpunct_wchar_do_thousands_sep(this);
3595 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3596 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3597 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3598 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3599 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
3600 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3601 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3602 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3604 TRACE("(%p)\n", this);
3605 return basic_string_char_ctor_cstr(ret
, this->grouping
);
3608 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3609 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3610 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3611 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3612 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
3613 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3615 TRACE("(%p)\n", this);
3616 return call_numpunct_wchar_do_grouping(this, ret
);
3619 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3620 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3621 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3622 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3623 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
3624 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3625 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3626 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3628 TRACE("(%p)\n", this);
3629 return basic_string_wchar_ctor_cstr(ret
, this->false_name
);
3632 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3633 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3634 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3635 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3636 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
3637 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3639 TRACE("(%p)\n", this);
3640 return call_numpunct_wchar_do_falsename(this, ret
);
3643 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3644 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3645 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3646 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3647 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
3648 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3649 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3650 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3652 TRACE("(%p)\n", this);
3653 return basic_string_wchar_ctor_cstr(ret
, this->true_name
);
3656 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3657 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3658 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3659 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3660 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
3661 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3663 TRACE("(%p)\n", this);
3664 return call_numpunct_wchar_do_truename(this, ret
);
3667 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
3669 double ret
= strtod(buf
, buf_end
);
3672 ret
*= pow(10, exp
);
3676 static double _Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3682 ret
= _Stod(buf
, buf_end
, exp
);
3692 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
3694 return _Stod(buf
, buf_end
, exp
);
3697 static float _Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3699 return _Stodx(buf
, buf_end
, exp
, err
);
3702 static __int64
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
3708 ret
= _strtoi64(buf
, buf_end
, base
);
3718 static LONG
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
3720 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
3721 if(!*err
&& i
!=(__int64
)((LONG
)i
))
3726 static unsigned __int64
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
3728 unsigned __int64 ret
;
3732 ret
= _strtoui64(buf
, buf_end
, base
);
3742 static ULONG
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
3744 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
3745 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
3747 return buf
[0]=='-' ? -i
: i
;
3750 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
3751 static locale_id num_get_wchar_id
= {0};
3752 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
3753 locale_id num_get_short_id
= {0};
3755 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
3756 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
3757 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
3758 extern const vtable_ptr MSVCP_num_get_short_vtable
;
3760 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3761 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3762 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3763 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3764 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
3765 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
3767 TRACE("(%p %p)\n", this, locinfo
);
3768 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3771 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3772 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3773 static num_get
* num_get_wchar_ctor_locinfo(num_get
*this,
3774 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3776 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3778 locale_facet_ctor_refs(&this->facet
, refs
);
3779 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
3781 num_get_wchar__Init(this, locinfo
);
3785 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3786 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3787 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
3788 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
3789 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3791 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
3792 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
3796 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
3797 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
3798 static num_get
* num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
3802 TRACE("(%p %lu)\n", this, refs
);
3804 _Locinfo_ctor(&locinfo
);
3805 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
3806 _Locinfo_dtor(&locinfo
);
3810 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
3811 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
3812 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
3813 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
3815 num_get_wchar_ctor_refs(this, refs
);
3816 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
3820 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3821 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3822 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
3823 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
3825 return num_get_short_ctor_refs(this, 0);
3828 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
3829 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
3830 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
3831 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
3832 static void num_get_wchar_dtor(num_get
*this)
3834 TRACE("(%p)\n", this);
3835 locale_facet_dtor(&this->facet
);
3838 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
3839 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
3841 TRACE("(%p %x)\n", this, flags
);
3843 /* we have an array, with the number of elements stored before the first object */
3844 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3846 for(i
=*ptr
-1; i
>=0; i
--)
3847 num_get_wchar_dtor(this+i
);
3848 MSVCRT_operator_delete(ptr
);
3850 num_get_wchar_dtor(this);
3852 MSVCRT_operator_delete(this);
3858 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3859 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3860 static MSVCP_size_t
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3862 TRACE("(%p %p)\n", facet
, loc
);
3864 if(facet
&& !*facet
) {
3867 *facet
= MSVCRT_operator_new(sizeof(num_get
));
3869 ERR("Out of memory\n");
3870 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3874 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
3875 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
3876 _Locinfo_dtor(&locinfo
);
3882 static num_get
* num_get_wchar_use_facet(const locale
*loc
)
3884 static num_get
*obj
= NULL
;
3887 const locale_facet
*fac
;
3889 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3890 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
3892 _Lockit_dtor(&lock
);
3893 return (num_get
*)fac
;
3897 _Lockit_dtor(&lock
);
3901 num_get_wchar__Getcat(&fac
, loc
);
3902 obj
= (num_get
*)fac
;
3903 locale_facet__Incref(&obj
->facet
);
3904 locale_facet_register(&obj
->facet
);
3905 _Lockit_dtor(&lock
);
3910 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3911 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3912 static MSVCP_size_t
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3914 if(facet
&& !*facet
) {
3915 num_get_wchar__Getcat(facet
, loc
);
3916 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
3922 num_get
* num_get_short_use_facet(const locale
*loc
)
3924 static num_get
*obj
= NULL
;
3927 const locale_facet
*fac
;
3929 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3930 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
3932 _Lockit_dtor(&lock
);
3933 return (num_get
*)fac
;
3937 _Lockit_dtor(&lock
);
3941 num_get_short__Getcat(&fac
, loc
);
3942 obj
= (num_get
*)fac
;
3943 locale_facet__Incref(&obj
->facet
);
3944 locale_facet_register(&obj
->facet
);
3945 _Lockit_dtor(&lock
);
3950 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
3955 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
3958 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
3959 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
3961 basic_string_char grouping_bstr
;
3962 basic_string_char groups_found
;
3963 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
3964 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
3965 wchar_t sep
, digits
[11], *digits_pos
;
3966 const char *grouping
, *groups
;
3967 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
3969 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
3972 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
3975 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
3976 grouping
= basic_string_char_c_str(&grouping_bstr
);
3977 sep
= grouping
? numpunct_wchar_thousands_sep(numpunct
) : (wchar_t)0;
3980 basic_string_char_ctor(&groups_found
);
3982 istreambuf_iterator_wchar_val(first
);
3984 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
3986 istreambuf_iterator_wchar_inc(first
);
3987 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
3989 istreambuf_iterator_wchar_inc(first
);
3992 /* read possibly grouped numbers before decimal */
3993 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
3994 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
3995 if(sep
&& first
->val
==sep
) {
3996 if(!groups_no
) break; /* empty group - stop parsing */
3997 basic_string_char_append_ch(&groups_found
, groups_no
);
4004 got_digit
= TRUE
; /* found a digit, zero or non-zero */
4005 /* write digit to dest if not a leading zero (to not waste dest buffer) */
4006 if(!got_nonzero
&& first
->val
== digits
[0])
4013 *dest
++ = '0'+digits_pos
-digits
;
4015 exp
++; /* too many digits, just multiply by 10 */
4016 if(sep
&& groups_no
<CHAR_MAX
)
4020 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
4021 if(got_digit
&& !got_nonzero
)
4024 /* get decimal, if any */
4025 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4027 *dest
++ = *localeconv()->decimal_point
;
4028 istreambuf_iterator_wchar_inc(first
);
4031 /* read non-grouped after decimal */
4032 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4033 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4035 else if(dest
<num_end
) {
4037 *dest
++ = '0'+digits_pos
-digits
;
4041 /* read exponent, if any */
4042 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4044 istreambuf_iterator_wchar_inc(first
);
4046 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4048 istreambuf_iterator_wchar_inc(first
);
4049 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4051 istreambuf_iterator_wchar_inc(first
);
4054 got_digit
= got_nonzero
= FALSE
;
4056 /* skip any leading zeroes */
4057 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4060 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
4061 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
4064 *dest
++ = '0'+digits_pos
-digits
;
4067 /* if just found zeroes for exponent, use that */
4068 if(got_digit
&& !got_nonzero
)
4076 if(sep
&& groups_no
)
4077 basic_string_char_append_ch(&groups_found
, groups_no
);
4079 groups
= basic_string_char_c_str(&groups_found
);
4080 if(cur_group
&& !groups
[cur_group
])
4082 error
= TRUE
; /* trailing empty */
4083 }else if(!cur_group
) /* no groups, skip loop */
4086 for(; cur_group
>=0 && !error
; cur_group
--) {
4087 if(*grouping
== CHAR_MAX
) {
4091 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4092 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4095 }else if(grouping
[1]) {
4099 basic_string_char_dtor(&grouping_bstr
);
4101 basic_string_char_dtor(&groups_found
);
4111 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4112 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
4114 wchar_t digits
[23], *digits_pos
, sep
;
4115 basic_string_char grouping_bstr
;
4116 basic_string_char groups_found
;
4117 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
4118 char *dest_beg
= dest
, *dest_end
= dest
+24;
4119 const char *grouping
, *groups
;
4120 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
4122 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
4125 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4126 for(i
=0; i
<6; i
++) {
4127 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
4128 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
4131 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4132 grouping
= basic_string_char_c_str(&grouping_bstr
);
4133 sep
= grouping
? numpunct_wchar_thousands_sep(numpunct
) : '\0';
4135 basefield
= fmtflags
& FMTFLAG_basefield
;
4136 if(basefield
== FMTFLAG_oct
)
4138 else if(basefield
== FMTFLAG_hex
)
4139 base
= 22; /* equal to the size of digits buffer */
4145 istreambuf_iterator_wchar_val(first
);
4146 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4148 istreambuf_iterator_wchar_inc(first
);
4149 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4151 istreambuf_iterator_wchar_inc(first
);
4154 if(first
->strbuf
&& first
->val
==digits
[0]) {
4156 istreambuf_iterator_wchar_inc(first
);
4157 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
4158 if(!base
|| base
== 22) {
4160 istreambuf_iterator_wchar_inc(first
);
4170 if(!base
) base
= 10;
4175 basic_string_char_ctor(&groups_found
);
4176 if(found_zero
) ++groups_no
;
4179 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4180 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4181 if(sep
&& first
->val
==sep
) {
4182 if(!groups_no
) break; /* empty group - stop parsing */
4183 basic_string_char_append_ch(&groups_found
, groups_no
);
4191 if(dest_empty
&& first
->val
== digits
[0]) {
4197 /* skip digits that can't be copied to dest buffer, other
4198 * functions are responsible for detecting overflows */
4200 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
4201 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
4202 'A'+digits_pos
-digits
-16));
4203 if(sep
&& groups_no
<CHAR_MAX
)
4208 if(sep
&& groups_no
)
4209 basic_string_char_append_ch(&groups_found
, groups_no
);
4211 groups
= basic_string_char_c_str(&groups_found
);
4212 if(cur_group
&& groups
&& !groups
[cur_group
])
4214 error
= TRUE
; /* trailing empty */
4216 }else if(!cur_group
) /* no groups, skip loop */
4219 for(; cur_group
>=0 && !error
; cur_group
--) {
4220 if(*grouping
== CHAR_MAX
) {
4224 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4225 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4228 }else if(grouping
[1]) {
4233 basic_string_char_dtor(&grouping_bstr
);
4235 basic_string_char_dtor(&groups_found
);
4242 }else if(dest_empty
)
4246 return (base
==22 ? 16 : base
);
4249 /* ?_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 */
4250 /* ?_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 */
4251 static int num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4252 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4254 return num_get__Getifld(this, dest
, first
, last
,
4255 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
4258 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
4259 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4260 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4261 void **pval
, numpunct_wchar
*numpunct
)
4267 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4269 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4270 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
4271 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
4272 *state
|= IOSTATE_failbit
;
4273 else if(end
!=tmp
&& !err
)
4274 *pval
= (void*)((INT_PTR
)v
);
4276 *state
|= IOSTATE_failbit
;
4279 *state
|= IOSTATE_eofbit
;
4285 /* ?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 */
4286 /* ?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 */
4287 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
4288 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
4289 (this, ret, first, last, base, state, pval))
4290 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
4291 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4292 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4294 return num_get_do_get_void(this, ret
, first
, last
, base
,
4295 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4298 /* ?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 */
4299 /* ?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 */
4300 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
4301 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4302 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4304 return num_get_do_get_void(this, ret
, first
, last
, base
,
4305 state
, pval
, numpunct_short_use_facet(base
->loc
));
4308 /* ?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 */
4309 /* ?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 */
4310 /* ?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 */
4311 /* ?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 */
4312 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
4313 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4314 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4316 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4317 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
4320 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
4321 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4322 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4323 double *pval
, numpunct_wchar
*numpunct
)
4329 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4331 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
4332 if(end
!=tmp
&& !err
)
4335 *state
|= IOSTATE_failbit
;
4338 *state
|= IOSTATE_eofbit
;
4344 /* ?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 */
4345 /* ?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 */
4346 /* ?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 */
4347 /* ?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 */
4348 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
4349 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4350 (this, ret, first, last, base, state, pval))
4351 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
4352 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4353 (this, ret, first, last, base, state, pval))
4354 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
4355 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4356 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4358 return num_get_do_get_double(this, ret
, first
, last
, base
,
4359 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4362 /* ?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 */
4363 /* ?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 */
4364 /* ?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 */
4365 /* ?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 */
4366 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
4367 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4368 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4370 return num_get_do_get_double(this, ret
, first
, last
, base
,
4371 state
, pval
, numpunct_short_use_facet(base
->loc
));
4374 /* ?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 */
4375 /* ?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 */
4376 /* ?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 */
4377 /* ?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 */
4378 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
4379 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4380 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4382 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4383 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
4386 /* ?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 */
4387 /* ?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 */
4388 /* ?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 */
4389 /* ?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 */
4390 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
4391 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4392 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4394 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4395 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
4398 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
4399 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4400 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4401 float *pval
, numpunct_wchar
*numpunct
)
4407 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4409 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
4410 &last
, base
->loc
, numpunct
), &err
);
4411 if(end
!=tmp
&& !err
)
4414 *state
|= IOSTATE_failbit
;
4417 *state
|= IOSTATE_eofbit
;
4423 /* ?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 */
4424 /* ?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 */
4425 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
4426 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
4427 (this, ret, first, last, base, state, pval))
4428 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
4429 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4430 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4432 return num_get_do_get_float(this, ret
, first
, last
, base
,
4433 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4436 /* ?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 */
4437 /* ?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 */
4438 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
4439 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4440 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4442 return num_get_do_get_float(this, ret
, first
, last
, base
,
4443 state
, pval
, numpunct_short_use_facet(base
->loc
));
4446 /* ?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 */
4447 /* ?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 */
4448 /* ?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 */
4449 /* ?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 */
4450 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
4451 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4452 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4454 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4455 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
4458 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
4459 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4460 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4461 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
4467 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4469 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4470 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4471 if(end
!=tmp
&& !err
)
4474 *state
|= IOSTATE_failbit
;
4477 *state
|= IOSTATE_eofbit
;
4483 /* ?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 */
4484 /* ?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 */
4485 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
4486 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
4487 (this, ret, first, last, base, state, pval))
4488 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
4489 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4490 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4492 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4493 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4496 /* ?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 */
4497 /* ?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 */
4498 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
4499 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4500 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4502 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4503 state
, pval
, numpunct_short_use_facet(base
->loc
));
4506 /* ?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 */
4507 /* ?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 */
4508 /* ?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 */
4509 /* ?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 */
4510 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
4511 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4512 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4514 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4515 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
4518 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
4519 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4520 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4521 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
4527 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4529 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4530 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4531 if(end
!=tmp
&& !err
)
4534 *state
|= IOSTATE_failbit
;
4537 *state
|= IOSTATE_eofbit
;
4543 /* ?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 */
4544 /* ?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 */
4545 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
4546 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
4547 (this, ret, first, last, base, state, pval))
4548 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
4549 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4550 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4552 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4553 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4556 /* ?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 */
4557 /* ?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 */
4558 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
4559 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4560 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4562 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4563 state
, pval
, numpunct_short_use_facet(base
->loc
));
4566 /* ?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 */
4567 /* ?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 */
4568 /* ?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 */
4569 /* ?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 */
4570 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
4571 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4572 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4574 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4575 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
4578 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
4579 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4580 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4581 ULONG
*pval
, numpunct_wchar
*numpunct
)
4587 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4589 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4590 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4591 if(end
!=tmp
&& !err
)
4594 *state
|= IOSTATE_failbit
;
4597 *state
|= IOSTATE_eofbit
;
4603 /* ?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 */
4604 /* ?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 */
4605 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
4606 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
4607 (this, ret, first, last, base, state, pval))
4608 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
4609 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4610 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4612 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4613 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4616 /* ?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 */
4617 /* ?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 */
4618 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
4619 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4620 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4622 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4623 state
, pval
, numpunct_short_use_facet(base
->loc
));
4626 /* ?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 */
4627 /* ?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 */
4628 /* ?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 */
4629 /* ?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 */
4630 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
4631 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4632 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4634 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4635 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4638 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
4639 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4640 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4641 LONG
*pval
, numpunct_wchar
*numpunct
)
4647 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4649 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4650 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4651 if(end
!=tmp
&& !err
)
4654 *state
|= IOSTATE_failbit
;
4657 *state
|= IOSTATE_eofbit
;
4663 /* ?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 */
4664 /* ?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 */
4665 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
4666 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
4667 (this, ret, first, last, base, state, pval))
4668 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
4669 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4670 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4672 return num_get_do_get_long(this, ret
, first
, last
, base
,
4673 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4676 /* ?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 */
4677 /* ?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 */
4678 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
4679 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4680 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4682 return num_get_do_get_long(this, ret
, first
, last
, base
,
4683 state
, pval
, numpunct_short_use_facet(base
->loc
));
4686 /* ?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 */
4687 /* ?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 */
4688 /* ?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 */
4689 /* ?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 */
4690 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
4691 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4692 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4694 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4695 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
4698 /* ?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 */
4699 /* ?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 */
4700 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
4701 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
4702 (this, ret, first, last, base, state, pval))
4703 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
4704 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4705 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
4707 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4708 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4711 /* ?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 */
4712 /* ?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 */
4713 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
4714 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4715 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
4717 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4718 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4721 /* ?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 */
4722 /* ?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 */
4723 /* ?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 */
4724 /* ?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 */
4725 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
4726 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4727 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
4729 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4730 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
4733 /* ?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 */
4734 /* ?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 */
4735 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
4736 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
4737 (this, ret, first, last, base, state, pval))
4738 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
4739 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4740 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
4743 char tmp
[25], *beg
, *end
;
4746 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4748 b
= num_get_wchar__Getifld(this, tmp
,
4749 &first
, &last
, base
->fmtfl
, base
->loc
);
4750 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
4751 v
= _Stoulx(beg
, &end
, b
, &err
);
4753 if(v
!= (ULONG
)((unsigned short)v
))
4754 *state
|= IOSTATE_failbit
;
4755 else if(end
!=beg
&& !err
)
4756 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
4758 *state
|= IOSTATE_failbit
;
4761 *state
|= IOSTATE_eofbit
;
4767 /* ?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 */
4768 /* ?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 */
4769 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
4770 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4771 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
4773 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
4777 /* ?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 */
4778 /* ?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 */
4779 /* ?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@ */
4780 /* ?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 */
4781 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
4782 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4783 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
4785 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4786 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
4789 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
4790 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4791 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4792 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
4794 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4796 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
4797 basic_string_wchar false_bstr
, true_bstr
;
4798 const wchar_t *pfalse
, *ptrue
;
4800 numpunct_wchar_falsename(numpunct
, &false_bstr
);
4801 numpunct_wchar_truename(numpunct
, &true_bstr
);
4802 pfalse
= basic_string_wchar_c_str(&false_bstr
);
4803 ptrue
= basic_string_wchar_c_str(&true_bstr
);
4805 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;
4806 istreambuf_iterator_wchar_inc(&first
)) {
4807 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
4809 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
4812 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
4814 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
4822 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
4831 *state
|= IOSTATE_failbit
;
4833 basic_string_wchar_dtor(&false_bstr
);
4834 basic_string_wchar_dtor(&true_bstr
);
4838 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4839 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4841 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
4844 *state
|= IOSTATE_failbit
;
4848 *state
|= IOSTATE_eofbit
;
4849 memcpy(ret
, &first
, sizeof(first
));
4853 /* ?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 */
4854 /* ?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 */
4855 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
4856 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
4857 (this, ret, first, last, base, state, pval))
4858 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
4859 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4860 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
4862 return num_get_do_get_bool(this, ret
, first
, last
, base
,
4863 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4866 /* ?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 */
4867 /* ?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 */
4868 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
4869 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4870 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
4872 return num_get_do_get_bool(this, ret
, first
, last
, base
,
4873 state
, pval
, numpunct_short_use_facet(base
->loc
));
4876 /* ?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 */
4877 /* ?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 */
4878 /* ?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 */
4879 /* ?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 */
4880 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
4881 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4882 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
4884 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4885 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
4888 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
4889 locale_id num_get_char_id
= {0};
4891 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
4892 extern const vtable_ptr MSVCP_num_get_char_vtable
;
4894 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4895 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4896 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
4897 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
4899 TRACE("(%p %p)\n", this, locinfo
);
4900 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4903 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4904 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4905 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
4906 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
4907 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4909 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4911 locale_facet_ctor_refs(&this->facet
, refs
);
4912 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
4914 num_get_char__Init(this, locinfo
);
4918 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
4919 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
4920 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
4921 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4925 TRACE("(%p %lu)\n", this, refs
);
4927 _Locinfo_ctor(&locinfo
);
4928 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
4929 _Locinfo_dtor(&locinfo
);
4933 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
4934 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
4935 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
4936 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
4938 return num_get_char_ctor_refs(this, 0);
4941 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
4942 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
4943 static void num_get_char_dtor(num_get
*this)
4945 TRACE("(%p)\n", this);
4946 locale_facet_dtor(&this->facet
);
4949 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
4950 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
4952 TRACE("(%p %x)\n", this, flags
);
4954 /* we have an array, with the number of elements stored before the first object */
4955 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4957 for(i
=*ptr
-1; i
>=0; i
--)
4958 num_get_char_dtor(this+i
);
4959 MSVCRT_operator_delete(ptr
);
4961 num_get_char_dtor(this);
4963 MSVCRT_operator_delete(this);
4969 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4970 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4971 static MSVCP_size_t
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4973 TRACE("(%p %p)\n", facet
, loc
);
4975 if(facet
&& !*facet
) {
4978 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4980 ERR("Out of memory\n");
4981 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4985 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
4986 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4987 _Locinfo_dtor(&locinfo
);
4993 num_get
* num_get_char_use_facet(const locale
*loc
)
4995 static num_get
*obj
= NULL
;
4998 const locale_facet
*fac
;
5000 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5001 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
5003 _Lockit_dtor(&lock
);
5004 return (num_get
*)fac
;
5008 _Lockit_dtor(&lock
);
5012 num_get_char__Getcat(&fac
, loc
);
5013 obj
= (num_get
*)fac
;
5014 locale_facet__Incref(&obj
->facet
);
5015 locale_facet_register(&obj
->facet
);
5016 _Lockit_dtor(&lock
);
5021 /* ?_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 */
5022 /* ?_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 */
5023 /* Copies number to dest buffer, validates grouping and skips separators.
5024 * Updates first so it points past the number, all digits are skipped.
5025 * Returns how exponent needs to changed.
5026 * Size of dest buffer is not specified, assuming it's not smaller than 32:
5027 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
5029 static int num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5030 istreambuf_iterator_char
*last
, const locale
*loc
)
5032 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5033 basic_string_char grouping_bstr
;
5034 basic_string_char groups_found
;
5035 int groups_no
= 0, cur_group
= 0, exp
= 0;
5036 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
;
5037 const char *grouping
, *groups
;
5038 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5040 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5042 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5043 grouping
= basic_string_char_c_str(&grouping_bstr
);
5044 sep
= grouping
? numpunct_char_thousands_sep(numpunct
) : '\0';
5047 basic_string_char_ctor(&groups_found
);
5049 istreambuf_iterator_char_val(first
);
5051 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5052 *dest
++ = first
->val
;
5053 istreambuf_iterator_char_inc(first
);
5057 /* read possibly grouped numbers before decimal */
5058 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5059 if(first
->val
<'0' || first
->val
>'9') {
5060 if(sep
&& first
->val
==sep
) {
5061 if(!groups_no
) break; /* empty group - stop parsing */
5062 basic_string_char_append_ch(&groups_found
, groups_no
);
5069 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5070 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5071 if(!got_nonzero
&& first
->val
== '0')
5078 *dest
++ = first
->val
;
5080 exp
++; /* too many digits, just multiply by 10 */
5081 if(sep
&& groups_no
<CHAR_MAX
)
5085 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5086 if(got_digit
&& !got_nonzero
)
5089 /* get decimal, if any */
5090 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
5092 *dest
++ = *localeconv()->decimal_point
;
5093 istreambuf_iterator_char_inc(first
);
5096 /* read non-grouped after decimal */
5097 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5098 if(first
->val
<'0' || first
->val
>'9')
5100 else if(dest
<num_end
) {
5102 *dest
++ = first
->val
;
5106 /* read exponent, if any */
5107 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
5108 *dest
++ = first
->val
;
5109 istreambuf_iterator_char_inc(first
);
5111 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5112 *dest
++ = first
->val
;
5113 istreambuf_iterator_char_inc(first
);
5116 got_digit
= got_nonzero
= FALSE
;
5118 /* skip any leading zeroes */
5119 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5122 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
5123 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5126 *dest
++ = first
->val
;
5129 /* if just found zeroes for exponent, use that */
5130 if(got_digit
&& !got_nonzero
)
5138 if(sep
&& groups_no
)
5139 basic_string_char_append_ch(&groups_found
, groups_no
);
5141 groups
= basic_string_char_c_str(&groups_found
);
5142 if(cur_group
&& !groups
[cur_group
])
5144 error
= TRUE
; /* trailing empty */
5145 }else if(!cur_group
) /* no groups, skip loop */
5148 for(; cur_group
>=0 && !error
; cur_group
--) {
5149 if(*grouping
== CHAR_MAX
) {
5153 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5154 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5157 }else if(grouping
[1]) {
5161 basic_string_char_dtor(&grouping_bstr
);
5163 basic_string_char_dtor(&groups_found
);
5173 /* ?_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 */
5174 /* ?_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 */
5175 /* Copies number to dest buffer, validates grouping and skips separators.
5176 * Updates first so it points past the number, all digits are skipped.
5177 * Returns number base (8, 10 or 16).
5178 * Size of dest buffer is not specified, assuming it's not smaller than 25:
5179 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
5181 static int num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5182 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
5184 static const char digits
[] = "0123456789abcdefABCDEF";
5186 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5187 basic_string_char grouping_bstr
;
5188 basic_string_char groups_found
;
5189 int basefield
, base
, groups_no
= 0, cur_group
= 0;
5190 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
;
5191 const char *grouping
, *groups
;
5192 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5194 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5196 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5197 grouping
= basic_string_char_c_str(&grouping_bstr
);
5198 sep
= grouping
? numpunct_char_thousands_sep(numpunct
) : '\0';
5200 basefield
= fmtflags
& FMTFLAG_basefield
;
5201 if(basefield
== FMTFLAG_oct
)
5203 else if(basefield
== FMTFLAG_hex
)
5204 base
= 22; /* equal to the size of digits buffer */
5210 istreambuf_iterator_char_val(first
);
5211 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5212 *dest
++ = first
->val
;
5213 istreambuf_iterator_char_inc(first
);
5216 if(first
->strbuf
&& first
->val
=='0') {
5218 istreambuf_iterator_char_inc(first
);
5219 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
5220 if(!base
|| base
== 22) {
5222 istreambuf_iterator_char_inc(first
);
5232 if (!base
) base
= 10;
5237 basic_string_char_ctor(&groups_found
);
5238 if(found_zero
) ++groups_no
;
5241 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5242 if(!memchr(digits
, first
->val
, base
)) {
5243 if(sep
&& first
->val
==sep
) {
5244 if(!groups_no
) break; /* empty group - stop parsing */
5245 basic_string_char_append_ch(&groups_found
, groups_no
);
5253 if(dest_empty
&& first
->val
== '0')
5260 /* skip digits that can't be copied to dest buffer, other
5261 * functions are responsible for detecting overflows */
5263 *dest
++ = first
->val
;
5264 if(sep
&& groups_no
<CHAR_MAX
)
5269 if(sep
&& groups_no
)
5270 basic_string_char_append_ch(&groups_found
, groups_no
);
5272 groups
= basic_string_char_c_str(&groups_found
);
5273 if(cur_group
&& groups
&& !groups
[cur_group
])
5275 error
= TRUE
; /* trailing empty */
5277 }else if(!cur_group
) /* no groups, skip loop */
5280 for(; cur_group
>=0 && !error
; cur_group
--) {
5281 if(*grouping
== CHAR_MAX
) {
5285 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5286 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5289 }else if(grouping
[1]) {
5294 basic_string_char_dtor(&grouping_bstr
);
5296 basic_string_char_dtor(&groups_found
);
5303 }else if(dest_empty
)
5307 return (base
==22 ? 16 : base
);
5310 /* ?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 */
5311 /* ?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 */
5312 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
5313 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
5314 (this, ret, first, last, base, state, pval))
5315 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
5316 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5317 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5323 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5325 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5326 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
5327 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5328 *state
|= IOSTATE_failbit
;
5329 else if(end
!=tmp
&& !err
)
5330 *pval
= (void*)((INT_PTR
)v
);
5332 *state
|= IOSTATE_failbit
;
5335 *state
|= IOSTATE_eofbit
;
5341 /* ?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 */
5342 /* ?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 */
5343 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
5344 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5345 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5347 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5348 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5351 /* ?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 */
5352 /* ?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 */
5353 /* ?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 */
5354 /* ?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 */
5355 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
5356 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5357 (this, ret, first, last, base, state, pval))
5358 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
5359 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5360 (this, ret, first, last, base, state, pval))
5361 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
5362 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5363 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5369 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5371 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5372 if(end
!=tmp
&& !err
)
5375 *state
|= IOSTATE_failbit
;
5378 *state
|= IOSTATE_eofbit
;
5384 /* ?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 */
5385 /* ?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 */
5386 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
5387 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
5388 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5390 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5391 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5394 /* ?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 */
5395 /* ?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 */
5396 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
5397 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5398 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5400 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5401 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5404 /* ?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 */
5405 /* ?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 */
5406 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
5407 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
5408 (this, ret, first, last, base, state, pval))
5409 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
5410 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5411 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5417 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5419 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5420 if(end
!=tmp
&& !err
)
5423 *state
|= IOSTATE_failbit
;
5426 *state
|= IOSTATE_eofbit
;
5432 /* ?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 */
5433 /* ?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 */
5434 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
5435 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5436 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5438 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5439 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5442 /* ?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 */
5443 /* ?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 */
5444 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5445 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5446 (this, ret, first, last, base, state, pval))
5447 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
5448 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5449 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5455 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5457 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5458 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5459 if(end
!=tmp
&& !err
)
5462 *state
|= IOSTATE_failbit
;
5465 *state
|= IOSTATE_eofbit
;
5471 /* ?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 */
5472 /* ?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 */
5473 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
5474 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5475 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5477 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5478 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5481 /* ?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 */
5482 /* ?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 */
5483 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5484 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5485 (this, ret, first, last, base, state, pval))
5486 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
5487 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5488 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5494 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5496 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5497 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5498 if(end
!=tmp
&& !err
)
5501 *state
|= IOSTATE_failbit
;
5504 *state
|= IOSTATE_eofbit
;
5510 /* ?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 */
5511 /* ?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 */
5512 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
5513 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5514 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5516 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5517 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5520 /* ?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 */
5521 /* ?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 */
5522 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
5523 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
5524 (this, ret, first, last, base, state, pval))
5525 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
5526 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5527 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5533 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5535 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5536 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5537 if(end
!=tmp
&& !err
)
5540 *state
|= IOSTATE_failbit
;
5543 *state
|= IOSTATE_eofbit
;
5549 /* ?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 */
5550 /* ?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 */
5551 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
5552 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5553 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5555 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5556 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5559 /* ?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 */
5560 /* ?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 */
5561 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
5562 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
5563 (this, ret, first, last, base, state, pval))
5564 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
5565 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5566 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5572 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5574 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5575 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5576 if(end
!=tmp
&& !err
)
5579 *state
|= IOSTATE_failbit
;
5582 *state
|= IOSTATE_eofbit
;
5588 /* ?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 */
5589 /* ?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 */
5590 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
5591 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5592 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5594 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5595 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5598 /* ?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 */
5599 /* ?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 */
5600 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
5601 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
5602 (this, ret, first, last, base, state, pval))
5603 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
5604 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5605 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5607 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5608 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5611 /* ?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 */
5612 /* ?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 */
5613 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
5614 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5615 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5617 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5618 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5621 /* ?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 */
5622 /* ?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 */
5623 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
5624 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
5625 (this, ret, first, last, base, state, pval))
5626 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
5627 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5628 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5631 char tmp
[25], *beg
, *end
;
5634 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5636 b
= num_get_char__Getifld(this, tmp
,
5637 &first
, &last
, base
->fmtfl
, base
->loc
);
5638 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5639 v
= _Stoulx(beg
, &end
, b
, &err
);
5641 if(v
!= (ULONG
)((unsigned short)v
))
5642 *state
|= IOSTATE_failbit
;
5643 else if(end
!=beg
&& !err
)
5644 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5646 *state
|= IOSTATE_failbit
;
5649 *state
|= IOSTATE_eofbit
;
5655 /* ?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 */
5656 /* ?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 */
5657 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
5658 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5659 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5661 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5662 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5665 /* ?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 */
5666 /* ?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 */
5667 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
5668 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
5669 (this, ret, first, last, base, state, pval))
5670 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
5671 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
5672 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5674 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5676 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5677 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
5678 basic_string_char false_bstr
, true_bstr
;
5679 const char *pfalse
, *ptrue
;
5681 numpunct_char_falsename(numpunct
, &false_bstr
);
5682 numpunct_char_truename(numpunct
, &true_bstr
);
5683 pfalse
= basic_string_char_c_str(&false_bstr
);
5684 ptrue
= basic_string_char_c_str(&true_bstr
);
5686 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;
5687 istreambuf_iterator_char_inc(&first
)) {
5688 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5690 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5693 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5695 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5703 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5712 *state
|= IOSTATE_failbit
;
5714 basic_string_char_dtor(&false_bstr
);
5715 basic_string_char_dtor(&true_bstr
);
5719 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5720 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5722 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5725 *state
|= IOSTATE_failbit
;
5729 *state
|= IOSTATE_eofbit
;
5730 memcpy(ret
, &first
, sizeof(first
));
5734 /* ?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 */
5735 /* ?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 */
5736 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
5737 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
5738 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5740 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5741 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5744 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5745 locale_id num_put_char_id
= {0};
5747 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5748 extern const vtable_ptr MSVCP_num_put_char_vtable
;
5750 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5751 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5752 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
5753 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
5755 TRACE("(%p %p)\n", this, locinfo
);
5756 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5759 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5760 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5761 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
5762 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
5764 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
5766 locale_facet_ctor_refs(&this->facet
, refs
);
5767 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
5769 num_put_char__Init(this, locinfo
);
5773 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5774 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5775 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
5776 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
5780 TRACE("(%p %lu)\n", this, refs
);
5782 _Locinfo_ctor(&locinfo
);
5783 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
5784 _Locinfo_dtor(&locinfo
);
5788 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5789 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5790 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
5791 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
5793 return num_put_char_ctor_refs(this, 0);
5796 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5797 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5798 static void num_put_char_dtor(num_put
*this)
5800 TRACE("(%p)\n", this);
5801 locale_facet_dtor(&this->facet
);
5804 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
5805 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
5807 TRACE("(%p %x)\n", this, flags
);
5809 /* we have an array, with the number of elements stored before the first object */
5810 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5812 for(i
=*ptr
-1; i
>=0; i
--)
5813 num_put_char_dtor(this+i
);
5814 MSVCRT_operator_delete(ptr
);
5816 num_put_char_dtor(this);
5818 MSVCRT_operator_delete(this);
5824 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5825 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5826 static MSVCP_size_t
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
5828 TRACE("(%p %p)\n", facet
, loc
);
5830 if(facet
&& !*facet
) {
5833 *facet
= MSVCRT_operator_new(sizeof(num_put
));
5835 ERR("Out of memory\n");
5836 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5840 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
5841 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
5842 _Locinfo_dtor(&locinfo
);
5848 num_put
* num_put_char_use_facet(const locale
*loc
)
5850 static num_put
*obj
= NULL
;
5853 const locale_facet
*fac
;
5855 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5856 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
5858 _Lockit_dtor(&lock
);
5859 return (num_put
*)fac
;
5863 _Lockit_dtor(&lock
);
5867 num_put_char__Getcat(&fac
, loc
);
5868 obj
= (num_put
*)fac
;
5869 locale_facet__Incref(&obj
->facet
);
5870 locale_facet_register(&obj
->facet
);
5871 _Lockit_dtor(&lock
);
5876 /* ?_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 */
5877 /* ?_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 */
5878 static ostreambuf_iterator_char
* num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
5879 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
5881 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
5883 for(; count
>0; count
--)
5884 ostreambuf_iterator_char_put(&dest
, *ptr
++);
5890 /* ?_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 */
5891 /* ?_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 */
5892 static ostreambuf_iterator_char
* num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
5893 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
5895 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
5897 for(; count
>0; count
--)
5898 ostreambuf_iterator_char_put(&dest
, c
);
5904 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
5905 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
5906 static char* num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
5908 int type
= fmtfl
& FMTFLAG_floatfield
;
5911 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
5914 if(fmtfl
& FMTFLAG_showpos
)
5916 if(fmtfl
& FMTFLAG_showbase
)
5923 if(type
== FMTFLAG_fixed
)
5925 else if(type
== FMTFLAG_scientific
)
5926 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
5927 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
5928 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
5930 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
5936 /* TODO: This function should be removed when num_put_char__Fput is implemented */
5937 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
5938 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
5940 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
5941 basic_string_char grouping_bstr
;
5942 const char *grouping
;
5943 char *p
, sep
= *localeconv()->decimal_point
;
5944 int cur_group
= 0, group_size
= 0;
5945 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
5948 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
5950 /* Change decimal point */
5951 for(p
=buf
; p
<buf
+count
; p
++) {
5953 *p
= numpunct_char_decimal_point(numpunct
);
5959 /* Add separators to number */
5960 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5961 grouping
= basic_string_char_c_str(&grouping_bstr
);
5962 sep
= grouping
? numpunct_char_thousands_sep(numpunct
) : '\0';
5964 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
5966 if(group_size
== grouping
[cur_group
]) {
5968 if(grouping
[cur_group
+1])
5971 memmove(p
+1, p
, buf
+count
-p
);
5976 basic_string_char_dtor(&grouping_bstr
);
5978 /* Display number with padding */
5979 if(count
>= base
->wide
)
5982 pad
= base
->wide
-count
;
5985 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
5986 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
5989 if(adjustfield
!= FMTFLAG_left
) {
5990 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
5993 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
5994 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
5997 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
5998 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
5999 static char* num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6001 int base
= fmtfl
& FMTFLAG_basefield
;
6004 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6007 if(fmtfl
& FMTFLAG_showpos
)
6009 if(fmtfl
& FMTFLAG_showbase
)
6016 if(base
== FMTFLAG_oct
)
6018 else if(base
== FMTFLAG_hex
)
6019 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6027 /* ?_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 */
6028 /* ?_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 */
6029 static ostreambuf_iterator_char
* num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6030 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6032 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6033 basic_string_char grouping_bstr
;
6034 const char *grouping
;
6036 int cur_group
= 0, group_size
= 0;
6037 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6040 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6042 /* Add separators to number */
6043 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6044 grouping
= basic_string_char_c_str(&grouping_bstr
);
6045 sep
= grouping
? numpunct_char_thousands_sep(numpunct
) : '\0';
6047 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6049 if(group_size
== grouping
[cur_group
]) {
6051 if(grouping
[cur_group
+1])
6054 memmove(p
+1, p
, buf
+count
-p
);
6059 basic_string_char_dtor(&grouping_bstr
);
6061 /* Display number with padding */
6062 if(count
>= base
->wide
)
6065 pad
= base
->wide
-count
;
6068 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6069 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6071 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6072 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
6075 if(adjustfield
!= FMTFLAG_left
) {
6076 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6079 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6080 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6083 /* ?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 */
6084 /* ?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 */
6085 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
6086 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
6087 (this, ret, dest, base, fill, v))
6088 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
6089 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6090 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6092 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6093 char fmt
[7]; /* strlen("%+#lld")+1 */
6095 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6097 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6098 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6101 /* ?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 */
6102 /* ?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 */
6103 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
6104 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6105 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6107 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6108 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
6111 /* ?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 */
6112 /* ?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 */
6113 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
6114 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
6115 (this, ret, dest, base, fill, v))
6116 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
6117 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6118 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6120 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6121 char fmt
[7]; /* strlen("%+#lld")+1 */
6123 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6125 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6126 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6129 /* ?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 */
6130 /* ?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 */
6131 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
6132 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6133 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6135 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6136 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6139 static inline streamsize
get_precision(const ios_base
*base
)
6141 return base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
6144 /* ?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 */
6145 /* ?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 */
6146 /* ?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 */
6147 /* ?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 */
6148 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
6149 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6150 (this, ret, dest, base, fill, v))
6151 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
6152 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6153 (this, ret, dest, base, fill, v))
6154 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
6155 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6156 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6159 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6163 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6165 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6166 prec
= get_precision(base
);
6167 size
= _scprintf(fmt
, prec
, v
);
6169 /* TODO: don't use dynamic allocation */
6170 tmp
= MSVCRT_operator_new(size
*2);
6172 ERR("Out of memory\n");
6173 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6175 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
6176 MSVCRT_operator_delete(tmp
);
6180 /* ?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 */
6181 /* ?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 */
6182 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
6183 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6184 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6186 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6187 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
6190 /* ?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 */
6191 /* ?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 */
6192 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
6193 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
6194 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6196 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6197 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6200 /* ?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 */
6201 /* ?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 */
6202 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
6203 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
6204 (this, ret, dest, base, fill, v))
6205 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
6206 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6207 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6209 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6211 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6213 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6216 /* ?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 */
6217 /* ?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 */
6218 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
6219 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6220 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6222 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6223 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
6226 /* ?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 */
6227 /* ?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 */
6228 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
6229 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
6230 (this, ret, dest, base, fill, v))
6231 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
6232 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6233 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6235 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6236 char fmt
[7]; /* strlen("%+#lld")+1 */
6238 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6240 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6241 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
6244 /* ?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 */
6245 /* ?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 */
6246 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
6247 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6248 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6250 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6251 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
6254 /* ?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 */
6255 /* ?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 */
6256 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
6257 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
6258 (this, ret, dest, base, fill, v))
6259 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
6260 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6261 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6263 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6264 char fmt
[7]; /* strlen("%+#lld")+1 */
6266 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6268 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6269 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
6272 /* ?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 */
6273 /* ?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 */
6274 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
6275 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6276 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6278 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6279 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
6282 /* ?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 */
6283 /* ?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 */
6284 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
6285 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
6286 (this, ret, dest, base, fill, v))
6287 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
6288 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6289 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6291 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6293 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6294 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6295 basic_string_char str
;
6296 MSVCP_size_t pad
, len
;
6299 numpunct_char_truename(numpunct
, &str
);
6301 numpunct_char_falsename(numpunct
, &str
);
6303 len
= basic_string_char_length(&str
);
6304 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
6307 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6308 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
6311 num_put_char__Putc(this, &dest
, dest
, basic_string_char_c_str(&str
), len
);
6312 basic_string_char_dtor(&str
);
6313 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6316 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
6319 /* ?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 */
6320 /* ?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 */
6321 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
6322 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6323 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6325 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6326 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
6329 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
6330 static locale_id num_put_wchar_id
= {0};
6331 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
6332 locale_id num_put_short_id
= {0};
6334 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
6335 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
6336 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
6337 extern const vtable_ptr MSVCP_num_put_short_vtable
;
6339 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6340 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6341 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
6342 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
6344 TRACE("(%p %p)\n", this, locinfo
);
6345 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6348 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6349 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6350 static num_put
* num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6352 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6354 locale_facet_ctor_refs(&this->facet
, refs
);
6355 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
6357 num_put_wchar__Init(this, locinfo
);
6361 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6362 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6363 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
6364 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6366 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
6367 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6371 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
6372 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
6373 static num_put
* num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6377 TRACE("(%p %lu)\n", this, refs
);
6379 _Locinfo_ctor(&locinfo
);
6380 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
6381 _Locinfo_dtor(&locinfo
);
6385 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
6386 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
6387 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
6388 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6390 num_put_wchar_ctor_refs(this, refs
);
6391 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6395 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
6396 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
6397 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
6398 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
6400 return num_put_short_ctor_refs(this, 0);
6403 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
6404 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
6405 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
6406 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
6407 static void num_put_wchar_dtor(num_put
*this)
6409 TRACE("(%p)\n", this);
6410 locale_facet_dtor(&this->facet
);
6413 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
6414 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
6416 TRACE("(%p %x)\n", this, flags
);
6418 /* we have an array, with the number of elements stored before the first object */
6419 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6421 for(i
=*ptr
-1; i
>=0; i
--)
6422 num_put_wchar_dtor(this+i
);
6423 MSVCRT_operator_delete(ptr
);
6425 num_put_wchar_dtor(this);
6427 MSVCRT_operator_delete(this);
6433 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6434 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6435 static MSVCP_size_t
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
6437 TRACE("(%p %p)\n", facet
, loc
);
6439 if(facet
&& !*facet
) {
6442 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6444 ERR("Out of memory\n");
6445 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6449 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
6450 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6451 _Locinfo_dtor(&locinfo
);
6457 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6458 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6459 static MSVCP_size_t
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
6461 TRACE("(%p %p)\n", facet
, loc
);
6463 if(facet
&& !*facet
) {
6466 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6468 ERR("Out of memory\n");
6469 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6473 _Locinfo_ctor_cstr(&locinfo
, basic_string_char_c_str(&loc
->ptr
->name
));
6474 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6475 _Locinfo_dtor(&locinfo
);
6481 static num_put
* num_put_wchar_use_facet(const locale
*loc
)
6483 static num_put
*obj
= NULL
;
6486 const locale_facet
*fac
;
6488 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6489 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
6491 _Lockit_dtor(&lock
);
6492 return (num_put
*)fac
;
6496 _Lockit_dtor(&lock
);
6500 num_put_wchar__Getcat(&fac
, loc
);
6501 obj
= (num_put
*)fac
;
6502 locale_facet__Incref(&obj
->facet
);
6503 locale_facet_register(&obj
->facet
);
6504 _Lockit_dtor(&lock
);
6509 num_put
* num_put_short_use_facet(const locale
*loc
)
6511 static num_put
*obj
= NULL
;
6514 const locale_facet
*fac
;
6516 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6517 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
6519 _Lockit_dtor(&lock
);
6520 return (num_put
*)fac
;
6524 _Lockit_dtor(&lock
);
6528 num_put_short__Getcat(&fac
, loc
);
6529 obj
= (num_put
*)fac
;
6530 locale_facet__Incref(&obj
->facet
);
6531 locale_facet_register(&obj
->facet
);
6532 _Lockit_dtor(&lock
);
6537 /* ?_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 */
6538 /* ?_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 */
6539 /* ?_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 */
6540 /* ?_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 */
6541 static ostreambuf_iterator_wchar
* num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6542 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
6544 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
6546 for(; count
>0; count
--)
6547 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
6553 /* ?_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 */
6554 /* ?_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 */
6555 /* ?_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 */
6556 /* ?_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 */
6557 static ostreambuf_iterator_wchar
* num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6558 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
6563 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
6565 for(; count
>0; count
--) {
6566 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
6567 ostreambuf_iterator_wchar_put(&dest
, ch
);
6574 /* ?_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 */
6575 /* ?_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 */
6576 /* ?_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 */
6577 /* ?_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 */
6578 static ostreambuf_iterator_wchar
* num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6579 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
6581 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6583 for(; count
>0; count
--)
6584 ostreambuf_iterator_wchar_put(&dest
, c
);
6590 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
6591 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6592 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
6593 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6594 static char* num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6596 int type
= fmtfl
& FMTFLAG_floatfield
;
6599 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6602 if(fmtfl
& FMTFLAG_showpos
)
6604 if(fmtfl
& FMTFLAG_showbase
)
6611 if(type
== FMTFLAG_fixed
)
6613 else if(type
== FMTFLAG_scientific
)
6614 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6615 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6616 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6618 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6624 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
6625 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6626 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
6627 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
6629 basic_string_char grouping_bstr
;
6630 const char *grouping
;
6631 char *p
, dec_point
= *localeconv()->decimal_point
;
6633 int cur_group
= 0, group_size
= 0;
6634 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6635 MSVCP_size_t i
, pad
;
6637 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6639 for(p
=buf
; p
<buf
+count
; p
++) {
6645 /* Add separators to number */
6646 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
6647 grouping
= basic_string_char_c_str(&grouping_bstr
);
6648 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
6650 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6652 if(group_size
== grouping
[cur_group
]) {
6654 if(grouping
[cur_group
+1])
6657 memmove(p
+1, p
, buf
+count
-p
);
6658 *p
= '\0'; /* mark thousands separator positions */
6662 basic_string_char_dtor(&grouping_bstr
);
6664 /* Display number with padding */
6665 if(count
>= base
->wide
)
6668 pad
= base
->wide
-count
;
6671 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6672 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
6675 if(adjustfield
!= FMTFLAG_left
) {
6676 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
6680 for(i
=0; i
<count
; i
++) {
6681 if(buf
[i
] == dec_point
)
6682 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
6684 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
6686 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
6689 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
6692 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
6693 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6694 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
6695 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6696 static char* num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6698 int base
= fmtfl
& FMTFLAG_basefield
;
6701 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6704 if(fmtfl
& FMTFLAG_showpos
)
6706 if(fmtfl
& FMTFLAG_showbase
)
6713 if(base
== FMTFLAG_oct
)
6715 else if(base
== FMTFLAG_hex
)
6716 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6724 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6725 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
6726 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
6728 basic_string_char grouping_bstr
;
6729 const char *grouping
;
6732 int cur_group
= 0, group_size
= 0;
6733 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6734 MSVCP_size_t i
, pad
;
6736 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6738 /* Add separators to number */
6739 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
6740 grouping
= basic_string_char_c_str(&grouping_bstr
);
6741 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
6743 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6745 if(group_size
== grouping
[cur_group
]) {
6747 if(grouping
[cur_group
+1])
6750 memmove(p
+1, p
, buf
+count
-p
);
6751 *p
= '\0'; /* mark thousands separator positions */
6755 basic_string_char_dtor(&grouping_bstr
);
6757 /* Display number with padding */
6758 if(count
>= base
->wide
)
6761 pad
= base
->wide
-count
;
6764 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6765 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
6767 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6768 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
6771 if(adjustfield
!= FMTFLAG_left
) {
6772 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
6776 for(i
=0; i
<count
; i
++) {
6778 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
6780 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
6783 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
6786 /* ?_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 */
6787 /* ?_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 */
6788 static ostreambuf_iterator_wchar
* num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6789 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
6791 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(base
->loc
));
6794 /* ?_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 */
6795 /* ?_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 */
6796 static ostreambuf_iterator_wchar
* num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6797 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
6799 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(base
->loc
));
6802 /* ?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 */
6803 /* ?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 */
6804 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
6805 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
6806 (this, ret, dest, base, fill, v))
6807 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
6808 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6809 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
6811 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6812 char fmt
[7]; /* strlen("%+#lld")+1 */
6814 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6816 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
6817 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6820 /* ?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 */
6821 /* ?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 */
6822 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
6823 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6824 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
6826 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6827 char fmt
[7]; /* strlen("%+#lld")+1 */
6829 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6831 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
6832 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6835 /* ?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 */
6836 /* ?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 */
6837 /* ?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 */
6838 /* ?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 */
6839 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
6840 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6841 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
6843 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6844 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
6847 /* ?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 */
6848 /* ?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 */
6849 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
6850 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
6851 (this, ret, dest, base, fill, v))
6852 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
6853 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6854 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
6856 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6857 char fmt
[7]; /* strlen("%+#lld")+1 */
6859 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6861 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
6862 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6865 /* ?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 */
6866 /* ?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 */
6867 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
6868 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6869 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
6871 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6872 char fmt
[7]; /* strlen("%+#lld")+1 */
6874 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6876 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
6877 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6880 /* ?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 */
6881 /* ?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 */
6882 /* ?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 */
6883 /* ?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 */
6884 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
6885 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6886 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
6888 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6889 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6892 /* ?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 */
6893 /* ?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 */
6894 /* ?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 */
6895 /* ?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 */
6896 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
6897 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
6898 (this, ret, dest, base, fill, v))
6899 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
6900 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
6901 (this, ret, dest, base, fill, v))
6902 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
6903 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6904 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
6907 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6910 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6912 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6913 size
= _scprintf(fmt
, base
->prec
, v
);
6915 /* TODO: don't use dynamic allocation */
6916 tmp
= MSVCRT_operator_new(size
*2);
6918 ERR("Out of memory\n");
6919 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6921 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
6922 numpunct_wchar_use_facet(base
->loc
));
6923 MSVCRT_operator_delete(tmp
);
6927 /* ?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 */
6928 /* ?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 */
6929 /* ?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 */
6930 /* ?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 */
6931 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
6932 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6933 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
6936 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6940 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6942 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6943 prec
= get_precision(base
);
6944 size
= _scprintf(fmt
, prec
, v
);
6946 /* TODO: don't use dynamic allocation */
6947 tmp
= MSVCRT_operator_new(size
*2);
6949 ERR("Out of memory\n");
6950 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6952 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
6953 numpunct_short_use_facet(base
->loc
));
6954 MSVCRT_operator_delete(tmp
);
6958 /* ?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 */
6959 /* ?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 */
6960 /* ?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 */
6961 /* ?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 */
6962 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
6963 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6964 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
6966 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6967 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
6970 /* ?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 */
6971 /* ?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 */
6972 /* ?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 */
6973 /* ?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 */
6974 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
6975 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6976 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
6978 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6979 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6982 /* ?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 */
6983 /* ?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 */
6984 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
6985 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
6986 (this, ret, dest, base, fill, v))
6987 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
6988 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6989 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
6991 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6993 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6995 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6998 /* ?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 */
6999 /* ?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 */
7000 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
7001 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7002 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7004 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7006 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7008 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7011 /* ?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 */
7012 /* ?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 */
7013 /* ?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 */
7014 /* ?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 */
7015 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
7016 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7017 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7019 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7020 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7023 /* ?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 */
7024 /* ?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 */
7025 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
7026 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
7027 (this, ret, dest, base, fill, v))
7028 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
7029 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7030 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7032 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7033 char fmt
[7]; /* strlen("%+#lld")+1 */
7035 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7037 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7038 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7041 /* ?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 */
7042 /* ?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 */
7043 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
7044 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7045 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7047 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7048 char fmt
[7]; /* strlen("%+#lld")+1 */
7050 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7052 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7053 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7056 /* ?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 */
7057 /* ?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 */
7058 /* ?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 */
7059 /* ?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 */
7060 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
7061 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7062 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7064 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7065 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7068 /* ?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 */
7069 /* ?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 */
7070 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
7071 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
7072 (this, ret, dest, base, fill, v))
7073 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
7074 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7075 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7077 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7078 char fmt
[7]; /* strlen("%+#lld")+1 */
7080 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7082 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7083 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7086 /* ?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 */
7087 /* ?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 */
7088 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
7089 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7090 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7092 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7093 char fmt
[7]; /* strlen("%+#lld")+1 */
7095 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7097 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7098 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7101 /* ?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 */
7102 /* ?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 */
7103 /* ?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 */
7104 /* ?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 */
7105 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
7106 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7107 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7109 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7110 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7113 /* ?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 */
7114 /* ?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 */
7115 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
7116 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
7117 (this, ret, dest, base, fill, v))
7118 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
7119 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7120 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7122 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7124 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7125 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7126 basic_string_wchar str
;
7127 MSVCP_size_t pad
, len
;
7130 numpunct_wchar_truename(numpunct
, &str
);
7132 numpunct_wchar_falsename(numpunct
, &str
);
7134 len
= basic_string_wchar_length(&str
);
7135 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7138 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7139 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7142 num_put_wchar__Put(this, &dest
, dest
, basic_string_wchar_c_str(&str
), len
);
7143 basic_string_wchar_dtor(&str
);
7144 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7147 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7150 /* ?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 */
7151 /* ?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 */
7152 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
7153 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7154 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7156 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7158 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7159 numpunct_wchar
*numpunct
= numpunct_short_use_facet(base
->loc
);
7160 basic_string_wchar str
;
7161 MSVCP_size_t pad
, len
;
7164 numpunct_wchar_truename(numpunct
, &str
);
7166 numpunct_wchar_falsename(numpunct
, &str
);
7168 len
= basic_string_wchar_length(&str
);
7169 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7172 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7173 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7176 num_put_wchar__Put(this, &dest
, dest
, basic_string_wchar_c_str(&str
), len
);
7177 basic_string_wchar_dtor(&str
);
7178 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7181 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7184 /* ?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 */
7185 /* ?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 */
7186 /* ?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 */
7187 /* ?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 */
7188 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
7189 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7190 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7192 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7193 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7196 /* ??0_Locimp@locale@std@@AAE@_N@Z */
7197 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
7198 static locale__Locimp
* locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
7200 TRACE("(%p %d)\n", this, transparent
);
7202 memset(this, 0, sizeof(locale__Locimp
));
7203 locale_facet_ctor_refs(&this->facet
, 1);
7204 this->transparent
= transparent
;
7205 basic_string_char_ctor_cstr(&this->name
, "*");
7209 /* ??_F_Locimp@locale@std@@QAEXXZ */
7210 /* ??_F_Locimp@locale@std@@QEAAXXZ */
7211 static locale__Locimp
* locale__Locimp_ctor(locale__Locimp
*this)
7213 return locale__Locimp_ctor_transparent(this, FALSE
);
7216 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
7217 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
7218 static locale__Locimp
* locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7223 TRACE("(%p %p)\n", this, copy
);
7225 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7226 memcpy(this, copy
, sizeof(locale__Locimp
));
7227 locale_facet_ctor_refs(&this->facet
, 1);
7228 if(copy
->facetvec
) {
7229 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
7230 if(!this->facetvec
) {
7231 _Lockit_dtor(&lock
);
7232 ERR("Out of memory\n");
7233 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7236 for(i
=0; i
<this->facet_cnt
; i
++)
7238 this->facetvec
[i
] = copy
->facetvec
[i
];
7239 if(this->facetvec
[i
])
7240 locale_facet__Incref(this->facetvec
[i
]);
7243 basic_string_char_copy_ctor(&this->name
, ©
->name
);
7244 _Lockit_dtor(&lock
);
7248 /* ??1_Locimp@locale@std@@MAE@XZ */
7249 /* ??1_Locimp@locale@std@@MEAA@XZ */
7250 static void locale__Locimp_dtor(locale__Locimp
*this)
7254 TRACE("(%p)\n", this);
7256 locale_facet_dtor(&this->facet
);
7257 for(i
=0; i
<this->facet_cnt
; i
++)
7258 if(this->facetvec
[i
] && locale_facet__Decref(this->facetvec
[i
]))
7259 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
7261 MSVCRT_operator_delete(this->facetvec
);
7262 basic_string_char_dtor(&this->name
);
7265 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
7266 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
7268 TRACE("(%p %x)\n", this, flags
);
7270 /* we have an array, with the number of elements stored before the first object */
7271 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7273 for(i
=*ptr
-1; i
>=0; i
--)
7274 locale__Locimp_dtor(this+i
);
7275 MSVCRT_operator_delete(ptr
);
7277 locale__Locimp_dtor(this);
7279 MSVCRT_operator_delete(this);
7285 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
7286 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
7287 static void locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
7291 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
7293 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7294 if(id
>= locimp
->facet_cnt
) {
7295 MSVCP_size_t new_size
= id
+1;
7296 locale_facet
**new_facetvec
;
7298 if(new_size
< locale_id__Id_cnt
+1)
7299 new_size
= locale_id__Id_cnt
+1;
7301 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
7303 _Lockit_dtor(&lock
);
7304 ERR("Out of memory\n");
7305 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7309 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
7310 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
7311 MSVCRT_operator_delete(locimp
->facetvec
);
7312 locimp
->facetvec
= new_facetvec
;
7313 locimp
->facet_cnt
= new_size
;
7316 if(locimp
->facetvec
[id
] && locale_facet__Decref(locimp
->facetvec
[id
]))
7317 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
7319 locimp
->facetvec
[id
] = facet
;
7321 locale_facet__Incref(facet
);
7322 _Lockit_dtor(&lock
);
7325 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
7326 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
7327 static void locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
7329 locale__Locimp__Locimp_Addfac(this, facet
, id
);
7332 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7333 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7334 /* List of missing facets:
7335 * num_put, collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7337 static void locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7339 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7341 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
7345 ctype
= ctype_short_use_facet(loc
);
7347 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7349 ERR("Out of memory\n");
7350 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7352 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
7354 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
7357 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
7361 numget
= num_get_short_use_facet(loc
);
7363 numget
= MSVCRT_operator_new(sizeof(num_get
));
7365 ERR("Out of memory\n");
7366 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7368 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
7370 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
7373 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
7377 numput
= num_put_short_use_facet(loc
);
7379 numput
= MSVCRT_operator_new(sizeof(num_put
));
7381 ERR("Out of memory\n");
7382 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7384 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
7386 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
7389 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
7390 numpunct_wchar
*numpunct
;
7393 numpunct
= numpunct_short_use_facet(loc
);
7395 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7397 ERR("Out of memory\n");
7398 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7400 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7402 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
7405 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
7406 codecvt_wchar
*codecvt
;
7409 codecvt
= codecvt_short_use_facet(loc
);
7411 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7413 ERR("Out of memory\n");
7414 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7416 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
7418 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
7422 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7423 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7424 /* List of missing facets:
7425 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7427 static void locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7429 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7431 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
7435 ctype
= ctype_wchar_use_facet(loc
);
7437 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7439 ERR("Out of memory\n");
7440 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7442 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
7444 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
7447 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
7451 numget
= num_get_wchar_use_facet(loc
);
7453 numget
= MSVCRT_operator_new(sizeof(num_get
));
7455 ERR("Out of memory\n");
7456 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7458 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
7460 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
7463 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
7467 numput
= num_put_wchar_use_facet(loc
);
7469 numput
= MSVCRT_operator_new(sizeof(num_put
));
7471 ERR("Out of memory\n");
7472 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7474 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
7476 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
7479 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
7480 numpunct_wchar
*numpunct
;
7483 numpunct
= numpunct_wchar_use_facet(loc
);
7485 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7487 ERR("Out of memory\n");
7488 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7490 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7492 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
7495 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
7496 codecvt_wchar
*codecvt
;
7499 codecvt
= codecvt_wchar_use_facet(loc
);
7501 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7503 ERR("Out of memory\n");
7504 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7506 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
7508 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
7512 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7513 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7514 /* List of missing facets:
7515 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7517 static void locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7519 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7521 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
7525 ctype
= ctype_char_use_facet(loc
);
7527 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
7529 ERR("Out of memory\n");
7530 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7532 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
7534 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
7537 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
7541 numget
= num_get_char_use_facet(loc
);
7543 numget
= MSVCRT_operator_new(sizeof(num_get
));
7545 ERR("Out of memory\n");
7546 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7548 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
7550 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
7553 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
7557 numput
= num_put_char_use_facet(loc
);
7559 numput
= MSVCRT_operator_new(sizeof(num_put
));
7561 ERR("Out of memory\n");
7562 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7564 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
7566 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
7569 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
7570 numpunct_char
*numpunct
;
7573 numpunct
= numpunct_char_use_facet(loc
);
7575 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
7577 ERR("Out of memory\n");
7578 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7580 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7582 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
7585 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
7586 codecvt_char
*codecvt
;
7589 codecvt
= codecvt_char_use_facet(loc
);
7591 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
7593 ERR("Out of memory\n");
7594 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7596 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
7598 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
7602 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
7603 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7604 static locale__Locimp
* locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7606 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
7608 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
7609 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
7610 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
7612 locimp
->catmask
|= cat
;
7613 basic_string_char_copy_ctor(&locimp
->name
, &locinfo
->newlocname
);
7617 /* ??_7_Locimp@locale@std@@6B@ */
7618 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
7619 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
7622 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
7623 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
7624 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
7625 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
7627 TRACE("(%p %p)\n", this, locimp
);
7628 /* Don't change locimp reference counter */
7633 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
7634 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
7635 locale__Locimp
* __cdecl
locale__Init(void)
7641 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7643 _Lockit_dtor(&lock
);
7644 return global_locale
;
7647 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7648 if(!global_locale
) {
7649 _Lockit_dtor(&lock
);
7650 ERR("Out of memory\n");
7651 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7655 locale__Locimp_ctor(global_locale
);
7656 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
7657 basic_string_char_dtor(&global_locale
->name
);
7658 basic_string_char_ctor_cstr(&global_locale
->name
, "C");
7660 locale__Locimp__Clocptr
= global_locale
;
7661 global_locale
->facet
.refs
++;
7662 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
7663 _Lockit_dtor(&lock
);
7665 return global_locale
;
7668 /* ??0locale@std@@QAE@ABV01@0H@Z */
7669 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
7670 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
7671 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
7675 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
7677 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7679 ERR("Out of memory\n");
7680 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7682 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
7684 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, basic_string_char_c_str(&loc
->ptr
->name
));
7685 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, basic_string_char_c_str(&other
->ptr
->name
));
7686 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
7687 _Locinfo_dtor(&locinfo
);
7692 /* ??0locale@std@@QAE@ABV01@@Z */
7693 /* ??0locale@std@@QEAA@AEBV01@@Z */
7694 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
7695 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
7697 TRACE("(%p %p)\n", this, copy
);
7698 this->ptr
= copy
->ptr
;
7699 locale_facet__Incref(&this->ptr
->facet
);
7703 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
7704 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
7705 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
7706 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
7708 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
7712 /* ??0locale@std@@QAE@PBDH@Z */
7713 /* ??0locale@std@@QEAA@PEBDH@Z */
7714 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
7715 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
7719 TRACE("(%p %s %d)\n", this, locname
, cat
);
7721 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7723 ERR("Out of memory\n");
7724 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7726 locale__Locimp_ctor(this->ptr
);
7730 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
7731 if(!memcmp(basic_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
7732 _Locinfo_dtor(&locinfo
);
7733 MSVCRT_operator_delete(this->ptr
);
7734 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
7737 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
7738 _Locinfo_dtor(&locinfo
);
7743 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
7744 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
7745 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
7746 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
7748 TRACE("(%p)\n", this);
7753 /* ??0locale@std@@QAE@XZ */
7754 /* ??0locale@std@@QEAA@XZ */
7755 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
7756 locale
* __thiscall
locale_ctor(locale
*this)
7758 TRACE("(%p)\n", this);
7759 this->ptr
= locale__Init();
7760 locale_facet__Incref(&this->ptr
->facet
);
7764 /* ??1locale@std@@QAE@XZ */
7765 /* ??1locale@std@@QEAA@XZ */
7766 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
7767 void __thiscall
locale_dtor(locale
*this)
7769 TRACE("(%p)\n", this);
7770 if(this->ptr
&& locale_facet__Decref(&this->ptr
->facet
)) {
7771 locale__Locimp_dtor(this->ptr
);
7772 MSVCRT_operator_delete(this);
7776 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
7777 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
7778 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
7779 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
7781 FIXME("(%p %p) stub\n", this, loc
);
7785 /* ??8locale@std@@QBE_NABV01@@Z */
7786 /* ??8locale@std@@QEBA_NAEBV01@@Z */
7787 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
7788 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
7790 FIXME("(%p %p) stub\n", this, loc
);
7794 /* ??9locale@std@@QBE_NABV01@@Z */
7795 /* ??9locale@std@@QEBA_NAEBV01@@Z */
7796 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
7797 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
7799 FIXME("(%p %p) stub\n", this, loc
);
7803 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
7804 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
7805 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
7806 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
7808 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
7810 if(this->ptr
->facet
.refs
> 1) {
7811 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7813 ERR("Out of memory\n");
7814 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7817 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
7818 locale_facet__Decref(&this->ptr
->facet
);
7819 this->ptr
= new_ptr
;
7822 locale__Locimp__Addfac(this->ptr
, facet
, id
);
7825 basic_string_char_dtor(&this->ptr
->name
);
7826 basic_string_char_ctor_cstr(&this->ptr
->name
, "*");
7831 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
7832 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
7833 static const locale_facet
* locale__Getfacet(const locale
*this, MSVCP_size_t id
)
7837 TRACE("(%p %lu)\n", this, id
);
7839 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
7840 if(fac
|| !this->ptr
->transparent
)
7843 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
7846 /* ?classic@locale@std@@SAABV12@XZ */
7847 /* ?classic@locale@std@@SAAEBV12@XZ */
7848 const locale
* __cdecl
locale_classic(void)
7852 return &classic_locale
;
7855 /* ?empty@locale@std@@SA?AV12@XZ */
7856 locale
* __cdecl
locale_empty(locale
*ret
)
7862 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
7864 ERR("Out of memory\n");
7865 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7867 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
7871 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
7872 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
7873 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
7874 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
7876 TRACE( "(%p)\n", this);
7877 basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
7881 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
7882 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
7883 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
7888 TRACE("(%p %p)\n", loc
, ret
);
7890 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7893 if(loc
->ptr
!= global_locale
) {
7894 locale_facet__Decref(&global_locale
->facet
);
7895 global_locale
= loc
->ptr
;
7896 locale_facet__Incref(&global_locale
->facet
);
7898 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
7899 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
7901 setlocale(i
, basic_string_char_c_str(&global_locale
->name
));
7904 _Lockit_dtor(&lock
);
7908 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@");
7909 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@");
7910 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@");
7911 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@");
7912 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@");
7913 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@");
7914 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@");
7915 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@");
7916 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@");
7917 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@");
7918 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@");
7919 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@");
7920 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@");
7921 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@");
7922 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@");
7923 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@@");
7924 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@@");
7925 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@@");
7926 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@@");
7927 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@@");
7928 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@@");
7931 void __asm_dummy_vtables(void) {
7933 __ASM_VTABLE(locale_facet
,
7934 VTABLE_ADD_FUNC(locale_facet_vector_dtor
));
7935 __ASM_VTABLE(collate_char
,
7936 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
7937 VTABLE_ADD_FUNC(collate_char_do_compare
)
7938 VTABLE_ADD_FUNC(collate_char_do_transform
)
7939 VTABLE_ADD_FUNC(collate_char_do_hash
));
7940 __ASM_VTABLE(collate_wchar
,
7941 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
7942 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
7943 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
7944 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
7945 __ASM_VTABLE(collate_short
,
7946 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
7947 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
7948 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
7949 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
7950 __ASM_VTABLE(ctype_base
,
7951 VTABLE_ADD_FUNC(ctype_base_vector_dtor
));
7952 __ASM_VTABLE(ctype_char
,
7953 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
7954 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
7955 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
7956 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
7957 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
7958 VTABLE_ADD_FUNC(ctype_char_do_widen
)
7959 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
7960 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
7961 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
));
7962 __ASM_VTABLE(ctype_wchar
,
7963 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
7964 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
7965 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
7966 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
7967 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
7968 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
7969 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
7970 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
7971 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
7972 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
7973 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
7974 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
7975 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
7976 __ASM_VTABLE(ctype_short
,
7977 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
7978 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
7979 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
7980 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
7981 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
7982 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
7983 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
7984 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
7985 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
7986 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
7987 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
7988 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
7989 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
7990 __ASM_VTABLE(codecvt_base
,
7991 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
7992 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
7993 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
7994 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
7995 __ASM_VTABLE(codecvt_char
,
7996 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
7997 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
7998 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
7999 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8000 VTABLE_ADD_FUNC(codecvt_char_do_in
)
8001 VTABLE_ADD_FUNC(codecvt_char_do_out
)
8002 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
8003 VTABLE_ADD_FUNC(codecvt_char_do_length
));
8004 __ASM_VTABLE(codecvt_wchar
,
8005 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8006 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8007 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8008 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8009 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8010 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8011 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8012 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8013 __ASM_VTABLE(codecvt_short
,
8014 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8015 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8016 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8017 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8018 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8019 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8020 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8021 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8022 __ASM_VTABLE(numpunct_char
,
8023 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
8024 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
8025 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
8026 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
8027 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
8028 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
8029 __ASM_VTABLE(numpunct_wchar
,
8030 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8031 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8032 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8033 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8034 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8035 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8036 __ASM_VTABLE(numpunct_short
,
8037 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8038 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8039 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8040 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8041 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8042 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8043 __ASM_VTABLE(num_get_char
,
8044 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
8045 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
8046 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8047 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8048 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
8049 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
8050 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
8051 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
8052 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
8053 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
8054 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
8055 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
8056 __ASM_VTABLE(num_get_short
,
8057 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8058 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
8059 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8060 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8061 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
8062 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
8063 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
8064 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
8065 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
8066 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
8067 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
8068 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
8069 __ASM_VTABLE(num_get_wchar
,
8070 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8071 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
8072 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8073 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8074 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
8075 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
8076 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
8077 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
8078 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
8079 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
8080 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
8081 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
8082 __ASM_VTABLE(num_put_char
,
8083 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
8084 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
8085 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8086 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8087 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
8088 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
8089 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
8090 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
8091 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
8092 __ASM_VTABLE(num_put_wchar
,
8093 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8094 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
8095 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8096 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8097 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
8098 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
8099 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
8100 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
8101 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
8102 __ASM_VTABLE(num_put_short
,
8103 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8104 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
8105 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8106 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8107 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
8108 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
8109 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
8110 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
8111 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
8116 void init_locale(void *base
)
8119 init_locale_facet_rtti(base
);
8120 init_collate_char_rtti(base
);
8121 init_collate_wchar_rtti(base
);
8122 init_collate_short_rtti(base
);
8123 init_ctype_base_rtti(base
);
8124 init_ctype_char_rtti(base
);
8125 init_ctype_wchar_rtti(base
);
8126 init_ctype_short_rtti(base
);
8127 init_codecvt_base_rtti(base
);
8128 init_codecvt_char_rtti(base
);
8129 init_codecvt_wchar_rtti(base
);
8130 init_codecvt_short_rtti(base
);
8131 init_numpunct_char_rtti(base
);
8132 init_numpunct_wchar_rtti(base
);
8133 init_numpunct_short_rtti(base
);
8134 init_num_get_char_rtti(base
);
8135 init_num_get_wchar_rtti(base
);
8136 init_num_get_short_rtti(base
);
8137 init_num_put_char_rtti(base
);
8138 init_num_put_wchar_rtti(base
);
8139 init_num_put_short_rtti(base
);
8143 void free_locale(void)
8145 facets_elem
*iter
, *safe
;
8148 locale__Locimp_dtor(global_locale
);
8149 locale_dtor(&classic_locale
);
8152 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
8153 list_remove(&iter
->entry
);
8154 if(locale_facet__Decref(iter
->fac
))
8155 call_locale_facet_vector_dtor(iter
->fac
, 1);
8156 MSVCRT_operator_delete(iter
);