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
29 #include "wine/list.h"
34 #include "wine/unicode.h"
35 #include "wine/debug.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
38 char* __cdecl _Getdays(void);
39 char* __cdecl _Getmonths(void);
40 void* __cdecl _Gettnames(void);
41 unsigned int __cdecl ___lc_codepage_func(void);
42 LCID* __cdecl ___lc_handle_func(void);
43 const locale_facet* __thiscall locale__Getfacet(const locale*, MSVCP_size_t);
51 typedef struct _locale__Locimp {
53 locale_facet **facetvec;
54 MSVCP_size_t facet_cnt;
56 MSVCP_bool transparent;
57 basic_string_char name;
66 basic_string_char days;
67 basic_string_char months;
68 basic_string_char oldlocname;
69 basic_string_char newlocname;
87 const char *false_name;
88 const char *true_name;
96 const wchar_t *false_name;
97 const wchar_t *true_name;
106 typedef struct _istreambuf_iterator_char
108 struct _basic_streambuf_char *strbuf;
111 } istreambuf_iterator_char;
113 typedef struct _istreambuf_iterator_wchar
115 struct _basic_streambuf_wchar *strbuf;
118 } istreambuf_iterator_wchar;
120 /* ?_Id_cnt@id@locale@std@@0HA */
121 int locale_id__Id_cnt = 0;
123 static locale__Locimp *global_locale;
124 static locale classic_locale;
126 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
127 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
128 locale__Locimp *locale__Locimp__Clocptr = NULL;
130 /* ??1facet@locale@std@@UAE@XZ */
131 /* ??1facet@locale@std@@UEAA@XZ */
132 DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
133 void __thiscall locale_facet_dtor(locale_facet *this)
135 TRACE("(%p)\n", this);
138 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
139 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
140 locale_facet*, (locale_facet*, unsigned int), (this, flags))
141 locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
143 TRACE("(%p %x)\n", this, flags);
145 /* we have an array, with the number of elements stored before the first object */
146 int i, *ptr = (int *)this-1;
148 for(i=*ptr-1; i>=0; i--)
149 locale_facet_dtor(this+i);
150 MSVCRT_operator_delete(ptr);
152 locale_facet_dtor(this);
154 MSVCRT_operator_delete(this);
165 static struct list lazy_facets = LIST_INIT(lazy_facets);
167 /* Not exported from msvcp90 */
168 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
169 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
170 void __cdecl locale_facet_register(locale_facet *add)
172 facets_elem *head = MSVCRT_operator_new(sizeof(*head));
174 ERR("Out of memory\n");
175 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
179 list_add_head(&lazy_facets, &head->entry);
182 /* Not exported from msvcp90 */
183 /* ??_7facet@locale@std@@6B@ */
184 extern const vtable_ptr MSVCP_locale_facet_vtable;
186 /* ??0id@locale@std@@QAE@I@Z */
187 /* ??0id@locale@std@@QEAA@_K@Z */
188 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
189 locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
191 TRACE("(%p %lu)\n", this, id);
197 /* ??_Fid@locale@std@@QAEXXZ */
198 /* ??_Fid@locale@std@@QEAAXXZ */
199 DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
200 locale_id* __thiscall locale_id_ctor(locale_id *this)
202 TRACE("(%p)\n", this);
208 /* ??Bid@locale@std@@QAEIXZ */
209 /* ??Bid@locale@std@@QEAA_KXZ */
210 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
211 MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
215 TRACE("(%p)\n", this);
218 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
219 this->id = ++locale_id__Id_cnt;
226 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
227 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
228 int* __cdecl locale_id__Id_cnt_func(void)
231 return &locale_id__Id_cnt;
234 /* ??_Ffacet@locale@std@@QAEXXZ */
235 /* ??_Ffacet@locale@std@@QEAAXXZ */
236 DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
237 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
239 TRACE("(%p)\n", this);
240 this->vtable = &MSVCP_locale_facet_vtable;
245 /* ??0facet@locale@std@@IAE@I@Z */
246 /* ??0facet@locale@std@@IEAA@_K@Z */
247 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
248 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
250 TRACE("(%p %lu)\n", this, refs);
251 this->vtable = &MSVCP_locale_facet_vtable;
256 /* ?_Incref@facet@locale@std@@QAEXXZ */
257 /* ?_Incref@facet@locale@std@@QEAAXXZ */
258 DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
259 void __thiscall locale_facet__Incref(locale_facet *this)
263 TRACE("(%p)\n", this);
265 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
270 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
271 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
272 DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
273 locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
278 TRACE("(%p)\n", this);
280 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
284 ret = this->refs ? NULL : this;
290 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
291 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
292 MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const locale *loc)
294 TRACE("(%p %p)\n", facet, loc);
298 /* ??0_Timevec@std@@QAE@ABV01@@Z */
299 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
300 /* This copy constructor modifies copied object */
301 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8)
302 _Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy)
304 TRACE("(%p %p)\n", this, copy);
305 this->timeptr = copy->timeptr;
306 copy->timeptr = NULL;
310 /* ??0_Timevec@std@@QAE@PAX@Z */
311 /* ??0_Timevec@std@@QEAA@PEAX@Z */
312 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8)
313 _Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr)
315 TRACE("(%p %p)\n", this, timeptr);
316 this->timeptr = timeptr;
320 /* ??_F_Timevec@std@@QAEXXZ */
321 /* ??_F_Timevec@std@@QEAAXXZ */
322 DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4)
323 _Timevec* __thiscall _Timevec_ctor(_Timevec *this)
325 TRACE("(%p)\n", this);
326 this->timeptr = NULL;
330 /* ??1_Timevec@std@@QAE@XZ */
331 /* ??1_Timevec@std@@QEAA@XZ */
332 DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4)
333 void __thiscall _Timevec_dtor(_Timevec *this)
335 TRACE("(%p)\n", this);
339 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
340 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
341 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8)
342 _Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right)
344 TRACE("(%p %p)\n", this, right);
345 this->timeptr = right->timeptr;
346 right->timeptr = NULL;
350 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
351 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
352 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4)
353 void* __thiscall _Timevec__Getptr(_Timevec *this)
355 TRACE("(%p)\n", this);
356 return this->timeptr;
359 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
360 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
361 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr)
363 const char *locale = NULL;
365 /* This function is probably modifying more global objects */
366 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
369 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
371 _Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
372 MSVCP_basic_string_char_ctor_cstr(&locinfo->days, "");
373 MSVCP_basic_string_char_ctor_cstr(&locinfo->months, "");
374 MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL));
377 locale = setlocale(LC_ALL, locstr);
379 locale = setlocale(LC_ALL, NULL);
382 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
384 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
389 /* ??0_Locinfo@std@@QAE@HPBD@Z */
390 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
391 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12)
392 _Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr)
394 return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr);
397 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
398 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
399 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_bstr(_Locinfo *locinfo, const basic_string_char *locstr)
401 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
404 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
405 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
406 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr, 8)
407 _Locinfo* __thiscall _Locinfo_ctor_bstr(_Locinfo *this, const basic_string_char *locstr)
409 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
412 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
413 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
414 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr)
416 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr);
419 /* ??0_Locinfo@std@@QAE@PBD@Z */
420 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
421 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8)
422 _Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr)
424 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr);
427 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
428 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
429 void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo)
431 TRACE("(%p)\n", locinfo);
433 setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname));
434 MSVCP_basic_string_char_dtor(&locinfo->days);
435 MSVCP_basic_string_char_dtor(&locinfo->months);
436 MSVCP_basic_string_char_dtor(&locinfo->oldlocname);
437 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
438 _Lockit_dtor(&locinfo->lock);
441 /* ??_F_Locinfo@std@@QAEXXZ */
442 /* ??_F_Locinfo@std@@QEAAXXZ */
443 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4)
444 _Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this)
446 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
449 /* ??1_Locinfo@std@@QAE@XZ */
450 /* ??1_Locinfo@std@@QEAA@XZ */
451 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4)
452 void __thiscall _Locinfo_dtor(_Locinfo *this)
454 _Locinfo__Locinfo_dtor(this);
457 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
458 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
459 _Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr)
461 const char *locale = NULL;
463 /* This function is probably modifying more global objects */
464 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
466 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
468 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
471 locale = setlocale(LC_ALL, locstr);
473 locale = setlocale(LC_ALL, NULL);
476 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
478 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
483 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
484 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
485 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12)
486 _Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr)
488 return _Locinfo__Locinfo_Addcats(this, category, locstr);
492 _Collvec __cdecl _Getcoll(void)
495 _locale_t locale = _get_current_locale();
499 ret.page = locale->locinfo->lc_collate_cp;
500 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
501 _free_locale(locale);
505 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
506 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
507 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8)
508 _Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret)
515 _Ctypevec __cdecl _Getctype(void)
518 _locale_t locale = _get_current_locale();
523 ret.page = locale->locinfo->lc_codepage;
524 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
526 table = malloc(sizeof(short[256]));
528 _free_locale(locale);
529 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
531 memcpy(table, locale->locinfo->pctype, sizeof(short[256]));
533 _free_locale(locale);
537 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
538 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
539 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8)
540 _Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret)
547 _Cvtvec __cdecl _Getcvt(void)
550 _locale_t locale = _get_current_locale();
554 ret.page = locale->locinfo->lc_codepage;
555 ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
556 _free_locale(locale);
560 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
561 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
562 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8)
563 _Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret)
569 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
570 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
571 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4)
572 int __thiscall _Locinfo__Getdateorder(const _Locinfo *this)
574 FIXME("(%p) stub\n", this);
578 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
579 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
580 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4)
581 const char* __thiscall _Locinfo__Getdays(_Locinfo *this)
583 char *days = _Getdays();
585 TRACE("(%p)\n", this);
588 MSVCP_basic_string_char_dtor(&this->days);
589 MSVCP_basic_string_char_ctor_cstr(&this->days, days);
593 return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) :
594 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
597 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
598 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
599 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4)
600 const char* __thiscall _Locinfo__Getmonths(_Locinfo *this)
602 char *months = _Getmonths();
604 TRACE("(%p)\n", this);
607 MSVCP_basic_string_char_dtor(&this->months);
608 MSVCP_basic_string_char_ctor_cstr(&this->months, months);
612 return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) :
613 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
614 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
617 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
618 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
619 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4)
620 const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this)
622 TRACE("(%p)\n", this);
626 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
627 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
628 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4)
629 const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this)
631 TRACE("(%p)\n", this);
635 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
636 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
637 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4)
638 const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this)
640 TRACE("(%p)\n", this);
644 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
645 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
646 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname, 8)
647 basic_string_char* __thiscall _Locinfo__Getname(const _Locinfo *this, basic_string_char *ret)
649 TRACE("(%p)\n", this);
651 MSVCP_basic_string_char_copy_ctor(ret, &this->newlocname);
655 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
656 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
657 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 8)
658 _Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret)
660 TRACE("(%p)\n", this);
662 _Timevec_ctor_timeptr(ret, _Gettnames());
666 /* ?id@?$collate@D@std@@2V0locale@2@A */
667 locale_id collate_char_id = {0};
669 /* ??_7?$collate@D@std@@6B@ */
670 extern const vtable_ptr MSVCP_collate_char_vtable;
672 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
673 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
674 DEFINE_THISCALL_WRAPPER(collate_char__Init, 8)
675 void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo)
677 TRACE("(%p %p)\n", this, locinfo);
678 _Locinfo__Getcoll(locinfo, &this->coll);
681 /* ??0?$collate@D@std@@IAE@PBDI@Z */
682 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
683 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12)
684 collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
688 TRACE("(%p %s %lu)\n", this, name, refs);
690 locale_facet_ctor_refs(&this->facet, refs);
691 this->facet.vtable = &MSVCP_collate_char_vtable;
693 _Locinfo_ctor_cstr(&locinfo, name);
694 collate_char__Init(this, &locinfo);
695 _Locinfo_dtor(&locinfo);
699 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
700 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
701 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12)
702 collate* __thiscall collate_char_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
704 TRACE("(%p %p %lu)\n", this, locinfo, refs);
706 locale_facet_ctor_refs(&this->facet, refs);
707 this->facet.vtable = &MSVCP_collate_char_vtable;
708 collate_char__Init(this, locinfo);
712 /* ??0?$collate@D@std@@QAE@I@Z */
713 /* ??0?$collate@D@std@@QEAA@_K@Z */
714 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8)
715 collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs)
717 return collate_char_ctor_name(this, "C", refs);
720 /* ??1?$collate@D@std@@MAE@XZ */
721 /* ??1?$collate@D@std@@MEAA@XZ */
722 DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4)
723 void __thiscall collate_char_dtor(collate *this)
725 TRACE("(%p)\n", this);
728 DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor, 8)
729 collate* __thiscall MSVCP_collate_char_vector_dtor(collate *this, unsigned int flags)
731 TRACE("(%p %x)\n", this, flags);
733 /* we have an array, with the number of elements stored before the first object */
734 int i, *ptr = (int *)this-1;
736 for(i=*ptr-1; i>=0; i--)
737 collate_char_dtor(this+i);
738 MSVCRT_operator_delete(ptr);
740 collate_char_dtor(this);
742 MSVCRT_operator_delete(this);
748 /* ??_F?$collate@D@std@@QAEXXZ */
749 /* ??_F?$collate@D@std@@QEAAXXZ */
750 DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4)
751 collate* __thiscall collate_char_ctor(collate *this)
753 return collate_char_ctor_name(this, "C", 0);
756 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
757 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
758 MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const locale *loc)
760 TRACE("(%p %p)\n", facet, loc);
762 if(facet && !*facet) {
763 *facet = MSVCRT_operator_new(sizeof(collate));
765 ERR("Out of memory\n");
766 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
769 collate_char_ctor_name((collate*)*facet,
770 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
777 int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2,
778 const char *last2, const _Collvec *coll)
782 TRACE("(%s %s)\n", debugstr_an(first1, last1-first1), debugstr_an(first2, last2-first2));
787 lcid = ___lc_handle_func()[LC_COLLATE];
788 return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL;
791 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
792 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
793 DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20)
794 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
795 (const collate*, const char*, const char*, const char*, const char*), \
796 (this, first1, last1, first2, last2))
797 int __thiscall collate_char_do_compare(const collate *this, const char *first1,
798 const char *last1, const char *first2, const char *last2)
800 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
801 return _Strcoll(first1, last1, first2, last2, &this->coll);
804 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
805 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
806 DEFINE_THISCALL_WRAPPER(collate_char_compare, 20)
807 int __thiscall collate_char_compare(const collate *this, const char *first1,
808 const char *last1, const char *first2, const char *last2)
810 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
811 return call_collate_char_do_compare(this, first1, last1, first2, last2);
814 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
815 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
816 DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12)
817 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
818 (const collate*, const char*, const char*), (this, first, last))
819 LONG __thiscall collate_char_do_hash(const collate *this,
820 const char *first, const char *last)
824 TRACE("(%p %p %p)\n", this, first, last);
826 for(; first<last; first++)
827 ret = (ret<<8 | ret>>24) + *first;
831 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
832 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
833 DEFINE_THISCALL_WRAPPER(collate_char_hash, 12)
834 LONG __thiscall collate_char_hash(const collate *this,
835 const char *first, const char *last)
837 TRACE("(%p %p %p)\n", this, first, last);
838 return call_collate_char_do_hash(this, first, last);
841 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
842 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
843 DEFINE_THISCALL_WRAPPER(collate_char_do_transform, 16)
844 basic_string_char* __thiscall collate_char_do_transform(const collate *this,
845 basic_string_char *ret, const char *first, const char *last)
847 FIXME("(%p %p %p) stub\n", this, first, last);
851 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
852 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
853 DEFINE_THISCALL_WRAPPER(collate_char_transform, 16)
854 basic_string_char* __thiscall collate_char_transform(const collate *this,
855 basic_string_char *ret, const char *first, const char *last)
857 FIXME("(%p %p %p) stub\n", this, first, last);
861 /* ?id@?$collate@_W@std@@2V0locale@2@A */
862 locale_id collate_wchar_id = {0};
863 /* ?id@?$collate@G@std@@2V0locale@2@A */
864 locale_id collate_short_id = {0};
866 /* ??_7?$collate@_W@std@@6B@ */
867 extern const vtable_ptr MSVCP_collate_wchar_vtable;
868 /* ??_7?$collate@G@std@@6B@ */
869 extern const vtable_ptr MSVCP_collate_short_vtable;
871 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
872 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
873 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
874 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
875 DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8)
876 void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo)
878 TRACE("(%p %p)\n", this, locinfo);
879 _Locinfo__Getcoll(locinfo, &this->coll);
882 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
883 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
884 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12)
885 collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
889 TRACE("(%p %s %lu)\n", this, name, refs);
891 locale_facet_ctor_refs(&this->facet, refs);
892 this->facet.vtable = &MSVCP_collate_wchar_vtable;
894 _Locinfo_ctor_cstr(&locinfo, name);
895 collate_wchar__Init(this, &locinfo);
896 _Locinfo_dtor(&locinfo);
900 /* ??0?$collate@G@std@@IAE@PBDI@Z */
901 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
902 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12)
903 collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
905 collate *ret = collate_wchar_ctor_name(this, name, refs);
906 ret->facet.vtable = &MSVCP_collate_short_vtable;
910 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
911 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
912 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12)
913 collate* __thiscall collate_wchar_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
915 TRACE("(%p %p %lu)\n", this, locinfo, refs);
917 locale_facet_ctor_refs(&this->facet, refs);
918 this->facet.vtable = &MSVCP_collate_wchar_vtable;
919 collate_wchar__Init(this, locinfo);
923 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
924 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
925 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12)
926 collate* __thiscall collate_short_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
928 collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs);
929 ret->facet.vtable = &MSVCP_collate_short_vtable;
933 /* ??0?$collate@_W@std@@QAE@I@Z */
934 /* ??0?$collate@_W@std@@QEAA@_K@Z */
935 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8)
936 collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs)
938 return collate_wchar_ctor_name(this, "C", refs);
941 /* ??0?$collate@G@std@@QAE@I@Z */
942 /* ??0?$collate@G@std@@QEAA@_K@Z */
943 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8)
944 collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs)
946 collate *ret = collate_wchar_ctor_refs(this, refs);
947 ret->facet.vtable = &MSVCP_collate_short_vtable;
951 /* ??1?$collate@_W@std@@MAE@XZ */
952 /* ??1?$collate@_W@std@@MEAA@XZ */
953 /* ??1?$collate@G@std@@MAE@XZ */
954 /* ??1?$collate@G@std@@MEAA@XZ */
955 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4)
956 void __thiscall collate_wchar_dtor(collate *this)
958 TRACE("(%p)\n", this);
961 DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor, 8)
962 collate* __thiscall MSVCP_collate_wchar_vector_dtor(collate *this, unsigned int flags)
964 TRACE("(%p %x)\n", this, flags);
966 /* we have an array, with the number of elements stored before the first object */
967 int i, *ptr = (int *)this-1;
969 for(i=*ptr-1; i>=0; i--)
970 collate_wchar_dtor(this+i);
971 MSVCRT_operator_delete(ptr);
973 collate_wchar_dtor(this);
975 MSVCRT_operator_delete(this);
981 DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor, 8)
982 collate* __thiscall MSVCP_collate_short_vector_dtor(collate *this, unsigned int flags)
984 return MSVCP_collate_wchar_vector_dtor(this, flags);
987 /* ??_F?$collate@_W@std@@QAEXXZ */
988 /* ??_F?$collate@_W@std@@QEAAXXZ */
989 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4)
990 collate* __thiscall collate_wchar_ctor(collate *this)
992 return collate_wchar_ctor_name(this, "C", 0);
995 /* ??_F?$collate@G@std@@QAEXXZ */
996 /* ??_F?$collate@G@std@@QEAAXXZ */
997 DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4)
998 collate* __thiscall collate_short_ctor(collate *this)
1000 collate *ret = collate_wchar_ctor(this);
1001 ret->facet.vtable = &MSVCP_collate_short_vtable;
1005 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1006 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1007 MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const locale *loc)
1009 TRACE("(%p %p)\n", facet, loc);
1011 if(facet && !*facet) {
1012 *facet = MSVCRT_operator_new(sizeof(collate));
1014 ERR("Out of memory\n");
1015 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1018 collate_wchar_ctor_name((collate*)*facet,
1019 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
1025 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1026 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1027 MSVCP_size_t __cdecl collate_short__Getcat(const locale_facet **facet, const locale *loc)
1029 if(facet && !*facet) {
1030 collate_wchar__Getcat(facet, loc);
1031 (*(locale_facet**)facet)->vtable = &MSVCP_collate_short_vtable;
1038 int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t *first2,
1039 const wchar_t *last2, const _Collvec *coll)
1043 TRACE("(%s %s)\n", debugstr_wn(first1, last1-first1), debugstr_wn(first2, last2-first2));
1046 lcid = coll->handle;
1048 lcid = ___lc_handle_func()[LC_COLLATE];
1049 return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-CSTR_EQUAL;
1052 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1053 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1054 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1055 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1056 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20)
1057 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1058 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1059 (this, first1, last1, first2, last2))
1060 int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1,
1061 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1063 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1064 return _Wcscoll(first1, last1, first2, last2, &this->coll);
1067 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1068 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1069 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1070 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1071 DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20)
1072 int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1,
1073 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1075 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1076 return call_collate_wchar_do_compare(this, first1, last1, first2, last2);
1079 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1080 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1081 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1082 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1083 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12)
1084 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1085 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1086 LONG __thiscall collate_wchar_do_hash(const collate *this,
1087 const wchar_t *first, const wchar_t *last)
1091 TRACE("(%p %p %p)\n", this, first, last);
1093 for(; first<last; first++)
1094 ret = (ret<<8 | ret>>24) + *first;
1098 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1099 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1100 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1101 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1102 DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12)
1103 LONG __thiscall collate_wchar_hash(const collate *this,
1104 const wchar_t *first, const wchar_t *last)
1106 TRACE("(%p %p %p)\n", this, first, last);
1107 return call_collate_wchar_do_hash(this, first, last);
1110 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1111 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1112 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1113 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1114 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform, 16)
1115 basic_string_wchar* __thiscall collate_wchar_do_transform(const collate *this,
1116 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1118 FIXME("(%p %p %p) stub\n", this, first, last);
1122 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1123 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1124 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1125 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1126 DEFINE_THISCALL_WRAPPER(collate_wchar_transform, 16)
1127 basic_string_wchar* __thiscall collate_wchar_transform(const collate *this,
1128 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1130 FIXME("(%p %p %p) stub\n", this, first, last);
1134 /* ??_7ctype_base@std@@6B@ */
1135 extern const vtable_ptr MSVCP_ctype_base_vtable;
1137 /* ??0ctype_base@std@@QAE@I@Z */
1138 /* ??0ctype_base@std@@QEAA@_K@Z */
1139 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
1140 ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
1142 TRACE("(%p %lu)\n", this, refs);
1143 locale_facet_ctor_refs(&this->facet, refs);
1144 this->facet.vtable = &MSVCP_ctype_base_vtable;
1148 /* ??_Fctype_base@std@@QAEXXZ */
1149 /* ??_Fctype_base@std@@QEAAXXZ */
1150 DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
1151 ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
1153 TRACE("(%p)\n", this);
1154 locale_facet_ctor_refs(&this->facet, 0);
1155 this->facet.vtable = &MSVCP_ctype_base_vtable;
1159 /* ??1ctype_base@std@@UAE@XZ */
1160 /* ??1ctype_base@std@@UEAA@XZ */
1161 DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
1162 void __thiscall ctype_base_dtor(ctype_base *this)
1164 TRACE("(%p)\n", this);
1167 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
1168 ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
1170 TRACE("(%p %x)\n", this, flags);
1172 /* we have an array, with the number of elements stored before the first object */
1173 int i, *ptr = (int *)this-1;
1175 for(i=*ptr-1; i>=0; i--)
1176 ctype_base_dtor(this+i);
1177 MSVCRT_operator_delete(ptr);
1179 ctype_base_dtor(this);
1181 MSVCRT_operator_delete(this);
1187 /* ?_Xran@ctype_base@std@@KAXXZ */
1188 void __cdecl ctype_base__Xran(void)
1190 throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
1193 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1194 locale_id ctype_char_id = {0};
1195 /* ?table_size@?$ctype@D@std@@2IB */
1196 /* ?table_size@?$ctype@D@std@@2_KB */
1197 MSVCP_size_t ctype_char_table_size = 256;
1199 /* ??_7?$ctype@D@std@@6B@ */
1200 extern const vtable_ptr MSVCP_ctype_char_vtable;
1202 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1203 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1204 locale_id* __cdecl ctype_char__Id_func(void)
1207 return &ctype_char_id;
1210 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1211 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1212 DEFINE_THISCALL_WRAPPER(ctype_char__Init, 8)
1213 void __thiscall ctype_char__Init(ctype_char *this, _Locinfo *locinfo)
1215 TRACE("(%p %p)\n", this, locinfo);
1216 _Locinfo__Getctype(locinfo, &this->ctype);
1219 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1220 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1221 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy, 4)
1222 void __thiscall ctype_char__Tidy(ctype_char *this)
1224 TRACE("(%p)\n", this);
1226 if(this->ctype.delfl)
1227 free((short*)this->ctype.table);
1230 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1231 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1232 const short* __cdecl ctype_char_classic_table(void)
1235 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1238 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1239 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1240 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo, 12)
1241 ctype_char* __thiscall ctype_char_ctor_locinfo(ctype_char *this,
1242 _Locinfo *locinfo, MSVCP_size_t refs)
1244 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1245 ctype_base_ctor_refs(&this->base, refs);
1246 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1247 ctype_char__Init(this, locinfo);
1251 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1252 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1253 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table, 16)
1254 ctype_char* __thiscall ctype_char_ctor_table(ctype_char *this,
1255 const short *table, MSVCP_bool delete, MSVCP_size_t refs)
1259 TRACE("(%p %p %d %lu)\n", this, table, delete, refs);
1261 ctype_base_ctor_refs(&this->base, refs);
1262 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1264 _Locinfo_ctor(&locinfo);
1265 ctype_char__Init(this, &locinfo);
1266 _Locinfo_dtor(&locinfo);
1269 ctype_char__Tidy(this);
1270 this->ctype.table = table;
1271 this->ctype.delfl = delete;
1276 /* ??_F?$ctype@D@std@@QAEXXZ */
1277 /* ??_F?$ctype@D@std@@QEAAXXZ */
1278 DEFINE_THISCALL_WRAPPER(ctype_char_ctor, 4)
1279 ctype_char* __thiscall ctype_char_ctor(ctype_char *this)
1281 return ctype_char_ctor_table(this, NULL, FALSE, 0);
1284 /* ??1?$ctype@D@std@@MAE@XZ */
1285 /* ??1?$ctype@D@std@@MEAA@XZ */
1286 DEFINE_THISCALL_WRAPPER(ctype_char_dtor, 4)
1287 void __thiscall ctype_char_dtor(ctype_char *this)
1289 TRACE("(%p)\n", this);
1290 ctype_char__Tidy(this);
1293 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_char_vector_dtor, 8)
1294 ctype_char* __thiscall MSVCP_ctype_char_vector_dtor(ctype_char *this, unsigned int flags)
1296 TRACE("(%p %x)\n", this, flags);
1298 /* we have an array, with the number of elements stored before the first object */
1299 int i, *ptr = (int *)this-1;
1301 for(i=*ptr-1; i>=0; i--)
1302 ctype_char_dtor(this+i);
1303 MSVCRT_operator_delete(ptr);
1305 ctype_char_dtor(this);
1307 MSVCRT_operator_delete(this);
1313 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1314 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1315 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12)
1316 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1317 char, (const ctype_char*, char, char), (this, ch, unused))
1318 char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused)
1320 TRACE("(%p %c %c)\n", this, ch, unused);
1324 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1325 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1326 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20)
1327 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1328 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1329 (this, first, last, unused, dest))
1330 const char* __thiscall ctype_char_do_narrow(const ctype_char *this,
1331 const char *first, const char *last, char unused, char *dest)
1333 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1334 memcpy(dest, first, last-first);
1338 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1339 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1340 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s, 24)
1341 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1342 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1343 (this, first, last, unused, dest, size))
1344 const char* __thiscall ctype_char__Do_narrow_s(const ctype_char *this, const char *first,
1345 const char *last, char unused, char *dest, MSVCP_size_t size)
1347 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1348 memcpy_s(dest, size, first, last-first);
1352 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1353 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1354 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch, 12)
1355 char __thiscall ctype_char_narrow_ch(const ctype_char *this, char ch, char dflt)
1357 TRACE("(%p %c %c)\n", this, ch, dflt);
1358 return call_ctype_char_do_narrow_ch(this, ch, dflt);
1361 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1362 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1363 DEFINE_THISCALL_WRAPPER(ctype_char_narrow, 20)
1364 const char* __thiscall ctype_char_narrow(const ctype_char *this,
1365 const char *first, const char *last, char dflt, char *dest)
1367 TRACE("(%p %p %p %c %p)\n", this, first, last, dflt, dest);
1368 return call_ctype_char_do_narrow(this, first, last, dflt, dest);
1371 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1372 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1373 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s, 24)
1374 const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *first,
1375 const char *last, char dflt, char *dest, MSVCP_size_t size)
1377 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1378 return call_ctype_char__Do_narrow_s(this, first, last, dflt, dest, size);
1381 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1382 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1383 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8)
1384 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1385 char, (const ctype_char*, char), (this, ch))
1386 char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch)
1388 TRACE("(%p %c)\n", this, ch);
1392 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1393 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1394 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16)
1395 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1396 const char*, (const ctype_char*, const char*, const char*, char*), \
1397 (this, first, last, dest))
1398 const char* __thiscall ctype_char_do_widen(const ctype_char *this,
1399 const char *first, const char *last, char *dest)
1401 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1402 memcpy(dest, first, last-first);
1406 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1407 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1408 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20)
1409 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1410 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1411 (this, first, last, dest, size))
1412 const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
1413 const char *first, const char *last, char *dest, MSVCP_size_t size)
1415 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1416 memcpy_s(dest, size, first, last-first);
1420 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1421 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1422 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8)
1423 char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch)
1425 TRACE("(%p %c)\n", this, ch);
1426 return call_ctype_char_do_widen_ch(this, ch);
1429 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1430 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1431 DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16)
1432 const char* __thiscall ctype_char_widen(const ctype_char *this,
1433 const char *first, const char *last, char *dest)
1435 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1436 return call_ctype_char_do_widen(this, first, last, dest);
1439 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1440 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1441 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20)
1442 const char* __thiscall ctype_char__Widen_s(const ctype_char *this,
1443 const char *first, const char *last, char *dest, MSVCP_size_t size)
1445 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1446 return call_ctype_char__Do_widen_s(this, first, last, dest, size);
1449 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1450 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1451 MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale *loc)
1453 TRACE("(%p %p)\n", facet, loc);
1455 if(facet && !*facet) {
1458 *facet = MSVCRT_operator_new(sizeof(ctype_char));
1460 ERR("Out of memory\n");
1461 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1465 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
1466 ctype_char_ctor_locinfo((ctype_char*)*facet, &locinfo, 0);
1467 _Locinfo_dtor(&locinfo);
1473 ctype_char* ctype_char_use_facet(const locale *loc)
1475 static ctype_char *obj = NULL;
1478 const locale_facet *fac;
1480 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
1481 fac = locale__Getfacet(loc, ctype_char_id.id);
1483 _Lockit_dtor(&lock);
1484 return (ctype_char*)fac;
1490 ctype_char__Getcat(&fac, loc);
1491 obj = (ctype_char*)fac;
1492 locale_facet__Incref(&obj->base.facet);
1493 locale_facet_register(&obj->base.facet);
1494 _Lockit_dtor(&lock);
1500 int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
1504 TRACE("%d %p\n", ch, ctype);
1509 cp = ___lc_codepage_func();
1511 /* Don't convert to unicode in case of C locale */
1513 if(ch>='A' && ch<='Z')
1522 str[0] = (ch>>8) & 255;
1530 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1533 lower = tolowerW(wide);
1537 WideCharToMultiByte(cp, 0, &lower, 1, str, 2, NULL, NULL);
1539 return str[0] + (str[1]<<8);
1543 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1544 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1545 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1546 char, (const ctype_char*, char), (this, ch))
1547 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch, 8)
1548 char __thiscall ctype_char_do_tolower_ch(const ctype_char *this, char ch)
1550 TRACE("(%p %c)\n", this, ch);
1551 return _Tolower(ch, &this->ctype);
1554 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1555 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1556 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1557 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1558 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower, 12)
1559 const char* __thiscall ctype_char_do_tolower(const ctype_char *this, char *first, const char *last)
1561 TRACE("(%p %p %p)\n", this, first, last);
1562 for(; first<last; first++)
1563 *first = _Tolower(*first, &this->ctype);
1567 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1568 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1569 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch, 8)
1570 char __thiscall ctype_char_tolower_ch(const ctype_char *this, char ch)
1572 TRACE("(%p %c)\n", this, ch);
1573 return call_ctype_char_do_tolower_ch(this, ch);
1576 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1577 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1578 DEFINE_THISCALL_WRAPPER(ctype_char_tolower, 12)
1579 const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, const char *last)
1581 TRACE("(%p %p %p)\n", this, first, last);
1582 return call_ctype_char_do_tolower(this, first, last);
1586 int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
1590 TRACE("%d %p\n", ch, ctype);
1595 cp = ___lc_codepage_func();
1597 /* Don't convert to unicode in case of C locale */
1599 if(ch>='a' && ch<='z')
1608 str[0] = (ch>>8) & 255;
1616 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1619 upper = toupperW(wide);
1623 WideCharToMultiByte(cp, 0, &upper, 1, str, 2, NULL, NULL);
1625 return str[0] + (str[1]<<8);
1629 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1630 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1631 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1632 char, (const ctype_char*, char), (this, ch))
1633 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch, 8)
1634 char __thiscall ctype_char_do_toupper_ch(const ctype_char *this, char ch)
1636 TRACE("(%p %c)\n", this, ch);
1637 return _Toupper(ch, &this->ctype);
1640 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1641 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1642 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1643 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1644 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper, 12)
1645 const char* __thiscall ctype_char_do_toupper(const ctype_char *this,
1646 char *first, const char *last)
1648 TRACE("(%p %p %p)\n", this, first, last);
1649 for(; first<last; first++)
1650 *first = _Toupper(*first, &this->ctype);
1654 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1655 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1656 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch, 8)
1657 char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch)
1659 TRACE("(%p %c)\n", this, ch);
1660 return call_ctype_char_do_toupper_ch(this, ch);
1663 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1664 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1665 DEFINE_THISCALL_WRAPPER(ctype_char_toupper, 12)
1666 const char* __thiscall ctype_char_toupper(const ctype_char *this, char *first, const char *last)
1668 TRACE("(%p %p %p)\n", this, first, last);
1669 return call_ctype_char_do_toupper(this, first, last);
1672 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1673 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1674 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch, 12)
1675 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char *this, short mask, char ch)
1677 TRACE("(%p %x %c)\n", this, mask, ch);
1678 return (this->ctype.table[(unsigned char)ch] & mask) != 0;
1681 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1682 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1683 DEFINE_THISCALL_WRAPPER(ctype_char_is, 16)
1684 const char* __thiscall ctype_char_is(const ctype_char *this, const char *first, const char *last, short *dest)
1686 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1687 for(; first<last; first++)
1688 *dest++ = this->ctype.table[(unsigned char)*first];
1692 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1693 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1694 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is, 16)
1695 const char* __thiscall ctype_char_scan_is(const ctype_char *this, short mask, const char *first, const char *last)
1697 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1698 for(; first<last; first++)
1699 if(!ctype_char_is_ch(this, mask, *first))
1704 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1705 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1706 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not, 16)
1707 const char* __thiscall ctype_char_scan_not(const ctype_char *this, short mask, const char *first, const char *last)
1709 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1710 for(; first<last; first++)
1711 if(ctype_char_is_ch(this, mask, *first))
1716 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1717 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1718 DEFINE_THISCALL_WRAPPER(ctype_char_table, 4)
1719 const short* __thiscall ctype_char_table(const ctype_char *this)
1721 TRACE("(%p)\n", this);
1722 return this->ctype.table;
1725 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1726 locale_id ctype_wchar_id = {0};
1727 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1728 locale_id ctype_short_id = {0};
1730 /* ??_7?$ctype@_W@std@@6B@ */
1731 extern const vtable_ptr MSVCP_ctype_wchar_vtable;
1732 /* ??_7?$ctype@G@std@@6B@ */
1733 extern const vtable_ptr MSVCP_ctype_short_vtable;
1735 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1736 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1737 locale_id* __cdecl ctype_wchar__Id_func(void)
1740 return &ctype_wchar_id;
1743 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1744 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1745 locale_id* __cdecl ctype_short__Id_func(void)
1748 return &ctype_short_id;
1751 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1752 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1753 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1754 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1755 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8)
1756 void __thiscall ctype_wchar__Init(ctype_wchar *this, _Locinfo *locinfo)
1758 TRACE("(%p %p)\n", this, locinfo);
1759 _Locinfo__Getctype(locinfo, &this->ctype);
1760 _Locinfo__Getcvt(locinfo, &this->cvt);
1763 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1764 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1765 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12)
1766 ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this,
1767 _Locinfo *locinfo, MSVCP_size_t refs)
1769 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1770 ctype_base_ctor_refs(&this->base, refs);
1771 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1772 ctype_wchar__Init(this, locinfo);
1776 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1777 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1778 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo, 12)
1779 ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this,
1780 _Locinfo *locinfo, MSVCP_size_t refs)
1782 ctype_wchar *ret = ctype_wchar_ctor_locinfo(this, locinfo, refs);
1783 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1787 /* ??0?$ctype@_W@std@@QAE@I@Z */
1788 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1789 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8)
1790 ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1794 TRACE("(%p %lu)\n", this, refs);
1796 ctype_base_ctor_refs(&this->base, refs);
1797 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1799 _Locinfo_ctor(&locinfo);
1800 ctype_wchar__Init(this, &locinfo);
1801 _Locinfo_dtor(&locinfo);
1805 /* ??0?$ctype@G@std@@QAE@I@Z */
1806 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1807 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs, 8)
1808 ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1810 ctype_wchar *ret = ctype_wchar_ctor_refs(this, refs);
1811 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1815 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1816 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1817 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12)
1818 ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this,
1819 const char *name, MSVCP_size_t refs)
1823 TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs);
1825 ctype_base_ctor_refs(&this->base, refs);
1826 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1828 _Locinfo_ctor_cstr(&locinfo, name);
1829 ctype_wchar__Init(this, &locinfo);
1830 _Locinfo_dtor(&locinfo);
1834 /* ??_F?$ctype@_W@std@@QAEXXZ */
1835 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1836 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4)
1837 ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this)
1839 TRACE("(%p)\n", this);
1840 return ctype_short_ctor_refs(this, 0);
1843 /* ??_F?$ctype@G@std@@QAEXXZ */
1844 /* ??_F?$ctype@G@std@@QEAAXXZ */
1845 DEFINE_THISCALL_WRAPPER(ctype_short_ctor, 4)
1846 ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this)
1848 ctype_wchar *ret = ctype_wchar_ctor(this);
1849 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1853 /* ??1?$ctype@_W@std@@MAE@XZ */
1854 /* ??1?$ctype@_W@std@@MEAA@XZ */
1855 /* ??1?$ctype@G@std@@MAE@XZ */
1856 /* ??1?$ctype@G@std@@MEAA@XZ */
1857 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4)
1858 void __thiscall ctype_wchar_dtor(ctype_wchar *this)
1860 TRACE("(%p)\n", this);
1861 if(this->ctype.delfl)
1862 free((void*)this->ctype.table);
1865 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor, 8)
1866 ctype_wchar* __thiscall MSVCP_ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int flags)
1868 TRACE("(%p %x)\n", this, flags);
1870 /* we have an array, with the number of elements stored before the first object */
1871 int i, *ptr = (int *)this-1;
1873 for(i=*ptr-1; i>=0; i--)
1874 ctype_wchar_dtor(this+i);
1875 MSVCRT_operator_delete(ptr);
1877 ctype_wchar_dtor(this);
1879 MSVCRT_operator_delete(this);
1885 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_short_vector_dtor, 8)
1886 ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigned int flags)
1888 return MSVCP_ctype_wchar_vector_dtor(this, flags);
1892 int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt)
1897 TRACE("%p %d %p %p\n", s, wch, state, cvt);
1902 cp = ___lc_codepage_func();
1914 size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def);
1923 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1924 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1925 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1926 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1927 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12)
1928 char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt)
1930 char buf[MB_LEN_MAX];
1932 TRACE("(%p %d %d)\n", this, ch, dflt);
1934 return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt;
1937 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1938 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1939 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1940 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1941 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12)
1942 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
1943 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1944 char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1946 return ctype_wchar__Donarrow(this, ch, dflt);
1949 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1950 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1951 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1952 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1953 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20)
1954 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
1955 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1956 (this, first, last, dflt, dest))
1957 const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this,
1958 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1960 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1961 for(; first<last; first++)
1962 *dest++ = ctype_wchar__Donarrow(this, *first, dflt);
1966 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
1967 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
1968 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
1969 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
1970 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s, 24)
1971 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
1972 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
1973 (this, first, last, dflt, dest, size))
1974 const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this,
1975 const wchar_t *first, const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
1977 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
1978 /* This function converts all multi-byte characters to dflt,
1979 * thanks to it result size is known before converting */
1980 if(last-first > size)
1982 return ctype_wchar_do_narrow(this, first, last, dflt, dest);
1985 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1986 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1987 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1988 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1989 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12)
1990 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1992 TRACE("(%p %d %d)\n", this, ch, dflt);
1993 return call_ctype_wchar_do_narrow_ch(this, ch, dflt);
1996 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1997 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1998 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1999 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2000 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20)
2001 const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this,
2002 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
2004 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
2005 return call_ctype_wchar_do_narrow(this, first, last, dflt, dest);
2008 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2009 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2010 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2011 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2012 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24)
2013 const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first,
2014 const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
2016 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
2017 return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size);
2021 int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt)
2027 TRACE("(%p %p %lu %p %p)\n", out, in, len, state, cvt);
2035 cp = ___lc_codepage_func();
2039 *out = (unsigned char)*in;
2046 ((char*)state)[1] = *in;
2048 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) {
2058 GetCPInfo(cp, &cp_info);
2060 for(i=0; i<MAX_LEADBYTES; i+=2) {
2061 if(!cp_info.LeadByte[i+1])
2063 if((unsigned char)*in>=cp_info.LeadByte[i] && (unsigned char)*in<=cp_info.LeadByte[i+1]) {
2071 *state = (unsigned char)*in;
2075 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 2, out, out ? 1 : 0)) {
2082 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 1, out, out ? 1 : 0)) {
2089 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2090 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2091 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2092 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2093 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8)
2094 wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch)
2098 TRACE("(%p %d)\n", this, ch);
2099 return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret;
2102 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2103 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2104 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2105 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2106 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch, 8)
2107 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2108 wchar_t, (const ctype_wchar*, char), (this, ch))
2109 wchar_t __thiscall ctype_wchar_do_widen_ch(const ctype_wchar *this, char ch)
2111 return ctype_wchar__Dowiden(this, ch);
2114 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2115 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2116 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2117 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2118 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen, 16)
2119 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2120 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2121 (this, first, last, dest))
2122 const char* __thiscall ctype_wchar_do_widen(const ctype_wchar *this,
2123 const char *first, const char *last, wchar_t *dest)
2125 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2126 for(; first<last; first++)
2127 *dest++ = ctype_wchar__Dowiden(this, *first);
2131 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2132 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2133 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2134 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2135 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s, 20)
2136 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2137 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2138 (this, first, last, dest, size))
2139 const char* __thiscall ctype_wchar__Do_widen_s(const ctype_wchar *this,
2140 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2142 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2143 /* This function converts all multi-byte characters to WEOF,
2144 * thanks to it result size is known before converting */
2145 if(size < last-first)
2147 return ctype_wchar_do_widen(this, first, last, dest);
2150 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2151 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2152 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2153 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2154 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch, 8)
2155 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar *this, char ch)
2157 TRACE("(%p %d)\n", this, ch);
2158 return call_ctype_wchar_do_widen_ch(this, ch);
2161 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2162 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2163 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2164 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2165 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen, 16)
2166 const char* __thiscall ctype_wchar_widen(const ctype_wchar *this,
2167 const char *first, const char *last, wchar_t *dest)
2169 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2170 return call_ctype_wchar_do_widen(this, first, last, dest);
2173 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2174 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2175 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2176 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2177 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s, 20)
2178 const char* __thiscall ctype_wchar__Widen_s(const ctype_wchar *this,
2179 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2181 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2182 return call_ctype_wchar__Do_widen_s(this, first, last, dest, size);
2185 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2186 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2187 MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const locale *loc)
2189 TRACE("(%p %p)\n", facet, loc);
2191 if(facet && !*facet) {
2194 *facet = MSVCRT_operator_new(sizeof(ctype_wchar));
2196 ERR("Out of memory\n");
2197 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2201 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
2202 ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0);
2203 _Locinfo_dtor(&locinfo);
2209 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2210 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2211 MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const locale *loc)
2213 if(facet && !*facet) {
2214 ctype_wchar__Getcat(facet, loc);
2215 (*(locale_facet**)facet)->vtable = &MSVCP_ctype_short_vtable;
2222 wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
2224 TRACE("(%d %p)\n", ch, ctype);
2225 return tolowerW(ch);
2228 ctype_wchar* ctype_wchar_use_facet(const locale *loc)
2230 static ctype_wchar *obj = NULL;
2233 const locale_facet *fac;
2235 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
2236 fac = locale__Getfacet(loc, ctype_wchar_id.id);
2238 _Lockit_dtor(&lock);
2239 return (ctype_wchar*)fac;
2245 ctype_wchar__Getcat(&fac, loc);
2246 obj = (ctype_wchar*)fac;
2247 locale_facet__Incref(&obj->base.facet);
2248 locale_facet_register(&obj->base.facet);
2249 _Lockit_dtor(&lock);
2254 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2255 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2256 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2257 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2258 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8)
2259 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2260 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2261 wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
2263 return _Towlower(ch, &this->ctype);
2266 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2267 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2268 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2269 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2270 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12)
2271 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2272 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2273 (this, first, last))
2274 const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this,
2275 wchar_t *first, const wchar_t *last)
2277 TRACE("(%p %p %p)\n", this, first, last);
2278 for(; first<last; first++)
2279 *first = _Towlower(*first, &this->ctype);
2283 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2284 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2285 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2286 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2287 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8)
2288 wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch)
2290 TRACE("(%p %d)\n", this, ch);
2291 return call_ctype_wchar_do_tolower_ch(this, ch);
2294 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2295 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2296 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2297 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2298 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12)
2299 const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
2300 wchar_t *first, const wchar_t *last)
2302 TRACE("(%p %p %p)\n", this, first, last);
2303 return call_ctype_wchar_do_tolower(this, first, last);
2307 wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
2309 TRACE("(%d %p)\n", ch, ctype);
2310 return toupperW(ch);
2313 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2314 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2315 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2316 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2317 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8)
2318 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2319 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2320 wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch)
2322 return _Towupper(ch, &this->ctype);
2325 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2326 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2327 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2328 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2329 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12)
2330 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2331 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2332 (this, first, last))
2333 const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
2334 wchar_t *first, const wchar_t *last)
2336 TRACE("(%p %p %p)\n", this, first, last);
2337 for(; first<last; first++)
2338 *first = _Towupper(*first, &this->ctype);
2342 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2343 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2344 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2345 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2346 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8)
2347 wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch)
2349 TRACE("(%p %d)\n", this, ch);
2350 return call_ctype_wchar_do_toupper_ch(this, ch);
2353 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2354 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2355 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2356 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2357 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12)
2358 const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this,
2359 wchar_t *first, const wchar_t *last)
2361 TRACE("(%p %p %p)\n", this, first, last);
2362 return call_ctype_wchar_do_toupper(this, first, last);
2366 const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last,
2367 short *mask, const _Ctypevec *ctype)
2369 TRACE("(%p %p %p %p)\n", first, last, mask, ctype);
2370 GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask);
2375 short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype)
2378 _Getwctypes(&ch, &ch+1, &mask, ctype);
2382 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2383 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2384 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2385 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2386 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12)
2387 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2388 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2389 MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2391 TRACE("(%p %x %d)\n", this, mask, ch);
2392 return (_Getwctype(ch, &this->ctype) & mask) != 0;
2395 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2396 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2397 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2398 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2399 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16)
2400 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2401 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2402 (this, first, last, dest))
2403 const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this,
2404 const wchar_t *first, const wchar_t *last, short *dest)
2406 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2407 return _Getwctypes(first, last, dest, &this->ctype);
2410 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2411 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2412 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2413 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2414 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12)
2415 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2417 TRACE("(%p %x %d)\n", this, mask, ch);
2418 return call_ctype_wchar_do_is_ch(this, mask, ch);
2421 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2422 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2423 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2424 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2425 DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16)
2426 const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this,
2427 const wchar_t *first, const wchar_t *last, short *dest)
2429 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2430 return call_ctype_wchar_do_is(this, first, last, dest);
2433 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2434 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2435 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2436 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2437 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16)
2438 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2439 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2440 (this, mask, first, last))
2441 const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this,
2442 short mask, const wchar_t *first, const wchar_t *last)
2444 TRACE("(%p %d %p %p)\n", this, mask, first, last);
2445 for(; first<last; first++)
2446 if(!ctype_wchar_is_ch(this, mask, *first))
2451 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2452 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2453 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2454 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2455 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16)
2456 const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
2457 short mask, const wchar_t *first, const wchar_t *last)
2459 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2460 return call_ctype_wchar_do_scan_is(this, mask, first, last);
2463 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2464 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2465 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2466 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2467 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16)
2468 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2469 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2470 (this, mask, first, last))
2471 const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this,
2472 short mask, const wchar_t *first, const wchar_t *last)
2474 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2475 for(; first<last; first++)
2476 if(ctype_wchar_is_ch(this, mask, *first))
2481 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2482 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2483 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2484 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2485 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16)
2486 const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this,
2487 short mask, const wchar_t *first, const wchar_t *last)
2489 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2490 return call_ctype_wchar_do_scan_not(this, mask, first, last);
2493 /* ??_7codecvt_base@std@@6B@ */
2494 extern const vtable_ptr MSVCP_codecvt_base_vtable;
2496 /* ??0codecvt_base@std@@QAE@I@Z */
2497 /* ??0codecvt_base@std@@QEAA@_K@Z */
2498 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs, 8)
2499 codecvt_base* __thiscall codecvt_base_ctor_refs(codecvt_base *this, MSVCP_size_t refs)
2501 TRACE("(%p %lu)\n", this, refs);
2502 locale_facet_ctor_refs(&this->facet, refs);
2503 this->facet.vtable = &MSVCP_codecvt_base_vtable;
2507 /* ??_Fcodecvt_base@std@@QAEXXZ */
2508 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2509 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor, 4)
2510 codecvt_base* __thiscall codecvt_base_ctor(codecvt_base *this)
2512 return codecvt_base_ctor_refs(this, 0);
2515 /* ??1codecvt_base@std@@UAE@XZ */
2516 /* ??1codecvt_base@std@@UEAA@XZ */
2517 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor, 4)
2518 void __thiscall codecvt_base_dtor(codecvt_base *this)
2520 TRACE("(%p)\n", this);
2521 locale_facet_dtor(&this->facet);
2524 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_base_vector_dtor, 8)
2525 codecvt_base* __thiscall MSVCP_codecvt_base_vector_dtor(codecvt_base *this, unsigned int flags)
2527 TRACE("(%p %x)\n", this, flags);
2529 /* we have an array, with the number of elements stored before the first object */
2530 int i, *ptr = (int *)this-1;
2532 for(i=*ptr-1; i>=0; i--)
2533 codecvt_base_dtor(this+i);
2534 MSVCRT_operator_delete(ptr);
2536 codecvt_base_dtor(this);
2538 MSVCRT_operator_delete(this);
2544 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2545 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2546 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2547 MSVCP_bool, (const codecvt_base*), (this))
2548 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv, 4)
2549 MSVCP_bool __thiscall codecvt_base_do_always_noconv(const codecvt_base *this)
2551 TRACE("(%p)\n", this);
2555 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2556 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2557 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv, 4)
2558 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base *this)
2560 TRACE("(%p)\n", this);
2561 return call_codecvt_base_do_always_noconv(this);
2564 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2565 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2566 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2567 int, (const codecvt_base*), (this))
2568 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length, 4)
2569 int __thiscall codecvt_base_do_max_length(const codecvt_base *this)
2571 TRACE("(%p)\n", this);
2575 /* ?max_length@codecvt_base@std@@QBEHXZ */
2576 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2577 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length, 4)
2578 int __thiscall codecvt_base_max_length(const codecvt_base *this)
2580 TRACE("(%p)\n", this);
2581 return call_codecvt_base_do_max_length(this);
2584 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2585 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2586 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2587 int, (const codecvt_base*), (this))
2588 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding, 4)
2589 int __thiscall codecvt_base_do_encoding(const codecvt_base *this)
2591 TRACE("(%p)\n", this);
2595 /* ?encoding@codecvt_base@std@@QBEHXZ */
2596 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2597 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding, 4)
2598 int __thiscall codecvt_base_encoding(const codecvt_base *this)
2600 TRACE("(%p)\n", this);
2601 return call_codecvt_base_do_encoding(this);
2604 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2605 locale_id codecvt_char_id = {0};
2607 /* ??_7?$codecvt@DDH@std@@6B@ */
2608 extern const vtable_ptr MSVCP_codecvt_char_vtable;
2610 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2611 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2612 DEFINE_THISCALL_WRAPPER(codecvt_char__Init, 8)
2613 void __thiscall codecvt_char__Init(codecvt_char *this, const _Locinfo *locinfo)
2615 TRACE("(%p %p)\n", this, locinfo);
2618 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2619 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2620 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo, 12)
2621 codecvt_char* __thiscall codecvt_char_ctor_locinfo(codecvt_char *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2623 TRACE("(%p %p %lu)\n", this, locinfo, refs);
2624 codecvt_base_ctor_refs(&this->base, refs);
2625 this->base.facet.vtable = &MSVCP_codecvt_char_vtable;
2629 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2630 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2631 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs, 8)
2632 codecvt_char* __thiscall codecvt_char_ctor_refs(codecvt_char *this, MSVCP_size_t refs)
2634 return codecvt_char_ctor_locinfo(this, NULL, refs);
2637 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2638 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2639 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor, 4)
2640 codecvt_char* __thiscall codecvt_char_ctor(codecvt_char *this)
2642 return codecvt_char_ctor_locinfo(this, NULL, 0);
2645 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2646 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2647 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor, 4)
2648 void __thiscall codecvt_char_dtor(codecvt_char *this)
2650 TRACE("(%p)\n", this);
2651 codecvt_base_dtor(&this->base);
2654 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_char_vector_dtor, 8)
2655 codecvt_char* __thiscall MSVCP_codecvt_char_vector_dtor(codecvt_char *this, unsigned int flags)
2657 TRACE("(%p %x)\n", this, flags);
2659 /* we have an array, with the number of elements stored before the first object */
2660 int i, *ptr = (int *)this-1;
2662 for(i=*ptr-1; i>=0; i--)
2663 codecvt_char_dtor(this+i);
2664 MSVCRT_operator_delete(ptr);
2666 codecvt_char_dtor(this);
2668 MSVCRT_operator_delete(this);
2674 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2675 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2676 MSVCP_size_t __cdecl codecvt_char__Getcat(const locale_facet **facet, const locale *loc)
2678 TRACE("(%p %p)\n", facet, loc);
2680 if(facet && !*facet) {
2681 *facet = MSVCRT_operator_new(sizeof(codecvt_char));
2683 ERR("Out of memory\n");
2684 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2687 codecvt_char_ctor((codecvt_char*)*facet);
2693 codecvt_char* codecvt_char_use_facet(const locale *loc)
2695 static codecvt_char *obj = NULL;
2698 const locale_facet *fac;
2700 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
2701 fac = locale__Getfacet(loc, codecvt_char_id.id);
2703 _Lockit_dtor(&lock);
2704 return (codecvt_char*)fac;
2710 codecvt_char__Getcat(&fac, loc);
2711 obj = (codecvt_char*)fac;
2712 locale_facet__Incref(&obj->base.facet);
2713 locale_facet_register(&obj->base.facet);
2714 _Lockit_dtor(&lock);
2719 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2720 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2721 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2722 CALL_VTBL_FUNC(this, 16, int, \
2723 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2724 (this, state, from, from_end, from_next, to, to_end, to_next))
2725 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in, 32)
2726 int __thiscall codecvt_char_do_in(const codecvt_char *this, int *state,
2727 const char *from, const char *from_end, const char **from_next,
2728 char *to, char *to_end, char **to_next)
2730 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2731 from_next, to, to_end, to_next);
2734 return CODECVT_noconv;
2737 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2738 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2739 DEFINE_THISCALL_WRAPPER(codecvt_char_in, 32)
2740 int __thiscall codecvt_char_in(const codecvt_char *this, int *state,
2741 const char *from, const char *from_end, const char **from_next,
2742 char *to, char *to_end, char **to_next)
2744 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2745 from_next, to, to_end, to_next);
2746 return call_codecvt_char_do_in(this, state, from, from_end, from_next,
2747 to, to_end, to_next);
2750 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2751 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2752 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2753 CALL_VTBL_FUNC(this, 20, int, \
2754 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2755 (this, state, from, from_end, from_next, to, to_end, to_next))
2756 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out, 32)
2757 int __thiscall codecvt_char_do_out(const codecvt_char *this, int *state,
2758 const char *from, const char *from_end, const char **from_next,
2759 char *to, char *to_end, char **to_next)
2761 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
2762 from_end, from_next, to, to_end, to_next);
2765 return CODECVT_noconv;
2768 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2769 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2770 DEFINE_THISCALL_WRAPPER(codecvt_char_out, 32)
2771 int __thiscall codecvt_char_out(const codecvt_char *this, int *state,
2772 const char *from, const char *from_end, const char **from_next,
2773 char *to, char *to_end, char **to_next)
2775 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from, from_end,
2776 from_next, to, to_end, to_next);
2777 return call_codecvt_char_do_out(this, state, from, from_end, from_next,
2778 to, to_end, to_next);
2781 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2782 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2783 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2784 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2785 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift, 20)
2786 int __thiscall codecvt_char_do_unshift(const codecvt_char *this,
2787 int *state, char *to, char *to_end, char **to_next)
2789 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
2791 return CODECVT_noconv;
2794 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2795 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2796 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift, 20)
2797 int __thiscall codecvt_char_unshift(const codecvt_char *this,
2798 int *state, char *to, char *to_end, char **to_next)
2800 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
2801 return call_codecvt_char_do_unshift(this, state, to, to_end, to_next);
2804 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2805 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2806 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2807 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2808 (this, state, from, from_end, max))
2809 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length, 20)
2810 int __thiscall codecvt_char_do_length(const codecvt_char *this, const int *state,
2811 const char *from, const char *from_end, MSVCP_size_t max)
2813 TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
2814 return (from_end-from > max ? max : from_end-from);
2817 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2818 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2819 DEFINE_THISCALL_WRAPPER(codecvt_char_length, 20)
2820 int __thiscall codecvt_char_length(const codecvt_char *this, const int *state,
2821 const char *from, const char *from_end, MSVCP_size_t max)
2823 TRACE("(%p %p %p %p %lu)\n", this, state, from, from_end, max);
2824 return call_codecvt_char_do_length(this, state, from, from_end, max);
2827 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2828 locale_id codecvt_wchar_id = {0};
2829 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2830 locale_id codecvt_short_id = {0};
2832 /* ??_7?$codecvt@_WDH@std@@6B@ */
2833 extern const vtable_ptr MSVCP_codecvt_wchar_vtable;
2834 /* ??_7?$codecvt@GDH@std@@6B@ */
2835 extern const vtable_ptr MSVCP_codecvt_short_vtable;
2837 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2838 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2839 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2840 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2841 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init, 8)
2842 void __thiscall codecvt_wchar__Init(codecvt_wchar *this, const _Locinfo *locinfo)
2844 TRACE("(%p %p)\n", this, locinfo);
2845 _Locinfo__Getcvt(locinfo, &this->cvt);
2848 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2849 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2850 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo, 12)
2851 codecvt_wchar* __thiscall codecvt_wchar_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2853 TRACE("(%p %p %ld)\n", this, locinfo, refs);
2855 codecvt_base_ctor_refs(&this->base, refs);
2856 this->base.facet.vtable = &MSVCP_codecvt_wchar_vtable;
2858 codecvt_wchar__Init(this, locinfo);
2862 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2863 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2864 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo, 12)
2865 codecvt_wchar* __thiscall codecvt_short_ctor_locinfo(codecvt_wchar *this, const _Locinfo *locinfo, MSVCP_size_t refs)
2867 TRACE("(%p %p %ld)\n", this, locinfo, refs);
2869 codecvt_wchar_ctor_locinfo(this, locinfo, refs);
2870 this->base.facet.vtable = &MSVCP_codecvt_short_vtable;
2874 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2875 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2876 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs, 8)
2877 codecvt_wchar* __thiscall codecvt_wchar_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs)
2881 TRACE("(%p %ld)\n", this, refs);
2883 _Locinfo_ctor(&locinfo);
2884 codecvt_wchar_ctor_locinfo(this, &locinfo, refs);
2885 _Locinfo_dtor(&locinfo);
2889 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2890 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2891 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs, 8)
2892 codecvt_wchar* __thiscall codecvt_short_ctor_refs(codecvt_wchar *this, MSVCP_size_t refs)
2896 TRACE("(%p %ld)\n", this, refs);
2898 _Locinfo_ctor(&locinfo);
2899 codecvt_short_ctor_locinfo(this, &locinfo, refs);
2900 _Locinfo_dtor(&locinfo);
2904 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
2905 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
2906 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name, 12)
2907 codecvt_wchar* __thiscall codecvt_short_ctor_name(codecvt_wchar *this, const char *name, MSVCP_size_t refs)
2911 TRACE("(%p %s %ld)\n", this, name, refs);
2913 _Locinfo_ctor_cstr(&locinfo, name);
2914 codecvt_short_ctor_locinfo(this, &locinfo, refs);
2915 _Locinfo_dtor(&locinfo);
2919 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
2920 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
2921 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor, 4)
2922 codecvt_wchar* __thiscall codecvt_wchar_ctor(codecvt_wchar *this)
2924 return codecvt_wchar_ctor_refs(this, 0);
2927 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2928 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2929 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor, 4)
2930 codecvt_wchar* __thiscall codecvt_short_ctor(codecvt_wchar *this)
2932 return codecvt_short_ctor_refs(this, 0);
2935 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2936 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2937 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2938 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2939 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor, 4)
2940 void __thiscall codecvt_wchar_dtor(codecvt_wchar *this)
2942 TRACE("(%p)\n", this);
2943 codecvt_base_dtor(&this->base);
2946 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_wchar_vector_dtor, 8)
2947 codecvt_wchar* __thiscall MSVCP_codecvt_wchar_vector_dtor(codecvt_wchar *this, unsigned int flags)
2949 TRACE("(%p %x)\n", this, flags);
2951 /* we have an array, with the number of elements stored before the first object */
2952 int i, *ptr = (int *)this-1;
2954 for(i=*ptr-1; i>=0; i--)
2955 codecvt_wchar_dtor(this+i);
2956 MSVCRT_operator_delete(ptr);
2958 codecvt_wchar_dtor(this);
2960 MSVCRT_operator_delete(this);
2966 DEFINE_THISCALL_WRAPPER(MSVCP_codecvt_short_vector_dtor, 8)
2967 codecvt_wchar* __thiscall MSVCP_codecvt_short_vector_dtor(codecvt_wchar *this, unsigned int flags)
2969 return MSVCP_codecvt_wchar_vector_dtor(this, flags);
2972 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2973 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2974 unsigned int __cdecl codecvt_wchar__Getcat(const locale_facet **facet, const locale *loc)
2976 TRACE("(%p %p)\n", facet, loc);
2978 if(facet && !*facet) {
2981 *facet = MSVCRT_operator_new(sizeof(codecvt_wchar));
2983 ERR("Out of memory\n");
2984 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2988 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
2989 codecvt_wchar_ctor_locinfo((codecvt_wchar*)*facet, &locinfo, 0);
2990 _Locinfo_dtor(&locinfo);
2996 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2997 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2998 unsigned int __cdecl codecvt_short__Getcat(const locale_facet **facet, const locale *loc)
3000 TRACE("(%p %p)\n", facet, loc);
3002 if(facet && !*facet) {
3005 *facet = MSVCRT_operator_new(sizeof(codecvt_wchar));
3007 ERR("Out of memory\n");
3008 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3012 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
3013 codecvt_short_ctor((codecvt_wchar*)*facet);
3014 _Locinfo_dtor(&locinfo);
3020 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3021 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3022 locale_id* __cdecl codecvt_wchar__Id_func(void)
3025 return &codecvt_wchar_id;
3028 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3029 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3030 locale_id* __cdecl codecvt_short__Id_func(void)
3033 return &codecvt_short_id;
3036 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3037 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3038 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3039 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3040 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv, 4)
3041 MSVCP_bool __thiscall codecvt_wchar_do_always_noconv(const codecvt_wchar *this)
3043 TRACE("(%p)\n", this);
3047 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3048 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3049 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3050 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3051 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length, 4)
3052 int __thiscall codecvt_wchar_do_max_length(const codecvt_wchar *this)
3054 TRACE("(%p)\n", this);
3058 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3059 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3060 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3061 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3062 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3063 CALL_VTBL_FUNC(this, 16, int, \
3064 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3065 (this, state, from, from_end, from_next, to, to_end, to_next))
3066 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in, 32)
3067 int __thiscall codecvt_wchar_do_in(const codecvt_wchar *this, int *state,
3068 const char *from, const char *from_end, const char **from_next,
3069 wchar_t *to, wchar_t *to_end, wchar_t **to_next)
3071 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3072 from_end, from_next, to, to_end, to_next);
3077 while(*from_next!=from_end && *to_next!=to_end) {
3078 switch(_Mbrtowc(*to_next, *from_next, from_end-*from_next, state, &this->cvt)) {
3080 *from_next = from_end;
3081 return CODECVT_partial;
3083 return CODECVT_error;
3097 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3098 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3099 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3100 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3101 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in, 32)
3102 int __thiscall codecvt_wchar_in(const codecvt_wchar *this, int *state,
3103 const char *from, const char *from_end, const char **from_next,
3104 wchar_t *to, wchar_t *to_end, wchar_t **to_next)
3106 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3107 from_end, from_next, to, to_end, to_next);
3108 return call_codecvt_wchar_do_in(this, state, from,
3109 from_end, from_next, to, to_end, to_next);
3112 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3113 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3114 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3115 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3116 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3117 CALL_VTBL_FUNC(this, 20, int, \
3118 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3119 (this, state, from, from_end, from_next, to, to_end, to_next))
3120 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out, 32)
3121 int __thiscall codecvt_wchar_do_out(const codecvt_wchar *this, int *state,
3122 const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
3123 char *to, char *to_end, char **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);
3131 while(*from_next!=from_end && *to_next!=to_end) {
3132 int old_state = *state, size;
3133 char buf[MB_LEN_MAX];
3135 switch((size = _Wcrtomb(buf, **from_next, state, &this->cvt))) {
3137 return CODECVT_error;
3139 if(size > from_end-*from_next) {
3141 return CODECVT_partial;
3152 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3153 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3154 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3155 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3156 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out, 32)
3157 int __thiscall codecvt_wchar_out(const codecvt_wchar *this, int *state,
3158 const wchar_t *from, const wchar_t *from_end, const wchar_t **from_next,
3159 char *to, char *to_end, char **to_next)
3161 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state, from,
3162 from_end, from_next, to, to_end, to_next);
3163 return call_codecvt_wchar_do_out(this, state, from,
3164 from_end, from_next, to, to_end, to_next);
3167 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3168 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3169 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3170 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3171 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3172 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3173 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift, 20)
3174 int __thiscall codecvt_wchar_do_unshift(const codecvt_wchar *this,
3175 int *state, char *to, char *to_end, char **to_next)
3177 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
3179 WARN("unexpected state: %x\n", *state);
3185 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3186 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3187 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3188 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3189 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift, 20)
3190 int __thiscall codecvt_wchar_unshift(const codecvt_wchar *this,
3191 int *state, char *to, char *to_end, char **to_next)
3193 TRACE("(%p %p %p %p %p)\n", this, state, to, to_end, to_next);
3194 return call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next);
3197 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3198 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3199 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3200 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3201 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3202 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3203 (this, state, from, from_end, max))
3204 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length, 20)
3205 int __thiscall codecvt_wchar_do_length(const codecvt_wchar *this, const int *state,
3206 const char *from, const char *from_end, MSVCP_size_t max)
3208 int tmp_state = *state, ret=0;
3210 TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
3212 while(ret<max && from!=from_end) {
3213 switch(_Mbrtowc(NULL, from, from_end-from, &tmp_state, &this->cvt)) {
3230 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3231 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3232 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3233 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3234 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length, 20)
3235 int __thiscall codecvt_wchar_length(const codecvt_wchar *this, const int *state,
3236 const char *from, const char *from_end, MSVCP_size_t max)
3238 TRACE("(%p %p %p %p %ld)\n", this, state, from, from_end, max);
3239 return call_codecvt_wchar_do_length(this, state, from, from_end, max);
3242 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3243 locale_id numpunct_char_id = {0};
3245 /* ??_7?$numpunct@D@std@@6B@ */
3246 extern const vtable_ptr MSVCP_numpunct_char_vtable;
3248 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3249 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3250 DEFINE_THISCALL_WRAPPER(numpunct_char__Init, 12)
3251 void __thiscall numpunct_char__Init(numpunct_char *this, _Locinfo *locinfo, MSVCP_bool isdef)
3255 TRACE("(%p %p %d)\n", this, locinfo, isdef);
3257 len = strlen(_Locinfo__Getfalse(locinfo))+1;
3258 this->false_name = MSVCRT_operator_new(len);
3259 if(this->false_name)
3260 memcpy((char*)this->false_name, _Locinfo__Getfalse(locinfo), len);
3262 len = strlen(_Locinfo__Gettrue(locinfo))+1;
3263 this->true_name = MSVCRT_operator_new(len);
3265 memcpy((char*)this->true_name, _Locinfo__Gettrue(locinfo), len);
3268 this->grouping = MSVCRT_operator_new(1);
3270 *(char*)this->grouping = 0;
3275 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
3277 len = strlen(lc->grouping)+1;
3278 this->grouping = MSVCRT_operator_new(len);
3280 memcpy((char*)this->grouping, lc->grouping, len);
3282 this->dp = lc->decimal_point[0];
3283 this->sep = lc->thousands_sep[0];
3286 if(!this->false_name || !this->true_name || !this->grouping) {
3287 MSVCRT_operator_delete((char*)this->grouping);
3288 MSVCRT_operator_delete((char*)this->false_name);
3289 MSVCRT_operator_delete((char*)this->true_name);
3291 ERR("Out of memory\n");
3292 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3296 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3297 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3298 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy, 4)
3299 void __thiscall numpunct_char__Tidy(numpunct_char *this)
3301 TRACE("(%p)\n", this);
3303 MSVCRT_operator_delete((char*)this->grouping);
3304 MSVCRT_operator_delete((char*)this->false_name);
3305 MSVCRT_operator_delete((char*)this->true_name);
3308 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3309 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3310 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo, 16)
3311 numpunct_char* __thiscall numpunct_char_ctor_locinfo(numpunct_char *this,
3312 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3314 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
3315 locale_facet_ctor_refs(&this->facet, refs);
3316 this->facet.vtable = &MSVCP_numpunct_char_vtable;
3317 numpunct_char__Init(this, locinfo, usedef);
3321 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3322 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3323 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name, 16)
3324 numpunct_char* __thiscall numpunct_char_ctor_name(numpunct_char *this,
3325 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3329 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
3330 locale_facet_ctor_refs(&this->facet, refs);
3331 this->facet.vtable = &MSVCP_numpunct_char_vtable;
3333 _Locinfo_ctor_cstr(&locinfo, name);
3334 numpunct_char__Init(this, &locinfo, usedef);
3335 _Locinfo_dtor(&locinfo);
3339 /* ??0?$numpunct@D@std@@QAE@I@Z */
3340 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3341 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs, 8)
3342 numpunct_char* __thiscall numpunct_char_ctor_refs(numpunct_char *this, MSVCP_size_t refs)
3344 TRACE("(%p %lu)\n", this, refs);
3345 return numpunct_char_ctor_name(this, "C", refs, FALSE);
3348 /* ??_F?$numpunct@D@std@@QAEXXZ */
3349 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3350 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor, 4)
3351 numpunct_char* __thiscall numpunct_char_ctor(numpunct_char *this)
3353 return numpunct_char_ctor_refs(this, 0);
3356 /* ??1?$numpunct@D@std@@MAE@XZ */
3357 /* ??1?$numpunct@D@std@@MEAA@XZ */
3358 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor, 4)
3359 void __thiscall numpunct_char_dtor(numpunct_char *this)
3361 TRACE("(%p)\n", this);
3362 numpunct_char__Tidy(this);
3365 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_char_vector_dtor, 8)
3366 numpunct_char* __thiscall MSVCP_numpunct_char_vector_dtor(numpunct_char *this, unsigned int flags)
3368 TRACE("(%p %x)\n", this, flags);
3370 /* we have an array, with the number of elements stored before the first object */
3371 int i, *ptr = (int *)this-1;
3373 for(i=*ptr-1; i>=0; i--)
3374 numpunct_char_dtor(this+i);
3375 MSVCRT_operator_delete(ptr);
3377 numpunct_char_dtor(this);
3379 MSVCRT_operator_delete(this);
3385 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3386 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3387 MSVCP_size_t __cdecl numpunct_char__Getcat(const locale_facet **facet, const locale *loc)
3389 TRACE("(%p %p)\n", facet, loc);
3391 if(facet && !*facet) {
3392 *facet = MSVCRT_operator_new(sizeof(numpunct_char));
3394 ERR("Out of memory\n");
3395 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3398 numpunct_char_ctor_name((numpunct_char*)*facet,
3399 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3405 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3406 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3407 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point, 4)
3408 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3409 char, (const numpunct_char *this), (this))
3410 char __thiscall numpunct_char_do_decimal_point(const numpunct_char *this)
3412 TRACE("(%p)\n", this);
3416 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3417 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3418 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point, 4)
3419 char __thiscall numpunct_char_decimal_point(const numpunct_char *this)
3421 TRACE("(%p)\n", this);
3422 return call_numpunct_char_do_decimal_point(this);
3425 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3426 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3427 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep, 4)
3428 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3429 char, (const numpunct_char*), (this))
3430 char __thiscall numpunct_char_do_thousands_sep(const numpunct_char *this)
3432 TRACE("(%p)\n", this);
3436 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3437 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3438 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep, 4)
3439 char __thiscall numpunct_char_thousands_sep(const numpunct_char *this)
3441 TRACE("(%p)\n", this);
3442 return call_numpunct_char_do_thousands_sep(this);
3445 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3446 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3447 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping, 8)
3448 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3449 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3450 basic_string_char* __thiscall numpunct_char_do_grouping(
3451 const numpunct_char *this, basic_string_char *ret)
3453 TRACE("(%p)\n", this);
3454 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
3457 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3458 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3459 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping, 8)
3460 basic_string_char* __thiscall numpunct_char_grouping(const numpunct_char *this, basic_string_char *ret)
3462 TRACE("(%p)\n", this);
3463 return call_numpunct_char_do_grouping(this, ret);
3466 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3467 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3468 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename, 8)
3469 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3470 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3471 basic_string_char* __thiscall numpunct_char_do_falsename(
3472 const numpunct_char *this, basic_string_char *ret)
3474 TRACE("(%p)\n", this);
3475 return MSVCP_basic_string_char_ctor_cstr(ret, this->false_name);
3478 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3479 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3480 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename, 8)
3481 basic_string_char* __thiscall numpunct_char_falsename(const numpunct_char *this, basic_string_char *ret)
3483 TRACE("(%p)\n", this);
3484 return call_numpunct_char_do_falsename(this, ret);
3487 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3488 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3489 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename, 8)
3490 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3491 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3492 basic_string_char* __thiscall numpunct_char_do_truename(
3493 const numpunct_char *this, basic_string_char *ret)
3495 TRACE("(%p)\n", this);
3496 return MSVCP_basic_string_char_ctor_cstr(ret, this->true_name);
3499 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3500 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3501 DEFINE_THISCALL_WRAPPER(numpunct_char_truename, 8)
3502 basic_string_char* __thiscall numpunct_char_truename(const numpunct_char *this, basic_string_char *ret)
3504 TRACE("(%p)\n", this);
3505 return call_numpunct_char_do_truename(this, ret);
3508 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3509 locale_id numpunct_wchar_id = {0};
3510 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3511 locale_id numpunct_short_id = {0};
3513 /* ??_7?$numpunct@_W@std@@6B@ */
3514 extern const vtable_ptr MSVCP_numpunct_wchar_vtable;
3515 /* ??_7?$numpunct@G@std@@6B@ */
3516 extern const vtable_ptr MSVCP_numpunct_short_vtable;
3518 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3519 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3520 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3521 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3522 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init, 12)
3523 void __thiscall numpunct_wchar__Init(numpunct_wchar *this, _Locinfo *locinfo, MSVCP_bool isdef)
3525 const char *to_convert;
3529 TRACE("(%p %p %d)\n", this, locinfo, isdef);
3531 _Locinfo__Getcvt(locinfo, &cvt);
3533 to_convert = _Locinfo__Getfalse(locinfo);
3534 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
3535 this->false_name = MSVCRT_operator_new(len*sizeof(WCHAR));
3536 if(this->false_name)
3537 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
3538 (wchar_t*)this->false_name, len);
3540 to_convert = _Locinfo__Gettrue(locinfo);
3541 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
3542 this->true_name = MSVCRT_operator_new(len*sizeof(WCHAR));
3544 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
3545 (wchar_t*)this->true_name, len);
3548 this->grouping = MSVCRT_operator_new(1);
3550 *(char*)this->grouping = 0;
3555 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
3557 len = strlen(lc->grouping)+1;
3558 this->grouping = MSVCRT_operator_new(len);
3560 memcpy((char*)this->grouping, lc->grouping, len);
3562 this->dp = lc->decimal_point[0];
3563 this->sep = lc->thousands_sep[0];
3566 if(!this->false_name || !this->true_name || !this->grouping) {
3567 MSVCRT_operator_delete((char*)this->grouping);
3568 MSVCRT_operator_delete((wchar_t*)this->false_name);
3569 MSVCRT_operator_delete((wchar_t*)this->true_name);
3571 ERR("Out of memory\n");
3572 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3576 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3577 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3578 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3579 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3580 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy, 4)
3581 void __thiscall numpunct_wchar__Tidy(numpunct_wchar *this)
3583 TRACE("(%p)\n", this);
3585 MSVCRT_operator_delete((char*)this->grouping);
3586 MSVCRT_operator_delete((wchar_t*)this->false_name);
3587 MSVCRT_operator_delete((wchar_t*)this->true_name);
3590 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3591 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3592 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo, 16)
3593 numpunct_wchar* __thiscall numpunct_wchar_ctor_locinfo(numpunct_wchar *this,
3594 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3596 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
3597 locale_facet_ctor_refs(&this->facet, refs);
3598 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
3599 numpunct_wchar__Init(this, locinfo, usedef);
3603 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3604 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3605 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo, 16)
3606 numpunct_wchar* __thiscall numpunct_short_ctor_locinfo(numpunct_wchar *this,
3607 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
3609 numpunct_wchar_ctor_locinfo(this, locinfo, refs, usedef);
3610 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3614 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3615 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3616 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name, 16)
3617 numpunct_wchar* __thiscall numpunct_wchar_ctor_name(numpunct_wchar *this,
3618 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3622 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
3623 locale_facet_ctor_refs(&this->facet, refs);
3624 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
3626 _Locinfo_ctor_cstr(&locinfo, name);
3627 numpunct_wchar__Init(this, &locinfo, usedef);
3628 _Locinfo_dtor(&locinfo);
3632 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3633 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3634 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name, 16)
3635 numpunct_wchar* __thiscall numpunct_short_ctor_name(numpunct_wchar *this,
3636 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
3638 numpunct_wchar_ctor_name(this, name, refs, usedef);
3639 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3643 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3644 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3645 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs, 8)
3646 numpunct_wchar* __thiscall numpunct_wchar_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
3648 TRACE("(%p %lu)\n", this, refs);
3649 return numpunct_wchar_ctor_name(this, "C", refs, FALSE);
3652 /* ??0?$numpunct@G@std@@QAE@I@Z */
3653 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3654 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs, 8)
3655 numpunct_wchar* __thiscall numpunct_short_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
3657 numpunct_wchar_ctor_refs(this, refs);
3658 this->facet.vtable = &MSVCP_numpunct_short_vtable;
3662 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3663 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3664 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor, 4)
3665 numpunct_wchar* __thiscall numpunct_wchar_ctor(numpunct_wchar *this)
3667 return numpunct_wchar_ctor_refs(this, 0);
3670 /* ??_F?$numpunct@G@std@@QAEXXZ */
3671 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3672 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor, 4)
3673 numpunct_wchar* __thiscall numpunct_short_ctor(numpunct_wchar *this)
3675 return numpunct_short_ctor_refs(this, 0);
3678 /* ??1?$numpunct@_W@std@@MAE@XZ */
3679 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3680 /* ??1?$numpunct@G@std@@MAE@XZ */
3681 /* ??1?$numpunct@G@std@@MEAA@XZ */
3682 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor, 4)
3683 void __thiscall numpunct_wchar_dtor(numpunct_wchar *this)
3685 TRACE("(%p)\n", this);
3686 numpunct_wchar__Tidy(this);
3689 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_wchar_vector_dtor, 8)
3690 numpunct_wchar* __thiscall MSVCP_numpunct_wchar_vector_dtor(numpunct_wchar *this, unsigned int flags)
3692 TRACE("(%p %x)\n", this, flags);
3694 /* we have an array, with the number of elements stored before the first object */
3695 int i, *ptr = (int *)this-1;
3697 for(i=*ptr-1; i>=0; i--)
3698 numpunct_wchar_dtor(this+i);
3699 MSVCRT_operator_delete(ptr);
3701 numpunct_wchar_dtor(this);
3703 MSVCRT_operator_delete(this);
3709 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_short_vector_dtor, 8)
3710 numpunct_wchar* __thiscall MSVCP_numpunct_short_vector_dtor(numpunct_wchar *this, unsigned int flags)
3712 return MSVCP_numpunct_wchar_vector_dtor(this, flags);
3715 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3716 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3717 MSVCP_size_t __cdecl numpunct_wchar__Getcat(const locale_facet **facet, const locale *loc)
3719 TRACE("(%p %p)\n", facet, loc);
3721 if(facet && !*facet) {
3722 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
3724 ERR("Out of memory\n");
3725 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3728 numpunct_wchar_ctor_name((numpunct_wchar*)*facet,
3729 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3735 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3736 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3737 MSVCP_size_t __cdecl numpunct_short__Getcat(const locale_facet **facet, const locale *loc)
3739 TRACE("(%p %p)\n", facet, loc);
3741 if(facet && !*facet) {
3742 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
3744 ERR("Out of memory\n");
3745 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3748 numpunct_short_ctor_name((numpunct_wchar*)*facet,
3749 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
3755 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3756 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3757 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3758 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3759 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point, 4)
3760 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3761 wchar_t, (const numpunct_wchar *this), (this))
3762 wchar_t __thiscall numpunct_wchar_do_decimal_point(const numpunct_wchar *this)
3764 TRACE("(%p)\n", this);
3768 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3769 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3770 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3771 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3772 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point, 4)
3773 wchar_t __thiscall numpunct_wchar_decimal_point(const numpunct_wchar *this)
3775 TRACE("(%p)\n", this);
3776 return call_numpunct_wchar_do_decimal_point(this);
3779 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3780 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3781 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3782 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3783 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep, 4)
3784 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3785 wchar_t, (const numpunct_wchar *this), (this))
3786 wchar_t __thiscall numpunct_wchar_do_thousands_sep(const numpunct_wchar *this)
3788 TRACE("(%p)\n", this);
3792 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3793 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3794 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3795 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3796 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep, 4)
3797 wchar_t __thiscall numpunct_wchar_thousands_sep(const numpunct_wchar *this)
3799 TRACE("(%p)\n", this);
3800 return call_numpunct_wchar_do_thousands_sep(this);
3803 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3804 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3805 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3806 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3807 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping, 8)
3808 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3809 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3810 basic_string_char* __thiscall numpunct_wchar_do_grouping(const numpunct_wchar *this, basic_string_char *ret)
3812 TRACE("(%p)\n", this);
3813 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
3816 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3817 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3818 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3819 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3820 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping, 8)
3821 basic_string_char* __thiscall numpunct_wchar_grouping(const numpunct_wchar *this, basic_string_char *ret)
3823 TRACE("(%p)\n", this);
3824 return call_numpunct_wchar_do_grouping(this, ret);
3827 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3828 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3829 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3830 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3831 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename, 8)
3832 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3833 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3834 basic_string_wchar* __thiscall numpunct_wchar_do_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3836 TRACE("(%p)\n", this);
3837 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->false_name);
3840 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3841 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3842 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3843 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3844 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename, 8)
3845 basic_string_wchar* __thiscall numpunct_wchar_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3847 TRACE("(%p)\n", this);
3848 return call_numpunct_wchar_do_falsename(this, ret);
3851 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3852 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3853 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3854 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3855 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename, 8)
3856 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3857 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3858 basic_string_wchar* __thiscall numpunct_wchar_do_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3860 TRACE("(%p)\n", this);
3861 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->true_name);
3864 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3865 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3866 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3867 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3868 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename, 8)
3869 basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3871 TRACE("(%p)\n", this);
3872 return call_numpunct_wchar_do_truename(this, ret);
3875 double __cdecl _Stod(const char *buf, char **buf_end, LONG exp)
3877 double ret = strtod(buf, buf_end);
3880 ret *= pow(10, exp);
3884 double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err)
3890 ret = _Stod(buf, buf_end, exp);
3900 float __cdecl _Stof(const char *buf, char **buf_end, LONG exp)
3902 return _Stod(buf, buf_end, exp);
3905 float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err)
3907 return _Stodx(buf, buf_end, exp, err);
3910 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
3911 locale_id num_get_wchar_id = {0};
3912 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
3913 locale_id num_get_short_id = {0};
3915 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
3916 extern const vtable_ptr MSVCP_num_get_wchar_vtable;
3917 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
3918 extern const vtable_ptr MSVCP_num_get_short_vtable;
3920 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3921 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3922 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3923 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3924 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor__Init, 8)
3925 void __thiscall num_get_wchar_ctor__Init(num_get *this, const _Locinfo *locinfo)
3927 FIXME("(%p %p) stub\n", this, locinfo);
3930 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3931 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3932 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo, 12)
3933 num_get* __thiscall num_get_wchar_ctor_locinfo(num_get *this,
3934 _Locinfo *locinfo, MSVCP_size_t refs)
3936 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3940 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3941 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3942 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo, 12)
3943 num_get* __thiscall num_get_short_ctor_locinfo(num_get *this,
3944 _Locinfo *locinfo, MSVCP_size_t refs)
3946 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3950 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
3951 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
3952 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs, 8)
3953 num_get* __thiscall num_get_wchar_ctor_refs(num_get *this, MSVCP_size_t refs)
3955 FIXME("(%p %lu) stub\n", this, refs);
3959 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
3960 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
3961 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs, 8)
3962 num_get* __thiscall num_get_short_ctor_refs(num_get *this, MSVCP_size_t refs)
3964 FIXME("(%p %lu) stub\n", this, refs);
3968 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3969 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3970 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor, 4)
3971 num_get* __thiscall num_get_wchar_ctor(num_get *this)
3973 FIXME("(%p) stub\n", this);
3977 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3978 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3979 DEFINE_THISCALL_WRAPPER(num_get_short_ctor, 4)
3980 num_get* __thiscall num_get_short_ctor(num_get *this)
3982 FIXME("(%p) stub\n", this);
3986 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
3987 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
3988 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
3989 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
3990 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor, 4)
3991 void __thiscall num_get_wchar_dtor(num_get *this)
3993 FIXME("(%p) stub\n", this);
3996 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar_vector_dtor, 8)
3997 num_get* __thiscall MSVCP_num_get_wchar_vector_dtor(num_get *this, unsigned int flags)
3999 TRACE("(%p %x)\n", this, flags);
4001 /* we have an array, with the number of elements stored before the first object */
4002 int i, *ptr = (int *)this-1;
4004 for(i=*ptr-1; i>=0; i--)
4005 num_get_wchar_dtor(this+i);
4006 MSVCRT_operator_delete(ptr);
4008 num_get_wchar_dtor(this);
4010 MSVCRT_operator_delete(this);
4016 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_short_vector_dtor, 8)
4017 num_get* __thiscall MSVCP_num_get_short_vector_dtor(num_get *this, unsigned int flags)
4019 return MSVCP_num_get_wchar_vector_dtor(this, flags);
4022 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4023 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4024 MSVCP_size_t __cdecl num_get_wchar__Getcat(const locale_facet **facet, const locale *loc)
4026 FIXME("(%p %p) stub\n", facet, loc);
4030 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4031 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4032 MSVCP_size_t __cdecl num_get_short__Getcat(const locale_facet **facet, const locale *loc)
4034 FIXME("(%p %p) stub\n", facet, loc);
4038 /* ?_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 */
4039 /* ?_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 */
4040 /* ?_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 */
4041 /* ?_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 */
4042 int __cdecl num_get_wchar__Getffld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4043 istreambuf_iterator_wchar *last, const locale *loc)
4045 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
4049 /* ?_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 */
4050 /* ?_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 */
4051 /* ?_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 */
4052 /* ?_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 */
4053 int __cdecl num_get_wchar__Getffldx(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4054 istreambuf_iterator_wchar *last, struct _ios_base *ios, int *phexexp)
4056 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
4060 /* ?_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 */
4061 /* ?_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 */
4062 /* ?_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 */
4063 /* ?_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 */
4064 int __cdecl num_get_wchar__Getifld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
4065 istreambuf_iterator_wchar *last, int fmtflags, const locale *loc)
4067 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
4071 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
4072 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
4073 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
4074 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
4075 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig, 20)
4076 int __thiscall MSVCP_num_get_wchar__Hexdig(num_get *this, wchar_t dig, wchar_t e0, wchar_t al, wchar_t au)
4078 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
4082 /* ?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 */
4083 /* ?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 */
4084 /* ?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 */
4085 /* ?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 */
4086 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36)
4087 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
4088 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
4090 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4094 /* ?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 */
4095 /* ?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 */
4096 /* ?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 */
4097 /* ?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 */
4098 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void,36)
4099 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
4100 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
4102 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4106 /* ?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 */
4107 /* ?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 */
4108 /* ?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 */
4109 /* ?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 */
4110 /* ?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 */
4111 /* ?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 */
4112 /* ?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 */
4113 /* ?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 */
4114 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36)
4115 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
4116 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
4118 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4122 /* ?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 */
4123 /* ?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 */
4124 /* ?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 */
4125 /* ?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 */
4126 /* ?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 */
4127 /* ?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 */
4128 /* ?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 */
4129 /* ?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 */
4130 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double,36)
4131 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
4132 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
4134 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4138 /* ?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 */
4139 /* ?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 */
4140 /* ?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 */
4141 /* ?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 */
4142 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36)
4143 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
4144 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
4146 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4150 /* ?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 */
4151 /* ?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 */
4152 /* ?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 */
4153 /* ?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 */
4154 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float,36)
4155 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
4156 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
4158 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4162 /* ?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 */
4163 /* ?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 */
4164 /* ?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 */
4165 /* ?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 */
4166 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36)
4167 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
4168 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
4170 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4174 /* ?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 */
4175 /* ?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 */
4176 /* ?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 */
4177 /* ?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 */
4178 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64,36)
4179 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
4180 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
4182 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4186 /* ?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 */
4187 /* ?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 */
4188 /* ?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 */
4189 /* ?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 */
4190 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36)
4191 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
4192 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
4194 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4198 /* ?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 */
4199 /* ?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 */
4200 /* ?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 */
4201 /* ?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 */
4202 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64,36)
4203 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
4204 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
4206 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4210 /* ?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 */
4211 /* ?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 */
4212 /* ?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 */
4213 /* ?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 */
4214 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36)
4215 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
4216 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
4218 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4222 /* ?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 */
4223 /* ?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 */
4224 /* ?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 */
4225 /* ?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 */
4226 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong,36)
4227 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
4228 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
4230 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4234 /* ?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 */
4235 /* ?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 */
4236 /* ?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 */
4237 /* ?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 */
4238 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36)
4239 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
4240 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *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@AAHAAJ@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@AEAHAEAJ@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@AAHAAJ@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@AEAHAEAJ@Z */
4250 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long,36)
4251 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
4252 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *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@AAHAAI@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@AEAHAEAI@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@AAHAAI@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@AEAHAEAI@Z */
4262 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36)
4263 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
4264 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *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@AAHAAI@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@AEAHAEAI@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@AAHAAI@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@AEAHAEAI@Z */
4274 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint,36)
4275 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
4276 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *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@AAHAAG@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@AEAHAEAG@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@AAHAAG@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@AEAHAEAG@Z */
4286 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36)
4287 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
4288 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *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@AAHAAG@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@AEAHAEAG@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@AAHAAG@ */
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@AEAHAEAG@Z */
4298 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort,36)
4299 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
4300 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *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_N@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_N@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_N@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_N@Z */
4310 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36)
4311 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
4312 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *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_N@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_N@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_N@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_N@Z */
4322 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool,36)
4323 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
4324 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *pval)
4326 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4330 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
4331 locale_id num_get_char_id = {0};
4333 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
4334 extern const vtable_ptr MSVCP_num_get_char_vtable;
4336 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4337 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4338 DEFINE_THISCALL_WRAPPER(num_get_char_ctor__Init, 8)
4339 void __thiscall num_get_char_ctor__Init(num_get *this, const _Locinfo *locinfo)
4341 FIXME("(%p %p) stub\n", this, locinfo);
4344 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4345 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4346 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo, 12)
4347 num_get* __thiscall num_get_char_ctor_locinfo(num_get *this,
4348 _Locinfo *locinfo, MSVCP_size_t refs)
4350 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
4354 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
4355 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
4356 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs, 8)
4357 num_get* __thiscall num_get_char_ctor_refs(num_get *this, MSVCP_size_t refs)
4359 FIXME("(%p %lu) stub\n", this, refs);
4363 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
4364 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
4365 DEFINE_THISCALL_WRAPPER(num_get_char_ctor, 4)
4366 num_get* __thiscall num_get_char_ctor(num_get *this)
4368 FIXME("(%p) stub\n", this);
4372 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
4373 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
4374 DEFINE_THISCALL_WRAPPER(num_get_char_dtor, 4)
4375 void __thiscall num_get_char_dtor(num_get *this)
4377 FIXME("(%p) stub\n", this);
4380 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char_vector_dtor, 8)
4381 num_get* __thiscall MSVCP_num_get_char_vector_dtor(num_get *this, unsigned int flags)
4383 TRACE("(%p %x)\n", this, flags);
4385 /* we have an array, with the number of elements stored before the first object */
4386 int i, *ptr = (int *)this-1;
4388 for(i=*ptr-1; i>=0; i--)
4389 num_get_char_dtor(this+i);
4390 MSVCRT_operator_delete(ptr);
4392 num_get_char_dtor(this);
4394 MSVCRT_operator_delete(this);
4400 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4401 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4402 MSVCP_size_t __cdecl num_get_char__Getcat(const locale_facet **facet, const locale *loc)
4404 FIXME("(%p %p) stub\n", facet, loc);
4408 /* ?_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 */
4409 /* ?_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 */
4410 int __cdecl num_get_char__Getffld(num_get *this, char *dest, istreambuf_iterator_char *first,
4411 istreambuf_iterator_char *last, const locale *loc)
4413 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
4417 /* ?_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 */
4418 /* ?_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 */
4419 int __cdecl num_get_char__Getffldx(num_get *this, char *dest, istreambuf_iterator_char *first,
4420 istreambuf_iterator_char *last, struct _ios_base *ios, int *phexexp)
4422 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
4426 /* ?_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 */
4427 /* ?_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 */
4428 int __cdecl num_get_char__Getifld(num_get *this, char *dest, istreambuf_iterator_char *first,
4429 istreambuf_iterator_char *last, int fmtflags, const locale *loc)
4431 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
4435 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
4436 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
4437 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig, 20)
4438 int __thiscall MSVCP_num_get_char__Hexdig(num_get *this, char dig, char e0, char al, char au)
4440 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
4444 /* ?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 */
4445 /* ?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 */
4446 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void,36)
4447 istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get *this, istreambuf_iterator_char *ret,
4448 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
4450 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4454 /* ?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 */
4455 /* ?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 */
4456 DEFINE_THISCALL_WRAPPER(num_get_char_get_void,36)
4457 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get *this, istreambuf_iterator_char *ret,
4458 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
4460 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4464 /* ?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 */
4465 /* ?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 */
4466 /* ?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 */
4467 /* ?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 */
4468 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double,36)
4469 istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *this, istreambuf_iterator_char *ret,
4470 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
4472 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4476 /* ?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 */
4477 /* ?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 */
4478 /* ?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 */
4479 /* ?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 */
4480 DEFINE_THISCALL_WRAPPER(num_get_char_get_double,36)
4481 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get *this, istreambuf_iterator_char *ret,
4482 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
4484 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4488 /* ?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 */
4489 /* ?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 */
4490 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float,36)
4491 istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *this, istreambuf_iterator_char *ret,
4492 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
4494 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4498 /* ?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 */
4499 /* ?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 */
4500 DEFINE_THISCALL_WRAPPER(num_get_char_get_float,36)
4501 istreambuf_iterator_char *__thiscall num_get_char_get_float(const num_get *this, istreambuf_iterator_char *ret,
4502 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
4504 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4508 /* ?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 */
4509 /* ?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 */
4510 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64,36)
4511 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
4512 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
4514 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4518 /* ?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 */
4519 /* ?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 */
4520 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64,36)
4521 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
4522 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
4524 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4528 /* ?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 */
4529 /* ?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 */
4530 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64,36)
4531 istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *this, istreambuf_iterator_char *ret,
4532 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
4534 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4538 /* ?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 */
4539 /* ?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 */
4540 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64,36)
4541 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get *this, istreambuf_iterator_char *ret,
4542 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
4544 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4548 /* ?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 */
4549 /* ?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 */
4550 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong,36)
4551 istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
4552 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
4554 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4558 /* ?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 */
4559 /* ?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 */
4560 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong,36)
4561 istreambuf_iterator_char *__thiscall num_get_char_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
4562 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
4564 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4568 /* ?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 */
4569 /* ?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 */
4570 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long,36)
4571 istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *this, istreambuf_iterator_char *ret,
4572 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
4574 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4578 /* ?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 */
4579 /* ?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 */
4580 DEFINE_THISCALL_WRAPPER(num_get_char_get_long,36)
4581 istreambuf_iterator_char *__thiscall num_get_char_get_long(const num_get *this, istreambuf_iterator_char *ret,
4582 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
4584 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4588 /* ?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 */
4589 /* ?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 */
4590 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint,36)
4591 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get *this, istreambuf_iterator_char *ret,
4592 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
4594 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4598 /* ?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 */
4599 /* ?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 */
4600 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint,36)
4601 istreambuf_iterator_char *__thiscall num_get_char_get_uint(const num_get *this, istreambuf_iterator_char *ret,
4602 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
4604 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4608 /* ?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 */
4609 /* ?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 */
4610 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort,36)
4611 istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
4612 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
4614 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4618 /* ?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 */
4619 /* ?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 */
4620 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort,36)
4621 istreambuf_iterator_char *__thiscall num_get_char_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
4622 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
4624 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4628 /* ?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 */
4629 /* ?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 */
4630 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool,36)
4631 istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *this, istreambuf_iterator_char *ret,
4632 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
4634 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4638 /* ?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 */
4639 /* ?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 */
4640 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool,36)
4641 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get *this, istreambuf_iterator_char *ret,
4642 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
4644 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
4648 /* ??0_Locimp@locale@std@@AAE@_N@Z */
4649 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
4650 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
4651 locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent)
4653 TRACE("(%p %d)\n", this, transparent);
4655 memset(this, 0, sizeof(locale__Locimp));
4656 locale_facet_ctor_refs(&this->facet, 1);
4657 this->transparent = transparent;
4658 MSVCP_basic_string_char_ctor_cstr(&this->name, "*");
4662 /* ??_F_Locimp@locale@std@@QAEXXZ */
4663 /* ??_F_Locimp@locale@std@@QEAAXXZ */
4664 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
4665 locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this)
4667 return locale__Locimp_ctor_transparent(this, FALSE);
4670 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
4671 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
4672 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8)
4673 locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy)
4678 TRACE("(%p %p)\n", this, copy);
4680 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
4681 memcpy(this, copy, sizeof(locale__Locimp));
4682 locale_facet_ctor_refs(&this->facet, 1);
4683 if(copy->facetvec) {
4684 this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
4685 if(!this->facetvec) {
4686 _Lockit_dtor(&lock);
4687 ERR("Out of memory\n");
4688 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4691 for(i=0; i<this->facet_cnt; i++)
4692 if(this->facetvec[i])
4693 locale_facet__Incref(this->facetvec[i]);
4695 MSVCP_basic_string_char_copy_ctor(&this->name, ©->name);
4696 _Lockit_dtor(&lock);
4700 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
4701 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
4702 locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy)
4704 return locale__Locimp_copy_ctor(this, copy);
4707 /* ??1_Locimp@locale@std@@MAE@XZ */
4708 /* ??1_Locimp@locale@std@@MEAA@XZ */
4709 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4)
4710 void __thiscall locale__Locimp_dtor(locale__Locimp *this)
4712 TRACE("(%p)\n", this);
4714 if(locale_facet__Decref(&this->facet)) {
4716 for(i=0; i<this->facet_cnt; i++)
4717 if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i]))
4718 call_locale_facet_vector_dtor(this->facetvec[i], 0);
4720 MSVCRT_operator_delete(this->facetvec);
4721 MSVCP_basic_string_char_dtor(&this->name);
4725 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
4726 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
4727 void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this)
4729 locale__Locimp_dtor(this);
4732 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8)
4733 locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags)
4735 TRACE("(%p %x)\n", this, flags);
4737 /* we have an array, with the number of elements stored before the first object */
4738 int i, *ptr = (int *)this-1;
4740 for(i=*ptr-1; i>=0; i--)
4741 locale__Locimp_dtor(this+i);
4742 MSVCRT_operator_delete(ptr);
4744 locale__Locimp_dtor(this);
4746 MSVCRT_operator_delete(this);
4752 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
4753 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
4754 void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id)
4758 TRACE("(%p %p %lu)\n", locimp, facet, id);
4760 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
4761 if(id >= locimp->facet_cnt) {
4762 MSVCP_size_t new_size = id+1;
4763 locale_facet **new_facetvec;
4765 if(new_size < locale_id__Id_cnt+1)
4766 new_size = locale_id__Id_cnt+1;
4768 new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size);
4770 _Lockit_dtor(&lock);
4771 ERR("Out of memory\n");
4772 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4776 memset(new_facetvec, 0, sizeof(locale_facet*)*new_size);
4777 memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt);
4778 MSVCRT_operator_delete(locimp->facetvec);
4779 locimp->facetvec = new_facetvec;
4780 locimp->facet_cnt = new_size;
4783 if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id]))
4784 call_locale_facet_vector_dtor(locimp->facetvec[id], 0);
4786 locimp->facetvec[id] = facet;
4788 locale_facet__Incref(facet);
4789 _Lockit_dtor(&lock);
4792 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
4793 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
4794 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12)
4795 void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id)
4797 locale__Locimp__Locimp_Addfac(this, facet, id);
4800 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
4801 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
4802 locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void)
4808 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
4809 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
4810 locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
4812 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
4816 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
4817 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
4818 void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
4820 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
4823 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
4824 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
4825 void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
4827 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
4830 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
4831 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
4832 void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
4834 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
4837 /* ??_7_Locimp@locale@std@@6B@ */
4838 const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
4839 (vtable_ptr)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor)
4842 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
4843 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
4844 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
4845 locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp)
4847 TRACE("(%p %p)\n", this, locimp);
4848 /* Don't change locimp reference counter */
4853 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
4854 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
4855 locale__Locimp* __cdecl locale__Init(void)
4861 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
4863 _Lockit_dtor(&lock);
4864 return global_locale;
4867 global_locale = MSVCRT_operator_new(sizeof(locale__Locimp));
4868 if(!global_locale) {
4869 _Lockit_dtor(&lock);
4870 ERR("Out of memory\n");
4871 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4875 locale__Locimp_ctor(global_locale);
4876 global_locale->catmask = (1<<(LC_MAX+1))-1;
4877 MSVCP_basic_string_char_dtor(&global_locale->name);
4878 MSVCP_basic_string_char_ctor_cstr(&global_locale->name, "C");
4880 locale__Locimp__Clocptr = global_locale;
4881 global_locale->facet.refs++;
4882 locale_ctor_locimp(&classic_locale, locale__Locimp__Clocptr);
4883 _Lockit_dtor(&lock);
4885 return global_locale;
4888 /* ??0locale@std@@QAE@ABV01@0H@Z */
4889 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
4890 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16)
4891 locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat)
4893 FIXME("(%p %p %p %d) stub\n", this, loc, other, cat);
4897 /* ??0locale@std@@QAE@ABV01@@Z */
4898 /* ??0locale@std@@QEAA@AEBV01@@Z */
4899 DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8)
4900 locale* __thiscall locale_copy_ctor(locale *this, const locale *copy)
4902 TRACE("(%p %p)\n", this, copy);
4903 this->ptr = copy->ptr;
4904 locale_facet__Incref(&this->ptr->facet);
4908 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
4909 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
4910 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16)
4911 locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat)
4913 FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat);
4917 /* ??0locale@std@@QAE@PBDH@Z */
4918 /* ??0locale@std@@QEAA@PEBDH@Z */
4919 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12)
4920 locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat)
4922 FIXME("(%p %s %d) stub\n", this, locname, cat);
4926 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
4927 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
4928 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8)
4929 locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized)
4931 TRACE("(%p)\n", this);
4936 /* ??0locale@std@@QAE@XZ */
4937 /* ??0locale@std@@QEAA@XZ */
4938 DEFINE_THISCALL_WRAPPER(locale_ctor, 4)
4939 locale* __thiscall locale_ctor(locale *this)
4941 TRACE("(%p)\n", this);
4942 this->ptr = locale__Init();
4943 locale_facet__Incref(&this->ptr->facet);
4947 /* ??1locale@std@@QAE@XZ */
4948 /* ??1locale@std@@QEAA@XZ */
4949 DEFINE_THISCALL_WRAPPER(locale_dtor, 4)
4950 void __thiscall locale_dtor(locale *this)
4952 TRACE("(%p)\n", this);
4954 locale__Locimp_dtor(this->ptr);
4957 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8)
4958 locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags)
4960 TRACE("(%p %x)\n", this, flags);
4962 /* we have an array, with the number of elements stored before the first object */
4963 int i, *ptr = (int *)this-1;
4965 for(i=*ptr-1; i>=0; i--)
4966 locale_dtor(this+i);
4967 MSVCRT_operator_delete(ptr);
4971 MSVCRT_operator_delete(this);
4977 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
4978 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
4979 DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8)
4980 locale* __thiscall locale_operator_assign(locale *this, const locale *loc)
4982 FIXME("(%p %p) stub\n", this, loc);
4986 /* ??8locale@std@@QBE_NABV01@@Z */
4987 /* ??8locale@std@@QEBA_NAEBV01@@Z */
4988 DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8)
4989 MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc)
4991 FIXME("(%p %p) stub\n", this, loc);
4995 /* ??9locale@std@@QBE_NABV01@@Z */
4996 /* ??9locale@std@@QEBA_NAEBV01@@Z */
4997 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8)
4998 MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc)
5000 FIXME("(%p %p) stub\n", this, loc);
5004 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
5005 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
5006 DEFINE_THISCALL_WRAPPER(locale__Addfac, 16)
5007 locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask)
5009 TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask);
5011 if(this->ptr->facet.refs > 1) {
5012 locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
5014 ERR("Out of memory\n");
5015 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
5018 locale__Locimp_copy_ctor(new_ptr, this->ptr);
5019 locale_facet__Decref(&this->ptr->facet);
5020 this->ptr = new_ptr;
5023 locale__Locimp__Addfac(this->ptr, facet, id);
5026 MSVCP_basic_string_char_dtor(&this->ptr->name);
5027 MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*");
5032 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
5033 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
5034 DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8)
5035 const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id)
5039 TRACE("(%p %lu)\n", this, id);
5041 fac = id < this->ptr->facet_cnt ? this->ptr->facetvec[id] : NULL;
5042 if(fac || !this->ptr->transparent)
5045 return id < global_locale->facet_cnt ? global_locale->facetvec[id] : NULL;
5048 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
5049 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
5050 locale__Locimp* __cdecl locale__Getgloballocale(void)
5053 return global_locale;
5056 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
5057 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
5058 void __cdecl locale__Setgloballocale(void *locimp)
5060 TRACE("(%p)\n", locimp);
5061 global_locale = locimp;
5064 /* ?classic@locale@std@@SAABV12@XZ */
5065 /* ?classic@locale@std@@SAAEBV12@XZ */
5066 const locale* __cdecl locale_classic(void)
5070 return &classic_locale;
5073 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
5074 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
5075 DEFINE_THISCALL_WRAPPER(locale_name, 8)
5076 basic_string_char* __thiscall locale_name(const locale *this, basic_string_char *ret)
5078 TRACE( "(%p)\n", this);
5079 MSVCP_basic_string_char_copy_ctor(ret, &this->ptr->name);
5083 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
5084 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
5085 locale* __cdecl locale_global(locale *ret, const locale *loc)
5090 TRACE("(%p %p)\n", loc, ret);
5092 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
5095 if(loc->ptr != global_locale) {
5096 locale_facet__Decref(&global_locale->facet);
5097 global_locale = loc->ptr;
5098 locale_facet__Incref(&global_locale->facet);
5100 for(i=LC_ALL+1; i<=LC_MAX; i++) {
5101 if((global_locale->catmask & (1<<(i-1))) == 0)
5103 setlocale(i, MSVCP_basic_string_char_c_str(&global_locale->name));
5106 _Lockit_dtor(&lock);
5110 DEFINE_RTTI_DATA0(locale_facet, 0, ".?AVfacet@locale@std@@");
5111 DEFINE_RTTI_DATA1(collate_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@D@std@@");
5112 DEFINE_RTTI_DATA1(collate_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@_W@std@@");
5113 DEFINE_RTTI_DATA1(collate_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$collate@G@std@@");
5114 DEFINE_RTTI_DATA1(ctype_base, 0, &locale_facet_rtti_base_descriptor, ".?AUctype_base@std@@");
5115 DEFINE_RTTI_DATA2(ctype_char, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@D@std@@");
5116 DEFINE_RTTI_DATA2(ctype_wchar, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@_W@std@@");
5117 DEFINE_RTTI_DATA2(ctype_short, 0, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$ctype@G@std@@");
5118 DEFINE_RTTI_DATA1(codecvt_base, 0, &locale_facet_rtti_base_descriptor, ".?AVcodecvt_base@std@@");
5119 DEFINE_RTTI_DATA2(codecvt_char, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@DDH@std@@");
5120 DEFINE_RTTI_DATA2(codecvt_wchar, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@_WDH@std@@");
5121 DEFINE_RTTI_DATA2(codecvt_short, 0, &codecvt_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, ".?AV?$codecvt@GDH@std@@");
5122 DEFINE_RTTI_DATA1(numpunct_char, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@D@std@@");
5123 DEFINE_RTTI_DATA1(numpunct_wchar, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@_W@std@@");
5124 DEFINE_RTTI_DATA1(numpunct_short, 0, &locale_facet_rtti_base_descriptor, ".?AV?$numpunct@G@std@@");
5125 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@@");
5126 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@@");
5127 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@@");
5130 void __asm_dummy_vtables(void) {
5132 __ASM_VTABLE(locale_facet, "");
5133 __ASM_VTABLE(collate_char,
5134 VTABLE_ADD_FUNC(collate_char_do_compare)
5135 VTABLE_ADD_FUNC(collate_char_do_transform)
5136 VTABLE_ADD_FUNC(collate_char_do_hash));
5137 __ASM_VTABLE(collate_wchar,
5138 VTABLE_ADD_FUNC(collate_wchar_do_compare)
5139 VTABLE_ADD_FUNC(collate_wchar_do_transform)
5140 VTABLE_ADD_FUNC(collate_wchar_do_hash));
5141 __ASM_VTABLE(collate_short,
5142 VTABLE_ADD_FUNC(collate_wchar_do_compare)
5143 VTABLE_ADD_FUNC(collate_wchar_do_transform)
5144 VTABLE_ADD_FUNC(collate_wchar_do_hash));
5145 __ASM_VTABLE(ctype_base, "");
5146 __ASM_VTABLE(ctype_char,
5147 VTABLE_ADD_FUNC(ctype_char_do_tolower)
5148 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch)
5149 VTABLE_ADD_FUNC(ctype_char_do_toupper)
5150 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch)
5151 VTABLE_ADD_FUNC(ctype_char_do_widen)
5152 VTABLE_ADD_FUNC(ctype_char_do_widen_ch)
5153 VTABLE_ADD_FUNC(ctype_char__Do_widen_s)
5154 VTABLE_ADD_FUNC(ctype_char_do_narrow)
5155 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch)
5156 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s));
5157 __ASM_VTABLE(ctype_wchar,
5158 VTABLE_ADD_FUNC(ctype_wchar_do_is)
5159 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
5160 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
5161 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
5162 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
5163 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
5164 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
5165 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
5166 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
5167 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
5168 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
5169 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
5170 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
5171 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
5172 __ASM_VTABLE(ctype_short,
5173 VTABLE_ADD_FUNC(ctype_wchar_do_is)
5174 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
5175 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
5176 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
5177 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
5178 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
5179 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
5180 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
5181 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
5182 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
5183 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
5184 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
5185 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
5186 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
5187 __ASM_VTABLE(codecvt_base,
5188 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv)
5189 VTABLE_ADD_FUNC(codecvt_base_do_max_length)
5190 VTABLE_ADD_FUNC(codecvt_base_do_encoding));
5191 __ASM_VTABLE(codecvt_char,
5192 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv)
5193 VTABLE_ADD_FUNC(codecvt_base_do_max_length)
5194 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
5195 VTABLE_ADD_FUNC(codecvt_char_do_in)
5196 VTABLE_ADD_FUNC(codecvt_char_do_out)
5197 VTABLE_ADD_FUNC(codecvt_char_do_unshift)
5198 VTABLE_ADD_FUNC(codecvt_char_do_length));
5199 __ASM_VTABLE(codecvt_wchar,
5200 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv)
5201 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length)
5202 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
5203 VTABLE_ADD_FUNC(codecvt_wchar_do_in)
5204 VTABLE_ADD_FUNC(codecvt_wchar_do_out)
5205 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift)
5206 VTABLE_ADD_FUNC(codecvt_wchar_do_length));
5207 __ASM_VTABLE(codecvt_short,
5208 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv)
5209 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length)
5210 VTABLE_ADD_FUNC(codecvt_base_do_encoding)
5211 VTABLE_ADD_FUNC(codecvt_wchar_do_in)
5212 VTABLE_ADD_FUNC(codecvt_wchar_do_out)
5213 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift)
5214 VTABLE_ADD_FUNC(codecvt_wchar_do_length));
5215 __ASM_VTABLE(numpunct_char,
5216 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point)
5217 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep)
5218 VTABLE_ADD_FUNC(numpunct_char_do_grouping)
5219 VTABLE_ADD_FUNC(numpunct_char_do_falsename)
5220 VTABLE_ADD_FUNC(numpunct_char_do_truename));
5221 __ASM_VTABLE(numpunct_wchar,
5222 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
5223 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
5224 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
5225 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
5226 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
5227 __ASM_VTABLE(numpunct_short,
5228 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
5229 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
5230 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
5231 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
5232 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
5233 __ASM_VTABLE(num_get_char,
5234 VTABLE_ADD_FUNC(num_get_char_do_get_void)
5235 VTABLE_ADD_FUNC(num_get_char_do_get_double)
5236 VTABLE_ADD_FUNC(num_get_char_do_get_double)
5237 VTABLE_ADD_FUNC(num_get_char_do_get_float)
5238 VTABLE_ADD_FUNC(num_get_char_do_get_uint64)
5239 VTABLE_ADD_FUNC(num_get_char_do_get_int64)
5240 VTABLE_ADD_FUNC(num_get_char_do_get_ulong)
5241 VTABLE_ADD_FUNC(num_get_char_do_get_long)
5242 VTABLE_ADD_FUNC(num_get_char_do_get_uint)
5243 VTABLE_ADD_FUNC(num_get_char_do_get_ushort)
5244 VTABLE_ADD_FUNC(num_get_char_do_get_bool));
5245 __ASM_VTABLE(num_get_short,
5246 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
5247 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
5248 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
5249 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
5250 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
5251 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
5252 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
5253 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
5254 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
5255 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
5256 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
5257 __ASM_VTABLE(num_get_wchar,
5258 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
5259 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
5260 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
5261 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
5262 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
5263 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
5264 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
5265 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
5266 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
5267 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
5268 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
5273 void free_locale(void)
5275 facets_elem *iter, *safe;
5278 locale__Locimp_dtor(global_locale);
5279 locale_dtor(&classic_locale);
5282 LIST_FOR_EACH_ENTRY_SAFE(iter, safe, &lazy_facets, facets_elem, entry) {
5283 list_remove(&iter->entry);
5284 if(locale_facet__Decref(iter->fac))
5285 call_locale_facet_vector_dtor(iter->fac, 1);
5286 MSVCRT_operator_delete(iter);