2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/list.h"
35 #include "wine/unicode.h"
36 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
39 char* __cdecl _Getdays(void);
40 char* __cdecl _Getmonths(void);
41 void* __cdecl _Gettnames(void);
42 unsigned int __cdecl ___lc_codepage_func(void);
43 LCID* __cdecl ___lc_handle_func(void);
44 const locale_facet* __thiscall locale__Getfacet(const locale*, MSVCP_size_t);
52 typedef struct _locale__Locimp {
54 locale_facet **facetvec;
55 MSVCP_size_t facet_cnt;
57 MSVCP_bool transparent;
58 basic_string_char name;
67 basic_string_char days;
68 basic_string_char months;
69 basic_string_char oldlocname;
70 basic_string_char newlocname;
88 const char *false_name;
89 const char *true_name;
97 const wchar_t *false_name;
98 const wchar_t *true_name;
101 typedef struct _istreambuf_iterator_wchar
103 basic_streambuf_wchar *strbuf;
106 } istreambuf_iterator_wchar;
108 /* ?_Id_cnt@id@locale@std@@0HA */
109 int locale_id__Id_cnt = 0;
111 static locale__Locimp *global_locale;
112 static locale classic_locale;
114 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
115 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
116 locale__Locimp *locale__Locimp__Clocptr = NULL;
118 static char istreambuf_iterator_char_val(istreambuf_iterator_char *this)
120 if(this->strbuf && !this->got) {
121 int c = basic_streambuf_char_sgetc(this->strbuf);
132 static void istreambuf_iterator_char_inc(istreambuf_iterator_char *this)
134 if(!this->strbuf || basic_streambuf_char_sbumpc(this->strbuf)==EOF) {
139 istreambuf_iterator_char_val(this);
143 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char *this, char ch)
145 if(this->failed || basic_streambuf_char_sputc(this->strbuf, ch)==EOF)
149 /* ??1facet@locale@std@@UAE@XZ */
150 /* ??1facet@locale@std@@UEAA@XZ */
151 DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
152 void __thiscall locale_facet_dtor(locale_facet *this)
154 TRACE("(%p)\n", this);
157 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
158 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
159 locale_facet*, (locale_facet*, unsigned int), (this, flags))
160 locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
162 TRACE("(%p %x)\n", this, flags);
164 /* we have an array, with the number of elements stored before the first object */
165 int i, *ptr = (int *)this-1;
167 for(i=*ptr-1; i>=0; i--)
168 locale_facet_dtor(this+i);
169 MSVCRT_operator_delete(ptr);
171 locale_facet_dtor(this);
173 MSVCRT_operator_delete(this);
184 static struct list lazy_facets = LIST_INIT(lazy_facets);
186 /* Not exported from msvcp90 */
187 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
188 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
189 void __cdecl locale_facet_register(locale_facet *add)
191 facets_elem *head = MSVCRT_operator_new(sizeof(*head));
193 ERR("Out of memory\n");
194 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
198 list_add_head(&lazy_facets, &head->entry);
201 /* Not exported from msvcp90 */
202 /* ??_7facet@locale@std@@6B@ */
203 extern const vtable_ptr MSVCP_locale_facet_vtable;
205 /* ??0id@locale@std@@QAE@I@Z */
206 /* ??0id@locale@std@@QEAA@_K@Z */
207 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
208 locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
210 TRACE("(%p %lu)\n", this, id);
216 /* ??_Fid@locale@std@@QAEXXZ */
217 /* ??_Fid@locale@std@@QEAAXXZ */
218 DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
219 locale_id* __thiscall locale_id_ctor(locale_id *this)
221 TRACE("(%p)\n", this);
227 /* ??Bid@locale@std@@QAEIXZ */
228 /* ??Bid@locale@std@@QEAA_KXZ */
229 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
230 MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
234 TRACE("(%p)\n", this);
237 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
238 this->id = ++locale_id__Id_cnt;
245 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
246 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
247 int* __cdecl locale_id__Id_cnt_func(void)
250 return &locale_id__Id_cnt;
253 /* ??_Ffacet@locale@std@@QAEXXZ */
254 /* ??_Ffacet@locale@std@@QEAAXXZ */
255 DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
256 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
258 TRACE("(%p)\n", this);
259 this->vtable = &MSVCP_locale_facet_vtable;
264 /* ??0facet@locale@std@@IAE@I@Z */
265 /* ??0facet@locale@std@@IEAA@_K@Z */
266 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
267 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
269 TRACE("(%p %lu)\n", this, refs);
270 this->vtable = &MSVCP_locale_facet_vtable;
275 /* ?_Incref@facet@locale@std@@QAEXXZ */
276 /* ?_Incref@facet@locale@std@@QEAAXXZ */
277 DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
278 void __thiscall locale_facet__Incref(locale_facet *this)
282 TRACE("(%p)\n", this);
284 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
289 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
290 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
291 DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
292 locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
297 TRACE("(%p)\n", this);
299 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
303 ret = this->refs ? NULL : this;
309 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
310 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
311 MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const locale *loc)
313 TRACE("(%p %p)\n", facet, loc);
317 /* ??0_Timevec@std@@QAE@ABV01@@Z */
318 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
319 /* This copy constructor modifies copied object */
320 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8)
321 _Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy)
323 TRACE("(%p %p)\n", this, copy);
324 this->timeptr = copy->timeptr;
325 copy->timeptr = NULL;
329 /* ??0_Timevec@std@@QAE@PAX@Z */
330 /* ??0_Timevec@std@@QEAA@PEAX@Z */
331 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8)
332 _Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr)
334 TRACE("(%p %p)\n", this, timeptr);
335 this->timeptr = timeptr;
339 /* ??_F_Timevec@std@@QAEXXZ */
340 /* ??_F_Timevec@std@@QEAAXXZ */
341 DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4)
342 _Timevec* __thiscall _Timevec_ctor(_Timevec *this)
344 TRACE("(%p)\n", this);
345 this->timeptr = NULL;
349 /* ??1_Timevec@std@@QAE@XZ */
350 /* ??1_Timevec@std@@QEAA@XZ */
351 DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4)
352 void __thiscall _Timevec_dtor(_Timevec *this)
354 TRACE("(%p)\n", this);
358 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
359 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
360 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8)
361 _Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right)
363 TRACE("(%p %p)\n", this, right);
364 this->timeptr = right->timeptr;
365 right->timeptr = NULL;
369 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
370 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
371 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4)
372 void* __thiscall _Timevec__Getptr(_Timevec *this)
374 TRACE("(%p)\n", this);
375 return this->timeptr;
378 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
379 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
380 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr)
382 const char *locale = NULL;
384 /* This function is probably modifying more global objects */
385 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
388 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
390 _Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
391 MSVCP_basic_string_char_ctor_cstr(&locinfo->days, "");
392 MSVCP_basic_string_char_ctor_cstr(&locinfo->months, "");
393 MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL));
396 locale = setlocale(LC_ALL, locstr);
398 locale = setlocale(LC_ALL, NULL);
401 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
403 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
408 /* ??0_Locinfo@std@@QAE@HPBD@Z */
409 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
410 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12)
411 _Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr)
413 return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr);
416 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
417 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
418 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_bstr(_Locinfo *locinfo, const basic_string_char *locstr)
420 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
423 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
424 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
425 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr, 8)
426 _Locinfo* __thiscall _Locinfo_ctor_bstr(_Locinfo *this, const basic_string_char *locstr)
428 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
431 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
432 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
433 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr)
435 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr);
438 /* ??0_Locinfo@std@@QAE@PBD@Z */
439 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
440 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8)
441 _Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr)
443 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr);
446 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
447 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
448 void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo)
450 TRACE("(%p)\n", locinfo);
452 setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname));
453 MSVCP_basic_string_char_dtor(&locinfo->days);
454 MSVCP_basic_string_char_dtor(&locinfo->months);
455 MSVCP_basic_string_char_dtor(&locinfo->oldlocname);
456 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
457 _Lockit_dtor(&locinfo->lock);
460 /* ??_F_Locinfo@std@@QAEXXZ */
461 /* ??_F_Locinfo@std@@QEAAXXZ */
462 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4)
463 _Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this)
465 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
468 /* ??1_Locinfo@std@@QAE@XZ */
469 /* ??1_Locinfo@std@@QEAA@XZ */
470 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4)
471 void __thiscall _Locinfo_dtor(_Locinfo *this)
473 _Locinfo__Locinfo_dtor(this);
476 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
477 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
478 _Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr)
480 const char *locale = NULL;
482 /* This function is probably modifying more global objects */
483 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
485 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
487 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
490 locale = setlocale(LC_ALL, locstr);
492 locale = setlocale(LC_ALL, NULL);
495 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
497 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
502 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
503 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
504 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12)
505 _Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr)
507 return _Locinfo__Locinfo_Addcats(this, category, locstr);
511 _Collvec __cdecl _Getcoll(void)
514 _locale_t locale = _get_current_locale();
518 ret.page = locale->locinfo->lc_collate_cp;
519 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
520 _free_locale(locale);
524 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
525 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
526 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8)
527 _Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret)
534 _Ctypevec __cdecl _Getctype(void)
537 _locale_t locale = _get_current_locale();
542 ret.page = locale->locinfo->lc_codepage;
543 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
545 table = malloc(sizeof(short[256]));
547 _free_locale(locale);
548 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
550 memcpy(table, locale->locinfo->pctype, sizeof(short[256]));
552 _free_locale(locale);
556 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
557 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
558 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8)
559 _Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret)
566 _Cvtvec __cdecl _Getcvt(void)
569 _locale_t locale = _get_current_locale();
573 ret.page = locale->locinfo->lc_codepage;
574 ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
575 _free_locale(locale);
579 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
580 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
581 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8)
582 _Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret)
588 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
589 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
590 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4)
591 int __thiscall _Locinfo__Getdateorder(const _Locinfo *this)
593 FIXME("(%p) stub\n", this);
597 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
598 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
599 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4)
600 const char* __thiscall _Locinfo__Getdays(_Locinfo *this)
602 char *days = _Getdays();
604 TRACE("(%p)\n", this);
607 MSVCP_basic_string_char_dtor(&this->days);
608 MSVCP_basic_string_char_ctor_cstr(&this->days, days);
612 return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) :
613 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
616 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
617 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
618 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4)
619 const char* __thiscall _Locinfo__Getmonths(_Locinfo *this)
621 char *months = _Getmonths();
623 TRACE("(%p)\n", this);
626 MSVCP_basic_string_char_dtor(&this->months);
627 MSVCP_basic_string_char_ctor_cstr(&this->months, months);
631 return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) :
632 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
633 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
636 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
637 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
638 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4)
639 const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this)
641 TRACE("(%p)\n", this);
645 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
646 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
647 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4)
648 const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this)
650 TRACE("(%p)\n", this);
654 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
655 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
656 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4)
657 const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this)
659 TRACE("(%p)\n", this);
663 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
664 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
665 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname, 8)
666 basic_string_char* __thiscall _Locinfo__Getname(const _Locinfo *this, basic_string_char *ret)
668 TRACE("(%p)\n", this);
670 MSVCP_basic_string_char_copy_ctor(ret, &this->newlocname);
674 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
675 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
676 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 8)
677 _Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret)
679 TRACE("(%p)\n", this);
681 _Timevec_ctor_timeptr(ret, _Gettnames());
685 /* ?id@?$collate@D@std@@2V0locale@2@A */
686 locale_id collate_char_id = {0};
688 /* ??_7?$collate@D@std@@6B@ */
689 extern const vtable_ptr MSVCP_collate_char_vtable;
691 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
692 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
693 DEFINE_THISCALL_WRAPPER(collate_char__Init, 8)
694 void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo)
696 TRACE("(%p %p)\n", this, locinfo);
697 _Locinfo__Getcoll(locinfo, &this->coll);
700 /* ??0?$collate@D@std@@IAE@PBDI@Z */
701 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
702 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12)
703 collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
707 TRACE("(%p %s %lu)\n", this, name, refs);
709 locale_facet_ctor_refs(&this->facet, refs);
710 this->facet.vtable = &MSVCP_collate_char_vtable;
712 _Locinfo_ctor_cstr(&locinfo, name);
713 collate_char__Init(this, &locinfo);
714 _Locinfo_dtor(&locinfo);
718 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
719 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
720 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12)
721 collate* __thiscall collate_char_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
723 TRACE("(%p %p %lu)\n", this, locinfo, refs);
725 locale_facet_ctor_refs(&this->facet, refs);
726 this->facet.vtable = &MSVCP_collate_char_vtable;
727 collate_char__Init(this, locinfo);
731 /* ??0?$collate@D@std@@QAE@I@Z */
732 /* ??0?$collate@D@std@@QEAA@_K@Z */
733 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8)
734 collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs)
736 return collate_char_ctor_name(this, "C", refs);
739 /* ??1?$collate@D@std@@MAE@XZ */
740 /* ??1?$collate@D@std@@MEAA@XZ */
741 DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4)
742 void __thiscall collate_char_dtor(collate *this)
744 TRACE("(%p)\n", this);
747 DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor, 8)
748 collate* __thiscall MSVCP_collate_char_vector_dtor(collate *this, unsigned int flags)
750 TRACE("(%p %x)\n", this, flags);
752 /* we have an array, with the number of elements stored before the first object */
753 int i, *ptr = (int *)this-1;
755 for(i=*ptr-1; i>=0; i--)
756 collate_char_dtor(this+i);
757 MSVCRT_operator_delete(ptr);
759 collate_char_dtor(this);
761 MSVCRT_operator_delete(this);
767 /* ??_F?$collate@D@std@@QAEXXZ */
768 /* ??_F?$collate@D@std@@QEAAXXZ */
769 DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4)
770 collate* __thiscall collate_char_ctor(collate *this)
772 return collate_char_ctor_name(this, "C", 0);
775 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
776 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
777 MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const locale *loc)
779 TRACE("(%p %p)\n", facet, loc);
781 if(facet && !*facet) {
782 *facet = MSVCRT_operator_new(sizeof(collate));
784 ERR("Out of memory\n");
785 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
788 collate_char_ctor_name((collate*)*facet,
789 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
796 int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2,
797 const char *last2, const _Collvec *coll)
801 TRACE("(%s %s)\n", debugstr_an(first1, last1-first1), debugstr_an(first2, last2-first2));
806 lcid = ___lc_handle_func()[LC_COLLATE];
807 return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL;
810 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
811 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
812 DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20)
813 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
814 (const collate*, const char*, const char*, const char*, const char*), \
815 (this, first1, last1, first2, last2))
816 int __thiscall collate_char_do_compare(const collate *this, const char *first1,
817 const char *last1, const char *first2, const char *last2)
819 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
820 return _Strcoll(first1, last1, first2, last2, &this->coll);
823 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
824 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
825 DEFINE_THISCALL_WRAPPER(collate_char_compare, 20)
826 int __thiscall collate_char_compare(const collate *this, const char *first1,
827 const char *last1, const char *first2, const char *last2)
829 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
830 return call_collate_char_do_compare(this, first1, last1, first2, last2);
833 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
834 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
835 DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12)
836 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
837 (const collate*, const char*, const char*), (this, first, last))
838 LONG __thiscall collate_char_do_hash(const collate *this,
839 const char *first, const char *last)
843 TRACE("(%p %p %p)\n", this, first, last);
845 for(; first<last; first++)
846 ret = (ret<<8 | ret>>24) + *first;
850 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
851 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
852 DEFINE_THISCALL_WRAPPER(collate_char_hash, 12)
853 LONG __thiscall collate_char_hash(const collate *this,
854 const char *first, const char *last)
856 TRACE("(%p %p %p)\n", this, first, last);
857 return call_collate_char_do_hash(this, first, last);
860 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
861 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
862 DEFINE_THISCALL_WRAPPER(collate_char_do_transform, 16)
863 basic_string_char* __thiscall collate_char_do_transform(const collate *this,
864 basic_string_char *ret, const char *first, const char *last)
866 FIXME("(%p %p %p) stub\n", this, first, last);
870 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
871 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
872 DEFINE_THISCALL_WRAPPER(collate_char_transform, 16)
873 basic_string_char* __thiscall collate_char_transform(const collate *this,
874 basic_string_char *ret, const char *first, const char *last)
876 FIXME("(%p %p %p) stub\n", this, first, last);
880 /* ?id@?$collate@_W@std@@2V0locale@2@A */
881 locale_id collate_wchar_id = {0};
882 /* ?id@?$collate@G@std@@2V0locale@2@A */
883 locale_id collate_short_id = {0};
885 /* ??_7?$collate@_W@std@@6B@ */
886 extern const vtable_ptr MSVCP_collate_wchar_vtable;
887 /* ??_7?$collate@G@std@@6B@ */
888 extern const vtable_ptr MSVCP_collate_short_vtable;
890 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
891 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
892 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
893 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
894 DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8)
895 void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo)
897 TRACE("(%p %p)\n", this, locinfo);
898 _Locinfo__Getcoll(locinfo, &this->coll);
901 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
902 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
903 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12)
904 collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
908 TRACE("(%p %s %lu)\n", this, name, refs);
910 locale_facet_ctor_refs(&this->facet, refs);
911 this->facet.vtable = &MSVCP_collate_wchar_vtable;
913 _Locinfo_ctor_cstr(&locinfo, name);
914 collate_wchar__Init(this, &locinfo);
915 _Locinfo_dtor(&locinfo);
919 /* ??0?$collate@G@std@@IAE@PBDI@Z */
920 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
921 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12)
922 collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
924 collate *ret = collate_wchar_ctor_name(this, name, refs);
925 ret->facet.vtable = &MSVCP_collate_short_vtable;
929 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
930 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
931 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12)
932 collate* __thiscall collate_wchar_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
934 TRACE("(%p %p %lu)\n", this, locinfo, refs);
936 locale_facet_ctor_refs(&this->facet, refs);
937 this->facet.vtable = &MSVCP_collate_wchar_vtable;
938 collate_wchar__Init(this, locinfo);
942 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
943 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
944 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12)
945 collate* __thiscall collate_short_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
947 collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs);
948 ret->facet.vtable = &MSVCP_collate_short_vtable;
952 /* ??0?$collate@_W@std@@QAE@I@Z */
953 /* ??0?$collate@_W@std@@QEAA@_K@Z */
954 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8)
955 collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs)
957 return collate_wchar_ctor_name(this, "C", refs);
960 /* ??0?$collate@G@std@@QAE@I@Z */
961 /* ??0?$collate@G@std@@QEAA@_K@Z */
962 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8)
963 collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs)
965 collate *ret = collate_wchar_ctor_refs(this, refs);
966 ret->facet.vtable = &MSVCP_collate_short_vtable;
970 /* ??1?$collate@_W@std@@MAE@XZ */
971 /* ??1?$collate@_W@std@@MEAA@XZ */
972 /* ??1?$collate@G@std@@MAE@XZ */
973 /* ??1?$collate@G@std@@MEAA@XZ */
974 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4)
975 void __thiscall collate_wchar_dtor(collate *this)
977 TRACE("(%p)\n", this);
980 DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor, 8)
981 collate* __thiscall MSVCP_collate_wchar_vector_dtor(collate *this, unsigned int flags)
983 TRACE("(%p %x)\n", this, flags);
985 /* we have an array, with the number of elements stored before the first object */
986 int i, *ptr = (int *)this-1;
988 for(i=*ptr-1; i>=0; i--)
989 collate_wchar_dtor(this+i);
990 MSVCRT_operator_delete(ptr);
992 collate_wchar_dtor(this);
994 MSVCRT_operator_delete(this);
1000 DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor, 8)
1001 collate* __thiscall MSVCP_collate_short_vector_dtor(collate *this, unsigned int flags)
1003 return MSVCP_collate_wchar_vector_dtor(this, flags);
1006 /* ??_F?$collate@_W@std@@QAEXXZ */
1007 /* ??_F?$collate@_W@std@@QEAAXXZ */
1008 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4)
1009 collate* __thiscall collate_wchar_ctor(collate *this)
1011 return collate_wchar_ctor_name(this, "C", 0);
1014 /* ??_F?$collate@G@std@@QAEXXZ */
1015 /* ??_F?$collate@G@std@@QEAAXXZ */
1016 DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4)
1017 collate* __thiscall collate_short_ctor(collate *this)
1019 collate *ret = collate_wchar_ctor(this);
1020 ret->facet.vtable = &MSVCP_collate_short_vtable;
1024 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1025 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1026 MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const locale *loc)
1028 TRACE("(%p %p)\n", facet, loc);
1030 if(facet && !*facet) {
1031 *facet = MSVCRT_operator_new(sizeof(collate));
1033 ERR("Out of memory\n");
1034 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1037 collate_wchar_ctor_name((collate*)*facet,
1038 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
1044 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1045 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1046 MSVCP_size_t __cdecl collate_short__Getcat(const locale_facet **facet, const locale *loc)
1048 if(facet && !*facet) {
1049 collate_wchar__Getcat(facet, loc);
1050 (*(locale_facet**)facet)->vtable = &MSVCP_collate_short_vtable;
1057 int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t *first2,
1058 const wchar_t *last2, const _Collvec *coll)
1062 TRACE("(%s %s)\n", debugstr_wn(first1, last1-first1), debugstr_wn(first2, last2-first2));
1065 lcid = coll->handle;
1067 lcid = ___lc_handle_func()[LC_COLLATE];
1068 return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL;
1071 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1072 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1073 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1074 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1075 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20)
1076 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1077 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1078 (this, first1, last1, first2, last2))
1079 int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1,
1080 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1082 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1083 return _Wcscoll(first1, last1, first2, last2, &this->coll);
1086 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1087 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1088 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1089 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1090 DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20)
1091 int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1,
1092 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1094 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1095 return call_collate_wchar_do_compare(this, first1, last1, first2, last2);
1098 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1099 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1100 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1101 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1102 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12)
1103 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1104 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1105 LONG __thiscall collate_wchar_do_hash(const collate *this,
1106 const wchar_t *first, const wchar_t *last)
1110 TRACE("(%p %p %p)\n", this, first, last);
1112 for(; first<last; first++)
1113 ret = (ret<<8 | ret>>24) + *first;
1117 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1118 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1119 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1120 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1121 DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12)
1122 LONG __thiscall collate_wchar_hash(const collate *this,
1123 const wchar_t *first, const wchar_t *last)
1125 TRACE("(%p %p %p)\n", this, first, last);
1126 return call_collate_wchar_do_hash(this, first, last);
1129 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1130 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1131 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1132 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1133 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform, 16)
1134 basic_string_wchar* __thiscall collate_wchar_do_transform(const collate *this,
1135 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1137 FIXME("(%p %p %p) stub\n", this, first, last);
1141 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1142 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1143 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1144 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1145 DEFINE_THISCALL_WRAPPER(collate_wchar_transform, 16)
1146 basic_string_wchar* __thiscall collate_wchar_transform(const collate *this,
1147 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1149 FIXME("(%p %p %p) stub\n", this, first, last);
1153 /* ??_7ctype_base@std@@6B@ */
1154 extern const vtable_ptr MSVCP_ctype_base_vtable;
1156 /* ??0ctype_base@std@@QAE@I@Z */
1157 /* ??0ctype_base@std@@QEAA@_K@Z */
1158 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
1159 ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
1161 TRACE("(%p %lu)\n", this, refs);
1162 locale_facet_ctor_refs(&this->facet, refs);
1163 this->facet.vtable = &MSVCP_ctype_base_vtable;
1167 /* ??_Fctype_base@std@@QAEXXZ */
1168 /* ??_Fctype_base@std@@QEAAXXZ */
1169 DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
1170 ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
1172 TRACE("(%p)\n", this);
1173 locale_facet_ctor_refs(&this->facet, 0);
1174 this->facet.vtable = &MSVCP_ctype_base_vtable;
1178 /* ??1ctype_base@std@@UAE@XZ */
1179 /* ??1ctype_base@std@@UEAA@XZ */
1180 DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
1181 void __thiscall ctype_base_dtor(ctype_base *this)
1183 TRACE("(%p)\n", this);
1186 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
1187 ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
1189 TRACE("(%p %x)\n", this, flags);
1191 /* we have an array, with the number of elements stored before the first object */
1192 int i, *ptr = (int *)this-1;
1194 for(i=*ptr-1; i>=0; i--)
1195 ctype_base_dtor(this+i);
1196 MSVCRT_operator_delete(ptr);
1198 ctype_base_dtor(this);
1200 MSVCRT_operator_delete(this);
1206 /* ?_Xran@ctype_base@std@@KAXXZ */
1207 void __cdecl ctype_base__Xran(void)
1209 throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
1212 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1213 locale_id ctype_char_id = {0};
1214 /* ?table_size@?$ctype@D@std@@2IB */
1215 /* ?table_size@?$ctype@D@std@@2_KB */
1216 MSVCP_size_t ctype_char_table_size = 256;
1218 /* ??_7?$ctype@D@std@@6B@ */
1219 extern const vtable_ptr MSVCP_ctype_char_vtable;
1221 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1222 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1223 locale_id* __cdecl ctype_char__Id_func(void)
1226 return &ctype_char_id;
1229 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1230 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1231 DEFINE_THISCALL_WRAPPER(ctype_char__Init, 8)
1232 void __thiscall ctype_char__Init(ctype_char *this, _Locinfo *locinfo)
1234 TRACE("(%p %p)\n", this, locinfo);
1235 _Locinfo__Getctype(locinfo, &this->ctype);
1238 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1239 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1240 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy, 4)
1241 void __thiscall ctype_char__Tidy(ctype_char *this)
1243 TRACE("(%p)\n", this);
1245 if(this->ctype.delfl)
1246 free((short*)this->ctype.table);
1249 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1250 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1251 const short* __cdecl ctype_char_classic_table(void)
1254 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1257 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1258 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1259 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo, 12)
1260 ctype_char* __thiscall ctype_char_ctor_locinfo(ctype_char *this,
1261 _Locinfo *locinfo, MSVCP_size_t refs)
1263 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1264 ctype_base_ctor_refs(&this->base, refs);
1265 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1266 ctype_char__Init(this, locinfo);
1270 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1271 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1272 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table, 16)
1273 ctype_char* __thiscall ctype_char_ctor_table(ctype_char *this,
1274 const short *table, MSVCP_bool delete, MSVCP_size_t refs)
1278 TRACE("(%p %p %d %lu)\n", this, table, delete, refs);
1280 ctype_base_ctor_refs(&this->base, refs);
1281 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1283 _Locinfo_ctor(&locinfo);
1284 ctype_char__Init(this, &locinfo);
1285 _Locinfo_dtor(&locinfo);
1288 ctype_char__Tidy(this);
1289 this->ctype.table = table;
1290 this->ctype.delfl = delete;
1295 /* ??_F?$ctype@D@std@@QAEXXZ */
1296 /* ??_F?$ctype@D@std@@QEAAXXZ */
1297 DEFINE_THISCALL_WRAPPER(ctype_char_ctor, 4)
1298 ctype_char* __thiscall ctype_char_ctor(ctype_char *this)
1300 return ctype_char_ctor_table(this, NULL, FALSE, 0);
1303 /* ??1?$ctype@D@std@@MAE@XZ */
1304 /* ??1?$ctype@D@std@@MEAA@XZ */
1305 DEFINE_THISCALL_WRAPPER(ctype_char_dtor, 4)
1306 void __thiscall ctype_char_dtor(ctype_char *this)
1308 TRACE("(%p)\n", this);
1309 ctype_char__Tidy(this);
1312 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_char_vector_dtor, 8)
1313 ctype_char* __thiscall MSVCP_ctype_char_vector_dtor(ctype_char *this, unsigned int flags)
1315 TRACE("(%p %x)\n", this, flags);
1317 /* we have an array, with the number of elements stored before the first object */
1318 int i, *ptr = (int *)this-1;
1320 for(i=*ptr-1; i>=0; i--)
1321 ctype_char_dtor(this+i);
1322 MSVCRT_operator_delete(ptr);
1324 ctype_char_dtor(this);
1326 MSVCRT_operator_delete(this);
1332 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1333 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1334 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12)
1335 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1336 char, (const ctype_char*, char, char), (this, ch, unused))
1337 char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused)
1339 TRACE("(%p %c %c)\n", this, ch, unused);
1343 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1344 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1345 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20)
1346 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1347 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1348 (this, first, last, unused, dest))
1349 const char* __thiscall ctype_char_do_narrow(const ctype_char *this,
1350 const char *first, const char *last, char unused, char *dest)
1352 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1353 memcpy(dest, first, last-first);
1357 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1358 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1359 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s, 24)
1360 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1361 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1362 (this, first, last, unused, dest, size))
1363 const char* __thiscall ctype_char__Do_narrow_s(const ctype_char *this, const char *first,
1364 const char *last, char unused, char *dest, MSVCP_size_t size)
1366 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1367 memcpy_s(dest, size, first, last-first);
1371 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1372 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1373 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch, 12)
1374 char __thiscall ctype_char_narrow_ch(const ctype_char *this, char ch, char dflt)
1376 TRACE("(%p %c %c)\n", this, ch, dflt);
1377 return call_ctype_char_do_narrow_ch(this, ch, dflt);
1380 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1381 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1382 DEFINE_THISCALL_WRAPPER(ctype_char_narrow, 20)
1383 const char* __thiscall ctype_char_narrow(const ctype_char *this,
1384 const char *first, const char *last, char dflt, char *dest)
1386 TRACE("(%p %p %p %c %p)\n", this, first, last, dflt, dest);
1387 return call_ctype_char_do_narrow(this, first, last, dflt, dest);
1390 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1391 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1392 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s, 24)
1393 const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *first,
1394 const char *last, char dflt, char *dest, MSVCP_size_t size)
1396 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1397 return call_ctype_char__Do_narrow_s(this, first, last, dflt, dest, size);
1400 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1401 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1402 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8)
1403 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1404 char, (const ctype_char*, char), (this, ch))
1405 char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch)
1407 TRACE("(%p %c)\n", this, ch);
1411 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1412 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1413 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16)
1414 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1415 const char*, (const ctype_char*, const char*, const char*, char*), \
1416 (this, first, last, dest))
1417 const char* __thiscall ctype_char_do_widen(const ctype_char *this,
1418 const char *first, const char *last, char *dest)
1420 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1421 memcpy(dest, first, last-first);
1425 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1426 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1427 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20)
1428 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1429 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1430 (this, first, last, dest, size))
1431 const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
1432 const char *first, const char *last, char *dest, MSVCP_size_t size)
1434 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1435 memcpy_s(dest, size, first, last-first);
1439 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1440 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1441 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8)
1442 char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch)
1444 TRACE("(%p %c)\n", this, ch);
1445 return call_ctype_char_do_widen_ch(this, ch);
1448 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1449 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1450 DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16)
1451 const char* __thiscall ctype_char_widen(const ctype_char *this,
1452 const char *first, const char *last, char *dest)
1454 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1455 return call_ctype_char_do_widen(this, first, last, dest);
1458 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1459 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1460 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20)
1461 const char* __thiscall ctype_char__Widen_s(const ctype_char *this,
1462 const char *first, const char *last, char *dest, MSVCP_size_t size)
1464 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1465 return call_ctype_char__Do_widen_s(this, first, last, dest, size);
1468 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1469 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1470 MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale *loc)
1472 TRACE("(%p %p)\n", facet, loc);
1474 if(facet && !*facet) {
1477 *facet = MSVCRT_operator_new(sizeof(ctype_char));
1479 ERR("Out of memory\n");
1480 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1484 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
1485 ctype_char_ctor_locinfo((ctype_char*)*facet, &locinfo, 0);
1486 _Locinfo_dtor(&locinfo);
1492 ctype_char* ctype_char_use_facet(const locale *loc)
1494 static ctype_char *obj = NULL;
1497 const locale_facet *fac;
1499 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
1500 fac = locale__Getfacet(loc, ctype_char_id.id);
1502 _Lockit_dtor(&lock);
1503 return (ctype_char*)fac;
1509 ctype_char__Getcat(&fac, loc);
1510 obj = (ctype_char*)fac;
1511 locale_facet__Incref(&obj->base.facet);
1512 locale_facet_register(&obj->base.facet);
1513 _Lockit_dtor(&lock);
1519 int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
1523 TRACE("%d %p\n", ch, ctype);
1528 cp = ___lc_codepage_func();
1530 /* Don't convert to unicode in case of C locale */
1532 if(ch>='A' && ch<='Z')
1541 str[0] = (ch>>8) & 255;
1549 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1552 lower = tolowerW(wide);
1556 WideCharToMultiByte(cp, 0, &lower, 1, str, 2, NULL, NULL);
1558 return str[0] + (str[1]<<8);
1562 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1563 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1564 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1565 char, (const ctype_char*, char), (this, ch))
1566 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch, 8)
1567 char __thiscall ctype_char_do_tolower_ch(const ctype_char *this, char ch)
1569 TRACE("(%p %c)\n", this, ch);
1570 return _Tolower(ch, &this->ctype);
1573 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1574 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1575 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1576 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1577 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower, 12)
1578 const char* __thiscall ctype_char_do_tolower(const ctype_char *this, char *first, const char *last)
1580 TRACE("(%p %p %p)\n", this, first, last);
1581 for(; first<last; first++)
1582 *first = _Tolower(*first, &this->ctype);
1586 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1587 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1588 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch, 8)
1589 char __thiscall ctype_char_tolower_ch(const ctype_char *this, char ch)
1591 TRACE("(%p %c)\n", this, ch);
1592 return call_ctype_char_do_tolower_ch(this, ch);
1595 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1596 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1597 DEFINE_THISCALL_WRAPPER(ctype_char_tolower, 12)
1598 const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, const char *last)
1600 TRACE("(%p %p %p)\n", this, first, last);
1601 return call_ctype_char_do_tolower(this, first, last);
1605 int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
1609 TRACE("%d %p\n", ch, ctype);
1614 cp = ___lc_codepage_func();
1616 /* Don't convert to unicode in case of C locale */
1618 if(ch>='a' && ch<='z')
1627 str[0] = (ch>>8) & 255;
1635 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1638 upper = toupperW(wide);
1642 WideCharToMultiByte(cp, 0, &upper, 1, str, 2, NULL, NULL);
1644 return str[0] + (str[1]<<8);
1648 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1649 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1650 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1651 char, (const ctype_char*, char), (this, ch))
1652 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch, 8)
1653 char __thiscall ctype_char_do_toupper_ch(const ctype_char *this, char ch)
1655 TRACE("(%p %c)\n", this, ch);
1656 return _Toupper(ch, &this->ctype);
1659 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1660 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1661 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1662 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1663 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper, 12)
1664 const char* __thiscall ctype_char_do_toupper(const ctype_char *this,
1665 char *first, const char *last)
1667 TRACE("(%p %p %p)\n", this, first, last);
1668 for(; first<last; first++)
1669 *first = _Toupper(*first, &this->ctype);
1673 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1674 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1675 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch, 8)
1676 char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch)
1678 TRACE("(%p %c)\n", this, ch);
1679 return call_ctype_char_do_toupper_ch(this, ch);
1682 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1683 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1684 DEFINE_THISCALL_WRAPPER(ctype_char_toupper, 12)
1685 const char* __thiscall ctype_char_toupper(const ctype_char *this, char *first, const char *last)
1687 TRACE("(%p %p %p)\n", this, first, last);
1688 return call_ctype_char_do_toupper(this, first, last);
1691 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1692 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1693 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch, 12)
1694 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char *this, short mask, char ch)
1696 TRACE("(%p %x %c)\n", this, mask, ch);
1697 return (this->ctype.table[(unsigned char)ch] & mask) != 0;
1700 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1701 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1702 DEFINE_THISCALL_WRAPPER(ctype_char_is, 16)
1703 const char* __thiscall ctype_char_is(const ctype_char *this, const char *first, const char *last, short *dest)
1705 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1706 for(; first<last; first++)
1707 *dest++ = this->ctype.table[(unsigned char)*first];
1711 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1712 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1713 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is, 16)
1714 const char* __thiscall ctype_char_scan_is(const ctype_char *this, short mask, const char *first, const char *last)
1716 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1717 for(; first<last; first++)
1718 if(!ctype_char_is_ch(this, mask, *first))
1723 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1724 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1725 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not, 16)
1726 const char* __thiscall ctype_char_scan_not(const ctype_char *this, short mask, const char *first, const char *last)
1728 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1729 for(; first<last; first++)
1730 if(ctype_char_is_ch(this, mask, *first))
1735 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1736 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1737 DEFINE_THISCALL_WRAPPER(ctype_char_table, 4)
1738 const short* __thiscall ctype_char_table(const ctype_char *this)
1740 TRACE("(%p)\n", this);
1741 return this->ctype.table;
1744 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1745 locale_id ctype_wchar_id = {0};
1746 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1747 locale_id ctype_short_id = {0};
1749 /* ??_7?$ctype@_W@std@@6B@ */
1750 extern const vtable_ptr MSVCP_ctype_wchar_vtable;
1751 /* ??_7?$ctype@G@std@@6B@ */
1752 extern const vtable_ptr MSVCP_ctype_short_vtable;
1754 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1755 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1756 locale_id* __cdecl ctype_wchar__Id_func(void)
1759 return &ctype_wchar_id;
1762 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1763 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1764 locale_id* __cdecl ctype_short__Id_func(void)
1767 return &ctype_short_id;
1770 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1771 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1772 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1773 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1774 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8)
1775 void __thiscall ctype_wchar__Init(ctype_wchar *this, _Locinfo *locinfo)
1777 TRACE("(%p %p)\n", this, locinfo);
1778 _Locinfo__Getctype(locinfo, &this->ctype);
1779 _Locinfo__Getcvt(locinfo, &this->cvt);
1782 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1783 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1784 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12)
1785 ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this,
1786 _Locinfo *locinfo, MSVCP_size_t refs)
1788 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1789 ctype_base_ctor_refs(&this->base, refs);
1790 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1791 ctype_wchar__Init(this, locinfo);
1795 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1796 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1797 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo, 12)
1798 ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this,
1799 _Locinfo *locinfo, MSVCP_size_t refs)
1801 ctype_wchar *ret = ctype_wchar_ctor_locinfo(this, locinfo, refs);
1802 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1806 /* ??0?$ctype@_W@std@@QAE@I@Z */
1807 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1808 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8)
1809 ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1813 TRACE("(%p %lu)\n", this, refs);
1815 ctype_base_ctor_refs(&this->base, refs);
1816 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1818 _Locinfo_ctor(&locinfo);
1819 ctype_wchar__Init(this, &locinfo);
1820 _Locinfo_dtor(&locinfo);
1824 /* ??0?$ctype@G@std@@QAE@I@Z */
1825 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1826 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs, 8)
1827 ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1829 ctype_wchar *ret = ctype_wchar_ctor_refs(this, refs);
1830 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1834 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1835 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1836 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12)
1837 ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this,
1838 const char *name, MSVCP_size_t refs)
1842 TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs);
1844 ctype_base_ctor_refs(&this->base, refs);
1845 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1847 _Locinfo_ctor_cstr(&locinfo, name);
1848 ctype_wchar__Init(this, &locinfo);
1849 _Locinfo_dtor(&locinfo);
1853 /* ??_F?$ctype@_W@std@@QAEXXZ */
1854 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1855 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4)
1856 ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this)
1858 TRACE("(%p)\n", this);
1859 return ctype_short_ctor_refs(this, 0);
1862 /* ??_F?$ctype@G@std@@QAEXXZ */
1863 /* ??_F?$ctype@G@std@@QEAAXXZ */
1864 DEFINE_THISCALL_WRAPPER(ctype_short_ctor, 4)
1865 ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this)
1867 ctype_wchar *ret = ctype_wchar_ctor(this);
1868 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1872 /* ??1?$ctype@_W@std@@MAE@XZ */
1873 /* ??1?$ctype@_W@std@@MEAA@XZ */
1874 /* ??1?$ctype@G@std@@MAE@XZ */
1875 /* ??1?$ctype@G@std@@MEAA@XZ */
1876 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4)
1877 void __thiscall ctype_wchar_dtor(ctype_wchar *this)
1879 TRACE("(%p)\n", this);
1880 if(this->ctype.delfl)
1881 free((void*)this->ctype.table);
1884 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor, 8)
1885 ctype_wchar* __thiscall MSVCP_ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int flags)
1887 TRACE("(%p %x)\n", this, flags);
1889 /* we have an array, with the number of elements stored before the first object */
1890 int i, *ptr = (int *)this-1;
1892 for(i=*ptr-1; i>=0; i--)
1893 ctype_wchar_dtor(this+i);
1894 MSVCRT_operator_delete(ptr);
1896 ctype_wchar_dtor(this);
1898 MSVCRT_operator_delete(this);
1904 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_short_vector_dtor, 8)
1905 ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigned int flags)
1907 return MSVCP_ctype_wchar_vector_dtor(this, flags);
1911 int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt)
1916 TRACE("%p %d %p %p\n", s, wch, state, cvt);
1921 cp = ___lc_codepage_func();
1933 size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def);
1942 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1943 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1944 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1945 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1946 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12)
1947 char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt)
1949 char buf[MB_LEN_MAX];
1951 TRACE("(%p %d %d)\n", this, ch, dflt);
1953 return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt;
1956 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1957 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1958 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1959 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1960 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12)
1961 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
1962 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1963 char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1965 return ctype_wchar__Donarrow(this, ch, dflt);
1968 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1969 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1970 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1971 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1972 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20)
1973 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
1974 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1975 (this, first, last, dflt, dest))
1976 const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this,
1977 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1979 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1980 for(; first<last; first++)
1981 *dest++ = ctype_wchar__Donarrow(this, *first, dflt);
1985 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
1986 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
1987 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
1988 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
1989 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s, 24)
1990 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
1991 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
1992 (this, first, last, dflt, dest, size))
1993 const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this,
1994 const wchar_t *first, const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
1996 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
1997 /* This function converts all multi-byte characters to dflt,
1998 * thanks to it result size is known before converting */
1999 if(last-first > size)
2001 return ctype_wchar_do_narrow(this, first, last, dflt, dest);
2004 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2005 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2006 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2007 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2008 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12)
2009 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
2011 TRACE("(%p %d %d)\n", this, ch, dflt);
2012 return call_ctype_wchar_do_narrow_ch(this, ch, dflt);
2015 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2016 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2017 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2018 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2019 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20)
2020 const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this,
2021 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
2023 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
2024 return call_ctype_wchar_do_narrow(this, first, last, dflt, dest);
2027 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2028 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2029 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2030 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2031 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24)
2032 const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first,
2033 const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
2035 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
2036 return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size);
2040 int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt)
2046 TRACE("(%p %p %lu %p %p)\n", out, in, len, state, cvt);
2054 cp = ___lc_codepage_func();
2058 *out = (unsigned char)*in;
2065 ((char*)state)[1] = *in;
2067 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) {
2077 GetCPInfo(cp, &cp_info);
2079 for(i=0; i<MAX_LEADBYTES; i+=2) {
2080 if(!cp_info.LeadByte[i+1])
2082 if((unsigned char)*in>=cp_info.LeadByte[i] && (unsigned char)*in<=cp_info.LeadByte[i+1]) {
2090 *state = (unsigned char)*in;
2094 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 2, out, out ? 1 : 0)) {
2101 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 1, out, out ? 1 : 0)) {
2108 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2109 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2110 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2111 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2112 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8)
2113 wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch)
2117 TRACE("(%p %d)\n", this, ch);
2118 return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret;
2121 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2122 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2123 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2124 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2125 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch, 8)
2126 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2127 wchar_t, (const ctype_wchar*, char), (this, ch))
2128 wchar_t __thiscall ctype_wchar_do_widen_ch(const ctype_wchar *this, char ch)
2130 return ctype_wchar__Dowiden(this, ch);
2133 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2134 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2135 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2136 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2137 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen, 16)
2138 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2139 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2140 (this, first, last, dest))
2141 const char* __thiscall ctype_wchar_do_widen(const ctype_wchar *this,
2142 const char *first, const char *last, wchar_t *dest)
2144 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2145 for(; first<last; first++)
2146 *dest++ = ctype_wchar__Dowiden(this, *first);
2150 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2151 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2152 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2153 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2154 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s, 20)
2155 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2156 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2157 (this, first, last, dest, size))
2158 const char* __thiscall ctype_wchar__Do_widen_s(const ctype_wchar *this,
2159 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2161 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2162 /* This function converts all multi-byte characters to WEOF,
2163 * thanks to it result size is known before converting */
2164 if(size < last-first)
2166 return ctype_wchar_do_widen(this, first, last, dest);
2169 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2170 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2171 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2172 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2173 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch, 8)
2174 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar *this, char ch)
2176 TRACE("(%p %d)\n", this, ch);
2177 return call_ctype_wchar_do_widen_ch(this, ch);
2180 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2181 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2182 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2183 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2184 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen, 16)
2185 const char* __thiscall ctype_wchar_widen(const ctype_wchar *this,
2186 const char *first, const char *last, wchar_t *dest)
2188 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2189 return call_ctype_wchar_do_widen(this, first, last, dest);
2192 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2193 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2194 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2195 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2196 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s, 20)
2197 const char* __thiscall ctype_wchar__Widen_s(const ctype_wchar *this,
2198 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2200 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2201 return call_ctype_wchar__Do_widen_s(this, first, last, dest, size);
2204 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2205 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2206 MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const locale *loc)
2208 TRACE("(%p %p)\n", facet, loc);
2210 if(facet && !*facet) {
2213 *facet = MSVCRT_operator_new(sizeof(ctype_wchar));
2215 ERR("Out of memory\n");
2216 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2220 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
2221 ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0);
2222 _Locinfo_dtor(&locinfo);
2228 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2229 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2230 MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const locale *loc)
2232 if(facet && !*facet) {
2233 ctype_wchar__Getcat(facet, loc);
2234 (*(locale_facet**)facet)->vtable = &MSVCP_ctype_short_vtable;
2241 wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
2243 TRACE("(%d %p)\n", ch, ctype);
2244 return tolowerW(ch);
2247 ctype_wchar* ctype_wchar_use_facet(const locale *loc)
2249 static ctype_wchar *obj = NULL;
2252 const locale_facet *fac;
2254 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
2255 fac = locale__Getfacet(loc, ctype_wchar_id.id);
2257 _Lockit_dtor(&lock);
2258 return (ctype_wchar*)fac;
2264 ctype_wchar__Getcat(&fac, loc);
2265 obj = (ctype_wchar*)fac;
2266 locale_facet__Incref(&obj->base.facet);
2267 locale_facet_register(&obj->base.facet);
2268 _Lockit_dtor(&lock);
2273 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2274 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2275 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2276 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2277 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8)
2278 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2279 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2280 wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
2282 return _Towlower(ch, &this->ctype);
2285 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2286 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2287 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2288 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2289 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12)
2290 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2291 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2292 (this, first, last))
2293 const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this,
2294 wchar_t *first, const wchar_t *last)
2296 TRACE("(%p %p %p)\n", this, first, last);
2297 for(; first<last; first++)
2298 *first = _Towlower(*first, &this->ctype);
2302 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2303 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2304 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2305 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2306 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8)
2307 wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch)
2309 TRACE("(%p %d)\n", this, ch);
2310 return call_ctype_wchar_do_tolower_ch(this, ch);
2313 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2314 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2315 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2316 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2317 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12)
2318 const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
2319 wchar_t *first, const wchar_t *last)
2321 TRACE("(%p %p %p)\n", this, first, last);
2322 return call_ctype_wchar_do_tolower(this, first, last);
2326 wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
2328 TRACE("(%d %p)\n", ch, ctype);
2329 return toupperW(ch);
2332 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2333 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2334 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2335 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2336 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8)
2337 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2338 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2339 wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch)
2341 return _Towupper(ch, &this->ctype);
2344 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2345 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2346 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2347 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2348 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12)
2349 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2350 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2351 (this, first, last))
2352 const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
2353 wchar_t *first, const wchar_t *last)
2355 TRACE("(%p %p %p)\n", this, first, last);
2356 for(; first<last; first++)
2357 *first = _Towupper(*first, &this->ctype);
2361 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2362 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2363 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2364 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2365 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8)
2366 wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch)
2368 TRACE("(%p %d)\n", this, ch);
2369 return call_ctype_wchar_do_toupper_ch(this, ch);
2372 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2373 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2374 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2375 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2376 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12)
2377 const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this,
2378 wchar_t *first, const wchar_t *last)
2380 TRACE("(%p %p %p)\n", this, first, last);
2381 return call_ctype_wchar_do_toupper(this, first, last);
2385 const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last,
2386 short *mask, const _Ctypevec *ctype)
2388 TRACE("(%p %p %p %p)\n", first, last, mask, ctype);
2389 GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask);
2394 short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype)
2397 _Getwctypes(&ch, &ch+1, &mask, ctype);
2401 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2402 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2403 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2404 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2405 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12)
2406 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2407 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2408 MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2410 TRACE("(%p %x %d)\n", this, mask, ch);
2411 return (_Getwctype(ch, &this->ctype) & mask) != 0;
2414 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2415 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2416 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2417 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2418 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16)
2419 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2420 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2421 (this, first, last, dest))
2422 const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this,
2423 const wchar_t *first, const wchar_t *last, short *dest)
2425 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2426 return _Getwctypes(first, last, dest, &this->ctype);
2429 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2430 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2431 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2432 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2433 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12)
2434 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2436 TRACE("(%p %x %d)\n", this, mask, ch);
2437 return call_ctype_wchar_do_is_ch(this, mask, ch);
2440 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2441 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2442 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2443 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2444 DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16)
2445 const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this,
2446 const wchar_t *first, const wchar_t *last, short *dest)
2448 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2449 return call_ctype_wchar_do_is(this, first, last, dest);
2452 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2453 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2454 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2455 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2456 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16)
2457 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2458 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2459 (this, mask, first, last))
2460 const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this,
2461 short mask, const wchar_t *first, const wchar_t *last)
2463 TRACE("(%p %d %p %p)\n", this, mask, first, last);
2464 for(; first<last; first++)
2465 if(!ctype_wchar_is_ch(this, mask, *first))
2470 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2471 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2472 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2473 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2474 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16)
2475 const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
2476 short mask, const wchar_t *first, const wchar_t *last)
2478 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2479 return call_ctype_wchar_do_scan_is(this, mask, first, last);
2482 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2483 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2484 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2485 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2486 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16)
2487 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2488 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2489 (this, mask, first, last))
2490 const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this,
2491 short mask, const wchar_t *first, const wchar_t *last)
2493 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2494 for(; first<last; first++)
2495 if(ctype_wchar_is_ch(this, mask, *first))
2500 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2501 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2502 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2503 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2504 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16)
2505 const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this,
2506 short mask, const wchar_t *first, const wchar_t *last)
2508 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2509 return call_ctype_wchar_do_scan_not(this, mask, first, last);
2512 /* ??_7codecvt_base@std@@6B@ */
2513 extern const vtable_ptr MSVCP_codecvt_base_vtable;
2515 /* ??0codecvt_base@std@@QAE@I@Z */
2516 /* ??0codecvt_base@std@@QEAA@_K@Z */
2517 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs, 8)
2518 codecvt_base* __thiscall codecvt_base_ctor_refs(codecvt_base *this, MSVCP_size_t refs)
2520 TRACE("(%p %lu)\n", this, refs);
2521 locale_facet_ctor_refs(&this->facet, refs);
2522 this->facet.vtable = &MSVCP_codecvt_base_vtable;
2526 /* ??_Fcodecvt_base@std@@QAEXXZ */
2527 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2528 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor, 4)
2529 codecvt_base* __thiscall codecvt_base_ctor(codecvt_base *this)
2531 return codecvt_base_ctor_refs(this, 0);
2534 /* ??1codecvt_base@std@@UAE@XZ */
2535 /* ??1codecvt_base@std@@UEAA@XZ */
2536 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor, 4)
2537 void __thiscall codecvt_base_dtor(codecvt_base *this)
2539 TRACE("(%p)\n", this);
2540 locale_facet_dtor(&this->facet);
2543 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_base_vector_dtor, 8)
2544 codecvt_base* __thiscall MSVCP_codecvt_base_vector_dtor(codecvt_base *this, unsigned int flags)
2546 TRACE("(%p %x)\n", this, flags);
2548 /* we have an array, with the number of elements stored before the first object */
2549 int i, *ptr = (int *)this-1;
2551 for(i=*ptr-1; i>=0; i--)
2552 codecvt_base_dtor(this+i);
2553 MSVCRT_operator_delete(ptr);
2555 codecvt_base_dtor(this);
2557 MSVCRT_operator_delete(this);
2563 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2564 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2565 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2566 MSVCP_bool, (const codecvt_base*), (this))
2567 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv, 4)
2568 MSVCP_bool __thiscall codecvt_base_do_always_noconv(const codecvt_base *this)
2570 TRACE("(%p)\n", this);
2574 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2575 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2576 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv, 4)
2577 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base *this)
2579 TRACE("(%p)\n", this);
2580 return call_codecvt_base_do_always_noconv(this);
2583 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2584 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2585 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2586 int, (const codecvt_base*), (this))
2587 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length, 4)
2588 int __thiscall codecvt_base_do_max_length(const codecvt_base *this)
2590 TRACE("(%p)\n", this);
2594 /* ?max_length@codecvt_base@std@@QBEHXZ */
2595 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2596 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length, 4)
2597 int __thiscall codecvt_base_max_length(const codecvt_base *this)
2599 TRACE("(%p)\n", this);
2600 return call_codecvt_base_do_max_length(this);
2603 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2604 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2605 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2606 int, (const codecvt_base*), (this))
2607 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding, 4)
2608 int __thiscall codecvt_base_do_encoding(const codecvt_base *this)
2610 TRACE("(%p)\n", this);
2614 /* ?encoding@codecvt_base@std@@QBEHXZ */
2615 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2616 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding, 4)
2617 int __thiscall codecvt_base_encoding(const codecvt_base *this)
2619 TRACE("(%p)\n", this);
2620 return call_codecvt_base_do_encoding(this);
2623 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2624 locale_id codecvt_char_id = {0};
2626 /* ??_7?$codecvt@DDH@std@@6B@ */
2627 extern const vtable_ptr MSVCP_codecvt_char_vtable;
2629 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2630 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2631 DEFINE_THISCALL_WRAPPER(codecvt_char__Init, 8)
2632 void __thiscall codecvt_char__Init(codecvt_char *this, const _Locinfo *locinfo)
2634 TRACE("(%p %p)\n", this, locinfo);
2637 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2638 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2639 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo, 12)
2640 codecvt_char* __thiscall codecvt_char_ctor_locinfo(codecvt_char *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2642 TRACE("(%p %p %lu)\n", this, locinfo, refs);
2643 codecvt_base_ctor_refs(&this->base, refs);
2644 this->base.facet.vtable = &MSVCP_codecvt_char_vtable;
2648 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2649 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2650 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs, 8)
2651 codecvt_char* __thiscall codecvt_char_ctor_refs(codecvt_char *this, MSVCP_size_t refs)
2653 return codecvt_char_ctor_locinfo(this, NULL, refs);
2656 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2657 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2658 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor, 4)
2659 codecvt_char* __thiscall codecvt_char_ctor(codecvt_char *this)
2661 return codecvt_char_ctor_locinfo(this, NULL, 0);
2664 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2665 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2666 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor, 4)
2667 void __thiscall codecvt_char_dtor(codecvt_char *this)
2669 TRACE("(%p)\n", this);
2670 codecvt_base_dtor(&this->base);
2673 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_char_vector_dtor, 8)
2674 codecvt_char* __thiscall MSVCP_codecvt_char_vector_dtor(codecvt_char *this, unsigned int flags)
2676 TRACE("(%p %x)\n", this, flags);
2678 /* we have an array, with the number of elements stored before the first object */
2679 int i, *ptr = (int *)this-1;
2681 for(i=*ptr-1; i>=0; i--)
2682 codecvt_char_dtor(this+i);
2683 MSVCRT_operator_delete(ptr);
2685 codecvt_char_dtor(this);
2687 MSVCRT_operator_delete(this);
2693 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2694 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2695 MSVCP_size_t __cdecl codecvt_char__Getcat(const locale_facet **facet, const locale *loc)
2697 TRACE("(%p %p)\n", facet, loc);
2699 if(facet && !*facet) {
2700 *facet = MSVCRT_operator_new(sizeof(codecvt_char));
2702 ERR("Out of memory\n");
2703 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2706 codecvt_char_ctor((codecvt_char*)*facet);
2712 codecvt_char* codecvt_char_use_facet(const locale *loc)
2714 static codecvt_char *obj = NULL;
2717 const locale_facet *fac;
2719 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
2720 fac = locale__Getfacet(loc, codecvt_char_id.id);
2722 _Lockit_dtor(&lock);
2723 return (codecvt_char*)fac;
2729 codecvt_char__Getcat(&fac, loc);
2730 obj = (codecvt_char*)fac;
2731 locale_facet__Incref(&obj->base.facet);
2732 locale_facet_register(&obj->base.facet);
2733 _Lockit_dtor(&lock);
2738 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2739 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2740 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2741 CALL_VTBL_FUNC(this, 16, int, \
2742 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2743 (this, state, from, from_end, from_next, to, to_end, to_next))
2744 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in, 32)
2745 int __thiscall codecvt_char_do_in(const codecvt_char *this, int *state,
2746 const char *from, const char *from_end, const char **from_next,
2747 char *to, char *to_end, char **to_next)
2749 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2750 from_next, to, to_end, to_next);
2753 return CODECVT_noconv;
2756 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2757 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2758 DEFINE_THISCALL_WRAPPER(codecvt_char_in, 32)
2759 int __thiscall codecvt_char_in(const codecvt_char *this, int *state,
2760 const char *from, const char *from_end, const char **from_next,
2761 char *to, char *to_end, char **to_next)
2763 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2764 from_next, to, to_end, to_next);
2765 return call_codecvt_char_do_in(this, state, from, from_end, from_next,
2766 to, to_end, to_next);
2769 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2770 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2771 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2772 CALL_VTBL_FUNC(this, 20, int, \
2773 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2774 (this, state, from, from_end, from_next, to, to_end, to_next))
2775 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out, 32)
2776 int __thiscall codecvt_char_do_out(const codecvt_char *this, int *state,
2777 const char *from, const char *from_end, const char **from_next,
2778 char *to, char *to_end, char **to_next)
2780 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
2781 from_end, from_next, to, to_end, to_next);
2784 return CODECVT_noconv;
2787 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2788 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2789 DEFINE_THISCALL_WRAPPER(codecvt_char_out, 32)
2790 int __thiscall codecvt_char_out(const codecvt_char *this, int *state,
2791 const char *from, const char *from_end, const char **from_next,
2792 char *to, char *to_end, char **to_next)
2794 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2795 from_next, to, to_end, to_next);
2796 return call_codecvt_char_do_out(this, state, from, from_end, from_next,
2797 to, to_end, to_next);
2800 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2801 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2802 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2803 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2804 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift, 20)
2805 int __thiscall codecvt_char_do_unshift(const codecvt_char *this,
2806 int *state, char *to, char *to_end, char **to_next)
2808 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
2810 return CODECVT_noconv;
2813 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2814 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2815 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift, 20)
2816 int __thiscall codecvt_char_unshift(const codecvt_char *this,
2817 int *state, char *to, char *to_end, char **to_next)
2819 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
2820 return call_codecvt_char_do_unshift(this, state, to, to_end, to_next);
2823 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2824 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2825 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2826 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2827 (this, state, from, from_end, max))
2828 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length, 20)
2829 int __thiscall codecvt_char_do_length(const codecvt_char *this, const int *state,
2830 const char *from, const char *from_end, MSVCP_size_t max)
2832 TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
2833 return (from_end-from > max ? max : from_end-from);
2836 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2837 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2838 DEFINE_THISCALL_WRAPPER(codecvt_char_length, 20)
2839 int __thiscall codecvt_char_length(const codecvt_char *this, const int *state,
2840 const char *from, const char *from_end, MSVCP_size_t max)
2842 TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
2843 return call_codecvt_char_do_length(this, state, from, from_end, max);
2846 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2847 locale_id codecvt_wchar_id = {0};
2848 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2849 locale_id codecvt_short_id = {0};
2851 /* ??_7?$codecvt@_WDH@std@@6B@ */
2852 extern const vtable_ptr MSVCP_codecvt_wchar_vtable;
2853 /* ??_7?$codecvt@GDH@std@@6B@ */
2854 extern const vtable_ptr MSVCP_codecvt_short_vtable;
2856 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2857 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2858 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2859 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2860 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init, 8)
2861 void __thiscall codecvt_wchar__Init(codecvt_wchar *this, const _Locinfo *locinfo)
2863 TRACE("(%p %p)\n", this, locinfo);
2864 _Locinfo__Getcvt(locinfo, &this->cvt);
2867 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2868 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2869 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo, 12)
2870 codecvt_wchar* __thiscall codecvt_wchar_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2872 TRACE("(%p %p %ld)\n", this, locinfo, refs);
2874 codecvt_base_ctor_refs(&this->base, refs);
2875 this->base.facet.vtable = &MSVCP_codecvt_wchar_vtable;
2877 codecvt_wchar__Init(this, locinfo);
2881 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2882 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2883 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo, 12)
2884 codecvt_wchar* __thiscall codecvt_short_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2886 TRACE("(%p %p %ld)\n", this, locinfo, refs);
2888 codecvt_wchar_ctor_locinfo(this, locinfo, refs);
2889 this->base.facet.vtable = &MSVCP_codecvt_short_vtable;
2893 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2894 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2895 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs, 8)
2896 codecvt_wchar* __thiscall codecvt_wchar_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs)
2900 TRACE("(%p %ld)\n", this, refs);
2902 _Locinfo_ctor(&locinfo);
2903 codecvt_wchar_ctor_locinfo(this, &locinfo, refs);
2904 _Locinfo_dtor(&locinfo);
2908 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2909 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2910 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs, 8)
2911 codecvt_wchar* __thiscall codecvt_short_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs)
2915 TRACE("(%p %ld)\n", this, refs);
2917 _Locinfo_ctor(&locinfo);
2918 codecvt_short_ctor_locinfo(this, &locinfo, refs);
2919 _Locinfo_dtor(&locinfo);
2923 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
2924 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
2925 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name, 12)
2926 codecvt_wchar* __thiscall codecvt_short_ctor_name(codecvt_wchar *this, const char *name, MSVCP_size_t refs)
2930 TRACE("(%p %s %ld)\n", this, name, refs);
2932 _Locinfo_ctor_cstr(&locinfo, name);
2933 codecvt_short_ctor_locinfo(this, &locinfo, refs);
2934 _Locinfo_dtor(&locinfo);
2938 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
2939 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
2940 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor, 4)
2941 codecvt_wchar* __thiscall codecvt_wchar_ctor(codecvt_wchar *this)
2943 return codecvt_wchar_ctor_refs(this, 0);
2946 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2947 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2948 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor, 4)
2949 codecvt_wchar* __thiscall codecvt_short_ctor(codecvt_wchar *this)
2951 return codecvt_short_ctor_refs(this, 0);
2954 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2955 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2956 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2957 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2958 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor, 4)
2959 void __thiscall codecvt_wchar_dtor(codecvt_wchar *this)
2961 TRACE("(%p)\n", this);
2962 codecvt_base_dtor(&this->base);
2965 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_wchar_vector_dtor, 8)
2966 codecvt_wchar* __thiscall MSVCP_codecvt_wchar_vector_dtor(codecvt_wchar *this, unsigned int flags)
2968 TRACE("(%p %x)\n", this, flags);
2970 /* we have an array, with the number of elements stored before the first object */
2971 int i, *ptr = (int *)this-1;
2973 for(i=*ptr-1; i>=0; i--)
2974 codecvt_wchar_dtor(this+i);
2975 MSVCRT_operator_delete(ptr);
2977 codecvt_wchar_dtor(this);
2979 MSVCRT_operator_delete(this);
2985 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_short_vector_dtor, 8)
2986 codecvt_wchar* __thiscall MSVCP_codecvt_short_vector_dtor(codecvt_wchar *this, unsigned int flags)
2988 return MSVCP_codecvt_wchar_vector_dtor(this, flags);
2991 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2992 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2993 unsigned int __cdecl codecvt_wchar__Getcat(const locale_facet **facet, const locale *loc)
2995 TRACE("(%p %p)\n", facet, loc);
2997 if(facet && !*facet) {
3000 *facet = MSVCRT_operator_new(sizeof(codecvt_wchar));
3002 ERR("Out of memory\n");
3003 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3007 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
3008 codecvt_wchar_ctor_locinfo((codecvt_wchar*)*facet, &locinfo, 0);
3009 _Locinfo_dtor(&locinfo);
3015 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3016 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3017 unsigned int __cdecl codecvt_short__Getcat(const locale_facet **facet, const locale *loc)
3019 TRACE("(%p %p)\n", facet, loc);
3021 if(facet && !*facet) {
3024 *facet = MSVCRT_operator_new(sizeof(codecvt_wchar));
3026 ERR("Out of memory\n");
3027 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3031 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
3032 codecvt_short_ctor((codecvt_wchar*)*facet);
3033 _Locinfo_dtor(&locinfo);
3039 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3040 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3041 locale_id* __cdecl codecvt_wchar__Id_func(void)
3044 return &codecvt_wchar_id;
3047 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3048 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3049 locale_id* __cdecl codecvt_short__Id_func(void)
3052 return &codecvt_short_id;
3055 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3056 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3057 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3058 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3059 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv, 4)
3060 MSVCP_bool __thiscall codecvt_wchar_do_always_noconv(const codecvt_wchar *this)
3062 TRACE("(%p)\n", this);
3066 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3067 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3068 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3069 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3070 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length, 4)
3071 int __thiscall codecvt_wchar_do_max_length(const codecvt_wchar *this)
3073 TRACE("(%p)\n", this);
3077 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3078 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3079 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3080 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3081 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3082 CALL_VTBL_FUNC(this, 16, int, \
3083 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3084 (this, state, from, from_end, from_next, to, to_end, to_next))
3085 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in, 32)
3086 int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, int *state,
3087 const char *from, const char *from_end, const char **from_next,
3088 wchar_t *to, wchar_t *to_end, wchar_t **to_next)
3090 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3091 from_end, from_next, to, to_end, to_next);
3096 while(*from_next!=from_end && *to_next!=to_end) {
3097 switch(_Mbrtowc(*to_next, *from_next, from_end-*from_next, state, &this->cvt)) {
3099 *from_next = from_end;
3100 return CODECVT_partial;
3102 return CODECVT_error;
3116 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3117 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3118 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3119 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3120 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in, 32)
3121 int __thiscall codecvt_wchar_in(const codecvt_wchar *this, int *state,
3122 const char *from, const char *from_end, const char **from_next,
3123 wchar_t *to, wchar_t *to_end, wchar_t **to_next)
3125 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3126 from_end, from_next, to, to_end, to_next);
3127 return call_codecvt_wchar_do_in(this, state, from,
3128 from_end, from_next, to, to_end, to_next);
3131 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3132 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3133 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3134 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3135 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3136 CALL_VTBL_FUNC(this, 20, int, \
3137 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3138 (this, state, from, from_end, from_next, to, to_end, to_next))
3139 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out, 32)
3140 int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state,
3141 const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
3142 char *to, char *to_end, char **to_next)
3144 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3145 from_end, from_next, to, to_end, to_next);
3150 while(*from_next!=from_end && *to_next!=to_end) {
3151 int old_state = *state, size;
3152 char buf[MB_LEN_MAX];
3154 switch((size = _Wcrtomb(buf, **from_next, state, &this->cvt))) {
3156 return CODECVT_error;
3158 if(size > from_end-*from_next) {
3160 return CODECVT_partial;
3171 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3172 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3173 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3174 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3175 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out, 32)
3176 int __thiscall codecvt_wchar_out(const codecvt_wchar *this, int *state,
3177 const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
3178 char *to, char *to_end, char **to_next)
3180 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3181 from_end, from_next, to, to_end, to_next);
3182 return call_codecvt_wchar_do_out(this, state, from,
3183 from_end, from_next, to, to_end, to_next);
3186 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3187 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3188 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3189 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3190 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3191 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3192 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift, 20)
3193 int __thiscall codecvt_wchar_do_unshift(const codecvt_wchar *this,
3194 int *state, char *to, char *to_end, char **to_next)
3196 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
3198 WARN("unexpected state: %x\n", *state);
3204 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3205 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3206 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3207 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3208 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift, 20)
3209 int __thiscall codecvt_wchar_unshift(const codecvt_wchar *this,
3210 int *state, char *to, char *to_end, char **to_next)
3212 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
3213 return call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next);
3216 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3217 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3218 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3219 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3220 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3221 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3222 (this, state, from, from_end, max))
3223 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length, 20)
3224 int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const int *state,
3225 const char *from, const char *from_end, MSVCP_size_t max)
3227 int tmp_state = *state, ret=0;
3229 TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
3231 while(ret<max && from!=from_end) {
3232 switch(_Mbrtowc(NULL, from, from_end-from, &tmp_state, &this->cvt)) {
3249 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3250 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3251 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3252 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3253 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length, 20)
3254 int __thiscall codecvt_wchar_length(const codecvt_wchar *this, const int *state,
3255 const char *from, const char *from_end, MSVCP_size_t max)
3257 TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
3258 return call_codecvt_wchar_do_length(this, state, from, from_end, max);
3261 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3262 locale_id numpunct_char_id = {0};
3264 /* ??_7?$numpunct@D@std@@6B@ */
3265 extern const vtable_ptr MSVCP_numpunct_char_vtable;
3267 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3268 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3269 DEFINE_THISCALL_WRAPPER(numpunct_char__Init, 12)
3270 void __thiscall numpunct_char__Init(numpunct_char *this, _Locinfo *locinfo, MSVCP_bool isdef)
3274 TRACE("(%p %p %d)\n", this, locinfo, isdef);
3276 len = strlen(_Locinfo__Getfalse(locinfo))+1;
3277 this->false_name = MSVCRT_operator_new(len);
3278 if(this->false_name)
3279 memcpy((char*)this->false_name, _Locinfo__Getfalse(locinfo), len);
3281 len = strlen(_Locinfo__Gettrue(locinfo))+1;
3282 this->true_name = MSVCRT_operator_new(len);
3284 memcpy((char*)this->true_name, _Locinfo__Gettrue(locinfo), len);
3287 this->grouping = MSVCRT_operator_new(1);
3289 *(char*)this->grouping = 0;
3294 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
3296 len = strlen(lc->grouping)+1;
3297 this->grouping = MSVCRT_operator_new(len);
3299 memcpy((char*)this->grouping, lc->grouping, len);
3301 this->dp = lc->decimal_point[0];
3302 this->sep = lc->thousands_sep[0];
3305 if(!this->false_name || !this->true_name || !this->grouping) {
3306 MSVCRT_operator_delete((char*)this->grouping);
3307 MSVCRT_operator_delete((char*)this->false_name);
3308 MSVCRT_operator_delete((char*)this->true_name);
3310 ERR("Out of memory\n");
3311 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3315 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3316 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3317 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy, 4)
3318 void __thiscall numpunct_char__Tidy(numpunct_char *this)
3320 TRACE("(%p)\n", this);
3322 MSVCRT_operator_delete((char*)this->grouping);
3323 MSVCRT_operator_delete((char*)this->false_name);
3324 MSVCRT_operator_delete((char*)this->true_name);
3327 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3328 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3329 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo, 16)
3330 numpunct_char* __thiscall numpunct_char_ctor_locinfo(numpunct_char *this,
3331 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3333 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
3334 locale_facet_ctor_refs(&this->facet, refs);
3335 this->facet.vtable = &MSVCP_numpunct_char_vtable;
3336 numpunct_char__Init(this, locinfo, usedef);
3340 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3341 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3342 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name, 16)
3343 numpunct_char* __thiscall numpunct_char_ctor_name(numpunct_char *this,
3344 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3348 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
3349 locale_facet_ctor_refs(&this->facet, refs);
3350 this->facet.vtable = &MSVCP_numpunct_char_vtable;
3352 _Locinfo_ctor_cstr(&locinfo, name);
3353 numpunct_char__Init(this, &locinfo, usedef);
3354 _Locinfo_dtor(&locinfo);
3358 /* ??0?$numpunct@D@std@@QAE@I@Z */
3359 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3360 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs, 8)
3361 numpunct_char* __thiscall numpunct_char_ctor_refs(numpunct_char *this, MSVCP_size_t refs)
3363 TRACE("(%p %lu)\n", this, refs);
3364 return numpunct_char_ctor_name(this, "C", refs, FALSE);
3367 /* ??_F?$numpunct@D@std@@QAEXXZ */
3368 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3369 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor, 4)
3370 numpunct_char* __thiscall numpunct_char_ctor(numpunct_char *this)
3372 return numpunct_char_ctor_refs(this, 0);
3375 /* ??1?$numpunct@D@std@@MAE@XZ */
3376 /* ??1?$numpunct@D@std@@MEAA@XZ */
3377 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor, 4)
3378 void __thiscall numpunct_char_dtor(numpunct_char *this)
3380 TRACE("(%p)\n", this);
3381 numpunct_char__Tidy(this);
3384 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_char_vector_dtor, 8)
3385 numpunct_char* __thiscall MSVCP_numpunct_char_vector_dtor(numpunct_char *this, unsigned int flags)
3387 TRACE("(%p %x)\n", this, flags);
3389 /* we have an array, with the number of elements stored before the first object */
3390 int i, *ptr = (int *)this-1;
3392 for(i=*ptr-1; i>=0; i--)
3393 numpunct_char_dtor(this+i);
3394 MSVCRT_operator_delete(ptr);
3396 numpunct_char_dtor(this);
3398 MSVCRT_operator_delete(this);
3404 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3405 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3406 MSVCP_size_t __cdecl numpunct_char__Getcat(const locale_facet **facet, const locale *loc)
3408 TRACE("(%p %p)\n", facet, loc);
3410 if(facet && !*facet) {
3411 *facet = MSVCRT_operator_new(sizeof(numpunct_char));
3413 ERR("Out of memory\n");
3414 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3417 numpunct_char_ctor_name((numpunct_char*)*facet,
3418 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3424 numpunct_char* numpunct_char_use_facet(const locale *loc)
3426 static numpunct_char *obj = NULL;
3429 const locale_facet *fac;
3431 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
3432 fac = locale__Getfacet(loc, numpunct_char_id.id);
3434 _Lockit_dtor(&lock);
3435 return (numpunct_char*)fac;
3441 numpunct_char__Getcat(&fac, loc);
3442 obj = (numpunct_char*)fac;
3443 locale_facet__Incref(&obj->facet);
3444 locale_facet_register(&obj->facet);
3445 _Lockit_dtor(&lock);
3450 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3451 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3452 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point, 4)
3453 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3454 char, (const numpunct_char *this), (this))
3455 char __thiscall numpunct_char_do_decimal_point(const numpunct_char *this)
3457 TRACE("(%p)\n", this);
3461 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3462 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3463 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point, 4)
3464 char __thiscall numpunct_char_decimal_point(const numpunct_char *this)
3466 TRACE("(%p)\n", this);
3467 return call_numpunct_char_do_decimal_point(this);
3470 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3471 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3472 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep, 4)
3473 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3474 char, (const numpunct_char*), (this))
3475 char __thiscall numpunct_char_do_thousands_sep(const numpunct_char *this)
3477 TRACE("(%p)\n", this);
3481 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3482 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3483 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep, 4)
3484 char __thiscall numpunct_char_thousands_sep(const numpunct_char *this)
3486 TRACE("(%p)\n", this);
3487 return call_numpunct_char_do_thousands_sep(this);
3490 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3491 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3492 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping, 8)
3493 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3494 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3495 basic_string_char* __thiscall numpunct_char_do_grouping(
3496 const numpunct_char *this, basic_string_char *ret)
3498 TRACE("(%p)\n", this);
3499 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
3502 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3503 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3504 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping, 8)
3505 basic_string_char* __thiscall numpunct_char_grouping(const numpunct_char *this, basic_string_char *ret)
3507 TRACE("(%p)\n", this);
3508 return call_numpunct_char_do_grouping(this, ret);
3511 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3512 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3513 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename, 8)
3514 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3515 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3516 basic_string_char* __thiscall numpunct_char_do_falsename(
3517 const numpunct_char *this, basic_string_char *ret)
3519 TRACE("(%p)\n", this);
3520 return MSVCP_basic_string_char_ctor_cstr(ret, this->false_name);
3523 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3524 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3525 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename, 8)
3526 basic_string_char* __thiscall numpunct_char_falsename(const numpunct_char *this, basic_string_char *ret)
3528 TRACE("(%p)\n", this);
3529 return call_numpunct_char_do_falsename(this, ret);
3532 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3533 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3534 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename, 8)
3535 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3536 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3537 basic_string_char* __thiscall numpunct_char_do_truename(
3538 const numpunct_char *this, basic_string_char *ret)
3540 TRACE("(%p)\n", this);
3541 return MSVCP_basic_string_char_ctor_cstr(ret, this->true_name);
3544 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3545 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3546 DEFINE_THISCALL_WRAPPER(numpunct_char_truename, 8)
3547 basic_string_char* __thiscall numpunct_char_truename(const numpunct_char *this, basic_string_char *ret)
3549 TRACE("(%p)\n", this);
3550 return call_numpunct_char_do_truename(this, ret);
3553 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3554 locale_id numpunct_wchar_id = {0};
3555 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3556 locale_id numpunct_short_id = {0};
3558 /* ??_7?$numpunct@_W@std@@6B@ */
3559 extern const vtable_ptr MSVCP_numpunct_wchar_vtable;
3560 /* ??_7?$numpunct@G@std@@6B@ */
3561 extern const vtable_ptr MSVCP_numpunct_short_vtable;
3563 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3564 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3565 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3566 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3567 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init, 12)
3568 void __thiscall numpunct_wchar__Init(numpunct_wchar *this, _Locinfo *locinfo, MSVCP_bool isdef)
3570 const char *to_convert;
3574 TRACE("(%p %p %d)\n", this, locinfo, isdef);
3576 _Locinfo__Getcvt(locinfo, &cvt);
3578 to_convert = _Locinfo__Getfalse(locinfo);
3579 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
3580 this->false_name = MSVCRT_operator_new(len*sizeof(WCHAR));
3581 if(this->false_name)
3582 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
3583 (wchar_t*)this->false_name, len);
3585 to_convert = _Locinfo__Gettrue(locinfo);
3586 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
3587 this->true_name = MSVCRT_operator_new(len*sizeof(WCHAR));
3589 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
3590 (wchar_t*)this->true_name, len);
3593 this->grouping = MSVCRT_operator_new(1);
3595 *(char*)this->grouping = 0;
3600 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
3602 len = strlen(lc->grouping)+1;
3603 this->grouping = MSVCRT_operator_new(len);
3605 memcpy((char*)this->grouping, lc->grouping, len);
3607 this->dp = lc->decimal_point[0];
3608 this->sep = lc->thousands_sep[0];
3611 if(!this->false_name || !this->true_name || !this->grouping) {
3612 MSVCRT_operator_delete((char*)this->grouping);
3613 MSVCRT_operator_delete((wchar_t*)this->false_name);
3614 MSVCRT_operator_delete((wchar_t*)this->true_name);
3616 ERR("Out of memory\n");
3617 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3621 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3622 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3623 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3624 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3625 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy, 4)
3626 void __thiscall numpunct_wchar__Tidy(numpunct_wchar *this)
3628 TRACE("(%p)\n", this);
3630 MSVCRT_operator_delete((char*)this->grouping);
3631 MSVCRT_operator_delete((wchar_t*)this->false_name);
3632 MSVCRT_operator_delete((wchar_t*)this->true_name);
3635 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3636 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3637 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo, 16)
3638 numpunct_wchar* __thiscall numpunct_wchar_ctor_locinfo(numpunct_wchar *this,
3639 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3641 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
3642 locale_facet_ctor_refs(&this->facet, refs);
3643 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
3644 numpunct_wchar__Init(this, locinfo, usedef);
3648 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3649 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3650 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo, 16)
3651 numpunct_wchar* __thiscall numpunct_short_ctor_locinfo(numpunct_wchar *this,
3652 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3654 numpunct_wchar_ctor_locinfo(this, locinfo, refs, usedef);
3655 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3659 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3660 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3661 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name, 16)
3662 numpunct_wchar* __thiscall numpunct_wchar_ctor_name(numpunct_wchar *this,
3663 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3667 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
3668 locale_facet_ctor_refs(&this->facet, refs);
3669 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
3671 _Locinfo_ctor_cstr(&locinfo, name);
3672 numpunct_wchar__Init(this, &locinfo, usedef);
3673 _Locinfo_dtor(&locinfo);
3677 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3678 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3679 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name, 16)
3680 numpunct_wchar* __thiscall numpunct_short_ctor_name(numpunct_wchar *this,
3681 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3683 numpunct_wchar_ctor_name(this, name, refs, usedef);
3684 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3688 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3689 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3690 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs, 8)
3691 numpunct_wchar* __thiscall numpunct_wchar_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
3693 TRACE("(%p %lu)\n", this, refs);
3694 return numpunct_wchar_ctor_name(this, "C", refs, FALSE);
3697 /* ??0?$numpunct@G@std@@QAE@I@Z */
3698 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3699 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs, 8)
3700 numpunct_wchar* __thiscall numpunct_short_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
3702 numpunct_wchar_ctor_refs(this, refs);
3703 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3707 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3708 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3709 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor, 4)
3710 numpunct_wchar* __thiscall numpunct_wchar_ctor(numpunct_wchar *this)
3712 return numpunct_wchar_ctor_refs(this, 0);
3715 /* ??_F?$numpunct@G@std@@QAEXXZ */
3716 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3717 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor, 4)
3718 numpunct_wchar* __thiscall numpunct_short_ctor(numpunct_wchar *this)
3720 return numpunct_short_ctor_refs(this, 0);
3723 /* ??1?$numpunct@_W@std@@MAE@XZ */
3724 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3725 /* ??1?$numpunct@G@std@@MAE@XZ */
3726 /* ??1?$numpunct@G@std@@MEAA@XZ */
3727 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor, 4)
3728 void __thiscall numpunct_wchar_dtor(numpunct_wchar *this)
3730 TRACE("(%p)\n", this);
3731 numpunct_wchar__Tidy(this);
3734 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_wchar_vector_dtor, 8)
3735 numpunct_wchar* __thiscall MSVCP_numpunct_wchar_vector_dtor(numpunct_wchar *this, unsigned int flags)
3737 TRACE("(%p %x)\n", this, flags);
3739 /* we have an array, with the number of elements stored before the first object */
3740 int i, *ptr = (int *)this-1;
3742 for(i=*ptr-1; i>=0; i--)
3743 numpunct_wchar_dtor(this+i);
3744 MSVCRT_operator_delete(ptr);
3746 numpunct_wchar_dtor(this);
3748 MSVCRT_operator_delete(this);
3754 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_short_vector_dtor, 8)
3755 numpunct_wchar* __thiscall MSVCP_numpunct_short_vector_dtor(numpunct_wchar *this, unsigned int flags)
3757 return MSVCP_numpunct_wchar_vector_dtor(this, flags);
3760 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3761 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3762 MSVCP_size_t __cdecl numpunct_wchar__Getcat(const locale_facet **facet, const locale *loc)
3764 TRACE("(%p %p)\n", facet, loc);
3766 if(facet && !*facet) {
3767 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
3769 ERR("Out of memory\n");
3770 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3773 numpunct_wchar_ctor_name((numpunct_wchar*)*facet,
3774 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3780 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3781 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3782 MSVCP_size_t __cdecl numpunct_short__Getcat(const locale_facet **facet, const locale *loc)
3784 TRACE("(%p %p)\n", facet, loc);
3786 if(facet && !*facet) {
3787 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
3789 ERR("Out of memory\n");
3790 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3793 numpunct_short_ctor_name((numpunct_wchar*)*facet,
3794 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3800 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3801 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3802 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3803 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3804 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point, 4)
3805 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3806 wchar_t, (const numpunct_wchar *this), (this))
3807 wchar_t __thiscall numpunct_wchar_do_decimal_point(const numpunct_wchar *this)
3809 TRACE("(%p)\n", this);
3813 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3814 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3815 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3816 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3817 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point, 4)
3818 wchar_t __thiscall numpunct_wchar_decimal_point(const numpunct_wchar *this)
3820 TRACE("(%p)\n", this);
3821 return call_numpunct_wchar_do_decimal_point(this);
3824 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3825 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3826 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3827 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3828 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep, 4)
3829 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3830 wchar_t, (const numpunct_wchar *this), (this))
3831 wchar_t __thiscall numpunct_wchar_do_thousands_sep(const numpunct_wchar *this)
3833 TRACE("(%p)\n", this);
3837 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3838 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3839 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3840 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3841 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep, 4)
3842 wchar_t __thiscall numpunct_wchar_thousands_sep(const numpunct_wchar *this)
3844 TRACE("(%p)\n", this);
3845 return call_numpunct_wchar_do_thousands_sep(this);
3848 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3849 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3850 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3851 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3852 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping, 8)
3853 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3854 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3855 basic_string_char* __thiscall numpunct_wchar_do_grouping(const numpunct_wchar *this, basic_string_char *ret)
3857 TRACE("(%p)\n", this);
3858 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
3861 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3862 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3863 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3864 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3865 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping, 8)
3866 basic_string_char* __thiscall numpunct_wchar_grouping(const numpunct_wchar *this, basic_string_char *ret)
3868 TRACE("(%p)\n", this);
3869 return call_numpunct_wchar_do_grouping(this, ret);
3872 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3873 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3874 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3875 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3876 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename, 8)
3877 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3878 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3879 basic_string_wchar* __thiscall numpunct_wchar_do_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3881 TRACE("(%p)\n", this);
3882 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->false_name);
3885 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3886 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3887 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3888 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3889 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename, 8)
3890 basic_string_wchar* __thiscall numpunct_wchar_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3892 TRACE("(%p)\n", this);
3893 return call_numpunct_wchar_do_falsename(this, ret);
3896 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3897 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3898 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3899 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3900 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename, 8)
3901 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3902 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3903 basic_string_wchar* __thiscall numpunct_wchar_do_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3905 TRACE("(%p)\n", this);
3906 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->true_name);
3909 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3910 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3911 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3912 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3913 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename, 8)
3914 basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3916 TRACE("(%p)\n", this);
3917 return call_numpunct_wchar_do_truename(this, ret);
3920 double __cdecl _Stod(const char *buf, char **buf_end, LONG exp)
3922 double ret = strtod(buf, buf_end);
3925 ret *= pow(10, exp);
3929 double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err)
3935 ret = _Stod(buf, buf_end, exp);
3945 float __cdecl _Stof(const char *buf, char **buf_end, LONG exp)
3947 return _Stod(buf, buf_end, exp);
3950 float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err)
3952 return _Stodx(buf, buf_end, exp, err);
3955 __int64 __cdecl _Stoll(const char *buf, char **buf_end, int base)
3957 return _strtoi64(buf, buf_end, base);
3960 __int64 __cdecl _Stollx(const char *buf, char **buf_end, int base, int *err)
3966 ret = _strtoi64(buf, buf_end, base);
3976 LONG __cdecl _Stolx(const char *buf, char **buf_end, int base, int *err)
3978 __int64 i = _Stollx(buf, buf_end, base, err);
3979 if(!*err && i!=(__int64)((LONG)i))
3984 unsigned __int64 __cdecl _Stoull(const char *buf, char **buf_end, int base)
3986 return _strtoui64(buf, buf_end, base);
3989 unsigned __int64 __cdecl _Stoullx(const char *buf, char **buf_end, int base, int *err)
3991 unsigned __int64 ret;
3995 ret = _strtoui64(buf, buf_end, base);
4005 ULONG __cdecl _Stoul(const char *buf, char **buf_end, int base)
4008 unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, &err);
4009 if(!err && i!=(unsigned __int64)((ULONG)i))
4011 return buf[0]=='-' ? -i : i;
4014 ULONG __cdecl _Stoulx(const char *buf, char **buf_end, int base, int *err)
4016 unsigned __int64 i = _Stoullx(buf[0]=='-' ? buf+1 : buf, buf_end, base, err);
4017 if(!*err && i!=(unsigned __int64)((ULONG)i))
4019 return buf[0]=='-' ? -i : i;
4022 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4023 locale_id num_get_wchar_id = {0};
4024 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4025 locale_id num_get_short_id = {0};
4027 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4028 extern const vtable_ptr MSVCP_num_get_wchar_vtable;
4029 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4030 extern const vtable_ptr MSVCP_num_get_short_vtable;
4032 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4033 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4034 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4035 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4036 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init, 8)
4037 void __thiscall num_get_wchar__Init(num_get *this, const _Locinfo *locinfo)
4039 FIXME("(%p %p) stub\n", this, locinfo);
4042 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4043 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4044 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo, 12)
4045 num_get* __thiscall num_get_wchar_ctor_locinfo(num_get *this,
4046 _Locinfo *locinfo, MSVCP_size_t refs)
4048 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
4052 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4053 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4054 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo, 12)
4055 num_get* __thiscall num_get_short_ctor_locinfo(num_get *this,
4056 _Locinfo *locinfo, MSVCP_size_t refs)
4058 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
4062 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4063 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4064 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs, 8)
4065 num_get* __thiscall num_get_wchar_ctor_refs(num_get *this, MSVCP_size_t refs)
4067 FIXME("(%p %lu) stub\n", this, refs);
4071 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4072 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4073 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs, 8)
4074 num_get* __thiscall num_get_short_ctor_refs(num_get *this, MSVCP_size_t refs)
4076 FIXME("(%p %lu) stub\n", this, refs);
4080 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4081 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4082 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor, 4)
4083 num_get* __thiscall num_get_wchar_ctor(num_get *this)
4085 FIXME("(%p) stub\n", this);
4089 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4090 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4091 DEFINE_THISCALL_WRAPPER(num_get_short_ctor, 4)
4092 num_get* __thiscall num_get_short_ctor(num_get *this)
4094 FIXME("(%p) stub\n", this);
4098 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4099 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4100 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4101 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4102 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor, 4)
4103 void __thiscall num_get_wchar_dtor(num_get *this)
4105 FIXME("(%p) stub\n", this);
4108 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar_vector_dtor, 8)
4109 num_get* __thiscall MSVCP_num_get_wchar_vector_dtor(num_get *this, unsigned int flags)
4111 TRACE("(%p %x)\n", this, flags);
4113 /* we have an array, with the number of elements stored before the first object */
4114 int i, *ptr = (int *)this-1;
4116 for(i=*ptr-1; i>=0; i--)
4117 num_get_wchar_dtor(this+i);
4118 MSVCRT_operator_delete(ptr);
4120 num_get_wchar_dtor(this);
4122 MSVCRT_operator_delete(this);
4128 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_short_vector_dtor, 8)
4129 num_get* __thiscall MSVCP_num_get_short_vector_dtor(num_get *this, unsigned int flags)
4131 return MSVCP_num_get_wchar_vector_dtor(this, flags);
4134 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4135 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4136 MSVCP_size_t __cdecl num_get_wchar__Getcat(const locale_facet **facet, const locale *loc)
4138 FIXME("(%p %p) stub\n", facet, loc);
4142 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4143 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4144 MSVCP_size_t __cdecl num_get_short__Getcat(const locale_facet **facet, const locale *loc)
4146 FIXME("(%p %p) stub\n", facet, loc);
4150 /* ?_Getffld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1ABVlocale@2@@Z */
4151 /* ?_Getffld@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AEBVlocale@2@@Z */
4152 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1ABVlocale@2@@Z */
4153 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEBVlocale@2@@Z */
4154 int __cdecl num_get_wchar__Getffld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4155 istreambuf_iterator_wchar *last, const locale *loc)
4157 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
4161 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AAVios_base@2@PAH@Z */
4162 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AEAVios_base@2@PEAH@Z */
4163 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AAVios_base@2@PAH@Z */
4164 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEAVios_base@2@PEAH@Z */
4165 int __cdecl num_get_wchar__Getffldx(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4166 istreambuf_iterator_wchar *last, ios_base *ios, int *phexexp)
4168 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
4172 /* ?_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 */
4173 /* ?_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 */
4174 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HABVlocale@2@@Z */
4175 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HAEBVlocale@2@@Z */
4176 int __cdecl num_get_wchar__Getifld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4177 istreambuf_iterator_wchar *last, int fmtflags, const locale *loc)
4179 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
4183 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
4184 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
4185 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
4186 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
4187 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig, 20)
4188 int __thiscall MSVCP_num_get_wchar__Hexdig(num_get *this, wchar_t dig, wchar_t e0, wchar_t al, wchar_t au)
4190 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
4194 /* ?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 */
4195 /* ?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 */
4196 /* ?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 */
4197 /* ?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 */
4198 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36)
4199 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
4200 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
4202 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4206 /* ?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 */
4207 /* ?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 */
4208 /* ?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 */
4209 /* ?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 */
4210 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void,36)
4211 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
4212 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, void **pval)
4214 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4218 /* ?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 */
4219 /* ?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 */
4220 /* ?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 */
4221 /* ?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 */
4222 /* ?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 */
4223 /* ?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 */
4224 /* ?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 */
4225 /* ?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 */
4226 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36)
4227 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
4228 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
4230 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4234 /* ?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 */
4235 /* ?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 */
4236 /* ?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 */
4237 /* ?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 */
4238 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble,36)
4239 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get *this, istreambuf_iterator_wchar *ret,
4240 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
4242 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4246 /* ?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 */
4247 /* ?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 */
4248 /* ?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 */
4249 /* ?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 */
4250 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double,36)
4251 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
4252 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, double *pval)
4254 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4258 /* ?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 */
4259 /* ?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 */
4260 /* ?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 */
4261 /* ?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 */
4262 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36)
4263 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
4264 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
4266 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4270 /* ?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 */
4271 /* ?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 */
4272 /* ?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 */
4273 /* ?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 */
4274 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float,36)
4275 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
4276 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, float *pval)
4278 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4282 /* ?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 */
4283 /* ?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 */
4284 /* ?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 */
4285 /* ?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 */
4286 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36)
4287 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
4288 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
4290 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4294 /* ?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 */
4295 /* ?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 */
4296 /* ?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 */
4297 /* ?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 */
4298 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64,36)
4299 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
4300 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONGLONG *pval)
4302 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4306 /* ?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 */
4307 /* ?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 */
4308 /* ?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 */
4309 /* ?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 */
4310 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36)
4311 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
4312 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
4314 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4318 /* ?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 */
4319 /* ?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 */
4320 /* ?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 */
4321 /* ?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 */
4322 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64,36)
4323 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
4324 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONGLONG *pval)
4326 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4330 /* ?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 */
4331 /* ?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 */
4332 /* ?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 */
4333 /* ?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 */
4334 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36)
4335 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
4336 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
4338 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4342 /* ?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 */
4343 /* ?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 */
4344 /* ?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 */
4345 /* ?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 */
4346 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong,36)
4347 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
4348 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, ULONG *pval)
4350 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4354 /* ?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 */
4355 /* ?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 */
4356 /* ?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 */
4357 /* ?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 */
4358 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36)
4359 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
4360 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
4362 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4366 /* ?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 */
4367 /* ?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 */
4368 /* ?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 */
4369 /* ?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 */
4370 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long,36)
4371 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
4372 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, LONG *pval)
4374 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4378 /* ?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 */
4379 /* ?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 */
4380 /* ?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 */
4381 /* ?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 */
4382 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36)
4383 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
4384 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval)
4386 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4390 /* ?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 */
4391 /* ?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 */
4392 /* ?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 */
4393 /* ?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 */
4394 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint,36)
4395 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
4396 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval)
4398 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4402 /* ?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 */
4403 /* ?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 */
4404 /* ?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 */
4405 /* ?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 */
4406 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36)
4407 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
4408 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval)
4410 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4414 /* ?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 */
4415 /* ?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 */
4416 /* ?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@ */
4417 /* ?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 */
4418 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort,36)
4419 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
4420 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned short *pval)
4422 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4426 /* ?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 */
4427 /* ?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 */
4428 /* ?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 */
4429 /* ?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 */
4430 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36)
4431 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
4432 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
4434 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4438 /* ?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 */
4439 /* ?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 */
4440 /* ?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 */
4441 /* ?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 */
4442 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool,36)
4443 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
4444 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, MSVCP_bool *pval)
4446 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4450 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
4451 locale_id num_get_char_id = {0};
4453 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
4454 extern const vtable_ptr MSVCP_num_get_char_vtable;
4456 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4457 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4458 DEFINE_THISCALL_WRAPPER(num_get_char__Init, 8)
4459 void __thiscall num_get_char__Init(num_get *this, const _Locinfo *locinfo)
4461 TRACE("(%p %p)\n", this, locinfo);
4462 _Locinfo__Getcvt(locinfo, &this->cvt);
4465 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4466 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4467 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo, 12)
4468 num_get* __thiscall num_get_char_ctor_locinfo(num_get *this,
4469 _Locinfo *locinfo, MSVCP_size_t refs)
4471 TRACE("(%p %p %lu)\n", this, locinfo, refs);
4473 locale_facet_ctor_refs(&this->facet, refs);
4474 this->facet.vtable = &MSVCP_num_get_char_vtable;
4476 num_get_char__Init(this, locinfo);
4480 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
4481 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
4482 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs, 8)
4483 num_get* __thiscall num_get_char_ctor_refs(num_get *this, MSVCP_size_t refs)
4487 TRACE("(%p %lu)\n", this, refs);
4489 _Locinfo_ctor(&locinfo);
4490 num_get_char_ctor_locinfo(this, &locinfo, refs);
4491 _Locinfo_dtor(&locinfo);
4495 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
4496 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
4497 DEFINE_THISCALL_WRAPPER(num_get_char_ctor, 4)
4498 num_get* __thiscall num_get_char_ctor(num_get *this)
4500 return num_get_char_ctor_refs(this, 0);
4503 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
4504 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
4505 DEFINE_THISCALL_WRAPPER(num_get_char_dtor, 4)
4506 void __thiscall num_get_char_dtor(num_get *this)
4508 TRACE("(%p)\n", this);
4509 locale_facet_dtor(&this->facet);
4512 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char_vector_dtor, 8)
4513 num_get* __thiscall MSVCP_num_get_char_vector_dtor(num_get *this, unsigned int flags)
4515 TRACE("(%p %x)\n", this, flags);
4517 /* we have an array, with the number of elements stored before the first object */
4518 int i, *ptr = (int *)this-1;
4520 for(i=*ptr-1; i>=0; i--)
4521 num_get_char_dtor(this+i);
4522 MSVCRT_operator_delete(ptr);
4524 num_get_char_dtor(this);
4526 MSVCRT_operator_delete(this);
4532 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4533 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4534 MSVCP_size_t __cdecl num_get_char__Getcat(const locale_facet **facet, const locale *loc)
4536 TRACE("(%p %p)\n", facet, loc);
4538 if(facet && !*facet) {
4541 *facet = MSVCRT_operator_new(sizeof(num_get));
4543 ERR("Out of memory\n");
4544 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4548 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
4549 num_get_char_ctor_locinfo((num_get*)*facet, &locinfo, 0);
4550 _Locinfo_dtor(&locinfo);
4556 num_get* num_get_char_use_facet(const locale *loc)
4558 static num_get *obj = NULL;
4561 const locale_facet *fac;
4563 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
4564 fac = locale__Getfacet(loc, num_get_char_id.id);
4566 _Lockit_dtor(&lock);
4567 return (num_get*)fac;
4573 num_get_char__Getcat(&fac, loc);
4574 obj = (num_get*)fac;
4575 locale_facet__Incref(&obj->facet);
4576 locale_facet_register(&obj->facet);
4577 _Lockit_dtor(&lock);
4582 /* ?_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 */
4583 /* ?_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 */
4584 /* Copies number to dest buffer, validates grouping and skips separators.
4585 * Updates first so it points past the number, all digits are skipped.
4586 * Returns how exponent needs to changed.
4587 * Size of dest buffer is not specified, assuming it's not smaller then 32:
4588 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
4590 int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_iterator_char *first,
4591 istreambuf_iterator_char *last, const locale *loc)
4593 numpunct_char *numpunct = numpunct_char_use_facet(loc);
4594 basic_string_char grouping_bstr;
4595 int groups_no = 0, cur_group = 0, exp = 0;
4596 char *dest_beg = dest, *num_end = dest+25, *exp_end = dest+31, *groups = NULL, sep;
4597 const char *grouping;
4598 BOOL error = TRUE, dest_empty = TRUE;
4600 TRACE("(%p %p %p %p)\n", dest, first, last, loc);
4602 numpunct_char_grouping(numpunct, &grouping_bstr);
4603 grouping = MSVCP_basic_string_char_c_str(&grouping_bstr);
4604 sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0';
4606 istreambuf_iterator_char_val(first);
4607 if(first->strbuf && (first->val=='-' || first->val=='+')) {
4608 *dest++ = first->val;
4609 istreambuf_iterator_char_inc(first);
4613 groups_no = strlen(grouping)+2;
4614 groups = calloc(groups_no, sizeof(char));
4617 for(; first->strbuf; istreambuf_iterator_char_inc(first)) {
4618 if(first->val<'0' || first->val>'9') {
4619 if(sep && first->val==sep) {
4620 if(cur_group == groups_no+1) {
4621 if(groups[1] != groups[2]) {
4625 memmove(groups+1, groups+2, groups_no);
4626 groups[cur_group] = 0;
4636 if(dest_empty && first->val == '0')
4640 *dest++ = first->val;
4643 if(sep && groups[cur_group]<CHAR_MAX)
4644 groups[cur_group]++;
4648 if(cur_group && !groups[cur_group])
4653 for(; cur_group>=0 && !error; cur_group--) {
4654 if(*grouping == CHAR_MAX) {
4658 }else if((cur_group && *grouping!=groups[cur_group])
4659 || (!cur_group && *grouping<groups[cur_group])) {
4662 }else if(grouping[1]) {
4666 MSVCP_basic_string_char_dtor(&grouping_bstr);
4672 }else if(dest_empty) {
4676 if(first->strbuf && first->val==numpunct_char_decimal_point(numpunct)) {
4678 *dest++ = *localeconv()->decimal_point;
4679 istreambuf_iterator_char_inc(first);
4682 for(; first->strbuf && first->val=='0'; istreambuf_iterator_char_inc(first))
4685 if(!first->strbuf || first->val<'1' || first->val>'9')
4690 for(; first->strbuf; istreambuf_iterator_char_inc(first)) {
4691 if(first->val<'0' || first->val>'9')
4693 else if(dest<num_end)
4694 *dest++ = first->val;
4697 if(first->strbuf && (first->val=='e' || first->val=='E')) {
4698 *dest++ = first->val;
4699 istreambuf_iterator_char_inc(first);
4701 if(first->strbuf && (first->val=='-' || first->val=='+')) {
4702 *dest++ = first->val;
4703 istreambuf_iterator_char_inc(first);
4706 error = dest_empty = TRUE;
4707 for(; first->strbuf && first->val=='0'; istreambuf_iterator_char_inc(first))
4710 for(; first->strbuf && first->val>='0' && first->val<='9'; istreambuf_iterator_char_inc(first)) {
4711 error = dest_empty = FALSE;
4713 *dest++ = first->val;
4719 }else if(dest_empty) {
4728 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AAVios_base@2@PAH@Z */
4729 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AEAVios_base@2@PEAH@Z */
4730 int __cdecl num_get_char__Getffldx(const num_get *this, char *dest, istreambuf_iterator_char *first,
4731 istreambuf_iterator_char *last, ios_base *ios, int *phexexp)
4733 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
4737 /* ?_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 */
4738 /* ?_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 */
4739 /* Copies number to dest buffer, validates grouping and skips separators.
4740 * Updates first so it points past the number, all digits are skipped.
4741 * Returns number base (8, 10 or 16).
4742 * Size of dest buffer is not specified, assuming it's not smaller then 25:
4743 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
4745 int __cdecl num_get_char__Getifld(const num_get *this, char *dest, istreambuf_iterator_char *first,
4746 istreambuf_iterator_char *last, int fmtflags, const locale *loc)
4748 static const char digits[] = "0123456789abcdefABCDEF";
4750 numpunct_char *numpunct = numpunct_char_use_facet(loc);
4751 basic_string_char grouping_bstr;
4752 int basefield, base, groups_no = 0, cur_group = 0;
4753 char *dest_beg = dest, *dest_end = dest+24, *groups = NULL, sep;
4754 const char *grouping;
4755 BOOL error = TRUE, dest_empty = TRUE;
4757 TRACE("(%p %p %p %04x %p)\n", dest, first, last, fmtflags, loc);
4759 numpunct_char_grouping(numpunct, &grouping_bstr);
4760 grouping = MSVCP_basic_string_char_c_str(&grouping_bstr);
4761 sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0';
4763 basefield = fmtflags & FMTFLAG_basefield;
4764 if(basefield == FMTFLAG_oct)
4766 else if(basefield == FMTFLAG_hex)
4767 base = 22; /* equal to the size of digits buffer */
4773 istreambuf_iterator_char_val(first);
4774 if(first->strbuf && (first->val=='-' || first->val=='+')) {
4775 *dest++ = first->val;
4776 istreambuf_iterator_char_inc(first);
4779 if(!base && first->strbuf && first->val=='0') {
4780 istreambuf_iterator_char_inc(first);
4781 if(first->strbuf && (first->val=='x' || first->val=='X')) {
4782 istreambuf_iterator_char_inc(first);
4793 groups_no = strlen(grouping)+2;
4794 groups = calloc(groups_no, sizeof(char));
4797 for(; first->strbuf; istreambuf_iterator_char_inc(first)) {
4798 if(!memchr(digits, first->val, base)) {
4799 if(sep && first->val==sep) {
4800 if(cur_group == groups_no+1) {
4801 if(groups[1] != groups[2]) {
4805 memmove(groups+1, groups+2, groups_no);
4806 groups[cur_group] = 0;
4816 if(dest_empty && first->val == '0')
4819 /* skip digits that can't be copied to dest buffer, other
4820 * functions are responsible for detecting overflows */
4822 *dest++ = first->val;
4823 if(sep && groups[cur_group]<CHAR_MAX)
4824 groups[cur_group]++;
4828 if(cur_group && !groups[cur_group])
4833 for(; cur_group>=0 && !error; cur_group--) {
4834 if(*grouping == CHAR_MAX) {
4838 }else if((cur_group && *grouping!=groups[cur_group])
4839 || (!cur_group && *grouping<groups[cur_group])) {
4842 }else if(grouping[1]) {
4846 MSVCP_basic_string_char_dtor(&grouping_bstr);
4855 return (base==22 ? 16 : base);
4858 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
4859 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
4860 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig, 20)
4861 int __thiscall MSVCP_num_get_char__Hexdig(num_get *this, char dig, char e0, char al, char au)
4863 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
4867 /* ?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 */
4868 /* ?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 */
4869 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
4870 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
4871 (this, ret, first, last, base, state, pval))
4872 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void,36)
4873 istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get *this, istreambuf_iterator_char *ret,
4874 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, void **pval)
4880 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4882 v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
4883 &first, &last, FMTFLAG_hex, base->loc), &err);
4884 if(v!=(unsigned __int64)((INT_PTR)v))
4885 *state |= IOSTATE_failbit;
4886 else if(end!=tmp && !err)
4887 *pval = (void*)((INT_PTR)v);
4889 *state |= IOSTATE_failbit;
4892 *state |= IOSTATE_eofbit;
4898 /* ?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 */
4899 /* ?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 */
4900 DEFINE_THISCALL_WRAPPER(num_get_char_get_void,36)
4901 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get *this, istreambuf_iterator_char *ret,
4902 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, void **pval)
4904 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4905 return call_num_get_char_do_get_void(this, ret, first, last, base, state, pval);
4908 /* ?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 */
4909 /* ?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 */
4910 /* ?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 */
4911 /* ?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 */
4912 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
4913 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
4914 (this, ret, first, last, base, state, pval))
4915 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
4916 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
4917 (this, ret, first, last, base, state, pval))
4918 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double,36)
4919 istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *this, istreambuf_iterator_char *ret,
4920 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval)
4926 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4928 v = _Stodx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err);
4929 if(end!=tmp && !err)
4932 *state |= IOSTATE_failbit;
4935 *state |= IOSTATE_eofbit;
4941 /* ?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 */
4942 /* ?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 */
4943 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble,36)
4944 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get *this, istreambuf_iterator_char *ret,
4945 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval)
4947 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4951 /* ?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 */
4952 /* ?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 */
4953 DEFINE_THISCALL_WRAPPER(num_get_char_get_double,36)
4954 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get *this, istreambuf_iterator_char *ret,
4955 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, double *pval)
4957 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4958 return call_num_get_char_do_get_double(this, ret, first, last, base, state, pval);
4961 /* ?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 */
4962 /* ?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 */
4963 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
4964 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
4965 (this, ret, first, last, base, state, pval))
4966 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float,36)
4967 istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *this, istreambuf_iterator_char *ret,
4968 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, float *pval)
4974 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4976 v = _Stofx(tmp, &end, num_get_char__Getffld(this, tmp, &first, &last, base->loc), &err);
4977 if(end!=tmp && !err)
4980 *state |= IOSTATE_failbit;
4983 *state |= IOSTATE_eofbit;
4989 /* ?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 */
4990 /* ?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 */
4991 DEFINE_THISCALL_WRAPPER(num_get_char_get_float,36)
4992 istreambuf_iterator_char *__thiscall num_get_char_get_float(const num_get *this, istreambuf_iterator_char *ret,
4993 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, float *pval)
4995 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
4996 return call_num_get_char_do_get_float(this, ret, first, last, base, state, pval);
4999 /* ?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 */
5000 /* ?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 */
5001 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5002 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5003 (this, ret, first, last, base, state, pval))
5004 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64,36)
5005 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
5006 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONGLONG *pval)
5012 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5014 v = _Stoullx(tmp, &end, num_get_char__Getifld(this, tmp,
5015 &first, &last, base->fmtfl, base->loc), &err);
5016 if(end!=tmp && !err)
5019 *state |= IOSTATE_failbit;
5022 *state |= IOSTATE_eofbit;
5028 /* ?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 */
5029 /* ?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 */
5030 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64,36)
5031 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
5032 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONGLONG *pval)
5034 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5035 return call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval);
5038 /* ?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 */
5039 /* ?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 */
5040 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5041 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5042 (this, ret, first, last, base, state, pval))
5043 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64,36)
5044 istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *this, istreambuf_iterator_char *ret,
5045 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONGLONG *pval)
5051 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5053 v = _Stollx(tmp, &end, num_get_char__Getifld(this, tmp,
5054 &first, &last, base->fmtfl, base->loc), &err);
5055 if(end!=tmp && !err)
5058 *state |= IOSTATE_failbit;
5061 *state |= IOSTATE_eofbit;
5067 /* ?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 */
5068 /* ?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 */
5069 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64,36)
5070 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get *this, istreambuf_iterator_char *ret,
5071 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONGLONG *pval)
5073 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5074 return call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval);
5077 /* ?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 */
5078 /* ?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 */
5079 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
5080 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
5081 (this, ret, first, last, base, state, pval))
5082 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong,36)
5083 istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
5084 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONG *pval)
5090 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5092 v = _Stoulx(tmp, &end, num_get_char__Getifld(this, tmp,
5093 &first, &last, base->fmtfl, base->loc), &err);
5094 if(end!=tmp && !err)
5097 *state |= IOSTATE_failbit;
5100 *state |= IOSTATE_eofbit;
5106 /* ?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 */
5107 /* ?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 */
5108 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong,36)
5109 istreambuf_iterator_char *__thiscall num_get_char_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
5110 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, ULONG *pval)
5112 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5113 return call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval);
5116 /* ?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 */
5117 /* ?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 */
5118 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
5119 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
5120 (this, ret, first, last, base, state, pval))
5121 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long,36)
5122 istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *this, istreambuf_iterator_char *ret,
5123 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONG *pval)
5129 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5131 v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
5132 &first, &last, base->fmtfl, base->loc), &err);
5133 if(end!=tmp && !err)
5136 *state |= IOSTATE_failbit;
5139 *state |= IOSTATE_eofbit;
5145 /* ?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 */
5146 /* ?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 */
5147 DEFINE_THISCALL_WRAPPER(num_get_char_get_long,36)
5148 istreambuf_iterator_char *__thiscall num_get_char_get_long(const num_get *this, istreambuf_iterator_char *ret,
5149 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, LONG *pval)
5151 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5152 return call_num_get_char_do_get_long(this, ret, first, last, base, state, pval);
5155 /* ?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 */
5156 /* ?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 */
5157 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
5158 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
5159 (this, ret, first, last, base, state, pval))
5160 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint,36)
5161 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get *this, istreambuf_iterator_char *ret,
5162 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned int *pval)
5164 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5165 return num_get_char_do_get_ulong(this, ret, first, last, base, state, pval);
5168 /* ?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 */
5169 /* ?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 */
5170 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint,36)
5171 istreambuf_iterator_char *__thiscall num_get_char_get_uint(const num_get *this, istreambuf_iterator_char *ret,
5172 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned int *pval)
5174 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5175 return call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval);
5178 /* ?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 */
5179 /* ?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 */
5180 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
5181 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
5182 (this, ret, first, last, base, state, pval))
5183 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort,36)
5184 istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
5185 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned short *pval)
5188 char tmp[25], *beg, *end;
5191 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5193 b = num_get_char__Getifld(this, tmp,
5194 &first, &last, base->fmtfl, base->loc);
5195 beg = tmp + (tmp[0]=='-' ? 1 : 0);
5196 v = _Stoulx(beg, &end, b, &err);
5198 if(v != (ULONG)((unsigned short)v))
5199 *state |= IOSTATE_failbit;
5200 else if(end!=beg && !err)
5201 *pval = (tmp[0]=='-' ? -((unsigned short)v) : v);
5203 *state |= IOSTATE_failbit;
5206 *state |= IOSTATE_eofbit;
5212 /* ?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 */
5213 /* ?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 */
5214 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort,36)
5215 istreambuf_iterator_char *__thiscall num_get_char_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
5216 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned short *pval)
5218 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5219 return call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval);
5222 /* ?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 */
5223 /* ?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 */
5224 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
5225 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
5226 (this, ret, first, last, base, state, pval))
5227 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool,36)
5228 istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *this, istreambuf_iterator_char *ret,
5229 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, MSVCP_bool *pval)
5231 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5233 if(base->fmtfl & FMTFLAG_boolalpha) {
5234 numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
5235 basic_string_char false_bstr, true_bstr;
5236 const char *pfalse, *ptrue;
5238 numpunct_char_falsename(numpunct, &false_bstr);
5239 numpunct_char_truename(numpunct, &true_bstr);
5240 pfalse = MSVCP_basic_string_char_c_str(&false_bstr);
5241 ptrue = MSVCP_basic_string_char_c_str(&true_bstr);
5243 for(istreambuf_iterator_char_val(&first); first.strbuf;
5244 istreambuf_iterator_char_inc(&first)) {
5245 if(pfalse && *pfalse && first.val!=*pfalse)
5247 if(ptrue && *ptrue && first.val!=*ptrue)
5250 if(pfalse && *pfalse && ptrue && !*ptrue)
5252 if(ptrue && *ptrue && pfalse && !*pfalse)
5260 if((!pfalse || !*pfalse) && (!ptrue || !*ptrue))
5269 *state |= IOSTATE_failbit;
5271 MSVCP_basic_string_char_dtor(&false_bstr);
5272 MSVCP_basic_string_char_dtor(&true_bstr);
5276 LONG v = _Stolx(tmp, &end, num_get_char__Getifld(this, tmp,
5277 &first, &last, base->fmtfl, base->loc), &err);
5279 if(end!=tmp && err==0 && (v==0 || v==1))
5282 *state |= IOSTATE_failbit;
5286 *state |= IOSTATE_eofbit;
5287 memcpy(ret, &first, sizeof(first));
5291 /* ?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 */
5292 /* ?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 */
5293 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool,36)
5294 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get *this, istreambuf_iterator_char *ret,
5295 istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, MSVCP_bool *pval)
5297 TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval);
5298 return call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval);
5301 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5302 locale_id num_put_char_id = {0};
5304 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5305 extern const vtable_ptr MSVCP_num_put_char_vtable;
5307 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5308 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5309 DEFINE_THISCALL_WRAPPER(num_put_char__Init, 8)
5310 void __thiscall num_put_char__Init(num_put *this, const _Locinfo *locinfo)
5312 TRACE("(%p %p)\n", this, locinfo);
5313 _Locinfo__Getcvt(locinfo, &this->cvt);
5316 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5317 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5318 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo, 12)
5319 num_put* __thiscall num_put_char_ctor_locinfo(num_put *this, const _Locinfo *locinfo, MSVCP_size_t refs)
5321 TRACE("(%p %p %ld)\n", this, locinfo, refs);
5323 locale_facet_ctor_refs(&this->facet, refs);
5324 this->facet.vtable = &MSVCP_num_put_char_vtable;
5326 num_put_char__Init(this, locinfo);
5330 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5331 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5332 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs, 8)
5333 num_put* __thiscall num_put_char_ctor_refs(num_put *this, MSVCP_size_t refs)
5337 TRACE("(%p %lu)\n", this, refs);
5339 _Locinfo_ctor(&locinfo);
5340 num_put_char_ctor_locinfo(this, &locinfo, refs);
5341 _Locinfo_dtor(&locinfo);
5345 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5346 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5347 DEFINE_THISCALL_WRAPPER(num_put_char_ctor, 4)
5348 num_put* __thiscall num_put_char_ctor(num_put *this)
5350 return num_put_char_ctor_refs(this, 0);
5353 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5354 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5355 DEFINE_THISCALL_WRAPPER(num_put_char_dtor, 4)
5356 void __thiscall num_put_char_dtor(num_put *this)
5358 TRACE("(%p)\n", this);
5359 locale_facet_dtor(&this->facet);
5362 DEFINE_THISCALL_WRAPPER(MSVCP_num_put_char_vector_dtor, 8)
5363 num_put* __thiscall MSVCP_num_put_char_vector_dtor(num_put *this, unsigned int flags)
5365 TRACE("(%p %x)\n", this, flags);
5367 /* we have an array, with the number of elements stored before the first object */
5368 int i, *ptr = (int *)this-1;
5370 for(i=*ptr-1; i>=0; i--)
5371 num_put_char_dtor(this+i);
5372 MSVCRT_operator_delete(ptr);
5374 num_put_char_dtor(this);
5376 MSVCRT_operator_delete(this);
5382 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5383 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5384 unsigned int __cdecl num_put_char__Getcat(const locale_facet **facet, const locale *loc)
5386 TRACE("(%p %p)\n", facet, loc);
5388 if(facet && !*facet) {
5391 *facet = MSVCRT_operator_new(sizeof(num_put));
5393 ERR("Out of memory\n");
5394 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
5398 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
5399 num_put_char_ctor_locinfo((num_put*)*facet, &locinfo, 0);
5400 _Locinfo_dtor(&locinfo);
5406 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDI@Z */
5407 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_K@Z */
5408 ostreambuf_iterator_char* __cdecl num_put_char__Put(const num_put *this, ostreambuf_iterator_char *ret,
5409 ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count)
5411 TRACE("(%p %p %p %ld)\n", this, ret, ptr, count);
5413 for(; count>0; count--)
5414 ostreambuf_iterator_char_put(&dest, *ptr++);
5420 /* ?_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 */
5421 /* ?_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 */
5422 ostreambuf_iterator_char* __cdecl num_put_char__Putc(const num_put *this, ostreambuf_iterator_char *ret,
5423 ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count)
5425 TRACE("(%p %p %p %ld)\n", this, ret, ptr, count);
5427 for(; count>0; count--)
5428 ostreambuf_iterator_char_put(&dest, *ptr++);
5434 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDID@Z */
5435 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_KD@Z */
5436 ostreambuf_iterator_char* __cdecl num_put_char__Putgrouped(const num_put *this, ostreambuf_iterator_char *ret,
5437 ostreambuf_iterator_char dest, const char *ptr, MSVCP_size_t count, char delim)
5439 FIXME("(%p %p %p %ld %d) stub\n", this, ret, ptr, count, delim);
5443 /* ?_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 */
5444 /* ?_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 */
5445 ostreambuf_iterator_char* __cdecl num_put_char__Rep(const num_put *this, ostreambuf_iterator_char *ret,
5446 ostreambuf_iterator_char dest, char c, MSVCP_size_t count)
5448 TRACE("(%p %p %d %ld)\n", this, ret, c, count);
5450 for(; count>0; count--)
5451 ostreambuf_iterator_char_put(&dest, c);
5457 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
5458 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
5459 char* __cdecl num_put_char__Ffmt(const num_put *this, char *fmt, char spec, int fmtfl)
5461 FIXME("(%p %p %d %d) stub\n", this, fmt, spec, fmtfl);
5465 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z */
5466 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBD_K333@Z */
5467 ostreambuf_iterator_char* __cdecl num_put_char__Fput(const num_put *this, ostreambuf_iterator_char *ret,
5468 ostreambuf_iterator_char dest, ios_base *base, char fill, const char *buf, MSVCP_size_t bef_point,
5469 MSVCP_size_t aft_point, MSVCP_size_t trailing, MSVCP_size_t count)
5471 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret, base,
5472 fill, buf, bef_point, aft_point, trailing, count);
5476 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
5477 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
5478 char* __cdecl num_put_char__Ifmt(const num_put *this, char *fmt, const char *spec, int fmtfl)
5480 int base = fmtfl & FMTFLAG_basefield;
5483 TRACE("(%p %p %p %d)\n", this, fmt, spec, fmtfl);
5486 if(fmtfl & FMTFLAG_showpos)
5488 if(fmtfl & FMTFLAG_showbase)
5495 if(base == FMTFLAG_oct)
5497 else if(base == FMTFLAG_hex)
5498 *p++ = (fmtfl & FMTFLAG_uppercase) ? 'X' : 'x';
5506 /* ?_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 */
5507 /* ?_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 */
5508 ostreambuf_iterator_char* __cdecl num_put_char__Iput(const num_put *this, ostreambuf_iterator_char *ret,
5509 ostreambuf_iterator_char dest, ios_base *base, char fill, char *buf, MSVCP_size_t count)
5511 numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
5512 basic_string_char grouping_bstr;
5513 const char *grouping;
5515 int cur_group = 0, group_size = 0;
5516 int adjustfield = base->fmtfl & FMTFLAG_adjustfield;
5519 TRACE("(%p %p %p %d %s %ld)\n", this, ret, base, fill, buf, count);
5521 /* Add separators to number */
5522 numpunct_char_grouping(numpunct, &grouping_bstr);
5523 grouping = MSVCP_basic_string_char_c_str(&grouping_bstr);
5524 sep = grouping[0] ? numpunct_char_thousands_sep(numpunct) : '\0';
5526 for(p=buf+count-1; p>buf && sep && grouping[cur_group]!=CHAR_MAX; p--) {
5528 if(group_size == grouping[cur_group]) {
5530 if(grouping[cur_group+1])
5533 memmove(p+1, p, buf+count-p);
5538 MSVCP_basic_string_char_dtor(&grouping_bstr);
5540 /* Display number with padding */
5541 if(count >= base->wide)
5544 pad = base->wide-count;
5547 if((adjustfield & FMTFLAG_internal) && (buf[0]=='-' || buf[0]=='+')) {
5548 num_put_char__Putc(this, &dest, dest, buf, 1);
5550 }else if((adjustfield & FMTFLAG_internal) && (buf[1]=='x' || buf[1]=='X')) {
5551 num_put_char__Putc(this, &dest, dest, buf, 2);
5554 if(adjustfield != FMTFLAG_left) {
5555 num_put_char__Rep(this, ret, dest, fill, pad);
5558 num_put_char__Putc(this, &dest, dest, buf, count);
5559 return num_put_char__Rep(this, ret, dest, fill, pad);
5562 /* ?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 */
5563 /* ?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 */
5564 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
5565 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
5566 (this, ret, dest, base, fill, v))
5567 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long, 28)
5568 ostreambuf_iterator_char* __thiscall num_put_char_do_put_long(const num_put *this, ostreambuf_iterator_char *ret,
5569 ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v)
5571 char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
5572 char fmt[7]; /* strlen("%+#lld")+1 */
5574 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5576 return num_put_char__Iput(this, ret, dest, base, fill, tmp,
5577 sprintf(tmp, num_put_char__Ifmt(this, fmt, "ld", base->fmtfl), v));
5580 /* ?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 */
5581 /* ?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 */
5582 DEFINE_THISCALL_WRAPPER(num_put_char_put_long, 28)
5583 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put *this, ostreambuf_iterator_char *ret,
5584 ostreambuf_iterator_char dest, ios_base *base, char fill, LONG v)
5586 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5587 return call_num_put_char_do_put_long(this, ret, dest, base, fill, v);
5590 /* ?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 */
5591 /* ?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 */
5592 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
5593 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
5594 (this, ret, dest, base, fill, v))
5595 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong, 28)
5596 ostreambuf_iterator_char* __thiscall num_put_char_do_put_ulong(const num_put *this, ostreambuf_iterator_char *ret,
5597 ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v)
5599 char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
5600 char fmt[7]; /* strlen("%+#lld")+1 */
5602 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5604 return num_put_char__Iput(this, ret, dest, base, fill, tmp,
5605 sprintf(tmp, num_put_char__Ifmt(this, fmt, "lu", base->fmtfl), v));
5608 /* ?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 */
5609 /* ?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 */
5610 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong, 28)
5611 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put *this, ostreambuf_iterator_char *ret,
5612 ostreambuf_iterator_char dest, ios_base *base, char fill, ULONG v)
5614 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5615 return call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v);
5618 /* ?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 */
5619 /* ?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 */
5620 /* ?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 */
5621 /* ?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 */
5622 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
5623 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
5624 (this, ret, dest, base, fill, v))
5625 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
5626 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
5627 (this, ret, dest, base, fill, v))
5628 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double, 32)
5629 ostreambuf_iterator_char* __thiscall num_put_char_do_put_double(const num_put *this, ostreambuf_iterator_char *ret,
5630 ostreambuf_iterator_char dest, ios_base *base, char fill, double v)
5632 FIXME("(%p %p %p %d %lf) stub\n", this, ret, base, fill, v);
5636 /* ?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 */
5637 /* ?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 */
5638 DEFINE_THISCALL_WRAPPER(num_put_char_put_double, 32)
5639 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put *this, ostreambuf_iterator_char *ret,
5640 ostreambuf_iterator_char dest, ios_base *base, char fill, double v)
5642 TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v);
5643 return call_num_put_char_do_put_double(this, ret, dest, base, fill, v);
5646 /* ?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 */
5647 /* ?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 */
5648 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble, 32)
5649 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put *this, ostreambuf_iterator_char *ret,
5650 ostreambuf_iterator_char dest, ios_base *base, char fill, double v)
5652 TRACE("(%p %p %p %d %lf)\n", this, ret, base, fill, v);
5653 return call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v);
5656 /* ?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 */
5657 /* ?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 */
5658 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
5659 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
5660 (this, ret, dest, base, fill, v))
5661 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr, 28)
5662 ostreambuf_iterator_char* __thiscall num_put_char_do_put_ptr(const num_put *this, ostreambuf_iterator_char *ret,
5663 ostreambuf_iterator_char dest, ios_base *base, char fill, const void *v)
5665 char tmp[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
5667 TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v);
5669 return num_put_char__Iput(this, ret, dest, base, fill, tmp, sprintf(tmp, "%p", v));
5672 /* ?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 */
5673 /* ?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 */
5674 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr, 28)
5675 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put *this, ostreambuf_iterator_char *ret,
5676 ostreambuf_iterator_char dest, ios_base *base, char fill, const void *v)
5678 TRACE("(%p %p %p %d %p)\n", this, ret, base, fill, v);
5679 return call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v);
5682 /* ?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 */
5683 /* ?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 */
5684 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
5685 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
5686 (this, ret, dest, base, fill, v))
5687 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64, 32)
5688 ostreambuf_iterator_char* __thiscall num_put_char_do_put_int64(const num_put *this, ostreambuf_iterator_char *ret,
5689 ostreambuf_iterator_char dest, ios_base *base, char fill, __int64 v)
5691 char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
5692 char fmt[7]; /* strlen("%+#lld")+1 */
5694 TRACE("(%p %p %p %d)\n", this, ret, base, fill);
5696 return num_put_char__Iput(this, ret, dest, base, fill, tmp,
5697 sprintf(tmp, num_put_char__Ifmt(this, fmt, "lld", base->fmtfl), v));
5700 /* ?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 */
5701 /* ?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 */
5702 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64, 32)
5703 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put *this, ostreambuf_iterator_char *ret,
5704 ostreambuf_iterator_char dest, ios_base *base, char fill, __int64 v)
5706 TRACE("(%p %p %p %d)\n", this, ret, base, fill);
5707 return call_num_put_char_do_put_int64(this, ret, dest, base, fill, v);
5710 /* ?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 */
5711 /* ?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 */
5712 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
5713 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
5714 (this, ret, dest, base, fill, v))
5715 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64, 32)
5716 ostreambuf_iterator_char* __thiscall num_put_char_do_put_uint64(const num_put *this, ostreambuf_iterator_char *ret,
5717 ostreambuf_iterator_char dest, ios_base *base, char fill, unsigned __int64 v)
5719 char tmp[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
5720 char fmt[7]; /* strlen("%+#lld")+1 */
5722 TRACE("(%p %p %p %d)\n", this, ret, base, fill);
5724 return num_put_char__Iput(this, ret, dest, base, fill, tmp,
5725 sprintf(tmp, num_put_char__Ifmt(this, fmt, "llu", base->fmtfl), v));
5728 /* ?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 */
5729 /* ?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 */
5730 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64, 32)
5731 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put *this, ostreambuf_iterator_char *ret,
5732 ostreambuf_iterator_char dest, ios_base *base, char fill, unsigned __int64 v)
5734 TRACE("(%p %p %p %d)\n", this, ret, base, fill);
5735 return call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v);
5738 /* ?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 */
5739 /* ?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 */
5740 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
5741 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
5742 (this, ret, dest, base, fill, v))
5743 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool, 28)
5744 ostreambuf_iterator_char* __thiscall num_put_char_do_put_bool(const num_put *this, ostreambuf_iterator_char *ret,
5745 ostreambuf_iterator_char dest, ios_base *base, char fill, MSVCP_bool v)
5747 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5749 if(base->fmtfl & FMTFLAG_boolalpha) {
5750 numpunct_char *numpunct = numpunct_char_use_facet(base->loc);
5751 basic_string_char str;
5752 MSVCP_size_t pad, len;
5755 numpunct_char_truename(numpunct, &str);
5757 numpunct_char_falsename(numpunct, &str);
5759 len = MSVCP_basic_string_char_length(&str);
5760 pad = (len>base->wide ? 0 : base->wide-len);
5763 if((base->fmtfl & FMTFLAG_adjustfield) != FMTFLAG_left) {
5764 num_put_char__Rep(this, &dest, dest, fill, pad);
5767 num_put_char__Putc(this, &dest, dest, MSVCP_basic_string_char_c_str(&str), len);
5768 MSVCP_basic_string_char_dtor(&str);
5769 return num_put_char__Rep(this, ret, dest, fill, pad);
5772 return num_put_char_put_long(this, ret, dest, base, fill, v);
5775 /* ?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 */
5776 /* ?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 */
5777 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool, 28)
5778 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put *this, ostreambuf_iterator_char *ret,
5779 ostreambuf_iterator_char dest, ios_base *base, char fill, MSVCP_bool v)
5781 TRACE("(%p %p %p %d %d)\n", this, ret, base, fill, v);
5782 return call_num_put_char_do_put_bool(this, ret, dest, base, fill, v);
5785 /* ??0_Locimp@locale@std@@AAE@_N@Z */
5786 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
5787 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
5788 locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent)
5790 TRACE("(%p %d)\n", this, transparent);
5792 memset(this, 0, sizeof(locale__Locimp));
5793 locale_facet_ctor_refs(&this->facet, 1);
5794 this->transparent = transparent;
5795 MSVCP_basic_string_char_ctor_cstr(&this->name, "*");
5799 /* ??_F_Locimp@locale@std@@QAEXXZ */
5800 /* ??_F_Locimp@locale@std@@QEAAXXZ */
5801 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
5802 locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this)
5804 return locale__Locimp_ctor_transparent(this, FALSE);
5807 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
5808 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
5809 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8)
5810 locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy)
5815 TRACE("(%p %p)\n", this, copy);
5817 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
5818 memcpy(this, copy, sizeof(locale__Locimp));
5819 locale_facet_ctor_refs(&this->facet, 1);
5820 if(copy->facetvec) {
5821 this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
5822 if(!this->facetvec) {
5823 _Lockit_dtor(&lock);
5824 ERR("Out of memory\n");
5825 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
5828 for(i=0; i<this->facet_cnt; i++)
5829 if(this->facetvec[i])
5830 locale_facet__Incref(this->facetvec[i]);
5832 MSVCP_basic_string_char_copy_ctor(&this->name, ©->name);
5833 _Lockit_dtor(&lock);
5837 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
5838 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
5839 locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy)
5841 return locale__Locimp_copy_ctor(this, copy);
5844 /* ??1_Locimp@locale@std@@MAE@XZ */
5845 /* ??1_Locimp@locale@std@@MEAA@XZ */
5846 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4)
5847 void __thiscall locale__Locimp_dtor(locale__Locimp *this)
5849 TRACE("(%p)\n", this);
5851 if(locale_facet__Decref(&this->facet)) {
5853 for(i=0; i<this->facet_cnt; i++)
5854 if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i]))
5855 call_locale_facet_vector_dtor(this->facetvec[i], 0);
5857 MSVCRT_operator_delete(this->facetvec);
5858 MSVCP_basic_string_char_dtor(&this->name);
5862 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
5863 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
5864 void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this)
5866 locale__Locimp_dtor(this);
5869 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8)
5870 locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags)
5872 TRACE("(%p %x)\n", this, flags);
5874 /* we have an array, with the number of elements stored before the first object */
5875 int i, *ptr = (int *)this-1;
5877 for(i=*ptr-1; i>=0; i--)
5878 locale__Locimp_dtor(this+i);
5879 MSVCRT_operator_delete(ptr);
5881 locale__Locimp_dtor(this);
5883 MSVCRT_operator_delete(this);
5889 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
5890 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
5891 void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id)
5895 TRACE("(%p %p %lu)\n", locimp, facet, id);
5897 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
5898 if(id >= locimp->facet_cnt) {
5899 MSVCP_size_t new_size = id+1;
5900 locale_facet **new_facetvec;
5902 if(new_size < locale_id__Id_cnt+1)
5903 new_size = locale_id__Id_cnt+1;
5905 new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size);
5907 _Lockit_dtor(&lock);
5908 ERR("Out of memory\n");
5909 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
5913 memset(new_facetvec, 0, sizeof(locale_facet*)*new_size);
5914 memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt);
5915 MSVCRT_operator_delete(locimp->facetvec);
5916 locimp->facetvec = new_facetvec;
5917 locimp->facet_cnt = new_size;
5920 if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id]))
5921 call_locale_facet_vector_dtor(locimp->facetvec[id], 0);
5923 locimp->facetvec[id] = facet;
5925 locale_facet__Incref(facet);
5926 _Lockit_dtor(&lock);
5929 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
5930 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
5931 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12)
5932 void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id)
5934 locale__Locimp__Locimp_Addfac(this, facet, id);
5937 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
5938 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
5939 locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void)
5945 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
5946 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
5947 locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
5949 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
5953 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
5954 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
5955 void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
5957 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
5960 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
5961 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
5962 void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
5964 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
5967 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
5968 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
5969 void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
5971 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
5974 /* ??_7_Locimp@locale@std@@6B@ */
5975 const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
5976 (vtable_ptr)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor)
5979 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
5980 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
5981 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
5982 locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp)
5984 TRACE("(%p %p)\n", this, locimp);
5985 /* Don't change locimp reference counter */
5990 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
5991 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
5992 locale__Locimp* __cdecl locale__Init(void)
5998 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
6000 _Lockit_dtor(&lock);
6001 return global_locale;
6004 global_locale = MSVCRT_operator_new(sizeof(locale__Locimp));
6005 if(!global_locale) {
6006 _Lockit_dtor(&lock);
6007 ERR("Out of memory\n");
6008 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
6012 locale__Locimp_ctor(global_locale);
6013 global_locale->catmask = (1<<(LC_MAX+1))-1;
6014 MSVCP_basic_string_char_dtor(&global_locale->name);
6015 MSVCP_basic_string_char_ctor_cstr(&global_locale->name, "C");
6017 locale__Locimp__Clocptr = global_locale;
6018 global_locale->facet.refs++;
6019 locale_ctor_locimp(&classic_locale, locale__Locimp__Clocptr);
6020 _Lockit_dtor(&lock);
6022 return global_locale;
6025 /* ??0locale@std@@QAE@ABV01@0H@Z */
6026 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
6027 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16)
6028 locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat)
6030 FIXME("(%p %p %p %d) stub\n", this, loc, other, cat);
6034 /* ??0locale@std@@QAE@ABV01@@Z */
6035 /* ??0locale@std@@QEAA@AEBV01@@Z */
6036 DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8)
6037 locale* __thiscall locale_copy_ctor(locale *this, const locale *copy)
6039 TRACE("(%p %p)\n", this, copy);
6040 this->ptr = copy->ptr;
6041 locale_facet__Incref(&this->ptr->facet);
6045 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
6046 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
6047 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16)
6048 locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat)
6050 FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat);
6054 /* ??0locale@std@@QAE@PBDH@Z */
6055 /* ??0locale@std@@QEAA@PEBDH@Z */
6056 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12)
6057 locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat)
6059 FIXME("(%p %s %d) stub\n", this, locname, cat);
6063 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
6064 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
6065 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8)
6066 locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized)
6068 TRACE("(%p)\n", this);
6073 /* ??0locale@std@@QAE@XZ */
6074 /* ??0locale@std@@QEAA@XZ */
6075 DEFINE_THISCALL_WRAPPER(locale_ctor, 4)
6076 locale* __thiscall locale_ctor(locale *this)
6078 TRACE("(%p)\n", this);
6079 this->ptr = locale__Init();
6080 locale_facet__Incref(&this->ptr->facet);
6084 /* ??1locale@std@@QAE@XZ */
6085 /* ??1locale@std@@QEAA@XZ */
6086 DEFINE_THISCALL_WRAPPER(locale_dtor, 4)
6087 void __thiscall locale_dtor(locale *this)
6089 TRACE("(%p)\n", this);
6091 locale__Locimp_dtor(this->ptr);
6094 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8)
6095 locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags)
6097 TRACE("(%p %x)\n", this, flags);
6099 /* we have an array, with the number of elements stored before the first object */
6100 int i, *ptr = (int *)this-1;
6102 for(i=*ptr-1; i>=0; i--)
6103 locale_dtor(this+i);
6104 MSVCRT_operator_delete(ptr);
6108 MSVCRT_operator_delete(this);
6114 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
6115 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
6116 DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8)
6117 locale* __thiscall locale_operator_assign(locale *this, const locale *loc)
6119 FIXME("(%p %p) stub\n", this, loc);
6123 /* ??8locale@std@@QBE_NABV01@@Z */
6124 /* ??8locale@std@@QEBA_NAEBV01@@Z */
6125 DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8)
6126 MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc)
6128 FIXME("(%p %p) stub\n", this, loc);
6132 /* ??9locale@std@@QBE_NABV01@@Z */
6133 /* ??9locale@std@@QEBA_NAEBV01@@Z */
6134 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8)
6135 MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc)
6137 FIXME("(%p %p) stub\n", this, loc);
6141 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
6142 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
6143 DEFINE_THISCALL_WRAPPER(locale__Addfac, 16)
6144 locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask)
6146 TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask);
6148 if(this->ptr->facet.refs > 1) {
6149 locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
6151 ERR("Out of memory\n");
6152 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
6155 locale__Locimp_copy_ctor(new_ptr, this->ptr);
6156 locale_facet__Decref(&this->ptr->facet);
6157 this->ptr = new_ptr;
6160 locale__Locimp__Addfac(this->ptr, facet, id);
6163 MSVCP_basic_string_char_dtor(&this->ptr->name);
6164 MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*");
6169 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
6170 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
6171 DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8)
6172 const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id)
6176 TRACE("(%p %lu)\n", this, id);
6178 fac = id < this->ptr->facet_cnt ? this->ptr->facetvec[id] : NULL;
6179 if(fac || !this->ptr->transparent)
6182 return id < global_locale->facet_cnt ? global_locale->facetvec[id] : NULL;
6185 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
6186 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
6187 locale__Locimp* __cdecl locale__Getgloballocale(void)
6190 return global_locale;
6193 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
6194 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
6195 void __cdecl locale__Setgloballocale(void *locimp)
6197 TRACE("(%p)\n", locimp);
6198 global_locale = locimp;
6201 /* ?classic@locale@std@@SAABV12@XZ */
6202 /* ?classic@locale@std@@SAAEBV12@XZ */
6203 const locale* __cdecl locale_classic(void)
6207 return &classic_locale;
6210 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
6211 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
6212 DEFINE_THISCALL_WRAPPER(locale_name, 8)
6213 basic_string_char* __thiscall locale_name(const locale *this, basic_string_char *ret)
6215 TRACE( "(%p)\n", this);
6216 MSVCP_basic_string_char_copy_ctor(ret, &this->ptr->name);
6220 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
6221 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
6222 locale* __cdecl locale_global(locale *ret, const locale *loc)
6227 TRACE("(%p %p)\n", loc, ret);
6229 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
6232 if(loc->ptr != global_locale) {
6233 locale_facet__Decref(&global_locale->facet);
6234 global_locale = loc->ptr;
6235 locale_facet__Incref(&global_locale->facet);
6237 for(i=LC_ALL+1; i<=LC_MAX; i++) {
6238 if((global_locale->catmask & (1<<(i-1))) == 0)
6240 setlocale(i, MSVCP_basic_string_char_c_str(&global_locale->name));
6243 _Lockit_dtor(&lock);
6247 DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
6248 DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
6249 DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");
6250 DEFINE_RTTI_DATA1(collate_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@G@std@@");
6251 DEFINE_RTTI_DATA1(ctype_base, 0, &locale_facet_rtti_base_descriptor, ".?AUctype_base@std@@");
6252 DEFINE_RTTI_DATA2(ctype_char, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@D@std@@");
6253 DEFINE_RTTI_DATA2(ctype_wchar, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@_W@std@@");
6254 DEFINE_RTTI_DATA2(ctype_short, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@G@std@@");
6255 DEFINE_RTTI_DATA1(codecvt_base, 0, &locale_facet_rtti_base_descriptor, ".?AVcodecvt_base@std@@");
6256 DEFINE_RTTI_DATA2(codecvt_char, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@DDH@std@@");
6257 DEFINE_RTTI_DATA2(codecvt_wchar, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@_WDH@std@@");
6258 DEFINE_RTTI_DATA2(codecvt_short, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@GDH@std@@");
6259 DEFINE_RTTI_DATA1(numpunct_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@D@std@@");
6260 DEFINE_RTTI_DATA1(numpunct_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@_W@std@@");
6261 DEFINE_RTTI_DATA1(numpunct_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@G@std@@");
6262 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@@");
6263 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@@");
6264 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@@");
6265 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@@");
6268 void __asm_dummy_vtables(void) {
6270 __ASM_VTABLE(locale_facet, "");
6271 __ASM_VTABLE(collate_char,
6272 VTABLE_ADD_FUNC(collate_char_do_compare)
6273 VTABLE_ADD_FUNC(collate_char_do_transform)
6274 VTABLE_ADD_FUNC(collate_char_do_hash));
6275 __ASM_VTABLE(collate_wchar,
6276 VTABLE_ADD_FUNC(collate_wchar_do_compare)
6277 VTABLE_ADD_FUNC(collate_wchar_do_transform)
6278 VTABLE_ADD_FUNC(collate_wchar_do_hash));
6279 __ASM_VTABLE(collate_short,
6280 VTABLE_ADD_FUNC(collate_wchar_do_compare)
6281 VTABLE_ADD_FUNC(collate_wchar_do_transform)
6282 VTABLE_ADD_FUNC(collate_wchar_do_hash));
6283 __ASM_VTABLE(ctype_base, "");
6284 __ASM_VTABLE(ctype_char,
6285 VTABLE_ADD_FUNC(ctype_char_do_tolower)
6286 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch)
6287 VTABLE_ADD_FUNC(ctype_char_do_toupper)
6288 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch)
6289 VTABLE_ADD_FUNC(ctype_char_do_widen)
6290 VTABLE_ADD_FUNC(ctype_char_do_widen_ch)
6291 VTABLE_ADD_FUNC(ctype_char__Do_widen_s)
6292 VTABLE_ADD_FUNC(ctype_char_do_narrow)
6293 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch)
6294 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s));
6295 __ASM_VTABLE(ctype_wchar,
6296 VTABLE_ADD_FUNC(ctype_wchar_do_is)
6297 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
6298 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
6299 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
6300 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
6301 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
6302 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
6303 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
6304 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
6305 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
6306 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
6307 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
6308 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
6309 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
6310 __ASM_VTABLE(ctype_short,
6311 VTABLE_ADD_FUNC(ctype_wchar_do_is)
6312 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
6313 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
6314 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
6315 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
6316 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
6317 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
6318 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
6319 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
6320 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
6321 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
6322 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
6323 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
6324 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
6325 __ASM_VTABLE(codecvt_base,
6326 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv)
6327 VTABLE_ADD_FUNC(codecvt_base_do_max_length)
6328 VTABLE_ADD_FUNC(codecvt_base_do_encoding));
6329 __ASM_VTABLE(codecvt_char,
6330 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv)
6331 VTABLE_ADD_FUNC(codecvt_base_do_max_length)
6332 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
6333 VTABLE_ADD_FUNC(codecvt_char_do_in)
6334 VTABLE_ADD_FUNC(codecvt_char_do_out)
6335 VTABLE_ADD_FUNC(codecvt_char_do_unshift)
6336 VTABLE_ADD_FUNC(codecvt_char_do_length));
6337 __ASM_VTABLE(codecvt_wchar,
6338 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv)
6339 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length)
6340 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
6341 VTABLE_ADD_FUNC(codecvt_wchar_do_in)
6342 VTABLE_ADD_FUNC(codecvt_wchar_do_out)
6343 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift)
6344 VTABLE_ADD_FUNC(codecvt_wchar_do_length));
6345 __ASM_VTABLE(codecvt_short,
6346 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv)
6347 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length)
6348 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
6349 VTABLE_ADD_FUNC(codecvt_wchar_do_in)
6350 VTABLE_ADD_FUNC(codecvt_wchar_do_out)
6351 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift)
6352 VTABLE_ADD_FUNC(codecvt_wchar_do_length));
6353 __ASM_VTABLE(numpunct_char,
6354 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point)
6355 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep)
6356 VTABLE_ADD_FUNC(numpunct_char_do_grouping)
6357 VTABLE_ADD_FUNC(numpunct_char_do_falsename)
6358 VTABLE_ADD_FUNC(numpunct_char_do_truename));
6359 __ASM_VTABLE(numpunct_wchar,
6360 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
6361 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
6362 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
6363 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
6364 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
6365 __ASM_VTABLE(numpunct_short,
6366 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
6367 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
6368 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
6369 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
6370 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
6371 __ASM_VTABLE(num_get_char,
6372 VTABLE_ADD_FUNC(num_get_char_do_get_void)
6373 VTABLE_ADD_FUNC(num_get_char_do_get_double)
6374 VTABLE_ADD_FUNC(num_get_char_do_get_double)
6375 VTABLE_ADD_FUNC(num_get_char_do_get_float)
6376 VTABLE_ADD_FUNC(num_get_char_do_get_uint64)
6377 VTABLE_ADD_FUNC(num_get_char_do_get_int64)
6378 VTABLE_ADD_FUNC(num_get_char_do_get_ulong)
6379 VTABLE_ADD_FUNC(num_get_char_do_get_long)
6380 VTABLE_ADD_FUNC(num_get_char_do_get_uint)
6381 VTABLE_ADD_FUNC(num_get_char_do_get_ushort)
6382 VTABLE_ADD_FUNC(num_get_char_do_get_bool));
6383 __ASM_VTABLE(num_get_short,
6384 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
6385 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
6386 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
6387 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
6388 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
6389 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
6390 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
6391 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
6392 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
6393 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
6394 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
6395 __ASM_VTABLE(num_get_wchar,
6396 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
6397 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
6398 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
6399 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
6400 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
6401 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
6402 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
6403 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
6404 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
6405 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
6406 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
6407 __ASM_VTABLE(num_put_char,
6408 VTABLE_ADD_FUNC(num_put_char_do_put_ptr)
6409 VTABLE_ADD_FUNC(num_put_char_do_put_double)
6410 VTABLE_ADD_FUNC(num_put_char_do_put_double)
6411 VTABLE_ADD_FUNC(num_put_char_do_put_uint64)
6412 VTABLE_ADD_FUNC(num_put_char_do_put_int64)
6413 VTABLE_ADD_FUNC(num_put_char_do_put_ulong)
6414 VTABLE_ADD_FUNC(num_put_char_do_put_long)
6415 VTABLE_ADD_FUNC(num_put_char_do_put_bool));
6420 void free_locale(void)
6422 facets_elem *iter, *safe;
6425 locale__Locimp_dtor(global_locale);
6426 locale_dtor(&classic_locale);
6429 LIST_FOR_EACH_ENTRY_SAFE(iter, safe, &lazy_facets, facets_elem, entry) {
6430 list_remove(&iter->entry);
6431 if(locale_facet__Decref(iter->fac))
6432 call_locale_facet_vector_dtor(iter->fac, 1);
6433 MSVCRT_operator_delete(iter);