msvcp90: Add num_get<char> stubs.
[wine.git] / dlls / msvcp90 / locale.c
blob55d41f4d304c884e0cc5a0860751b2e5ec48a0da
1 /*
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
19 #include "config.h"
21 #include <stdarg.h>
23 #include "msvcp90.h"
24 #include "locale.h"
25 #include "errno.h"
26 #include "limits.h"
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winnls.h"
31 #include "wine/unicode.h"
32 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
35 char* __cdecl _Getdays(void);
36 char* __cdecl _Getmonths(void);
37 void* __cdecl _Gettnames(void);
38 unsigned int __cdecl ___lc_codepage_func(void);
39 LCID* __cdecl ___lc_handle_func(void);
41 typedef int category;
43 typedef struct {
44 MSVCP_size_t id;
45 } locale_id;
47 typedef struct {
48 const vtable_ptr *vtable;
49 MSVCP_size_t refs;
50 } locale_facet;
52 typedef struct _locale__Locimp {
53 locale_facet facet;
54 locale_facet **facetvec;
55 MSVCP_size_t facet_cnt;
56 category catmask;
57 MSVCP_bool transparent;
58 basic_string_char name;
59 } locale__Locimp;
61 typedef struct {
62 void *timeptr;
63 } _Timevec;
65 typedef struct {
66 _Lockit lock;
67 basic_string_char days;
68 basic_string_char months;
69 basic_string_char oldlocname;
70 basic_string_char newlocname;
71 } _Locinfo;
73 typedef struct {
74 LCID handle;
75 unsigned page;
76 } _Collvec;
78 typedef struct {
79 LCID handle;
80 unsigned page;
81 const short *table;
82 int delfl;
83 } _Ctypevec;
85 typedef struct {
86 LCID handle;
87 unsigned page;
88 } _Cvtvec;
90 typedef struct {
91 locale_facet facet;
92 _Collvec coll;
93 } collate;
95 typedef struct {
96 locale_facet facet;
97 } ctype_base;
99 typedef struct {
100 ctype_base base;
101 _Ctypevec ctype;
102 } ctype_char;
104 typedef struct {
105 ctype_base base;
106 _Ctypevec ctype;
107 _Cvtvec cvt;
108 } ctype_wchar;
110 typedef struct {
111 locale_facet facet;
112 const char *grouping;
113 char dp;
114 char sep;
115 const char *false_name;
116 const char *true_name;
117 } numpunct_char;
119 typedef struct {
120 locale_facet facet;
121 const char *grouping;
122 wchar_t dp;
123 wchar_t sep;
124 const wchar_t *false_name;
125 const wchar_t *true_name;
126 } numpunct_wchar;
128 typedef struct _num_get_char {
129 locale_facet facet;
130 _Cvtvec cvt;
131 } num_get_char;
133 typedef struct _num_get_wchar {
134 locale_facet facet;
135 _Cvtvec cvt;
136 } num_get_wchar;
138 struct _ios_base;
139 typedef struct _istreambuf_iterator_char
141 struct _basic_streambuf_char *strbuf;
142 MSVCP_bool got;
143 char val;
144 } istreambuf_iterator_char;
146 typedef struct _istreambuf_iterator_wchar
148 struct _basic_streambuf_wchar *strbuf;
149 MSVCP_bool got;
150 wchar_t val;
151 } istreambuf_iterator_wchar;
153 /* ?_Id_cnt@id@locale@std@@0HA */
154 int locale_id__Id_cnt = 0;
156 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
157 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
158 locale__Locimp *locale__Locimp__Clocptr = NULL;
160 /* ??1facet@locale@std@@UAE@XZ */
161 /* ??1facet@locale@std@@UEAA@XZ */
162 DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
163 void __thiscall locale_facet_dtor(locale_facet *this)
165 TRACE("(%p)\n", this);
168 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
169 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
170 locale_facet*, (locale_facet*, unsigned int), (this, flags))
171 locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
173 TRACE("(%p %x)\n", this, flags);
174 if(flags & 2) {
175 /* we have an array, with the number of elements stored before the first object */
176 int i, *ptr = (int *)this-1;
178 for(i=*ptr-1; i>=0; i--)
179 locale_facet_dtor(this+i);
180 MSVCRT_operator_delete(ptr);
181 } else {
182 locale_facet_dtor(this);
183 if(flags & 1)
184 MSVCRT_operator_delete(this);
187 return this;
190 const vtable_ptr MSVCP_locale_facet_vtable[] = {
191 (vtable_ptr)THISCALL_NAME(MSVCP_locale_facet_vector_dtor)
194 /* ??0id@locale@std@@QAE@I@Z */
195 /* ??0id@locale@std@@QEAA@_K@Z */
196 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
197 locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
199 TRACE("(%p %lu)\n", this, id);
201 this->id = id;
202 return this;
205 /* ??_Fid@locale@std@@QAEXXZ */
206 /* ??_Fid@locale@std@@QEAAXXZ */
207 DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
208 locale_id* __thiscall locale_id_ctor(locale_id *this)
210 TRACE("(%p)\n", this);
212 this->id = 0;
213 return this;
216 /* ??Bid@locale@std@@QAEIXZ */
217 /* ??Bid@locale@std@@QEAA_KXZ */
218 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
219 MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
221 _Lockit lock;
223 TRACE("(%p)\n", this);
225 if(!this->id) {
226 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
227 this->id = ++locale_id__Id_cnt;
228 _Lockit_dtor(&lock);
231 return this->id;
234 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
235 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
236 int* __cdecl locale_id__Id_cnt_func(void)
238 TRACE("\n");
239 return &locale_id__Id_cnt;
242 /* ??_Ffacet@locale@std@@QAEXXZ */
243 /* ??_Ffacet@locale@std@@QEAAXXZ */
244 DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
245 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
247 TRACE("(%p)\n", this);
248 this->vtable = MSVCP_locale_facet_vtable;
249 this->refs = 0;
250 return this;
253 /* ??0facet@locale@std@@IAE@I@Z */
254 /* ??0facet@locale@std@@IEAA@_K@Z */
255 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
256 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
258 TRACE("(%p %lu)\n", this, refs);
259 this->vtable = MSVCP_locale_facet_vtable;
260 this->refs = refs;
261 return this;
264 /* ?_Incref@facet@locale@std@@QAEXXZ */
265 /* ?_Incref@facet@locale@std@@QEAAXXZ */
266 DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
267 void __thiscall locale_facet__Incref(locale_facet *this)
269 _Lockit lock;
271 TRACE("(%p)\n", this);
273 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
274 this->refs++;
275 _Lockit_dtor(&lock);
278 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
279 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
280 DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
281 locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
283 _Lockit lock;
284 locale_facet *ret;
286 TRACE("(%p)\n", this);
288 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
289 if(this->refs)
290 this->refs--;
292 ret = this->refs ? NULL : this;
293 _Lockit_dtor(&lock);
295 return ret;
298 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
299 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
300 MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const locale *loc)
302 TRACE("(%p %p)\n", facet, loc);
303 return -1;
306 /* ??0_Timevec@std@@QAE@ABV01@@Z */
307 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
308 /* This copy constructor modifies copied object */
309 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8)
310 _Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy)
312 TRACE("(%p %p)\n", this, copy);
313 this->timeptr = copy->timeptr;
314 copy->timeptr = NULL;
315 return this;
318 /* ??0_Timevec@std@@QAE@PAX@Z */
319 /* ??0_Timevec@std@@QEAA@PEAX@Z */
320 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8)
321 _Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr)
323 TRACE("(%p %p)\n", this, timeptr);
324 this->timeptr = timeptr;
325 return this;
328 /* ??_F_Timevec@std@@QAEXXZ */
329 /* ??_F_Timevec@std@@QEAAXXZ */
330 DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4)
331 _Timevec* __thiscall _Timevec_ctor(_Timevec *this)
333 TRACE("(%p)\n", this);
334 this->timeptr = NULL;
335 return this;
338 /* ??1_Timevec@std@@QAE@XZ */
339 /* ??1_Timevec@std@@QEAA@XZ */
340 DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4)
341 void __thiscall _Timevec_dtor(_Timevec *this)
343 TRACE("(%p)\n", this);
344 free(this->timeptr);
347 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
348 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
349 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8)
350 _Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right)
352 TRACE("(%p %p)\n", this, right);
353 this->timeptr = right->timeptr;
354 right->timeptr = NULL;
355 return this;
358 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
359 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
360 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4)
361 void* __thiscall _Timevec__Getptr(_Timevec *this)
363 TRACE("(%p)\n", this);
364 return this->timeptr;
367 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
368 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
369 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr)
371 const char *locale = NULL;
373 /* This function is probably modifying more global objects */
374 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
376 if(!locstr)
377 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
379 _Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
380 MSVCP_basic_string_char_ctor_cstr(&locinfo->days, "");
381 MSVCP_basic_string_char_ctor_cstr(&locinfo->months, "");
382 MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL));
384 if(category)
385 locale = setlocale(LC_ALL, locstr);
386 else
387 locale = setlocale(LC_ALL, NULL);
389 if(locale)
390 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
391 else
392 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
394 return locinfo;
397 /* ??0_Locinfo@std@@QAE@HPBD@Z */
398 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
399 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12)
400 _Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr)
402 return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr);
405 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
406 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
407 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_bstr(_Locinfo *locinfo, const basic_string_char *locstr)
409 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
412 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
413 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
414 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr, 8)
415 _Locinfo* __thiscall _Locinfo_ctor_bstr(_Locinfo *this, const basic_string_char *locstr)
417 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
420 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
421 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
422 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr)
424 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr);
427 /* ??0_Locinfo@std@@QAE@PBD@Z */
428 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
429 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8)
430 _Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr)
432 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr);
435 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
436 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
437 void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo)
439 TRACE("(%p)\n", locinfo);
441 setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname));
442 MSVCP_basic_string_char_dtor(&locinfo->days);
443 MSVCP_basic_string_char_dtor(&locinfo->months);
444 MSVCP_basic_string_char_dtor(&locinfo->oldlocname);
445 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
446 _Lockit_dtor(&locinfo->lock);
449 /* ??_F_Locinfo@std@@QAEXXZ */
450 /* ??_F_Locinfo@std@@QEAAXXZ */
451 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4)
452 _Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this)
454 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
457 /* ??1_Locinfo@std@@QAE@XZ */
458 /* ??1_Locinfo@std@@QEAA@XZ */
459 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4)
460 void __thiscall _Locinfo_dtor(_Locinfo *this)
462 _Locinfo__Locinfo_dtor(this);
465 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
466 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
467 _Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr)
469 const char *locale = NULL;
471 /* This function is probably modifying more global objects */
472 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
473 if(!locstr)
474 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
476 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
478 if(category)
479 locale = setlocale(LC_ALL, locstr);
480 else
481 locale = setlocale(LC_ALL, NULL);
483 if(locale)
484 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
485 else
486 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
488 return locinfo;
491 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
492 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
493 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12)
494 _Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr)
496 return _Locinfo__Locinfo_Addcats(this, category, locstr);
499 /* _Getcoll */
500 _Collvec __cdecl _Getcoll(void)
502 _Collvec ret;
503 _locale_t locale = _get_current_locale();
505 TRACE("\n");
507 ret.page = locale->locinfo->lc_collate_cp;
508 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
509 _free_locale(locale);
510 return ret;
513 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
514 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
515 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8)
516 _Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret)
518 *ret = _Getcoll();
519 return ret;
522 /* _Getctype */
523 _Ctypevec __cdecl _Getctype(void)
525 _Ctypevec ret;
526 _locale_t locale = _get_current_locale();
527 short *table;
529 TRACE("\n");
531 ret.page = locale->locinfo->lc_codepage;
532 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
533 ret.delfl = TRUE;
534 table = malloc(sizeof(short[256]));
535 if(!table) {
536 _free_locale(locale);
537 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
539 memcpy(table, locale->locinfo->pctype, sizeof(short[256]));
540 ret.table = table;
541 _free_locale(locale);
542 return ret;
545 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
546 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
547 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8)
548 _Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret)
550 *ret = _Getctype();
551 return ret;
554 /* _Getcvt */
555 _Cvtvec __cdecl _Getcvt(void)
557 _Cvtvec ret;
558 _locale_t locale = _get_current_locale();
560 TRACE("\n");
562 ret.page = locale->locinfo->lc_codepage;
563 ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
564 _free_locale(locale);
565 return ret;
568 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
569 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
570 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8)
571 _Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret)
573 *ret = _Getcvt();
574 return ret;
577 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
578 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
579 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4)
580 int __thiscall _Locinfo__Getdateorder(const _Locinfo *this)
582 FIXME("(%p) stub\n", this);
583 return 0;
586 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
587 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
588 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4)
589 const char* __thiscall _Locinfo__Getdays(_Locinfo *this)
591 char *days = _Getdays();
593 TRACE("(%p)\n", this);
595 if(days) {
596 MSVCP_basic_string_char_dtor(&this->days);
597 MSVCP_basic_string_char_ctor_cstr(&this->days, days);
598 free(days);
601 return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) :
602 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
605 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
606 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
607 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4)
608 const char* __thiscall _Locinfo__Getmonths(_Locinfo *this)
610 char *months = _Getmonths();
612 TRACE("(%p)\n", this);
614 if(months) {
615 MSVCP_basic_string_char_dtor(&this->months);
616 MSVCP_basic_string_char_ctor_cstr(&this->months, months);
617 free(months);
620 return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) :
621 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
622 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
625 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
626 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
627 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4)
628 const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this)
630 TRACE("(%p)\n", this);
631 return "false";
634 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
635 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
636 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4)
637 const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this)
639 TRACE("(%p)\n", this);
640 return "true";
643 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
644 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
645 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4)
646 const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this)
648 TRACE("(%p)\n", this);
649 return localeconv();
652 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
653 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
654 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname, 8)
655 basic_string_char* __thiscall _Locinfo__Getname(const _Locinfo *this, basic_string_char *ret)
657 TRACE("(%p)\n", this);
659 MSVCP_basic_string_char_copy_ctor(ret, &this->newlocname);
660 return ret;
663 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
664 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
665 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 8)
666 _Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret)
668 TRACE("(%p)\n", this);
670 _Timevec_ctor_timeptr(ret, _Gettnames());
671 return ret;
674 static const type_info locale_facet_type_info = {
675 MSVCP_locale_facet_vtable,
676 NULL,
677 ".?AVfacet@locale@std@@"
680 /* ?id@?$collate@D@std@@2V0locale@2@A */
681 locale_id collate_char_id = {0};
683 /* ??_7?$collate@D@std@@6B@ */
684 extern const vtable_ptr MSVCP_collate_char_vtable;
686 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
687 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
688 DEFINE_THISCALL_WRAPPER(collate_char__Init, 8)
689 void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo)
691 TRACE("(%p %p)\n", this, locinfo);
692 _Locinfo__Getcoll(locinfo, &this->coll);
695 /* ??0?$collate@D@std@@IAE@PBDI@Z */
696 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
697 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12)
698 collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
700 _Locinfo locinfo;
702 TRACE("(%p %s %lu)\n", this, name, refs);
704 locale_facet_ctor_refs(&this->facet, refs);
705 this->facet.vtable = &MSVCP_collate_char_vtable;
707 _Locinfo_ctor_cstr(&locinfo, name);
708 collate_char__Init(this, &locinfo);
709 _Locinfo_dtor(&locinfo);
710 return this;
713 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
714 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
715 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12)
716 collate* __thiscall collate_char_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
718 TRACE("(%p %p %lu)\n", this, locinfo, refs);
720 locale_facet_ctor_refs(&this->facet, refs);
721 this->facet.vtable = &MSVCP_collate_char_vtable;
722 collate_char__Init(this, locinfo);
723 return this;
726 /* ??0?$collate@D@std@@QAE@I@Z */
727 /* ??0?$collate@D@std@@QEAA@_K@Z */
728 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8)
729 collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs)
731 return collate_char_ctor_name(this, "C", refs);
734 /* ??1?$collate@D@std@@MAE@XZ */
735 /* ??1?$collate@D@std@@MEAA@XZ */
736 DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4)
737 void __thiscall collate_char_dtor(collate *this)
739 TRACE("(%p)\n", this);
742 DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor, 8)
743 collate* __thiscall MSVCP_collate_char_vector_dtor(collate *this, unsigned int flags)
745 TRACE("(%p %x)\n", this, flags);
746 if(flags & 2) {
747 /* we have an array, with the number of elements stored before the first object */
748 int i, *ptr = (int *)this-1;
750 for(i=*ptr-1; i>=0; i--)
751 collate_char_dtor(this+i);
752 MSVCRT_operator_delete(ptr);
753 } else {
754 collate_char_dtor(this);
755 if(flags & 1)
756 MSVCRT_operator_delete(this);
759 return this;
762 /* ??_F?$collate@D@std@@QAEXXZ */
763 /* ??_F?$collate@D@std@@QEAAXXZ */
764 DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4)
765 collate* __thiscall collate_char_ctor(collate *this)
767 return collate_char_ctor_name(this, "C", 0);
770 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
771 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
772 MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const locale *loc)
774 TRACE("(%p %p)\n", facet, loc);
776 if(facet && !*facet) {
777 *facet = MSVCRT_operator_new(sizeof(collate));
778 if(!*facet) {
779 ERR("Out of memory\n");
780 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
781 return 0;
783 collate_char_ctor_name((collate*)*facet,
784 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
787 return LC_COLLATE;
790 /* _Strcoll */
791 int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2,
792 const char *last2, const _Collvec *coll)
794 LCID lcid;
796 TRACE("(%s %s)\n", debugstr_an(first1, last1-first1), debugstr_an(first2, last2-first2));
798 if(coll)
799 lcid = coll->handle;
800 else
801 lcid = ___lc_handle_func()[LC_COLLATE];
802 return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-2;
805 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
806 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
807 DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20)
808 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
809 (const collate*, const char*, const char*, const char*, const char*), \
810 (this, first1, last1, first2, last2))
811 int __thiscall collate_char_do_compare(const collate *this, const char *first1,
812 const char *last1, const char *first2, const char *last2)
814 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
815 return _Strcoll(first1, last1, first2, last2, &this->coll);
818 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
819 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
820 DEFINE_THISCALL_WRAPPER(collate_char_compare, 20)
821 int __thiscall collate_char_compare(const collate *this, const char *first1,
822 const char *last1, const char *first2, const char *last2)
824 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
825 return call_collate_char_do_compare(this, first1, last1, first2, last2);
828 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
829 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
830 DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12)
831 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
832 (const collate*, const char*, const char*), (this, first, last))
833 LONG __thiscall collate_char_do_hash(const collate *this,
834 const char *first, const char *last)
836 ULONG ret = 0;
838 TRACE("(%p %p %p)\n", this, first, last);
840 for(; first<last; first++)
841 ret = (ret<<8 | ret>>24) + *first;
842 return ret;
845 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
846 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
847 DEFINE_THISCALL_WRAPPER(collate_char_hash, 12)
848 LONG __thiscall collate_char_hash(const collate *this,
849 const char *first, const char *last)
851 TRACE("(%p %p %p)\n", this, first, last);
852 return call_collate_char_do_hash(this, first, last);
855 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
856 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
857 DEFINE_THISCALL_WRAPPER(collate_char_do_transform, 16)
858 basic_string_char* __thiscall collate_char_do_transform(const collate *this,
859 basic_string_char *ret, const char *first, const char *last)
861 FIXME("(%p %p %p) stub\n", this, first, last);
862 return ret;
865 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
866 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
867 DEFINE_THISCALL_WRAPPER(collate_char_transform, 16)
868 basic_string_char* __thiscall collate_char_transform(const collate *this,
869 basic_string_char *ret, const char *first, const char *last)
871 FIXME("(%p %p %p) stub\n", this, first, last);
872 return ret;
875 /* ?id@?$collate@_W@std@@2V0locale@2@A */
876 locale_id collate_wchar_id = {0};
877 /* ?id@?$collate@G@std@@2V0locale@2@A */
878 locale_id collate_short_id = {0};
880 /* ??_7?$collate@_W@std@@6B@ */
881 extern const vtable_ptr MSVCP_collate_wchar_vtable;
882 /* ??_7?$collate@G@std@@6B@ */
883 extern const vtable_ptr MSVCP_collate_short_vtable;
885 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
886 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
887 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
888 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
889 DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8)
890 void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo)
892 TRACE("(%p %p)\n", this, locinfo);
893 _Locinfo__Getcoll(locinfo, &this->coll);
896 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
897 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
898 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12)
899 collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
901 _Locinfo locinfo;
903 TRACE("(%p %s %lu)\n", this, name, refs);
905 locale_facet_ctor_refs(&this->facet, refs);
906 this->facet.vtable = &MSVCP_collate_wchar_vtable;
908 _Locinfo_ctor_cstr(&locinfo, name);
909 collate_wchar__Init(this, &locinfo);
910 _Locinfo_dtor(&locinfo);
911 return this;
914 /* ??0?$collate@G@std@@IAE@PBDI@Z */
915 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
916 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12)
917 collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
919 collate *ret = collate_wchar_ctor_name(this, name, refs);
920 ret->facet.vtable = &MSVCP_collate_short_vtable;
921 return ret;
924 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
925 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
926 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12)
927 collate* __thiscall collate_wchar_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
929 TRACE("(%p %p %lu)\n", this, locinfo, refs);
931 locale_facet_ctor_refs(&this->facet, refs);
932 this->facet.vtable = &MSVCP_collate_wchar_vtable;
933 collate_wchar__Init(this, locinfo);
934 return this;
937 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
938 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
939 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12)
940 collate* __thiscall collate_short_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
942 collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs);
943 ret->facet.vtable = &MSVCP_collate_short_vtable;
944 return ret;
947 /* ??0?$collate@_W@std@@QAE@I@Z */
948 /* ??0?$collate@_W@std@@QEAA@_K@Z */
949 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8)
950 collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs)
952 return collate_wchar_ctor_name(this, "C", refs);
955 /* ??0?$collate@G@std@@QAE@I@Z */
956 /* ??0?$collate@G@std@@QEAA@_K@Z */
957 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8)
958 collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs)
960 collate *ret = collate_wchar_ctor_refs(this, refs);
961 ret->facet.vtable = &MSVCP_collate_short_vtable;
962 return ret;
965 /* ??1?$collate@_W@std@@MAE@XZ */
966 /* ??1?$collate@_W@std@@MEAA@XZ */
967 /* ??1?$collate@G@std@@MAE@XZ */
968 /* ??1?$collate@G@std@@MEAA@XZ */
969 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4)
970 void __thiscall collate_wchar_dtor(collate *this)
972 TRACE("(%p)\n", this);
975 DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor, 8)
976 collate* __thiscall MSVCP_collate_wchar_vector_dtor(collate *this, unsigned int flags)
978 TRACE("(%p %x)\n", this, flags);
979 if(flags & 2) {
980 /* we have an array, with the number of elements stored before the first object */
981 int i, *ptr = (int *)this-1;
983 for(i=*ptr-1; i>=0; i--)
984 collate_wchar_dtor(this+i);
985 MSVCRT_operator_delete(ptr);
986 } else {
987 collate_wchar_dtor(this);
988 if(flags & 1)
989 MSVCRT_operator_delete(this);
992 return this;
995 DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor, 8)
996 collate* __thiscall MSVCP_collate_short_vector_dtor(collate *this, unsigned int flags)
998 return MSVCP_collate_wchar_vector_dtor(this, flags);
1001 /* ??_F?$collate@_W@std@@QAEXXZ */
1002 /* ??_F?$collate@_W@std@@QEAAXXZ */
1003 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4)
1004 collate* __thiscall collate_wchar_ctor(collate *this)
1006 return collate_wchar_ctor_name(this, "C", 0);
1009 /* ??_F?$collate@G@std@@QAEXXZ */
1010 /* ??_F?$collate@G@std@@QEAAXXZ */
1011 DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4)
1012 collate* __thiscall collate_short_ctor(collate *this)
1014 collate *ret = collate_wchar_ctor(this);
1015 ret->facet.vtable = &MSVCP_collate_short_vtable;
1016 return ret;
1019 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1020 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1021 MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const locale *loc)
1023 TRACE("(%p %p)\n", facet, loc);
1025 if(facet && !*facet) {
1026 *facet = MSVCRT_operator_new(sizeof(collate));
1027 if(!*facet) {
1028 ERR("Out of memory\n");
1029 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1030 return 0;
1032 collate_wchar_ctor_name((collate*)*facet,
1033 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
1036 return LC_COLLATE;
1039 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1040 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1041 MSVCP_size_t __cdecl collate_short__Getcat(const locale_facet **facet, const locale *loc)
1043 if(facet && !*facet) {
1044 collate_wchar__Getcat(facet, loc);
1045 (*(locale_facet**)facet)->vtable = &MSVCP_collate_short_vtable;
1048 return LC_COLLATE;
1051 /* _Wcscoll */
1052 int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t *first2,
1053 const wchar_t *last2, const _Collvec *coll)
1055 LCID lcid;
1057 TRACE("(%s %s)\n", debugstr_wn(first1, last1-first1), debugstr_wn(first2, last2-first2));
1059 if(coll)
1060 lcid = coll->handle;
1061 else
1062 lcid = ___lc_handle_func()[LC_COLLATE];
1063 return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-2;
1066 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1067 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1068 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1069 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1070 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20)
1071 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1072 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1073 (this, first1, last1, first2, last2))
1074 int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1,
1075 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1077 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1078 return _Wcscoll(first1, last1, first2, last2, &this->coll);
1081 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1082 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1083 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1084 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1085 DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20)
1086 int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1,
1087 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1089 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1090 return call_collate_wchar_do_compare(this, first1, last1, first2, last2);
1093 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1094 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1095 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1096 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1097 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12)
1098 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1099 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1100 LONG __thiscall collate_wchar_do_hash(const collate *this,
1101 const wchar_t *first, const wchar_t *last)
1103 ULONG ret = 0;
1105 TRACE("(%p %p %p)\n", this, first, last);
1107 for(; first<last; first++)
1108 ret = (ret<<8 | ret>>24) + *first;
1109 return ret;
1112 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1113 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1114 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1115 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1116 DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12)
1117 LONG __thiscall collate_wchar_hash(const collate *this,
1118 const wchar_t *first, const wchar_t *last)
1120 TRACE("(%p %p %p)\n", this, first, last);
1121 return call_collate_wchar_do_hash(this, first, last);
1124 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1125 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1126 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1127 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1128 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform, 16)
1129 basic_string_wchar* __thiscall collate_wchar_do_transform(const collate *this,
1130 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1132 FIXME("(%p %p %p) stub\n", this, first, last);
1133 return ret;
1136 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1137 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1138 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1139 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1140 DEFINE_THISCALL_WRAPPER(collate_wchar_transform, 16)
1141 basic_string_wchar* __thiscall collate_wchar_transform(const collate *this,
1142 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1144 FIXME("(%p %p %p) stub\n", this, first, last);
1145 return ret;
1148 /* ??_7ctype_base@std@@6B@ */
1149 extern const vtable_ptr MSVCP_ctype_base_vtable;
1151 /* ??0ctype_base@std@@QAE@I@Z */
1152 /* ??0ctype_base@std@@QEAA@_K@Z */
1153 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
1154 ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
1156 TRACE("(%p %lu)\n", this, refs);
1157 locale_facet_ctor_refs(&this->facet, refs);
1158 this->facet.vtable = &MSVCP_ctype_base_vtable;
1159 return this;
1162 /* ??_Fctype_base@std@@QAEXXZ */
1163 /* ??_Fctype_base@std@@QEAAXXZ */
1164 DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
1165 ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
1167 TRACE("(%p)\n", this);
1168 locale_facet_ctor_refs(&this->facet, 0);
1169 this->facet.vtable = &MSVCP_ctype_base_vtable;
1170 return this;
1173 /* ??1ctype_base@std@@UAE@XZ */
1174 /* ??1ctype_base@std@@UEAA@XZ */
1175 DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
1176 void __thiscall ctype_base_dtor(ctype_base *this)
1178 TRACE("(%p)\n", this);
1181 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
1182 ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
1184 TRACE("(%p %x)\n", this, flags);
1185 if(flags & 2) {
1186 /* we have an array, with the number of elements stored before the first object */
1187 int i, *ptr = (int *)this-1;
1189 for(i=*ptr-1; i>=0; i--)
1190 ctype_base_dtor(this+i);
1191 MSVCRT_operator_delete(ptr);
1192 } else {
1193 ctype_base_dtor(this);
1194 if(flags & 1)
1195 MSVCRT_operator_delete(this);
1198 return this;
1201 /* ?_Xran@ctype_base@std@@KAXXZ */
1202 void __cdecl ctype_base__Xran(void)
1204 throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
1207 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1208 locale_id ctype_char_id = {0};
1209 /* ?table_size@?$ctype@D@std@@2IB */
1210 /* ?table_size@?$ctype@D@std@@2_KB */
1211 MSVCP_size_t ctype_char_table_size = 256;
1213 /* ??_7?$ctype@D@std@@6B@ */
1214 extern const vtable_ptr MSVCP_ctype_char_vtable;
1216 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1217 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1218 locale_id* __cdecl ctype_char__Id_func(void)
1220 TRACE("()\n");
1221 return &ctype_char_id;
1224 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1225 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1226 DEFINE_THISCALL_WRAPPER(ctype_char__Init, 8)
1227 void __thiscall ctype_char__Init(ctype_char *this, _Locinfo *locinfo)
1229 TRACE("(%p %p)\n", this, locinfo);
1230 _Locinfo__Getctype(locinfo, &this->ctype);
1233 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1234 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1235 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy, 4)
1236 void __thiscall ctype_char__Tidy(ctype_char *this)
1238 TRACE("(%p)\n", this);
1240 if(this->ctype.delfl)
1241 free((short*)this->ctype.table);
1244 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1245 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1246 const short* __cdecl ctype_char_classic_table(void)
1248 TRACE("()\n");
1249 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1252 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1253 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1254 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo, 12)
1255 ctype_char* __thiscall ctype_char_ctor_locinfo(ctype_char *this,
1256 _Locinfo *locinfo, MSVCP_size_t refs)
1258 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1259 ctype_base_ctor_refs(&this->base, refs);
1260 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1261 ctype_char__Init(this, locinfo);
1262 return this;
1265 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1266 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1267 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table, 16)
1268 ctype_char* __thiscall ctype_char_ctor_table(ctype_char *this,
1269 const short *table, MSVCP_bool delete, MSVCP_size_t refs)
1271 _Locinfo locinfo;
1273 TRACE("(%p %p %d %lu)\n", this, table, delete, refs);
1275 ctype_base_ctor_refs(&this->base, refs);
1276 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1278 _Locinfo_ctor(&locinfo);
1279 ctype_char__Init(this, &locinfo);
1280 _Locinfo_dtor(&locinfo);
1282 if(table) {
1283 ctype_char__Tidy(this);
1284 this->ctype.table = table;
1285 this->ctype.delfl = delete;
1287 return this;
1290 /* ??_F?$ctype@D@std@@QAEXXZ */
1291 /* ??_F?$ctype@D@std@@QEAAXXZ */
1292 DEFINE_THISCALL_WRAPPER(ctype_char_ctor, 4)
1293 ctype_char* __thiscall ctype_char_ctor(ctype_char *this)
1295 return ctype_char_ctor_table(this, NULL, FALSE, 0);
1298 /* ??1?$ctype@D@std@@MAE@XZ */
1299 /* ??1?$ctype@D@std@@MEAA@XZ */
1300 DEFINE_THISCALL_WRAPPER(ctype_char_dtor, 4)
1301 void __thiscall ctype_char_dtor(ctype_char *this)
1303 TRACE("(%p)\n", this);
1304 ctype_char__Tidy(this);
1307 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_char_vector_dtor, 8)
1308 ctype_char* __thiscall MSVCP_ctype_char_vector_dtor(ctype_char *this, unsigned int flags)
1310 TRACE("(%p %x)\n", this, flags);
1311 if(flags & 2) {
1312 /* we have an array, with the number of elements stored before the first object */
1313 int i, *ptr = (int *)this-1;
1315 for(i=*ptr-1; i>=0; i--)
1316 ctype_char_dtor(this+i);
1317 MSVCRT_operator_delete(ptr);
1318 } else {
1319 ctype_char_dtor(this);
1320 if(flags & 1)
1321 MSVCRT_operator_delete(this);
1324 return this;
1327 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1328 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1329 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12)
1330 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1331 char, (const ctype_char*, char, char), (this, ch, unused))
1332 char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused)
1334 TRACE("(%p %c %c)\n", this, ch, unused);
1335 return ch;
1338 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1339 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1340 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20)
1341 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1342 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1343 (this, first, last, unused, dest))
1344 const char* __thiscall ctype_char_do_narrow(const ctype_char *this,
1345 const char *first, const char *last, char unused, char *dest)
1347 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1348 memcpy(dest, first, last-first);
1349 return last;
1352 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1353 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1354 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s, 24)
1355 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1356 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1357 (this, first, last, unused, dest, size))
1358 const char* __thiscall ctype_char__Do_narrow_s(const ctype_char *this, const char *first,
1359 const char *last, char unused, char *dest, MSVCP_size_t size)
1361 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1362 memcpy_s(dest, size, first, last-first);
1363 return last;
1366 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1367 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1368 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch, 12)
1369 char __thiscall ctype_char_narrow_ch(const ctype_char *this, char ch, char dflt)
1371 TRACE("(%p %c %c)\n", this, ch, dflt);
1372 return call_ctype_char_do_narrow_ch(this, ch, dflt);
1375 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1376 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1377 DEFINE_THISCALL_WRAPPER(ctype_char_narrow, 20)
1378 const char* __thiscall ctype_char_narrow(const ctype_char *this,
1379 const char *first, const char *last, char dflt, char *dest)
1381 TRACE("(%p %p %p %c %p)\n", this, first, last, dflt, dest);
1382 return call_ctype_char_do_narrow(this, first, last, dflt, dest);
1385 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1386 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1387 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s, 24)
1388 const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *first,
1389 const char *last, char dflt, char *dest, MSVCP_size_t size)
1391 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1392 return call_ctype_char__Do_narrow_s(this, first, last, dflt, dest, size);
1395 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1396 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1397 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8)
1398 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1399 char, (const ctype_char*, char), (this, ch))
1400 char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch)
1402 TRACE("(%p %c)\n", this, ch);
1403 return ch;
1406 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1407 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1408 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16)
1409 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1410 const char*, (const ctype_char*, const char*, const char*, char*), \
1411 (this, first, last, dest))
1412 const char* __thiscall ctype_char_do_widen(const ctype_char *this,
1413 const char *first, const char *last, char *dest)
1415 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1416 memcpy(dest, first, last-first);
1417 return last;
1420 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1421 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1422 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20)
1423 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1424 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1425 (this, first, last, dest, size))
1426 const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
1427 const char *first, const char *last, char *dest, MSVCP_size_t size)
1429 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1430 memcpy_s(dest, size, first, last-first);
1431 return last;
1434 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1435 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1436 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8)
1437 char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch)
1439 TRACE("(%p %c)\n", this, ch);
1440 return call_ctype_char_do_widen_ch(this, ch);
1443 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1444 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1445 DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16)
1446 const char* __thiscall ctype_char_widen(const ctype_char *this,
1447 const char *first, const char *last, char *dest)
1449 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1450 return call_ctype_char_do_widen(this, first, last, dest);
1453 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1454 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1455 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20)
1456 const char* __thiscall ctype_char__Widen_s(const ctype_char *this,
1457 const char *first, const char *last, char *dest, MSVCP_size_t size)
1459 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1460 return call_ctype_char__Do_widen_s(this, first, last, dest, size);
1463 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1464 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1465 MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale *loc)
1467 TRACE("(%p %p)\n", facet, loc);
1469 if(facet && !*facet) {
1470 _Locinfo locinfo;
1472 *facet = MSVCRT_operator_new(sizeof(ctype_char));
1473 if(!*facet) {
1474 ERR("Out of memory\n");
1475 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1476 return 0;
1479 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
1480 ctype_char_ctor_locinfo((ctype_char*)*facet, &locinfo, 0);
1481 _Locinfo_dtor(&locinfo);
1484 return LC_CTYPE;
1487 /* _Tolower */
1488 int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
1490 unsigned int cp;
1492 TRACE("%d %p\n", ch, ctype);
1494 if(ctype)
1495 cp = ctype->page;
1496 else
1497 cp = ___lc_codepage_func();
1499 /* Don't convert to unicode in case of C locale */
1500 if(!cp) {
1501 if(ch>='A' && ch<='Z')
1502 ch = ch-'A'+'a';
1503 return ch;
1504 } else {
1505 WCHAR wide, lower;
1506 char str[2];
1507 int size;
1509 if(ch > 255) {
1510 str[0] = (ch>>8) & 255;
1511 str[1] = ch & 255;
1512 size = 2;
1513 } else {
1514 str[0] = ch & 255;
1515 size = 1;
1518 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1519 return ch;
1521 lower = tolowerW(wide);
1522 if(lower == wide)
1523 return ch;
1525 WideCharToMultiByte(cp, 0, &lower, 1, str, 2, NULL, NULL);
1527 return str[0] + (str[1]<<8);
1531 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1532 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1533 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1534 char, (const ctype_char*, char), (this, ch))
1535 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch, 8)
1536 char __thiscall ctype_char_do_tolower_ch(const ctype_char *this, char ch)
1538 TRACE("(%p %c)\n", this, ch);
1539 return _Tolower(ch, &this->ctype);
1542 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1543 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1544 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1545 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1546 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower, 12)
1547 const char* __thiscall ctype_char_do_tolower(const ctype_char *this, char *first, const char *last)
1549 TRACE("(%p %p %p)\n", this, first, last);
1550 for(; first<last; first++)
1551 *first = _Tolower(*first, &this->ctype);
1552 return last;
1555 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1556 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1557 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch, 8)
1558 char __thiscall ctype_char_tolower_ch(const ctype_char *this, char ch)
1560 TRACE("(%p %c)\n", this, ch);
1561 return call_ctype_char_do_tolower_ch(this, ch);
1564 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1565 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1566 DEFINE_THISCALL_WRAPPER(ctype_char_tolower, 12)
1567 const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, const char *last)
1569 TRACE("(%p %p %p)\n", this, first, last);
1570 return call_ctype_char_do_tolower(this, first, last);
1573 /* _Toupper */
1574 int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
1576 unsigned int cp;
1578 TRACE("%d %p\n", ch, ctype);
1580 if(ctype)
1581 cp = ctype->page;
1582 else
1583 cp = ___lc_codepage_func();
1585 /* Don't convert to unicode in case of C locale */
1586 if(!cp) {
1587 if(ch>='a' && ch<='z')
1588 ch = ch-'a'+'A';
1589 return ch;
1590 } else {
1591 WCHAR wide, upper;
1592 char str[2];
1593 int size;
1595 if(ch > 255) {
1596 str[0] = (ch>>8) & 255;
1597 str[1] = ch & 255;
1598 size = 2;
1599 } else {
1600 str[0] = ch & 255;
1601 size = 1;
1604 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1605 return ch;
1607 upper = toupperW(wide);
1608 if(upper == wide)
1609 return ch;
1611 WideCharToMultiByte(cp, 0, &upper, 1, str, 2, NULL, NULL);
1613 return str[0] + (str[1]<<8);
1617 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1618 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1619 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1620 char, (const ctype_char*, char), (this, ch))
1621 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch, 8)
1622 char __thiscall ctype_char_do_toupper_ch(const ctype_char *this, char ch)
1624 TRACE("(%p %c)\n", this, ch);
1625 return _Toupper(ch, &this->ctype);
1628 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1629 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1630 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1631 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1632 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper, 12)
1633 const char* __thiscall ctype_char_do_toupper(const ctype_char *this,
1634 char *first, const char *last)
1636 TRACE("(%p %p %p)\n", this, first, last);
1637 for(; first<last; first++)
1638 *first = _Toupper(*first, &this->ctype);
1639 return last;
1642 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1643 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1644 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch, 8)
1645 char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch)
1647 TRACE("(%p %c)\n", this, ch);
1648 return call_ctype_char_do_toupper_ch(this, ch);
1651 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1652 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1653 DEFINE_THISCALL_WRAPPER(ctype_char_toupper, 12)
1654 const char* __thiscall ctype_char_toupper(const ctype_char *this, char *first, const char *last)
1656 TRACE("(%p %p %p)\n", this, first, last);
1657 return call_ctype_char_do_toupper(this, first, last);
1660 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1661 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1662 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch, 12)
1663 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char *this, short mask, char ch)
1665 TRACE("(%p %x %c)\n", this, mask, ch);
1666 return (this->ctype.table[(unsigned char)ch] & mask) != 0;
1669 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1670 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1671 DEFINE_THISCALL_WRAPPER(ctype_char_is, 16)
1672 const char* __thiscall ctype_char_is(const ctype_char *this, const char *first, const char *last, short *dest)
1674 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1675 for(; first<last; first++)
1676 *dest++ = this->ctype.table[(unsigned char)*first];
1677 return last;
1680 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1681 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1682 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is, 16)
1683 const char* __thiscall ctype_char_scan_is(const ctype_char *this, short mask, const char *first, const char *last)
1685 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1686 for(; first<last; first++)
1687 if(!ctype_char_is_ch(this, mask, *first))
1688 break;
1689 return first;
1692 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1693 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1694 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not, 16)
1695 const char* __thiscall ctype_char_scan_not(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))
1700 break;
1701 return first;
1704 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1705 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1706 DEFINE_THISCALL_WRAPPER(ctype_char_table, 4)
1707 const short* __thiscall ctype_char_table(const ctype_char *this)
1709 TRACE("(%p)\n", this);
1710 return this->ctype.table;
1713 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1714 locale_id ctype_wchar_id = {0};
1715 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1716 locale_id ctype_short_id = {0};
1718 /* ??_7?$ctype@_W@std@@6B@ */
1719 extern const vtable_ptr MSVCP_ctype_wchar_vtable;
1720 /* ??_7?$ctype@G@std@@6B@ */
1721 extern const vtable_ptr MSVCP_ctype_short_vtable;
1723 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1724 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1725 locale_id* __cdecl ctype_wchar__Id_func(void)
1727 TRACE("()\n");
1728 return &ctype_wchar_id;
1731 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1732 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1733 locale_id* __cdecl ctype_short__Id_func(void)
1735 TRACE("()\n");
1736 return &ctype_short_id;
1739 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1740 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1741 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1742 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1743 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8)
1744 void __thiscall ctype_wchar__Init(ctype_wchar *this, _Locinfo *locinfo)
1746 TRACE("(%p %p)\n", this, locinfo);
1747 _Locinfo__Getctype(locinfo, &this->ctype);
1748 _Locinfo__Getcvt(locinfo, &this->cvt);
1751 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1752 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1753 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12)
1754 ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this,
1755 _Locinfo *locinfo, MSVCP_size_t refs)
1757 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1758 ctype_base_ctor_refs(&this->base, refs);
1759 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1760 ctype_wchar__Init(this, locinfo);
1761 return this;
1764 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1765 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1766 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo, 12)
1767 ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this,
1768 _Locinfo *locinfo, MSVCP_size_t refs)
1770 ctype_wchar *ret = ctype_wchar_ctor_locinfo(this, locinfo, refs);
1771 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1772 return ret;
1775 /* ??0?$ctype@_W@std@@QAE@I@Z */
1776 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1777 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8)
1778 ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1780 _Locinfo locinfo;
1782 TRACE("(%p %lu)\n", this, refs);
1784 ctype_base_ctor_refs(&this->base, refs);
1785 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1787 _Locinfo_ctor(&locinfo);
1788 ctype_wchar__Init(this, &locinfo);
1789 _Locinfo_dtor(&locinfo);
1790 return this;
1793 /* ??0?$ctype@G@std@@QAE@I@Z */
1794 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1795 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs, 8)
1796 ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1798 ctype_wchar *ret = ctype_wchar_ctor_refs(this, refs);
1799 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1800 return ret;
1803 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1804 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1805 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12)
1806 ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this,
1807 const char *name, MSVCP_size_t refs)
1809 _Locinfo locinfo;
1811 TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs);
1813 ctype_base_ctor_refs(&this->base, refs);
1814 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1816 _Locinfo_ctor_cstr(&locinfo, name);
1817 ctype_wchar__Init(this, &locinfo);
1818 _Locinfo_dtor(&locinfo);
1819 return this;
1822 /* ??_F?$ctype@_W@std@@QAEXXZ */
1823 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1824 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4)
1825 ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this)
1827 TRACE("(%p)\n", this);
1828 return ctype_short_ctor_refs(this, 0);
1831 /* ??_F?$ctype@G@std@@QAEXXZ */
1832 /* ??_F?$ctype@G@std@@QEAAXXZ */
1833 DEFINE_THISCALL_WRAPPER(ctype_short_ctor, 4)
1834 ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this)
1836 ctype_wchar *ret = ctype_wchar_ctor(this);
1837 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1838 return ret;
1841 /* ??1?$ctype@_W@std@@MAE@XZ */
1842 /* ??1?$ctype@_W@std@@MEAA@XZ */
1843 /* ??1?$ctype@G@std@@MAE@XZ */
1844 /* ??1?$ctype@G@std@@MEAA@XZ */
1845 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4)
1846 void __thiscall ctype_wchar_dtor(ctype_wchar *this)
1848 TRACE("(%p)\n", this);
1849 if(this->ctype.delfl)
1850 free((void*)this->ctype.table);
1853 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor, 8)
1854 ctype_wchar* __thiscall MSVCP_ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int flags)
1856 TRACE("(%p %x)\n", this, flags);
1857 if(flags & 2) {
1858 /* we have an array, with the number of elements stored before the first object */
1859 int i, *ptr = (int *)this-1;
1861 for(i=*ptr-1; i>=0; i--)
1862 ctype_wchar_dtor(this+i);
1863 MSVCRT_operator_delete(ptr);
1864 } else {
1865 ctype_wchar_dtor(this);
1866 if(flags & 1)
1867 MSVCRT_operator_delete(this);
1870 return this;
1873 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_short_vector_dtor, 8)
1874 ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigned int flags)
1876 return MSVCP_ctype_wchar_vector_dtor(this, flags);
1879 /* _Wcrtomb */
1880 int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt)
1882 int cp, size;
1883 BOOL def;
1885 TRACE("%p %d %p %p\n", s, wch, state, cvt);
1887 if(cvt)
1888 cp = cvt->page;
1889 else
1890 cp = ___lc_codepage_func();
1892 if(!cp) {
1893 if(wch > 255) {
1894 *_errno() = EILSEQ;
1895 return -1;
1898 *s = wch & 255;
1899 return 1;
1902 size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def);
1903 if(!size || def) {
1904 *_errno() = EILSEQ;
1905 return -1;
1908 return size;
1911 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1912 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1913 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1914 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1915 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12)
1916 char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt)
1918 char buf[MB_LEN_MAX];
1920 TRACE("(%p %d %d)\n", this, ch, dflt);
1922 return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt;
1925 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1926 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1927 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1928 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1929 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12)
1930 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
1931 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1932 char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1934 return ctype_wchar__Donarrow(this, ch, dflt);
1937 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1938 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1939 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1940 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1941 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20)
1942 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
1943 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1944 (this, first, last, dflt, dest))
1945 const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this,
1946 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1948 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1949 for(; first<last; first++)
1950 *dest++ = ctype_wchar__Donarrow(this, *first, dflt);
1951 return last;
1954 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
1955 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
1956 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
1957 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
1958 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s, 24)
1959 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
1960 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
1961 (this, first, last, dflt, dest, size))
1962 const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this,
1963 const wchar_t *first, const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
1965 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
1966 /* This function converts all multi-byte characters to dflt,
1967 * thanks to it result size is known before converting */
1968 if(last-first > size)
1969 ctype_base__Xran();
1970 return ctype_wchar_do_narrow(this, first, last, dflt, dest);
1973 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1974 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1975 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1976 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1977 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12)
1978 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1980 TRACE("(%p %d %d)\n", this, ch, dflt);
1981 return call_ctype_wchar_do_narrow_ch(this, ch, dflt);
1984 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1985 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1986 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1987 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
1988 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20)
1989 const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this,
1990 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1992 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1993 return call_ctype_wchar_do_narrow(this, first, last, dflt, dest);
1996 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
1997 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
1998 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
1999 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2000 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24)
2001 const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first,
2002 const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
2004 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
2005 return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size);
2008 /* _Mbrtowc */
2009 int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt)
2011 int i, cp;
2012 CPINFO cp_info;
2013 BOOL is_lead;
2015 TRACE("(%p %p %lu %p %p)\n", out, in, len, state, cvt);
2017 if(!len)
2018 return 0;
2020 if(cvt)
2021 cp = cvt->page;
2022 else
2023 cp = ___lc_codepage_func();
2025 if(!cp) {
2026 if(out)
2027 *out = (unsigned char)*in;
2029 *state = 0;
2030 return *in ? 1 : 0;
2033 if(*state) {
2034 ((char*)state)[1] = *in;
2036 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) {
2037 *state = 0;
2038 *_errno() = EILSEQ;
2039 return -1;
2042 *state = 0;
2043 return 2;
2046 GetCPInfo(cp, &cp_info);
2047 is_lead = FALSE;
2048 for(i=0; i<MAX_LEADBYTES; i+=2) {
2049 if(!cp_info.LeadByte[i+1])
2050 break;
2051 if((unsigned char)*in>=cp_info.LeadByte[i] && (unsigned char)*in<=cp_info.LeadByte[i+1]) {
2052 is_lead = TRUE;
2053 break;
2057 if(is_lead) {
2058 if(len == 1) {
2059 *state = (unsigned char)*in;
2060 return -2;
2063 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 2, out, out ? 1 : 0)) {
2064 *_errno() = EILSEQ;
2065 return -1;
2067 return 2;
2070 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 1, out, out ? 1 : 0)) {
2071 *_errno() = EILSEQ;
2072 return -1;
2074 return 1;
2077 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2078 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2079 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2080 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2081 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8)
2082 wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch)
2084 wchar_t ret;
2085 int state = 0;
2086 TRACE("(%p %d)\n", this, ch);
2087 return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret;
2090 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2091 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2092 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2093 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2094 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch, 8)
2095 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2096 wchar_t, (const ctype_wchar*, char), (this, ch))
2097 wchar_t __thiscall ctype_wchar_do_widen_ch(const ctype_wchar *this, char ch)
2099 return ctype_wchar__Dowiden(this, ch);
2102 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2103 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2104 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2105 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2106 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen, 16)
2107 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2108 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2109 (this, first, last, dest))
2110 const char* __thiscall ctype_wchar_do_widen(const ctype_wchar *this,
2111 const char *first, const char *last, wchar_t *dest)
2113 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2114 for(; first<last; first++)
2115 *dest++ = ctype_wchar__Dowiden(this, *first);
2116 return last;
2119 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2120 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2121 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2122 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2123 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s, 20)
2124 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2125 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2126 (this, first, last, dest, size))
2127 const char* __thiscall ctype_wchar__Do_widen_s(const ctype_wchar *this,
2128 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2130 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2131 /* This function converts all multi-byte characters to WEOF,
2132 * thanks to it result size is known before converting */
2133 if(size < last-first)
2134 ctype_base__Xran();
2135 return ctype_wchar_do_widen(this, first, last, dest);
2138 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2139 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2140 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2141 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2142 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch, 8)
2143 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar *this, char ch)
2145 TRACE("(%p %d)\n", this, ch);
2146 return call_ctype_wchar_do_widen_ch(this, ch);
2149 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2150 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2151 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2152 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2153 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen, 16)
2154 const char* __thiscall ctype_wchar_widen(const ctype_wchar *this,
2155 const char *first, const char *last, wchar_t *dest)
2157 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2158 return call_ctype_wchar_do_widen(this, first, last, dest);
2161 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2162 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2163 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2164 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2165 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s, 20)
2166 const char* __thiscall ctype_wchar__Widen_s(const ctype_wchar *this,
2167 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2169 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2170 return call_ctype_wchar__Do_widen_s(this, first, last, dest, size);
2173 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2174 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2175 MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const locale *loc)
2177 TRACE("(%p %p)\n", facet, loc);
2179 if(facet && !*facet) {
2180 _Locinfo locinfo;
2182 *facet = MSVCRT_operator_new(sizeof(ctype_wchar));
2183 if(!*facet) {
2184 ERR("Out of memory\n");
2185 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2186 return 0;
2189 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
2190 ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0);
2191 _Locinfo_dtor(&locinfo);
2194 return LC_CTYPE;
2197 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2198 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2199 MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const locale *loc)
2201 if(facet && !*facet) {
2202 ctype_wchar__Getcat(facet, loc);
2203 (*(locale_facet**)facet)->vtable = &MSVCP_ctype_short_vtable;
2206 return LC_CTYPE;
2209 /* _Towlower */
2210 wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
2212 TRACE("(%d %p)\n", ch, ctype);
2213 return tolowerW(ch);
2216 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2217 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2218 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2219 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2220 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8)
2221 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2222 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2223 wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
2225 return _Towlower(ch, &this->ctype);
2228 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2229 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2230 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2231 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2232 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12)
2233 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2234 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2235 (this, first, last))
2236 const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this,
2237 wchar_t *first, const wchar_t *last)
2239 TRACE("(%p %p %p)\n", this, first, last);
2240 for(; first<last; first++)
2241 *first = _Towlower(*first, &this->ctype);
2242 return last;
2245 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2246 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2247 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2248 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2249 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8)
2250 wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch)
2252 TRACE("(%p %d)\n", this, ch);
2253 return call_ctype_wchar_do_tolower_ch(this, ch);
2256 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2257 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2258 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2259 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2260 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12)
2261 const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
2262 wchar_t *first, const wchar_t *last)
2264 TRACE("(%p %p %p)\n", this, first, last);
2265 return call_ctype_wchar_do_tolower(this, first, last);
2268 /* _Towupper */
2269 wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
2271 TRACE("(%d %p)\n", ch, ctype);
2272 return toupperW(ch);
2275 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2276 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2277 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2278 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2279 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8)
2280 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2281 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2282 wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch)
2284 return _Towupper(ch, &this->ctype);
2287 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2288 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2289 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2290 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2291 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12)
2292 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2293 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2294 (this, first, last))
2295 const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
2296 wchar_t *first, const wchar_t *last)
2298 TRACE("(%p %p %p)\n", this, first, last);
2299 for(; first<last; first++)
2300 *first = _Towupper(*first, &this->ctype);
2301 return last;
2304 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2305 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2306 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2307 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2308 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8)
2309 wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch)
2311 TRACE("(%p %d)\n", this, ch);
2312 return call_ctype_wchar_do_toupper_ch(this, ch);
2315 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2316 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2317 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2318 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2319 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12)
2320 const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this,
2321 wchar_t *first, const wchar_t *last)
2323 TRACE("(%p %p %p)\n", this, first, last);
2324 return call_ctype_wchar_do_toupper(this, first, last);
2327 /* _Getwctypes */
2328 const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last,
2329 short *mask, const _Ctypevec *ctype)
2331 TRACE("(%p %p %p %p)\n", first, last, mask, ctype);
2332 GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask);
2333 return last;
2336 /* _Getwctype */
2337 short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype)
2339 short mask = 0;
2340 _Getwctypes(&ch, &ch+1, &mask, ctype);
2341 return mask;
2344 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2345 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2346 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2347 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2348 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12)
2349 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2350 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2351 MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2353 TRACE("(%p %x %d)\n", this, mask, ch);
2354 return (_Getwctype(ch, &this->ctype) & mask) != 0;
2357 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2358 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2359 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2360 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2361 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16)
2362 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2363 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2364 (this, first, last, dest))
2365 const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this,
2366 const wchar_t *first, const wchar_t *last, short *dest)
2368 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2369 return _Getwctypes(first, last, dest, &this->ctype);
2372 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2373 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2374 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2375 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2376 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12)
2377 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2379 TRACE("(%p %x %d)\n", this, mask, ch);
2380 return call_ctype_wchar_do_is_ch(this, mask, ch);
2383 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2384 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2385 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2386 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2387 DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16)
2388 const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this,
2389 const wchar_t *first, const wchar_t *last, short *dest)
2391 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2392 return call_ctype_wchar_do_is(this, first, last, dest);
2395 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2396 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2397 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2398 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2399 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16)
2400 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2401 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2402 (this, mask, first, last))
2403 const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this,
2404 short mask, const wchar_t *first, const wchar_t *last)
2406 TRACE("(%p %d %p %p)\n", this, mask, first, last);
2407 for(; first<last; first++)
2408 if(!ctype_wchar_is_ch(this, mask, *first))
2409 break;
2410 return first;
2413 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2414 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2415 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2416 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2417 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16)
2418 const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
2419 short mask, const wchar_t *first, const wchar_t *last)
2421 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2422 return call_ctype_wchar_do_scan_is(this, mask, first, last);
2425 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2426 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2427 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2428 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2429 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16)
2430 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2431 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2432 (this, mask, first, last))
2433 const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this,
2434 short mask, const wchar_t *first, const wchar_t *last)
2436 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2437 for(; first<last; first++)
2438 if(ctype_wchar_is_ch(this, mask, *first))
2439 break;
2440 return first;
2443 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2444 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2445 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2446 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2447 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16)
2448 const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this,
2449 short mask, const wchar_t *first, const wchar_t *last)
2451 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2452 return call_ctype_wchar_do_scan_not(this, mask, first, last);
2455 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
2456 locale_id numpunct_char_id = {0};
2458 /* ??_7?$numpunct@D@std@@6B@ */
2459 extern const vtable_ptr MSVCP_numpunct_char_vtable;
2461 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
2462 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2463 DEFINE_THISCALL_WRAPPER(numpunct_char__Init, 12)
2464 void __thiscall numpunct_char__Init(numpunct_char *this, _Locinfo *locinfo, MSVCP_bool isdef)
2466 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
2467 int len;
2469 TRACE("(%p %p %d)\n", this, locinfo, isdef);
2471 len = strlen(_Locinfo__Getfalse(locinfo))+1;
2472 this->false_name = MSVCRT_operator_new(len);
2473 if(this->false_name)
2474 memcpy((char*)this->false_name, _Locinfo__Getfalse(locinfo), len);
2476 len = strlen(_Locinfo__Gettrue(locinfo))+1;
2477 this->true_name = MSVCRT_operator_new(len);
2478 if(this->true_name)
2479 memcpy((char*)this->true_name, _Locinfo__Gettrue(locinfo), len);
2481 if(isdef) {
2482 this->grouping = MSVCRT_operator_new(1);
2483 if(this->grouping)
2484 *(char*)this->grouping = 0;
2486 this->dp = '.';
2487 this->sep = ',';
2488 } else {
2489 len = strlen(lc->grouping)+1;
2490 this->grouping = MSVCRT_operator_new(len);
2491 if(this->grouping)
2492 memcpy((char*)this->grouping, lc->grouping, len);
2494 this->dp = lc->decimal_point[0];
2495 this->sep = lc->thousands_sep[0];
2498 if(!this->false_name || !this->true_name || !this->grouping) {
2499 MSVCRT_operator_delete((char*)this->grouping);
2500 MSVCRT_operator_delete((char*)this->false_name);
2501 MSVCRT_operator_delete((char*)this->true_name);
2503 ERR("Out of memory\n");
2504 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2508 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
2509 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
2510 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy, 4)
2511 void __thiscall numpunct_char__Tidy(numpunct_char *this)
2513 TRACE("(%p)\n", this);
2515 MSVCRT_operator_delete((char*)this->grouping);
2516 MSVCRT_operator_delete((char*)this->false_name);
2517 MSVCRT_operator_delete((char*)this->true_name);
2520 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
2521 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2522 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo, 16)
2523 numpunct_char* __thiscall numpunct_char_ctor_locinfo(numpunct_char *this,
2524 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2526 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
2527 locale_facet_ctor_refs(&this->facet, refs);
2528 this->facet.vtable = &MSVCP_numpunct_char_vtable;
2529 numpunct_char__Init(this, locinfo, usedef);
2530 return this;
2533 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
2534 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
2535 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name, 16)
2536 numpunct_char* __thiscall numpunct_char_ctor_name(numpunct_char *this,
2537 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2539 _Locinfo locinfo;
2541 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
2542 locale_facet_ctor_refs(&this->facet, refs);
2543 this->facet.vtable = &MSVCP_numpunct_char_vtable;
2545 _Locinfo_ctor_cstr(&locinfo, name);
2546 numpunct_char__Init(this, &locinfo, usedef);
2547 _Locinfo_dtor(&locinfo);
2548 return this;
2551 /* ??0?$numpunct@D@std@@QAE@I@Z */
2552 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
2553 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs, 8)
2554 numpunct_char* __thiscall numpunct_char_ctor_refs(numpunct_char *this, MSVCP_size_t refs)
2556 TRACE("(%p %lu)\n", this, refs);
2557 return numpunct_char_ctor_name(this, "C", refs, FALSE);
2560 /* ??_F?$numpunct@D@std@@QAEXXZ */
2561 /* ??_F?$numpunct@D@std@@QEAAXXZ */
2562 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor, 4)
2563 numpunct_char* __thiscall numpunct_char_ctor(numpunct_char *this)
2565 return numpunct_char_ctor_refs(this, 0);
2568 /* ??1?$numpunct@D@std@@MAE@XZ */
2569 /* ??1?$numpunct@D@std@@MEAA@XZ */
2570 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor, 4)
2571 void __thiscall numpunct_char_dtor(numpunct_char *this)
2573 TRACE("(%p)\n", this);
2574 numpunct_char__Tidy(this);
2577 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_char_vector_dtor, 8)
2578 numpunct_char* __thiscall MSVCP_numpunct_char_vector_dtor(numpunct_char *this, unsigned int flags)
2580 TRACE("(%p %x)\n", this, flags);
2581 if(flags & 2) {
2582 /* we have an array, with the number of elements stored before the first object */
2583 int i, *ptr = (int *)this-1;
2585 for(i=*ptr-1; i>=0; i--)
2586 numpunct_char_dtor(this+i);
2587 MSVCRT_operator_delete(ptr);
2588 } else {
2589 numpunct_char_dtor(this);
2590 if(flags & 1)
2591 MSVCRT_operator_delete(this);
2594 return this;
2597 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2598 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2599 MSVCP_size_t __cdecl numpunct_char__Getcat(const locale_facet **facet, const locale *loc)
2601 TRACE("(%p %p)\n", facet, loc);
2603 if(facet && !*facet) {
2604 *facet = MSVCRT_operator_new(sizeof(numpunct_char));
2605 if(!*facet) {
2606 ERR("Out of memory\n");
2607 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2608 return 0;
2610 numpunct_char_ctor_name((numpunct_char*)*facet,
2611 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
2614 return LC_NUMERIC;
2617 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
2618 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
2619 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point, 4)
2620 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
2621 char, (const numpunct_char *this), (this))
2622 char __thiscall numpunct_char_do_decimal_point(const numpunct_char *this)
2624 TRACE("(%p)\n", this);
2625 return this->dp;
2628 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
2629 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
2630 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point, 4)
2631 char __thiscall numpunct_char_decimal_point(const numpunct_char *this)
2633 TRACE("(%p)\n", this);
2634 return call_numpunct_char_do_decimal_point(this);
2637 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
2638 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
2639 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep, 4)
2640 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
2641 char, (const numpunct_char*), (this))
2642 char __thiscall numpunct_char_do_thousands_sep(const numpunct_char *this)
2644 TRACE("(%p)\n", this);
2645 return this->sep;
2648 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
2649 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
2650 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep, 4)
2651 char __thiscall numpunct_char_thousands_sep(const numpunct_char *this)
2653 TRACE("(%p)\n", this);
2654 return call_numpunct_char_do_thousands_sep(this);
2657 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2658 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2659 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping, 8)
2660 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
2661 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2662 basic_string_char* __thiscall numpunct_char_do_grouping(
2663 const numpunct_char *this, basic_string_char *ret)
2665 TRACE("(%p)\n", this);
2666 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
2669 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2670 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2671 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping, 8)
2672 basic_string_char* __thiscall numpunct_char_grouping(const numpunct_char *this, basic_string_char *ret)
2674 TRACE("(%p)\n", this);
2675 return call_numpunct_char_do_grouping(this, ret);
2678 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2679 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2680 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename, 8)
2681 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
2682 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2683 basic_string_char* __thiscall numpunct_char_do_falsename(
2684 const numpunct_char *this, basic_string_char *ret)
2686 TRACE("(%p)\n", this);
2687 return MSVCP_basic_string_char_ctor_cstr(ret, this->false_name);
2690 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2691 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2692 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename, 8)
2693 basic_string_char* __thiscall numpunct_char_falsename(const numpunct_char *this, basic_string_char *ret)
2695 TRACE("(%p)\n", this);
2696 return call_numpunct_char_do_falsename(this, ret);
2699 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2700 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2701 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename, 8)
2702 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
2703 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2704 basic_string_char* __thiscall numpunct_char_do_truename(
2705 const numpunct_char *this, basic_string_char *ret)
2707 TRACE("(%p)\n", this);
2708 return MSVCP_basic_string_char_ctor_cstr(ret, this->true_name);
2711 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2712 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2713 DEFINE_THISCALL_WRAPPER(numpunct_char_truename, 8)
2714 basic_string_char* __thiscall numpunct_char_truename(const numpunct_char *this, basic_string_char *ret)
2716 TRACE("(%p)\n", this);
2717 return call_numpunct_char_do_truename(this, ret);
2720 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
2721 locale_id numpunct_wchar_id = {0};
2722 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
2723 locale_id numpunct_short_id = {0};
2725 /* ??_7?$numpunct@_W@std@@6B@ */
2726 extern const vtable_ptr MSVCP_numpunct_wchar_vtable;
2727 /* ??_7?$numpunct@G@std@@6B@ */
2728 extern const vtable_ptr MSVCP_numpunct_short_vtable;
2730 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
2731 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2732 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
2733 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2734 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init, 12)
2735 void __thiscall numpunct_wchar__Init(numpunct_wchar *this, _Locinfo *locinfo, MSVCP_bool isdef)
2737 FIXME("(%p %p %d) stub\n", this, locinfo, isdef);
2740 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
2741 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
2742 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
2743 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
2744 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy, 4)
2745 void __thiscall numpunct_wchar__Tidy(numpunct_wchar *this)
2747 FIXME("(%p) stub\n", this);
2750 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
2751 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2752 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo, 16)
2753 numpunct_wchar* __thiscall numpunct_wchar_ctor_locinfo(numpunct_wchar *this,
2754 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2756 FIXME("(%p %p %lu %d) stub\n", this, locinfo, refs, usedef);
2757 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
2758 return NULL;
2761 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
2762 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2763 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo, 16)
2764 numpunct_wchar* __thiscall numpunct_short_ctor_locinfo(numpunct_wchar *this,
2765 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2767 numpunct_wchar_ctor_locinfo(this, locinfo, refs, usedef);
2768 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2769 return this;
2772 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
2773 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
2774 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name, 16)
2775 numpunct_wchar* __thiscall numpunct_wchar_ctor_name(numpunct_wchar *this,
2776 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2778 FIXME("(%p %s %lu %d) stub\n", this, debugstr_a(name), refs, usedef);
2779 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
2780 return NULL;
2783 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
2784 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
2785 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name, 16)
2786 numpunct_wchar* __thiscall numpunct_short_ctor_name(numpunct_wchar *this,
2787 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2789 numpunct_wchar_ctor_name(this, name, refs, usedef);
2790 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2791 return this;
2794 /* ??0?$numpunct@_W@std@@QAE@I@Z */
2795 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
2796 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs, 8)
2797 numpunct_wchar* __thiscall numpunct_wchar_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
2799 FIXME("(%p %lu) stub\n", this, refs);
2800 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
2801 return NULL;
2804 /* ??0?$numpunct@G@std@@QAE@I@Z */
2805 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
2806 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs, 8)
2807 numpunct_wchar* __thiscall numpunct_short_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
2809 numpunct_wchar_ctor_refs(this, refs);
2810 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2811 return this;
2814 /* ??_F?$numpunct@_W@std@@QAEXXZ */
2815 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
2816 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor, 4)
2817 numpunct_wchar* __thiscall numpunct_wchar_ctor(numpunct_wchar *this)
2819 return numpunct_wchar_ctor_refs(this, 0);
2822 /* ??_F?$numpunct@G@std@@QAEXXZ */
2823 /* ??_F?$numpunct@G@std@@QEAAXXZ */
2824 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor, 4)
2825 numpunct_wchar* __thiscall numpunct_short_ctor(numpunct_wchar *this)
2827 return numpunct_short_ctor_refs(this, 0);
2830 /* ??1?$numpunct@_W@std@@MAE@XZ */
2831 /* ??1?$numpunct@_W@std@@MEAA@XZ */
2832 /* ??1?$numpunct@G@std@@MAE@XZ */
2833 /* ??1?$numpunct@G@std@@MEAA@XZ */
2834 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor, 4)
2835 void __thiscall numpunct_wchar_dtor(numpunct_wchar *this)
2837 FIXME("(%p) stub\n", this);
2840 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_wchar_vector_dtor, 8)
2841 numpunct_wchar* __thiscall MSVCP_numpunct_wchar_vector_dtor(numpunct_wchar *this, unsigned int flags)
2843 TRACE("(%p %x)\n", this, flags);
2844 if(flags & 2) {
2845 /* we have an array, with the number of elements stored before the first object */
2846 int i, *ptr = (int *)this-1;
2848 for(i=*ptr-1; i>=0; i--)
2849 numpunct_wchar_dtor(this+i);
2850 MSVCRT_operator_delete(ptr);
2851 } else {
2852 numpunct_wchar_dtor(this);
2853 if(flags & 1)
2854 MSVCRT_operator_delete(this);
2857 return this;
2860 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_short_vector_dtor, 8)
2861 numpunct_wchar* __thiscall MSVCP_numpunct_short_vector_dtor(numpunct_wchar *this, unsigned int flags)
2863 return MSVCP_numpunct_wchar_vector_dtor(this, flags);
2866 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2867 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2868 MSVCP_size_t __cdecl numpunct_wchar__Getcat(const locale_facet **facet, const locale *loc)
2870 FIXME("(%p %p) stub\n", facet, loc);
2871 return 0;
2874 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2875 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2876 MSVCP_size_t __cdecl numpunct_short__Getcat(const locale_facet **facet, const locale *loc)
2878 FIXME("(%p %p) stub\n", facet, loc);
2879 return 0;
2882 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
2883 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
2884 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
2885 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
2886 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point, 4)
2887 wchar_t __thiscall numpunct_wchar_do_decimal_point(const numpunct_wchar *this)
2889 FIXME("(%p) stub\n", this);
2890 return 0;
2893 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
2894 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
2895 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
2896 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
2897 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point, 4)
2898 wchar_t __thiscall numpunct_wchar_decimal_point(const numpunct_wchar *this)
2900 FIXME("(%p) stub\n", this);
2901 return 0;
2904 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
2905 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
2906 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
2907 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
2908 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep, 4)
2909 wchar_t __thiscall numpunct_wchar_do_thousands_sep(const numpunct_wchar *this)
2911 FIXME("(%p) stub\n", this);
2912 return 0;
2915 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
2916 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
2917 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
2918 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
2919 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep, 4)
2920 wchar_t __thiscall numpunct_wchar_thousands_sep(const numpunct_wchar *this)
2922 FIXME("(%p) stub\n", this);
2923 return 0;
2926 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2927 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2928 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2929 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2930 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping, 8)
2931 basic_string_char* __thiscall numpunct_wchar_do_grouping(const numpunct_wchar *this, basic_string_char *ret)
2933 FIXME("(%p) stub\n", this);
2934 return ret;
2937 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2938 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2939 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2940 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2941 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping, 8)
2942 basic_string_char* __thiscall numpunct_wchar_grouping(const numpunct_wchar *this, basic_string_char *ret)
2944 FIXME("(%p) stub\n", this);
2945 return ret;
2948 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2949 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2950 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2951 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2952 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename, 8)
2953 basic_string_wchar* __thiscall numpunct_wchar_do_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
2955 FIXME("(%p) stub\n", this);
2956 return ret;
2959 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2960 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2961 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2962 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2963 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename, 8)
2964 basic_string_wchar* __thiscall numpunct_wchar_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
2966 FIXME("(%p) stub\n", this);
2967 return ret;
2970 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2971 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2972 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2973 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2974 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename, 8)
2975 basic_string_wchar* __thiscall numpunct_wchar_do_truename(const numpunct_wchar *this, basic_string_wchar *ret)
2977 FIXME("(%p) stub\n", this);
2978 return ret;
2981 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2982 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
2983 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2984 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
2985 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename, 8)
2986 basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *this, basic_string_wchar *ret)
2988 FIXME("(%p) stub\n", this);
2989 return ret;
2992 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
2993 locale_id num_get_wchar_id = {0};
2995 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
2996 extern const vtable_ptr MSVCP_num_get_wchar_vtable;
2998 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
2999 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3000 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor__Init, 8)
3001 void __thiscall num_get_wchar_ctor__Init(num_get_wchar *this, const _Locinfo *locinfo)
3003 FIXME("(%p %p) stub\n", this, locinfo);
3006 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3007 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3008 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo, 12)
3009 num_get_wchar* __thiscall num_get_wchar_ctor_locinfo(num_get_wchar *this,
3010 _Locinfo *locinfo, MSVCP_size_t refs)
3012 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3013 return NULL;
3016 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
3017 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
3018 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs, 8)
3019 num_get_wchar* __thiscall num_get_wchar_ctor_refs(num_get_wchar *this, MSVCP_size_t refs)
3021 FIXME("(%p %lu) stub\n", this, refs);
3022 return NULL;
3025 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3026 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3027 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor, 4)
3028 num_get_wchar* __thiscall num_get_wchar_ctor(num_get_wchar *this)
3030 FIXME("(%p) stub\n", this);
3031 return NULL;
3034 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
3035 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
3036 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor, 4)
3037 void __thiscall num_get_wchar_dtor(num_get_wchar *this)
3039 FIXME("(%p) stub\n", this);
3042 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar_vector_dtor, 8)
3043 num_get_wchar* __thiscall MSVCP_num_get_wchar_vector_dtor(num_get_wchar *this, unsigned int flags)
3045 TRACE("(%p %x)\n", this, flags);
3046 if(flags & 2) {
3047 /* we have an array, with the number of elements stored before the first object */
3048 int i, *ptr = (int *)this-1;
3050 for(i=*ptr-1; i>=0; i--)
3051 num_get_wchar_dtor(this+i);
3052 MSVCRT_operator_delete(ptr);
3053 } else {
3054 num_get_wchar_dtor(this);
3055 if(flags & 1)
3056 MSVCRT_operator_delete(this);
3059 return this;
3062 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3063 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3064 MSVCP_size_t __cdecl num_get_wchar__Getcat(const locale_facet **facet, const locale *loc)
3066 FIXME("(%p %p) stub\n", facet, loc);
3067 return -1;
3070 /* ?_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 */
3071 /* ?_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 */
3072 int __cdecl num_get_wchar__Getffld(char *dest, istreambuf_iterator_wchar *first,
3073 istreambuf_iterator_wchar *last, const locale *loc)
3075 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
3076 return -1;
3079 /* ?_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 */
3080 /* ?_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 */
3081 int __cdecl num_get_wchar__Getffldx(char *dest, istreambuf_iterator_wchar *first,
3082 istreambuf_iterator_wchar *last, struct _ios_base *ios, int *phexexp)
3084 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
3085 return -1;
3088 /* ?_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 */
3089 /* ?_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 */
3090 int __cdecl num_get_wchar__Getifld(char *dest, istreambuf_iterator_wchar *first,
3091 istreambuf_iterator_wchar *last, int fmtflags, const locale *loc)
3093 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
3094 return -1;
3097 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
3098 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
3099 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig, 20)
3100 int __thiscall MSVCP_num_get_wchar__Hexdig(num_get_wchar *this, wchar_t dig, wchar_t e0, wchar_t al, wchar_t au)
3102 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
3103 return -1;
3106 /* ?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 */
3107 /* ?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 */
3108 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36)
3109 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3110 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
3112 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3113 return ret;
3116 /* ?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 */
3117 /* ?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 */
3118 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void,36)
3119 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3120 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
3122 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3123 return ret;
3126 /* ?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 */
3127 /* ?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 */
3128 /* ?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 */
3129 /* ?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 */
3130 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36)
3131 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3132 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
3134 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3135 return ret;
3138 /* ?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 */
3139 /* ?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 */
3140 /* ?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 */
3141 /* ?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 */
3142 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double,36)
3143 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3144 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
3146 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3147 return ret;
3150 /* ?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 */
3151 /* ?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 */
3152 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36)
3153 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3154 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
3156 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3157 return ret;
3160 /* ?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 */
3161 /* ?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 */
3162 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float,36)
3163 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3164 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
3166 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3167 return ret;
3170 /* ?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 */
3171 /* ?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 */
3172 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36)
3173 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3174 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
3176 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3177 return ret;
3180 /* ?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 */
3181 /* ?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 */
3182 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64,36)
3183 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3184 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
3186 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3187 return ret;
3190 /* ?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 */
3191 /* ?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 */
3192 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36)
3193 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3194 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
3196 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3197 return ret;
3200 /* ?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 */
3201 /* ?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 */
3202 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64,36)
3203 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3204 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
3206 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3207 return ret;
3210 /* ?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 */
3211 /* ?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 */
3212 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36)
3213 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3214 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
3216 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3217 return ret;
3220 /* ?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 */
3221 /* ?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 */
3222 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong,36)
3223 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3224 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
3226 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3227 return ret;
3230 /* ?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 */
3231 /* ?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 */
3232 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36)
3233 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3234 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *pval)
3236 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3237 return ret;
3240 /* ?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 */
3241 /* ?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 */
3242 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long,36)
3243 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_long(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3244 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *pval)
3246 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3247 return ret;
3250 /* ?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 */
3251 /* ?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 */
3252 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36)
3253 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3254 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *pval)
3256 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3257 return ret;
3260 /* ?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 */
3261 /* ?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 */
3262 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint,36)
3263 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3264 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *pval)
3266 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3267 return ret;
3270 /* ?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 */
3271 /* ?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 */
3272 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36)
3273 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3274 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *pval)
3276 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3277 return ret;
3280 /* ?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 */
3281 /* ?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 */
3282 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort,36)
3283 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3284 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *pval)
3286 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3287 return ret;
3290 /* ?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 */
3291 /* ?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 */
3292 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36)
3293 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3294 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3296 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3297 return ret;
3300 /* ?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 */
3301 /* ?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 */
3302 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool,36)
3303 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get_wchar *this, istreambuf_iterator_wchar *ret,
3304 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3306 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3307 return ret;
3310 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
3311 locale_id num_get_char_id = {0};
3313 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
3314 extern const vtable_ptr MSVCP_num_get_char_vtable;
3316 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3317 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3318 DEFINE_THISCALL_WRAPPER(num_get_char_ctor__Init, 8)
3319 void __thiscall num_get_char_ctor__Init(num_get_char *this, const _Locinfo *locinfo)
3321 FIXME("(%p %p) stub\n", this, locinfo);
3324 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3325 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3326 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo, 12)
3327 num_get_char* __thiscall num_get_char_ctor_locinfo(num_get_char *this,
3328 _Locinfo *locinfo, MSVCP_size_t refs)
3330 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3331 return NULL;
3334 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
3335 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
3336 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs, 8)
3337 num_get_char* __thiscall num_get_char_ctor_refs(num_get_char *this, MSVCP_size_t refs)
3339 FIXME("(%p %lu) stub\n", this, refs);
3340 return NULL;
3343 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
3344 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
3345 DEFINE_THISCALL_WRAPPER(num_get_char_ctor, 4)
3346 num_get_char* __thiscall num_get_char_ctor(num_get_char *this)
3348 FIXME("(%p) stub\n", this);
3349 return NULL;
3352 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
3353 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
3354 DEFINE_THISCALL_WRAPPER(num_get_char_dtor, 4)
3355 void __thiscall num_get_char_dtor(num_get_char *this)
3357 FIXME("(%p) stub\n", this);
3360 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char_vector_dtor, 8)
3361 num_get_char* __thiscall MSVCP_num_get_char_vector_dtor(num_get_char *this, unsigned int flags)
3363 TRACE("(%p %x)\n", this, flags);
3364 if(flags & 2) {
3365 /* we have an array, with the number of elements stored before the first object */
3366 int i, *ptr = (int *)this-1;
3368 for(i=*ptr-1; i>=0; i--)
3369 num_get_char_dtor(this+i);
3370 MSVCRT_operator_delete(ptr);
3371 } else {
3372 num_get_char_dtor(this);
3373 if(flags & 1)
3374 MSVCRT_operator_delete(this);
3377 return this;
3380 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3381 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3382 MSVCP_size_t __cdecl num_get_char__Getcat(const locale_facet **facet, const locale *loc)
3384 FIXME("(%p %p) stub\n", facet, loc);
3385 return -1;
3388 /* ?_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 */
3389 /* ?_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 */
3390 int __cdecl num_get_char__Getffld(char *dest, istreambuf_iterator_char *first,
3391 istreambuf_iterator_char *last, const locale *loc)
3393 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
3394 return -1;
3397 /* ?_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 */
3398 /* ?_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 */
3399 int __cdecl num_get_char__Getffldx(char *dest, istreambuf_iterator_char *first,
3400 istreambuf_iterator_char *last, struct _ios_base *ios, int *phexexp)
3402 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
3403 return -1;
3406 /* ?_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 */
3407 /* ?_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 */
3408 int __cdecl num_get_char__Getifld(char *dest, istreambuf_iterator_char *first,
3409 istreambuf_iterator_char *last, int fmtflags, const locale *loc)
3411 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
3412 return -1;
3415 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
3416 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
3417 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig, 20)
3418 int __thiscall MSVCP_num_get_char__Hexdig(num_get_char *this, char dig, char e0, char al, char au)
3420 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
3421 return -1;
3424 /* ?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 */
3425 /* ?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 */
3426 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void,36)
3427 istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get_char *this, istreambuf_iterator_char *ret,
3428 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
3430 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3431 return ret;
3434 /* ?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 */
3435 /* ?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 */
3436 DEFINE_THISCALL_WRAPPER(num_get_char_get_void,36)
3437 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get_char *this, istreambuf_iterator_char *ret,
3438 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
3440 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3441 return ret;
3444 /* ?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 */
3445 /* ?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 */
3446 /* ?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 */
3447 /* ?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 */
3448 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double,36)
3449 istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get_char *this, istreambuf_iterator_char *ret,
3450 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
3452 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3453 return ret;
3456 /* ?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 */
3457 /* ?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 */
3458 /* ?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 */
3459 /* ?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 */
3460 DEFINE_THISCALL_WRAPPER(num_get_char_get_double,36)
3461 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get_char *this, istreambuf_iterator_char *ret,
3462 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
3464 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3465 return ret;
3468 /* ?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 */
3469 /* ?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 */
3470 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float,36)
3471 istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get_char *this, istreambuf_iterator_char *ret,
3472 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
3474 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3475 return ret;
3478 /* ?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 */
3479 /* ?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 */
3480 DEFINE_THISCALL_WRAPPER(num_get_char_get_float,36)
3481 istreambuf_iterator_char *__thiscall num_get_char_get_float(const num_get_char *this, istreambuf_iterator_char *ret,
3482 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
3484 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3485 return ret;
3488 /* ?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 */
3489 /* ?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 */
3490 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64,36)
3491 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get_char *this, istreambuf_iterator_char *ret,
3492 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
3494 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3495 return ret;
3498 /* ?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 */
3499 /* ?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 */
3500 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64,36)
3501 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get_char *this, istreambuf_iterator_char *ret,
3502 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
3504 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3505 return ret;
3508 /* ?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 */
3509 /* ?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 */
3510 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64,36)
3511 istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get_char *this, istreambuf_iterator_char *ret,
3512 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
3514 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3515 return ret;
3518 /* ?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 */
3519 /* ?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 */
3520 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64,36)
3521 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get_char *this, istreambuf_iterator_char *ret,
3522 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
3524 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3525 return ret;
3528 /* ?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 */
3529 /* ?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 */
3530 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong,36)
3531 istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get_char *this, istreambuf_iterator_char *ret,
3532 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
3534 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3535 return ret;
3538 /* ?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 */
3539 /* ?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 */
3540 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong,36)
3541 istreambuf_iterator_char *__thiscall num_get_char_get_ulong(const num_get_char *this, istreambuf_iterator_char *ret,
3542 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
3544 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3545 return ret;
3548 /* ?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 */
3549 /* ?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 */
3550 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long,36)
3551 istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get_char *this, istreambuf_iterator_char *ret,
3552 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
3554 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3555 return ret;
3558 /* ?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 */
3559 /* ?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 */
3560 DEFINE_THISCALL_WRAPPER(num_get_char_get_long,36)
3561 istreambuf_iterator_char *__thiscall num_get_char_get_long(const num_get_char *this, istreambuf_iterator_char *ret,
3562 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
3564 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3565 return ret;
3568 /* ?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 */
3569 /* ?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 */
3570 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint,36)
3571 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get_char *this, istreambuf_iterator_char *ret,
3572 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
3574 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3575 return ret;
3578 /* ?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 */
3579 /* ?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 */
3580 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint,36)
3581 istreambuf_iterator_char *__thiscall num_get_char_get_uint(const num_get_char *this, istreambuf_iterator_char *ret,
3582 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
3584 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3585 return ret;
3588 /* ?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 */
3589 /* ?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 */
3590 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort,36)
3591 istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get_char *this, istreambuf_iterator_char *ret,
3592 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
3594 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3595 return ret;
3598 /* ?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 */
3599 /* ?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 */
3600 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort,36)
3601 istreambuf_iterator_char *__thiscall num_get_char_get_ushort(const num_get_char *this, istreambuf_iterator_char *ret,
3602 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
3604 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3605 return ret;
3608 /* ?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 */
3609 /* ?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 */
3610 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool,36)
3611 istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get_char *this, istreambuf_iterator_char *ret,
3612 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3614 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3615 return ret;
3618 /* ?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 */
3619 /* ?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 */
3620 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool,36)
3621 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get_char *this, istreambuf_iterator_char *ret,
3622 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3624 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3625 return ret;
3628 /* ??0_Locimp@locale@std@@AAE@_N@Z */
3629 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
3630 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
3631 locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent)
3633 TRACE("(%p %d)\n", this, transparent);
3635 memset(this, 0, sizeof(locale__Locimp));
3636 locale_facet_ctor_refs(&this->facet, 1);
3637 this->transparent = transparent;
3638 MSVCP_basic_string_char_ctor_cstr(&this->name, "*");
3639 return this;
3642 /* ??_F_Locimp@locale@std@@QAEXXZ */
3643 /* ??_F_Locimp@locale@std@@QEAAXXZ */
3644 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
3645 locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this)
3647 return locale__Locimp_ctor_transparent(this, FALSE);
3650 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
3651 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
3652 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8)
3653 locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy)
3655 _Lockit lock;
3656 MSVCP_size_t i;
3658 TRACE("(%p %p)\n", this, copy);
3660 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
3661 memcpy(this, copy, sizeof(locale__Locimp));
3662 locale_facet_ctor_refs(&this->facet, 1);
3663 if(copy->facetvec) {
3664 this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
3665 if(!this->facetvec) {
3666 _Lockit_dtor(&lock);
3667 ERR("Out of memory\n");
3668 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3669 return NULL;
3671 for(i=0; i<this->facet_cnt; i++)
3672 if(this->facetvec[i])
3673 locale_facet__Incref(this->facetvec[i]);
3675 MSVCP_basic_string_char_copy_ctor(&this->name, &copy->name);
3676 _Lockit_dtor(&lock);
3677 return this;
3680 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
3681 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
3682 locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy)
3684 return locale__Locimp_copy_ctor(this, copy);
3687 /* ??1_Locimp@locale@std@@MAE@XZ */
3688 /* ??1_Locimp@locale@std@@MEAA@XZ */
3689 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4)
3690 void __thiscall locale__Locimp_dtor(locale__Locimp *this)
3692 TRACE("(%p)\n", this);
3694 if(locale_facet__Decref(&this->facet)) {
3695 MSVCP_size_t i;
3696 for(i=0; i<this->facet_cnt; i++)
3697 if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i]))
3698 call_locale_facet_vector_dtor(this->facetvec[i], 0);
3700 MSVCRT_operator_delete(this->facetvec);
3701 MSVCP_basic_string_char_dtor(&this->name);
3705 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
3706 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
3707 void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this)
3709 locale__Locimp_dtor(this);
3712 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8)
3713 locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags)
3715 TRACE("(%p %x)\n", this, flags);
3716 if(flags & 2) {
3717 /* we have an array, with the number of elements stored before the first object */
3718 int i, *ptr = (int *)this-1;
3720 for(i=*ptr-1; i>=0; i--)
3721 locale__Locimp_dtor(this+i);
3722 MSVCRT_operator_delete(ptr);
3723 } else {
3724 locale__Locimp_dtor(this);
3725 if(flags & 1)
3726 MSVCRT_operator_delete(this);
3729 return this;
3732 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
3733 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
3734 void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id)
3736 _Lockit lock;
3738 TRACE("(%p %p %lu)\n", locimp, facet, id);
3740 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
3741 if(id >= locimp->facet_cnt) {
3742 MSVCP_size_t new_size = id+1;
3743 locale_facet **new_facetvec;
3745 if(new_size < locale_id__Id_cnt+1)
3746 new_size = locale_id__Id_cnt+1;
3748 new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size);
3749 if(!new_facetvec) {
3750 _Lockit_dtor(&lock);
3751 ERR("Out of memory\n");
3752 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3753 return;
3756 memset(new_facetvec, 0, sizeof(locale_facet*)*new_size);
3757 memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt);
3758 MSVCRT_operator_delete(locimp->facetvec);
3759 locimp->facetvec = new_facetvec;
3760 locimp->facet_cnt = new_size;
3763 if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id]))
3764 call_locale_facet_vector_dtor(locimp->facetvec[id], 0);
3766 locimp->facetvec[id] = facet;
3767 if(facet)
3768 locale_facet__Incref(facet);
3769 _Lockit_dtor(&lock);
3772 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
3773 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
3774 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12)
3775 void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id)
3777 locale__Locimp__Locimp_Addfac(this, facet, id);
3780 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
3781 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
3782 locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void)
3784 FIXME("stub\n");
3785 return NULL;
3788 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
3789 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3790 locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3792 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3793 return NULL;
3796 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3797 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3798 void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3800 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3803 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3804 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3805 void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3807 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3810 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3811 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3812 void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3814 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3817 /* ??_7_Locimp@locale@std@@6B@ */
3818 const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
3819 (vtable_ptr)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor)
3822 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
3823 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
3824 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
3825 locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp)
3827 TRACE("(%p %p)\n", this, locimp);
3828 /* Don't change locimp reference counter */
3829 this->ptr = locimp;
3830 return this;
3833 /* ??0locale@std@@QAE@ABV01@0H@Z */
3834 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
3835 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16)
3836 locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat)
3838 FIXME("(%p %p %p %d) stub\n", this, loc, other, cat);
3839 return NULL;
3842 /* ??0locale@std@@QAE@ABV01@@Z */
3843 /* ??0locale@std@@QEAA@AEBV01@@Z */
3844 DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8)
3845 locale* __thiscall locale_copy_ctor(locale *this, const locale *copy)
3847 TRACE("(%p %p)\n", this, copy);
3848 this->ptr = copy->ptr;
3849 locale_facet__Incref(&this->ptr->facet);
3850 return this;
3853 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
3854 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
3855 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16)
3856 locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat)
3858 FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat);
3859 return NULL;
3862 /* ??0locale@std@@QAE@PBDH@Z */
3863 /* ??0locale@std@@QEAA@PEBDH@Z */
3864 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12)
3865 locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat)
3867 FIXME("(%p %s %d) stub\n", this, locname, cat);
3868 return NULL;
3871 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
3872 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
3873 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8)
3874 locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized)
3876 TRACE("(%p)\n", this);
3877 this->ptr = NULL;
3878 return this;
3881 /* ??0locale@std@@QAE@XZ */
3882 /* ??0locale@std@@QEAA@XZ */
3883 DEFINE_THISCALL_WRAPPER(locale_ctor, 4)
3884 locale* __thiscall locale_ctor(locale *this)
3886 TRACE("(%p)\n", this);
3887 this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
3888 if(!this->ptr) {
3889 ERR("Out of memory\n");
3890 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3891 return NULL;
3894 locale__Locimp_ctor(this->ptr);
3895 return this;
3898 /* ??1locale@std@@QAE@XZ */
3899 /* ??1locale@std@@QEAA@XZ */
3900 DEFINE_THISCALL_WRAPPER(locale_dtor, 4)
3901 void __thiscall locale_dtor(locale *this)
3903 TRACE("(%p)\n", this);
3904 if(this->ptr)
3905 locale__Locimp_dtor(this->ptr);
3908 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8)
3909 locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags)
3911 TRACE("(%p %x)\n", this, flags);
3912 if(flags & 2) {
3913 /* we have an array, with the number of elements stored before the first object */
3914 int i, *ptr = (int *)this-1;
3916 for(i=*ptr-1; i>=0; i--)
3917 locale_dtor(this+i);
3918 MSVCRT_operator_delete(ptr);
3919 } else {
3920 locale_dtor(this);
3921 if(flags & 1)
3922 MSVCRT_operator_delete(this);
3925 return this;
3928 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
3929 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
3930 DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8)
3931 locale* __thiscall locale_operator_assign(locale *this, const locale *loc)
3933 FIXME("(%p %p) stub\n", this, loc);
3934 return NULL;
3937 /* ??8locale@std@@QBE_NABV01@@Z */
3938 /* ??8locale@std@@QEBA_NAEBV01@@Z */
3939 DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8)
3940 MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc)
3942 FIXME("(%p %p) stub\n", this, loc);
3943 return 0;
3946 /* ??9locale@std@@QBE_NABV01@@Z */
3947 /* ??9locale@std@@QEBA_NAEBV01@@Z */
3948 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8)
3949 MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc)
3951 FIXME("(%p %p) stub\n", this, loc);
3952 return 0;
3955 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
3956 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
3957 DEFINE_THISCALL_WRAPPER(locale__Addfac, 16)
3958 locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask)
3960 TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask);
3962 if(this->ptr->facet.refs > 1) {
3963 locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
3964 if(!new_ptr) {
3965 ERR("Out of memory\n");
3966 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3967 return NULL;
3969 locale__Locimp_copy_ctor(new_ptr, this->ptr);
3970 locale_facet__Decref(&this->ptr->facet);
3971 this->ptr = new_ptr;
3974 locale__Locimp__Addfac(this->ptr, facet, id);
3976 if(catmask) {
3977 MSVCP_basic_string_char_dtor(&this->ptr->name);
3978 MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*");
3980 return this;
3983 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
3984 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
3985 DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8)
3986 const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id)
3988 FIXME("(%p %lu) stub\n", this, id);
3989 return NULL;
3992 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
3993 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
3994 locale__Locimp* __cdecl locale__Init(void)
3996 FIXME("stub\n");
3997 return NULL;
4000 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
4001 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
4002 locale__Locimp* __cdecl locale__Getgloballocale(void)
4004 FIXME("stub\n");
4005 return NULL;
4008 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
4009 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
4010 void __cdecl locale__Setgloballocale(void *locimp)
4012 FIXME("(%p) stub\n", locimp);
4015 /* ?classic@locale@std@@SAABV12@XZ */
4016 /* ?classic@locale@std@@SAAEBV12@XZ */
4017 const locale* __cdecl locale_classic(void)
4019 FIXME("stub\n");
4020 return NULL;
4023 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4024 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4025 DEFINE_THISCALL_WRAPPER(locale_name, 8)
4026 basic_string_char* __thiscall locale_name(const locale *this, basic_string_char *ret)
4028 TRACE( "(%p)\n", this);
4029 MSVCP_basic_string_char_copy_ctor(ret, &this->ptr->name);
4030 return ret;
4033 static const rtti_base_descriptor locale_facet_rtti_base_descriptor = {
4034 &locale_facet_type_info,
4036 { 0, -1, 0},
4040 DEFINE_RTTI_DATA(collate_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@D@std@@");
4041 DEFINE_RTTI_DATA(collate_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@_W@std@@");
4042 DEFINE_RTTI_DATA(collate_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@G@std@@");
4043 DEFINE_RTTI_DATA(ctype_base, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AUctype_base@std@@");
4044 DEFINE_RTTI_DATA(ctype_char, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@D@std@@");
4045 DEFINE_RTTI_DATA(ctype_wchar, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@_W@std@@");
4046 DEFINE_RTTI_DATA(ctype_short, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@G@std@@");
4047 DEFINE_RTTI_DATA(numpunct_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@D@std@@");
4048 DEFINE_RTTI_DATA(numpunct_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@_W@std@@");
4049 DEFINE_RTTI_DATA(numpunct_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@G@std@@");
4050 DEFINE_RTTI_DATA(num_get_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@");
4051 DEFINE_RTTI_DATA(num_get_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@");
4053 #ifndef __GNUC__
4054 void __asm_dummy_vtables(void) {
4055 #endif
4056 __ASM_VTABLE(collate_char,
4057 VTABLE_ADD_FUNC(collate_char_do_compare)
4058 VTABLE_ADD_FUNC(collate_char_do_transform)
4059 VTABLE_ADD_FUNC(collate_char_do_hash));
4060 __ASM_VTABLE(collate_wchar,
4061 VTABLE_ADD_FUNC(collate_wchar_do_compare)
4062 VTABLE_ADD_FUNC(collate_wchar_do_transform)
4063 VTABLE_ADD_FUNC(collate_wchar_do_hash));
4064 __ASM_VTABLE(collate_short,
4065 VTABLE_ADD_FUNC(collate_wchar_do_compare)
4066 VTABLE_ADD_FUNC(collate_wchar_do_transform)
4067 VTABLE_ADD_FUNC(collate_wchar_do_hash));
4068 __ASM_VTABLE(ctype_base, "");
4069 __ASM_VTABLE(ctype_char,
4070 VTABLE_ADD_FUNC(ctype_char_do_tolower)
4071 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch)
4072 VTABLE_ADD_FUNC(ctype_char_do_toupper)
4073 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch)
4074 VTABLE_ADD_FUNC(ctype_char_do_widen)
4075 VTABLE_ADD_FUNC(ctype_char_do_widen_ch)
4076 VTABLE_ADD_FUNC(ctype_char__Do_widen_s)
4077 VTABLE_ADD_FUNC(ctype_char_do_narrow)
4078 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch)
4079 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s));
4080 __ASM_VTABLE(ctype_wchar,
4081 VTABLE_ADD_FUNC(ctype_wchar_do_is)
4082 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
4083 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
4084 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
4085 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
4086 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
4087 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
4088 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
4089 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
4090 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
4091 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
4092 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
4093 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
4094 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
4095 __ASM_VTABLE(ctype_short,
4096 VTABLE_ADD_FUNC(ctype_wchar_do_is)
4097 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
4098 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
4099 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
4100 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
4101 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
4102 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
4103 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
4104 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
4105 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
4106 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
4107 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
4108 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
4109 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
4110 __ASM_VTABLE(numpunct_char,
4111 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point)
4112 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep)
4113 VTABLE_ADD_FUNC(numpunct_char_do_grouping)
4114 VTABLE_ADD_FUNC(numpunct_char_do_falsename)
4115 VTABLE_ADD_FUNC(numpunct_char_do_truename));
4116 __ASM_VTABLE(numpunct_wchar,
4117 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
4118 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
4119 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
4120 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
4121 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
4122 __ASM_VTABLE(numpunct_short,
4123 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
4124 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
4125 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
4126 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
4127 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
4128 __ASM_VTABLE(num_get_char,
4129 VTABLE_ADD_FUNC(num_get_char_do_get_void)
4130 VTABLE_ADD_FUNC(num_get_char_do_get_double)
4131 VTABLE_ADD_FUNC(num_get_char_do_get_double)
4132 VTABLE_ADD_FUNC(num_get_char_do_get_float)
4133 VTABLE_ADD_FUNC(num_get_char_do_get_uint64)
4134 VTABLE_ADD_FUNC(num_get_char_do_get_int64)
4135 VTABLE_ADD_FUNC(num_get_char_do_get_long)
4136 VTABLE_ADD_FUNC(num_get_char_do_get_ulong)
4137 VTABLE_ADD_FUNC(num_get_char_do_get_uint)
4138 VTABLE_ADD_FUNC(num_get_char_do_get_ushort)
4139 VTABLE_ADD_FUNC(num_get_char_do_get_bool));
4140 __ASM_VTABLE(num_get_wchar,
4141 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
4142 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4143 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4144 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
4145 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
4146 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
4147 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
4148 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
4149 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
4150 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
4151 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
4152 #ifndef __GNUC__
4154 #endif