1 /*
2 * Copyright 2010 Piotr Caban for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22
23 #include "msvcp90.h"
24 #include "locale.h"
25 #include "errno.h"
26 #include "limits.h"
27
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);
34
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);
40
41 typedef int category;
42
43 typedef struct {
44 MSVCP_size_t id;
45 } locale_id;
46
47 typedef struct {
48 const vtable_ptr *vtable;
49 MSVCP_size_t refs;
50 } locale_facet;
51
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;
60
61 typedef struct {
62 void *timeptr;
63 } _Timevec;
64
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;
72
73 typedef struct {
74 LCID handle;
75 unsigned page;
76 } _Collvec;
77
78 typedef struct {
79 LCID handle;
80 unsigned page;
81 const short *table;
82 int delfl;
83 } _Ctypevec;
84
85 typedef struct {
86 LCID handle;
87 unsigned page;
88 } _Cvtvec;
89
90 typedef struct {
91 locale_facet facet;
92 _Collvec coll;
93 } collate;
94
95 typedef struct {
96 locale_facet facet;
97 } ctype_base;
98
99 typedef struct {
100 ctype_base base;
101 _Ctypevec ctype;
102 } ctype_char;
103
104 typedef struct {
105 ctype_base base;
106 _Ctypevec ctype;
107 _Cvtvec cvt;
108 } ctype_wchar;
109
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;
118
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;
127
128 typedef struct {
129 locale_facet facet;
130 _Cvtvec cvt;
131 } num_get;
132
133 struct _ios_base;
134 typedef struct _istreambuf_iterator_char
135 {
136 struct _basic_streambuf_char *strbuf;
137 MSVCP_bool got;
138 char val;
139 } istreambuf_iterator_char;
140
141 typedef struct _istreambuf_iterator_wchar
142 {
143 struct _basic_streambuf_wchar *strbuf;
144 MSVCP_bool got;
145 wchar_t val;
146 } istreambuf_iterator_wchar;
147
148 /* ?_Id_cnt@id@locale@std@@0HA */
149 int locale_id__Id_cnt = 0;
150
151 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
152 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
153 locale__Locimp *locale__Locimp__Clocptr = NULL;
154
155 /* ??1facet@locale@std@@UAE@XZ */
156 /* ??1facet@locale@std@@UEAA@XZ */
157 DEFINE_THISCALL_WRAPPER(locale_facet_dtor, 4)
158 void __thiscall locale_facet_dtor(locale_facet *this)
159 {
160 TRACE("(%p)\n", this);
161 }
162
163 DEFINE_THISCALL_WRAPPER(MSVCP_locale_facet_vector_dtor, 8)
164 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
165 locale_facet*, (locale_facet*, unsigned int), (this, flags))
166 locale_facet* __thiscall MSVCP_locale_facet_vector_dtor(locale_facet *this, unsigned int flags)
167 {
168 TRACE("(%p %x)\n", this, flags);
169 if(flags & 2) {
170 /* we have an array, with the number of elements stored before the first object */
171 int i, *ptr = (int *)this-1;
172
173 for(i=*ptr-1; i>=0; i--)
174 locale_facet_dtor(this+i);
175 MSVCRT_operator_delete(ptr);
176 } else {
177 locale_facet_dtor(this);
178 if(flags & 1)
179 MSVCRT_operator_delete(this);
180 }
181
182 return this;
183 }
184
185 extern const vtable_ptr MSVCP_locale_facet_vtable;
186
187 /* ??0id@locale@std@@QAE@I@Z */
188 /* ??0id@locale@std@@QEAA@_K@Z */
189 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id, 8)
190 locale_id* __thiscall locale_id_ctor_id(locale_id *this, MSVCP_size_t id)
191 {
192 TRACE("(%p %lu)\n", this, id);
193
194 this->id = id;
195 return this;
196 }
197
198 /* ??_Fid@locale@std@@QAEXXZ */
199 /* ??_Fid@locale@std@@QEAAXXZ */
200 DEFINE_THISCALL_WRAPPER(locale_id_ctor, 4)
201 locale_id* __thiscall locale_id_ctor(locale_id *this)
202 {
203 TRACE("(%p)\n", this);
204
205 this->id = 0;
206 return this;
207 }
208
209 /* ??Bid@locale@std@@QAEIXZ */
210 /* ??Bid@locale@std@@QEAA_KXZ */
211 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t, 4)
212 MSVCP_size_t __thiscall locale_id_operator_size_t(locale_id *this)
213 {
214 _Lockit lock;
215
216 TRACE("(%p)\n", this);
217
218 if(!this->id) {
219 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
220 this->id = ++locale_id__Id_cnt;
221 _Lockit_dtor(&lock);
222 }
223
224 return this->id;
225 }
226
227 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
228 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
229 int* __cdecl locale_id__Id_cnt_func(void)
230 {
231 TRACE("\n");
232 return &locale_id__Id_cnt;
233 }
234
235 /* ??_Ffacet@locale@std@@QAEXXZ */
236 /* ??_Ffacet@locale@std@@QEAAXXZ */
237 DEFINE_THISCALL_WRAPPER(locale_facet_ctor, 4)
238 locale_facet* __thiscall locale_facet_ctor(locale_facet *this)
239 {
240 TRACE("(%p)\n", this);
241 this->vtable = &MSVCP_locale_facet_vtable;
242 this->refs = 0;
243 return this;
244 }
245
246 /* ??0facet@locale@std@@IAE@I@Z */
247 /* ??0facet@locale@std@@IEAA@_K@Z */
248 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs, 8)
249 locale_facet* __thiscall locale_facet_ctor_refs(locale_facet *this, MSVCP_size_t refs)
250 {
251 TRACE("(%p %lu)\n", this, refs);
252 this->vtable = &MSVCP_locale_facet_vtable;
253 this->refs = refs;
254 return this;
255 }
256
257 /* ?_Incref@facet@locale@std@@QAEXXZ */
258 /* ?_Incref@facet@locale@std@@QEAAXXZ */
259 DEFINE_THISCALL_WRAPPER(locale_facet__Incref, 4)
260 void __thiscall locale_facet__Incref(locale_facet *this)
261 {
262 _Lockit lock;
263
264 TRACE("(%p)\n", this);
265
266 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
267 this->refs++;
268 _Lockit_dtor(&lock);
269 }
270
271 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
272 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
273 DEFINE_THISCALL_WRAPPER(locale_facet__Decref, 4)
274 locale_facet* __thiscall locale_facet__Decref(locale_facet *this)
275 {
276 _Lockit lock;
277 locale_facet *ret;
278
279 TRACE("(%p)\n", this);
280
281 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
282 if(this->refs)
283 this->refs--;
284
285 ret = this->refs ? NULL : this;
286 _Lockit_dtor(&lock);
287
288 return ret;
289 }
290
291 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
292 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
293 MSVCP_size_t __cdecl locale_facet__Getcat(const locale_facet **facet, const locale *loc)
294 {
295 TRACE("(%p %p)\n", facet, loc);
296 return -1;
297 }
298
299 /* ??0_Timevec@std@@QAE@ABV01@@Z */
300 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
301 /* This copy constructor modifies copied object */
302 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor, 8)
303 _Timevec* __thiscall _Timevec_copy_ctor(_Timevec *this, _Timevec *copy)
304 {
305 TRACE("(%p %p)\n", this, copy);
306 this->timeptr = copy->timeptr;
307 copy->timeptr = NULL;
308 return this;
309 }
310
311 /* ??0_Timevec@std@@QAE@PAX@Z */
312 /* ??0_Timevec@std@@QEAA@PEAX@Z */
313 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr, 8)
314 _Timevec* __thiscall _Timevec_ctor_timeptr(_Timevec *this, void *timeptr)
315 {
316 TRACE("(%p %p)\n", this, timeptr);
317 this->timeptr = timeptr;
318 return this;
319 }
320
321 /* ??_F_Timevec@std@@QAEXXZ */
322 /* ??_F_Timevec@std@@QEAAXXZ */
323 DEFINE_THISCALL_WRAPPER(_Timevec_ctor, 4)
324 _Timevec* __thiscall _Timevec_ctor(_Timevec *this)
325 {
326 TRACE("(%p)\n", this);
327 this->timeptr = NULL;
328 return this;
329 }
330
331 /* ??1_Timevec@std@@QAE@XZ */
332 /* ??1_Timevec@std@@QEAA@XZ */
333 DEFINE_THISCALL_WRAPPER(_Timevec_dtor, 4)
334 void __thiscall _Timevec_dtor(_Timevec *this)
335 {
336 TRACE("(%p)\n", this);
337 free(this->timeptr);
338 }
339
340 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
341 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
342 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign, 8)
343 _Timevec* __thiscall _Timevec_op_assign(_Timevec *this, _Timevec *right)
344 {
345 TRACE("(%p %p)\n", this, right);
346 this->timeptr = right->timeptr;
347 right->timeptr = NULL;
348 return this;
349 }
350
351 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
352 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
353 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr, 4)
354 void* __thiscall _Timevec__Getptr(_Timevec *this)
355 {
356 TRACE("(%p)\n", this);
357 return this->timeptr;
358 }
359
360 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
361 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
362 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo *locinfo, int category, const char *locstr)
363 {
364 const char *locale = NULL;
365
366 /* This function is probably modifying more global objects */
367 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
368
369 if(!locstr)
370 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
371
372 _Lockit_ctor_locktype(&locinfo->lock, _LOCK_LOCALE);
373 MSVCP_basic_string_char_ctor_cstr(&locinfo->days, "");
374 MSVCP_basic_string_char_ctor_cstr(&locinfo->months, "");
375 MSVCP_basic_string_char_ctor_cstr(&locinfo->oldlocname, setlocale(LC_ALL, NULL));
376
377 if(category)
378 locale = setlocale(LC_ALL, locstr);
379 else
380 locale = setlocale(LC_ALL, NULL);
381
382 if(locale)
383 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
384 else
385 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
386
387 return locinfo;
388 }
389
390 /* ??0_Locinfo@std@@QAE@HPBD@Z */
391 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
392 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr, 12)
393 _Locinfo* __thiscall _Locinfo_ctor_cat_cstr(_Locinfo *this, int category, const char *locstr)
394 {
395 return _Locinfo__Locinfo_ctor_cat_cstr(this, category, locstr);
396 }
397
398 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
399 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
400 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_bstr(_Locinfo *locinfo, const basic_string_char *locstr)
401 {
402 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
403 }
404
405 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
406 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
407 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr, 8)
408 _Locinfo* __thiscall _Locinfo_ctor_bstr(_Locinfo *this, const basic_string_char *locstr)
409 {
410 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr));
411 }
412
413 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
414 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
415 _Locinfo* __cdecl _Locinfo__Locinfo_ctor_cstr(_Locinfo *locinfo, const char *locstr)
416 {
417 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo, 1/*FIXME*/, locstr);
418 }
419
420 /* ??0_Locinfo@std@@QAE@PBD@Z */
421 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
422 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr, 8)
423 _Locinfo* __thiscall _Locinfo_ctor_cstr(_Locinfo *this, const char *locstr)
424 {
425 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr);
426 }
427
428 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
429 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
430 void __cdecl _Locinfo__Locinfo_dtor(_Locinfo *locinfo)
431 {
432 TRACE("(%p)\n", locinfo);
433
434 setlocale(LC_ALL, MSVCP_basic_string_char_c_str(&locinfo->oldlocname));
435 MSVCP_basic_string_char_dtor(&locinfo->days);
436 MSVCP_basic_string_char_dtor(&locinfo->months);
437 MSVCP_basic_string_char_dtor(&locinfo->oldlocname);
438 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
439 _Lockit_dtor(&locinfo->lock);
440 }
441
442 /* ??_F_Locinfo@std@@QAEXXZ */
443 /* ??_F_Locinfo@std@@QEAAXXZ */
444 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor, 4)
445 _Locinfo* __thiscall _Locinfo_ctor(_Locinfo *this)
446 {
447 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
448 }
449
450 /* ??1_Locinfo@std@@QAE@XZ */
451 /* ??1_Locinfo@std@@QEAA@XZ */
452 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor, 4)
453 void __thiscall _Locinfo_dtor(_Locinfo *this)
454 {
455 _Locinfo__Locinfo_dtor(this);
456 }
457
458 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
459 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
460 _Locinfo* __cdecl _Locinfo__Locinfo_Addcats(_Locinfo *locinfo, int category, const char *locstr)
461 {
462 const char *locale = NULL;
463
464 /* This function is probably modifying more global objects */
465 FIXME("(%p %d %s) semi-stub\n", locinfo, category, locstr);
466 if(!locstr)
467 throw_exception(EXCEPTION_RUNTIME_ERROR, "bad locale name");
468
469 MSVCP_basic_string_char_dtor(&locinfo->newlocname);
470
471 if(category)
472 locale = setlocale(LC_ALL, locstr);
473 else
474 locale = setlocale(LC_ALL, NULL);
475
476 if(locale)
477 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, locale);
478 else
479 MSVCP_basic_string_char_ctor_cstr(&locinfo->newlocname, "*");
480
481 return locinfo;
482 }
483
484 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
485 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
486 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats, 12)
487 _Locinfo* __thiscall _Locinfo__Addcats(_Locinfo *this, int category, const char *locstr)
488 {
489 return _Locinfo__Locinfo_Addcats(this, category, locstr);
490 }
491
492 /* _Getcoll */
493 _Collvec __cdecl _Getcoll(void)
494 {
495 _Collvec ret;
496 _locale_t locale = _get_current_locale();
497
498 TRACE("\n");
499
500 ret.page = locale->locinfo->lc_collate_cp;
501 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
502 _free_locale(locale);
503 return ret;
504 }
505
506 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
507 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
508 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll, 8)
509 _Collvec* __thiscall _Locinfo__Getcoll(const _Locinfo *this, _Collvec *ret)
510 {
511 *ret = _Getcoll();
512 return ret;
513 }
514
515 /* _Getctype */
516 _Ctypevec __cdecl _Getctype(void)
517 {
518 _Ctypevec ret;
519 _locale_t locale = _get_current_locale();
520 short *table;
521
522 TRACE("\n");
523
524 ret.page = locale->locinfo->lc_codepage;
525 ret.handle = locale->locinfo->lc_handle[LC_COLLATE];
526 ret.delfl = TRUE;
527 table = malloc(sizeof(short[256]));
528 if(!table) {
529 _free_locale(locale);
530 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
531 }
532 memcpy(table, locale->locinfo->pctype, sizeof(short[256]));
533 ret.table = table;
534 _free_locale(locale);
535 return ret;
536 }
537
538 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
539 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
540 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype, 8)
541 _Ctypevec* __thiscall _Locinfo__Getctype(const _Locinfo *this, _Ctypevec *ret)
542 {
543 *ret = _Getctype();
544 return ret;
545 }
546
547 /* _Getcvt */
548 _Cvtvec __cdecl _Getcvt(void)
549 {
550 _Cvtvec ret;
551 _locale_t locale = _get_current_locale();
552
553 TRACE("\n");
554
555 ret.page = locale->locinfo->lc_codepage;
556 ret.handle = locale->locinfo->lc_handle[LC_CTYPE];
557 _free_locale(locale);
558 return ret;
559 }
560
561 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
562 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
563 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt, 8)
564 _Cvtvec* __thiscall _Locinfo__Getcvt(const _Locinfo *this, _Cvtvec *ret)
565 {
566 *ret = _Getcvt();
567 return ret;
568 }
569
570 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
571 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
572 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder, 4)
573 int __thiscall _Locinfo__Getdateorder(const _Locinfo *this)
574 {
575 FIXME("(%p) stub\n", this);
576 return 0;
577 }
578
579 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
580 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
581 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays, 4)
582 const char* __thiscall _Locinfo__Getdays(_Locinfo *this)
583 {
584 char *days = _Getdays();
585
586 TRACE("(%p)\n", this);
587
588 if(days) {
589 MSVCP_basic_string_char_dtor(&this->days);
590 MSVCP_basic_string_char_ctor_cstr(&this->days, days);
591 free(days);
592 }
593
594 return this->days.size ? MSVCP_basic_string_char_c_str(&this->days) :
595 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
596 }
597
598 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
599 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
600 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths, 4)
601 const char* __thiscall _Locinfo__Getmonths(_Locinfo *this)
602 {
603 char *months = _Getmonths();
604
605 TRACE("(%p)\n", this);
606
607 if(months) {
608 MSVCP_basic_string_char_dtor(&this->months);
609 MSVCP_basic_string_char_ctor_cstr(&this->months, months);
610 free(months);
611 }
612
613 return this->months.size ? MSVCP_basic_string_char_c_str(&this->months) :
614 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
615 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
616 }
617
618 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
619 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
620 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse, 4)
621 const char* __thiscall _Locinfo__Getfalse(const _Locinfo *this)
622 {
623 TRACE("(%p)\n", this);
624 return "false";
625 }
626
627 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
628 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
629 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue, 4)
630 const char* __thiscall _Locinfo__Gettrue(const _Locinfo *this)
631 {
632 TRACE("(%p)\n", this);
633 return "true";
634 }
635
636 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
637 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
638 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv, 4)
639 const struct lconv* __thiscall _Locinfo__Getlconv(const _Locinfo *this)
640 {
641 TRACE("(%p)\n", this);
642 return localeconv();
643 }
644
645 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
646 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
647 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname, 8)
648 basic_string_char* __thiscall _Locinfo__Getname(const _Locinfo *this, basic_string_char *ret)
649 {
650 TRACE("(%p)\n", this);
651
652 MSVCP_basic_string_char_copy_ctor(ret, &this->newlocname);
653 return ret;
654 }
655
656 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
657 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
658 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames, 8)
659 _Timevec*__thiscall _Locinfo__Gettnames(const _Locinfo *this, _Timevec *ret)
660 {
661 TRACE("(%p)\n", this);
662
663 _Timevec_ctor_timeptr(ret, _Gettnames());
664 return ret;
665 }
666
667 /* ?id@?$collate@D@std@@2V0locale@2@A */
668 locale_id collate_char_id = {0};
669
670 /* ??_7?$collate@D@std@@6B@ */
671 extern const vtable_ptr MSVCP_collate_char_vtable;
672
673 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
674 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
675 DEFINE_THISCALL_WRAPPER(collate_char__Init, 8)
676 void __thiscall collate_char__Init(collate *this, const _Locinfo *locinfo)
677 {
678 TRACE("(%p %p)\n", this, locinfo);
679 _Locinfo__Getcoll(locinfo, &this->coll);
680 }
681
682 /* ??0?$collate@D@std@@IAE@PBDI@Z */
683 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
684 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name, 12)
685 collate* __thiscall collate_char_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
686 {
687 _Locinfo locinfo;
688
689 TRACE("(%p %s %lu)\n", this, name, refs);
690
691 locale_facet_ctor_refs(&this->facet, refs);
692 this->facet.vtable = &MSVCP_collate_char_vtable;
693
694 _Locinfo_ctor_cstr(&locinfo, name);
695 collate_char__Init(this, &locinfo);
696 _Locinfo_dtor(&locinfo);
697 return this;
698 }
699
700 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
701 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
702 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo, 12)
703 collate* __thiscall collate_char_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
704 {
705 TRACE("(%p %p %lu)\n", this, locinfo, refs);
706
707 locale_facet_ctor_refs(&this->facet, refs);
708 this->facet.vtable = &MSVCP_collate_char_vtable;
709 collate_char__Init(this, locinfo);
710 return this;
711 }
712
713 /* ??0?$collate@D@std@@QAE@I@Z */
714 /* ??0?$collate@D@std@@QEAA@_K@Z */
715 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs, 8)
716 collate* __thiscall collate_char_ctor_refs(collate *this, MSVCP_size_t refs)
717 {
718 return collate_char_ctor_name(this, "C", refs);
719 }
720
721 /* ??1?$collate@D@std@@MAE@XZ */
722 /* ??1?$collate@D@std@@MEAA@XZ */
723 DEFINE_THISCALL_WRAPPER(collate_char_dtor, 4)
724 void __thiscall collate_char_dtor(collate *this)
725 {
726 TRACE("(%p)\n", this);
727 }
728
729 DEFINE_THISCALL_WRAPPER(MSVCP_collate_char_vector_dtor, 8)
730 collate* __thiscall MSVCP_collate_char_vector_dtor(collate *this, unsigned int flags)
731 {
732 TRACE("(%p %x)\n", this, flags);
733 if(flags & 2) {
734 /* we have an array, with the number of elements stored before the first object */
735 int i, *ptr = (int *)this-1;
736
737 for(i=*ptr-1; i>=0; i--)
738 collate_char_dtor(this+i);
739 MSVCRT_operator_delete(ptr);
740 } else {
741 collate_char_dtor(this);
742 if(flags & 1)
743 MSVCRT_operator_delete(this);
744 }
745
746 return this;
747 }
748
749 /* ??_F?$collate@D@std@@QAEXXZ */
750 /* ??_F?$collate@D@std@@QEAAXXZ */
751 DEFINE_THISCALL_WRAPPER(collate_char_ctor, 4)
752 collate* __thiscall collate_char_ctor(collate *this)
753 {
754 return collate_char_ctor_name(this, "C", 0);
755 }
756
757 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
758 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
759 MSVCP_size_t __cdecl collate_char__Getcat(const locale_facet **facet, const locale *loc)
760 {
761 TRACE("(%p %p)\n", facet, loc);
762
763 if(facet && !*facet) {
764 *facet = MSVCRT_operator_new(sizeof(collate));
765 if(!*facet) {
766 ERR("Out of memory\n");
767 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
768 return 0;
769 }
770 collate_char_ctor_name((collate*)*facet,
771 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
772 }
773
774 return LC_COLLATE;
775 }
776
777 /* _Strcoll */
778 int __cdecl _Strcoll(const char *first1, const char *last1, const char *first2,
779 const char *last2, const _Collvec *coll)
780 {
781 LCID lcid;
782
783 TRACE("(%s %s)\n", debugstr_an(first1, last1-first1), debugstr_an(first2, last2-first2));
784
785 if(coll)
786 lcid = coll->handle;
787 else
788 lcid = ___lc_handle_func()[LC_COLLATE];
789 return CompareStringA(lcid, 0, first1, last1-first1, first2, last2-first2)-2;
790 }
791
792 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
793 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
794 DEFINE_THISCALL_WRAPPER(collate_char_do_compare, 20)
795 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
796 (const collate*, const char*, const char*, const char*, const char*), \
797 (this, first1, last1, first2, last2))
798 int __thiscall collate_char_do_compare(const collate *this, const char *first1,
799 const char *last1, const char *first2, const char *last2)
800 {
801 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
802 return _Strcoll(first1, last1, first2, last2, &this->coll);
803 }
804
805 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
806 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
807 DEFINE_THISCALL_WRAPPER(collate_char_compare, 20)
808 int __thiscall collate_char_compare(const collate *this, const char *first1,
809 const char *last1, const char *first2, const char *last2)
810 {
811 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
812 return call_collate_char_do_compare(this, first1, last1, first2, last2);
813 }
814
815 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
816 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
817 DEFINE_THISCALL_WRAPPER(collate_char_do_hash, 12)
818 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
819 (const collate*, const char*, const char*), (this, first, last))
820 LONG __thiscall collate_char_do_hash(const collate *this,
821 const char *first, const char *last)
822 {
823 ULONG ret = 0;
824
825 TRACE("(%p %p %p)\n", this, first, last);
826
827 for(; first<last; first++)
828 ret = (ret<<8 | ret>>24) + *first;
829 return ret;
830 }
831
832 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
833 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
834 DEFINE_THISCALL_WRAPPER(collate_char_hash, 12)
835 LONG __thiscall collate_char_hash(const collate *this,
836 const char *first, const char *last)
837 {
838 TRACE("(%p %p %p)\n", this, first, last);
839 return call_collate_char_do_hash(this, first, last);
840 }
841
842 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
843 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
844 DEFINE_THISCALL_WRAPPER(collate_char_do_transform, 16)
845 basic_string_char* __thiscall collate_char_do_transform(const collate *this,
846 basic_string_char *ret, const char *first, const char *last)
847 {
848 FIXME("(%p %p %p) stub\n", this, first, last);
849 return ret;
850 }
851
852 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
853 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
854 DEFINE_THISCALL_WRAPPER(collate_char_transform, 16)
855 basic_string_char* __thiscall collate_char_transform(const collate *this,
856 basic_string_char *ret, const char *first, const char *last)
857 {
858 FIXME("(%p %p %p) stub\n", this, first, last);
859 return ret;
860 }
861
862 /* ?id@?$collate@_W@std@@2V0locale@2@A */
863 locale_id collate_wchar_id = {0};
864 /* ?id@?$collate@G@std@@2V0locale@2@A */
865 locale_id collate_short_id = {0};
866
867 /* ??_7?$collate@_W@std@@6B@ */
868 extern const vtable_ptr MSVCP_collate_wchar_vtable;
869 /* ??_7?$collate@G@std@@6B@ */
870 extern const vtable_ptr MSVCP_collate_short_vtable;
871
872 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
873 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
874 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
875 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
876 DEFINE_THISCALL_WRAPPER(collate_wchar__Init, 8)
877 void __thiscall collate_wchar__Init(collate *this, const _Locinfo *locinfo)
878 {
879 TRACE("(%p %p)\n", this, locinfo);
880 _Locinfo__Getcoll(locinfo, &this->coll);
881 }
882
883 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
884 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
885 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name, 12)
886 collate* __thiscall collate_wchar_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
887 {
888 _Locinfo locinfo;
889
890 TRACE("(%p %s %lu)\n", this, name, refs);
891
892 locale_facet_ctor_refs(&this->facet, refs);
893 this->facet.vtable = &MSVCP_collate_wchar_vtable;
894
895 _Locinfo_ctor_cstr(&locinfo, name);
896 collate_wchar__Init(this, &locinfo);
897 _Locinfo_dtor(&locinfo);
898 return this;
899 }
900
901 /* ??0?$collate@G@std@@IAE@PBDI@Z */
902 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
903 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name, 12)
904 collate* __thiscall collate_short_ctor_name(collate *this, const char *name, MSVCP_size_t refs)
905 {
906 collate *ret = collate_wchar_ctor_name(this, name, refs);
907 ret->facet.vtable = &MSVCP_collate_short_vtable;
908 return ret;
909 }
910
911 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
912 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
913 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo, 12)
914 collate* __thiscall collate_wchar_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
915 {
916 TRACE("(%p %p %lu)\n", this, locinfo, refs);
917
918 locale_facet_ctor_refs(&this->facet, refs);
919 this->facet.vtable = &MSVCP_collate_wchar_vtable;
920 collate_wchar__Init(this, locinfo);
921 return this;
922 }
923
924 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
925 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
926 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo, 12)
927 collate* __thiscall collate_short_ctor_locinfo(collate *this, _Locinfo *locinfo, MSVCP_size_t refs)
928 {
929 collate *ret = collate_wchar_ctor_locinfo(this, locinfo, refs);
930 ret->facet.vtable = &MSVCP_collate_short_vtable;
931 return ret;
932 }
933
934 /* ??0?$collate@_W@std@@QAE@I@Z */
935 /* ??0?$collate@_W@std@@QEAA@_K@Z */
936 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs, 8)
937 collate* __thiscall collate_wchar_ctor_refs(collate *this, MSVCP_size_t refs)
938 {
939 return collate_wchar_ctor_name(this, "C", refs);
940 }
941
942 /* ??0?$collate@G@std@@QAE@I@Z */
943 /* ??0?$collate@G@std@@QEAA@_K@Z */
944 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs, 8)
945 collate* __thiscall collate_short_ctor_refs(collate *this, MSVCP_size_t refs)
946 {
947 collate *ret = collate_wchar_ctor_refs(this, refs);
948 ret->facet.vtable = &MSVCP_collate_short_vtable;
949 return ret;
950 }
951
952 /* ??1?$collate@_W@std@@MAE@XZ */
953 /* ??1?$collate@_W@std@@MEAA@XZ */
954 /* ??1?$collate@G@std@@MAE@XZ */
955 /* ??1?$collate@G@std@@MEAA@XZ */
956 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor, 4)
957 void __thiscall collate_wchar_dtor(collate *this)
958 {
959 TRACE("(%p)\n", this);
960 }
961
962 DEFINE_THISCALL_WRAPPER(MSVCP_collate_wchar_vector_dtor, 8)
963 collate* __thiscall MSVCP_collate_wchar_vector_dtor(collate *this, unsigned int flags)
964 {
965 TRACE("(%p %x)\n", this, flags);
966 if(flags & 2) {
967 /* we have an array, with the number of elements stored before the first object */
968 int i, *ptr = (int *)this-1;
969
970 for(i=*ptr-1; i>=0; i--)
971 collate_wchar_dtor(this+i);
972 MSVCRT_operator_delete(ptr);
973 } else {
974 collate_wchar_dtor(this);
975 if(flags & 1)
976 MSVCRT_operator_delete(this);
977 }
978
979 return this;
980 }
981
982 DEFINE_THISCALL_WRAPPER(MSVCP_collate_short_vector_dtor, 8)
983 collate* __thiscall MSVCP_collate_short_vector_dtor(collate *this, unsigned int flags)
984 {
985 return MSVCP_collate_wchar_vector_dtor(this, flags);
986 }
987
988 /* ??_F?$collate@_W@std@@QAEXXZ */
989 /* ??_F?$collate@_W@std@@QEAAXXZ */
990 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor, 4)
991 collate* __thiscall collate_wchar_ctor(collate *this)
992 {
993 return collate_wchar_ctor_name(this, "C", 0);
994 }
995
996 /* ??_F?$collate@G@std@@QAEXXZ */
997 /* ??_F?$collate@G@std@@QEAAXXZ */
998 DEFINE_THISCALL_WRAPPER(collate_short_ctor, 4)
999 collate* __thiscall collate_short_ctor(collate *this)
1000 {
1001 collate *ret = collate_wchar_ctor(this);
1002 ret->facet.vtable = &MSVCP_collate_short_vtable;
1003 return ret;
1004 }
1005
1006 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1007 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1008 MSVCP_size_t __cdecl collate_wchar__Getcat(const locale_facet **facet, const locale *loc)
1009 {
1010 TRACE("(%p %p)\n", facet, loc);
1011
1012 if(facet && !*facet) {
1013 *facet = MSVCRT_operator_new(sizeof(collate));
1014 if(!*facet) {
1015 ERR("Out of memory\n");
1016 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1017 return 0;
1018 }
1019 collate_wchar_ctor_name((collate*)*facet,
1020 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0);
1021 }
1022
1023 return LC_COLLATE;
1024 }
1025
1026 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1027 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1028 MSVCP_size_t __cdecl collate_short__Getcat(const locale_facet **facet, const locale *loc)
1029 {
1030 if(facet && !*facet) {
1031 collate_wchar__Getcat(facet, loc);
1032 (*(locale_facet**)facet)->vtable = &MSVCP_collate_short_vtable;
1033 }
1034
1035 return LC_COLLATE;
1036 }
1037
1038 /* _Wcscoll */
1039 int __cdecl _Wcscoll(const wchar_t *first1, const wchar_t *last1, const wchar_t *first2,
1040 const wchar_t *last2, const _Collvec *coll)
1041 {
1042 LCID lcid;
1043
1044 TRACE("(%s %s)\n", debugstr_wn(first1, last1-first1), debugstr_wn(first2, last2-first2));
1045
1046 if(coll)
1047 lcid = coll->handle;
1048 else
1049 lcid = ___lc_handle_func()[LC_COLLATE];
1050 return CompareStringW(lcid, 0, first1, last1-first1, first2, last2-first2)-2;
1051 }
1052
1053 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1054 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1055 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1056 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1057 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare, 20)
1058 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1059 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1060 (this, first1, last1, first2, last2))
1061 int __thiscall collate_wchar_do_compare(const collate *this, const wchar_t *first1,
1062 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1063 {
1064 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1065 return _Wcscoll(first1, last1, first2, last2, &this->coll);
1066 }
1067
1068 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1069 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1070 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1071 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1072 DEFINE_THISCALL_WRAPPER(collate_wchar_compare, 20)
1073 int __thiscall collate_wchar_compare(const collate *this, const wchar_t *first1,
1074 const wchar_t *last1, const wchar_t *first2, const wchar_t *last2)
1075 {
1076 TRACE("(%p %p %p %p %p)\n", this, first1, last1, first2, last2);
1077 return call_collate_wchar_do_compare(this, first1, last1, first2, last2);
1078 }
1079
1080 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1081 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1082 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1083 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1084 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash, 12)
1085 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1086 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1087 LONG __thiscall collate_wchar_do_hash(const collate *this,
1088 const wchar_t *first, const wchar_t *last)
1089 {
1090 ULONG ret = 0;
1091
1092 TRACE("(%p %p %p)\n", this, first, last);
1093
1094 for(; first<last; first++)
1095 ret = (ret<<8 | ret>>24) + *first;
1096 return ret;
1097 }
1098
1099 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1100 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1101 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1102 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1103 DEFINE_THISCALL_WRAPPER(collate_wchar_hash, 12)
1104 LONG __thiscall collate_wchar_hash(const collate *this,
1105 const wchar_t *first, const wchar_t *last)
1106 {
1107 TRACE("(%p %p %p)\n", this, first, last);
1108 return call_collate_wchar_do_hash(this, first, last);
1109 }
1110
1111 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1112 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1113 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1114 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1115 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform, 16)
1116 basic_string_wchar* __thiscall collate_wchar_do_transform(const collate *this,
1117 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1118 {
1119 FIXME("(%p %p %p) stub\n", this, first, last);
1120 return ret;
1121 }
1122
1123 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1124 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1125 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1126 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1127 DEFINE_THISCALL_WRAPPER(collate_wchar_transform, 16)
1128 basic_string_wchar* __thiscall collate_wchar_transform(const collate *this,
1129 basic_string_wchar *ret, const wchar_t *first, const wchar_t *last)
1130 {
1131 FIXME("(%p %p %p) stub\n", this, first, last);
1132 return ret;
1133 }
1134
1135 /* ??_7ctype_base@std@@6B@ */
1136 extern const vtable_ptr MSVCP_ctype_base_vtable;
1137
1138 /* ??0ctype_base@std@@QAE@I@Z */
1139 /* ??0ctype_base@std@@QEAA@_K@Z */
1140 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs, 8)
1141 ctype_base* __thiscall ctype_base_ctor_refs(ctype_base *this, MSVCP_size_t refs)
1142 {
1143 TRACE("(%p %lu)\n", this, refs);
1144 locale_facet_ctor_refs(&this->facet, refs);
1145 this->facet.vtable = &MSVCP_ctype_base_vtable;
1146 return this;
1147 }
1148
1149 /* ??_Fctype_base@std@@QAEXXZ */
1150 /* ??_Fctype_base@std@@QEAAXXZ */
1151 DEFINE_THISCALL_WRAPPER(ctype_base_ctor, 4)
1152 ctype_base* __thiscall ctype_base_ctor(ctype_base *this)
1153 {
1154 TRACE("(%p)\n", this);
1155 locale_facet_ctor_refs(&this->facet, 0);
1156 this->facet.vtable = &MSVCP_ctype_base_vtable;
1157 return this;
1158 }
1159
1160 /* ??1ctype_base@std@@UAE@XZ */
1161 /* ??1ctype_base@std@@UEAA@XZ */
1162 DEFINE_THISCALL_WRAPPER(ctype_base_dtor, 4)
1163 void __thiscall ctype_base_dtor(ctype_base *this)
1164 {
1165 TRACE("(%p)\n", this);
1166 }
1167
1168 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_base_vector_dtor, 8)
1169 ctype_base* __thiscall MSVCP_ctype_base_vector_dtor(ctype_base *this, unsigned int flags)
1170 {
1171 TRACE("(%p %x)\n", this, flags);
1172 if(flags & 2) {
1173 /* we have an array, with the number of elements stored before the first object */
1174 int i, *ptr = (int *)this-1;
1175
1176 for(i=*ptr-1; i>=0; i--)
1177 ctype_base_dtor(this+i);
1178 MSVCRT_operator_delete(ptr);
1179 } else {
1180 ctype_base_dtor(this);
1181 if(flags & 1)
1182 MSVCRT_operator_delete(this);
1183 }
1184
1185 return this;
1186 }
1187
1188 /* ?_Xran@ctype_base@std@@KAXXZ */
1189 void __cdecl ctype_base__Xran(void)
1190 {
1191 throw_exception(EXCEPTION_OUT_OF_RANGE, "out of range in ctype<T>");
1192 }
1193
1194 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1195 locale_id ctype_char_id = {0};
1196 /* ?table_size@?$ctype@D@std@@2IB */
1197 /* ?table_size@?$ctype@D@std@@2_KB */
1198 MSVCP_size_t ctype_char_table_size = 256;
1199
1200 /* ??_7?$ctype@D@std@@6B@ */
1201 extern const vtable_ptr MSVCP_ctype_char_vtable;
1202
1203 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1204 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1205 locale_id* __cdecl ctype_char__Id_func(void)
1206 {
1207 TRACE("()\n");
1208 return &ctype_char_id;
1209 }
1210
1211 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1212 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1213 DEFINE_THISCALL_WRAPPER(ctype_char__Init, 8)
1214 void __thiscall ctype_char__Init(ctype_char *this, _Locinfo *locinfo)
1215 {
1216 TRACE("(%p %p)\n", this, locinfo);
1217 _Locinfo__Getctype(locinfo, &this->ctype);
1218 }
1219
1220 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1221 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1222 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy, 4)
1223 void __thiscall ctype_char__Tidy(ctype_char *this)
1224 {
1225 TRACE("(%p)\n", this);
1226
1227 if(this->ctype.delfl)
1228 free((short*)this->ctype.table);
1229 }
1230
1231 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1232 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1233 const short* __cdecl ctype_char_classic_table(void)
1234 {
1235 TRACE("()\n");
1236 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1237 }
1238
1239 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1240 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1241 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo, 12)
1242 ctype_char* __thiscall ctype_char_ctor_locinfo(ctype_char *this,
1243 _Locinfo *locinfo, MSVCP_size_t refs)
1244 {
1245 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1246 ctype_base_ctor_refs(&this->base, refs);
1247 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1248 ctype_char__Init(this, locinfo);
1249 return this;
1250 }
1251
1252 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1253 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1254 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table, 16)
1255 ctype_char* __thiscall ctype_char_ctor_table(ctype_char *this,
1256 const short *table, MSVCP_bool delete, MSVCP_size_t refs)
1257 {
1258 _Locinfo locinfo;
1259
1260 TRACE("(%p %p %d %lu)\n", this, table, delete, refs);
1261
1262 ctype_base_ctor_refs(&this->base, refs);
1263 this->base.facet.vtable = &MSVCP_ctype_char_vtable;
1264
1265 _Locinfo_ctor(&locinfo);
1266 ctype_char__Init(this, &locinfo);
1267 _Locinfo_dtor(&locinfo);
1268
1269 if(table) {
1270 ctype_char__Tidy(this);
1271 this->ctype.table = table;
1272 this->ctype.delfl = delete;
1273 }
1274 return this;
1275 }
1276
1277 /* ??_F?$ctype@D@std@@QAEXXZ */
1278 /* ??_F?$ctype@D@std@@QEAAXXZ */
1279 DEFINE_THISCALL_WRAPPER(ctype_char_ctor, 4)
1280 ctype_char* __thiscall ctype_char_ctor(ctype_char *this)
1281 {
1282 return ctype_char_ctor_table(this, NULL, FALSE, 0);
1283 }
1284
1285 /* ??1?$ctype@D@std@@MAE@XZ */
1286 /* ??1?$ctype@D@std@@MEAA@XZ */
1287 DEFINE_THISCALL_WRAPPER(ctype_char_dtor, 4)
1288 void __thiscall ctype_char_dtor(ctype_char *this)
1289 {
1290 TRACE("(%p)\n", this);
1291 ctype_char__Tidy(this);
1292 }
1293
1294 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_char_vector_dtor, 8)
1295 ctype_char* __thiscall MSVCP_ctype_char_vector_dtor(ctype_char *this, unsigned int flags)
1296 {
1297 TRACE("(%p %x)\n", this, flags);
1298 if(flags & 2) {
1299 /* we have an array, with the number of elements stored before the first object */
1300 int i, *ptr = (int *)this-1;
1301
1302 for(i=*ptr-1; i>=0; i--)
1303 ctype_char_dtor(this+i);
1304 MSVCRT_operator_delete(ptr);
1305 } else {
1306 ctype_char_dtor(this);
1307 if(flags & 1)
1308 MSVCRT_operator_delete(this);
1309 }
1310
1311 return this;
1312 }
1313
1314 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1315 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1316 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch, 12)
1317 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1318 char, (const ctype_char*, char, char), (this, ch, unused))
1319 char __thiscall ctype_char_do_narrow_ch(const ctype_char *this, char ch, char unused)
1320 {
1321 TRACE("(%p %c %c)\n", this, ch, unused);
1322 return ch;
1323 }
1324
1325 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1326 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1327 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow, 20)
1328 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1329 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1330 (this, first, last, unused, dest))
1331 const char* __thiscall ctype_char_do_narrow(const ctype_char *this,
1332 const char *first, const char *last, char unused, char *dest)
1333 {
1334 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1335 memcpy(dest, first, last-first);
1336 return last;
1337 }
1338
1339 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1340 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1341 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s, 24)
1342 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1343 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1344 (this, first, last, unused, dest, size))
1345 const char* __thiscall ctype_char__Do_narrow_s(const ctype_char *this, const char *first,
1346 const char *last, char unused, char *dest, MSVCP_size_t size)
1347 {
1348 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1349 memcpy_s(dest, size, first, last-first);
1350 return last;
1351 }
1352
1353 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1354 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1355 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch, 12)
1356 char __thiscall ctype_char_narrow_ch(const ctype_char *this, char ch, char dflt)
1357 {
1358 TRACE("(%p %c %c)\n", this, ch, dflt);
1359 return call_ctype_char_do_narrow_ch(this, ch, dflt);
1360 }
1361
1362 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1363 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1364 DEFINE_THISCALL_WRAPPER(ctype_char_narrow, 20)
1365 const char* __thiscall ctype_char_narrow(const ctype_char *this,
1366 const char *first, const char *last, char dflt, char *dest)
1367 {
1368 TRACE("(%p %p %p %c %p)\n", this, first, last, dflt, dest);
1369 return call_ctype_char_do_narrow(this, first, last, dflt, dest);
1370 }
1371
1372 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1373 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1374 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s, 24)
1375 const char* __thiscall ctype_char__Narrow_s(const ctype_char *this, const char *first,
1376 const char *last, char dflt, char *dest, MSVCP_size_t size)
1377 {
1378 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1379 return call_ctype_char__Do_narrow_s(this, first, last, dflt, dest, size);
1380 }
1381
1382 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1383 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1384 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch, 8)
1385 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1386 char, (const ctype_char*, char), (this, ch))
1387 char __thiscall ctype_char_do_widen_ch(const ctype_char *this, char ch)
1388 {
1389 TRACE("(%p %c)\n", this, ch);
1390 return ch;
1391 }
1392
1393 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1394 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1395 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen, 16)
1396 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1397 const char*, (const ctype_char*, const char*, const char*, char*), \
1398 (this, first, last, dest))
1399 const char* __thiscall ctype_char_do_widen(const ctype_char *this,
1400 const char *first, const char *last, char *dest)
1401 {
1402 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1403 memcpy(dest, first, last-first);
1404 return last;
1405 }
1406
1407 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1408 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1409 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s, 20)
1410 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1411 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1412 (this, first, last, dest, size))
1413 const char* __thiscall ctype_char__Do_widen_s(const ctype_char *this,
1414 const char *first, const char *last, char *dest, MSVCP_size_t size)
1415 {
1416 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1417 memcpy_s(dest, size, first, last-first);
1418 return last;
1419 }
1420
1421 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1422 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1423 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch, 8)
1424 char __thiscall ctype_char_widen_ch(const ctype_char *this, char ch)
1425 {
1426 TRACE("(%p %c)\n", this, ch);
1427 return call_ctype_char_do_widen_ch(this, ch);
1428 }
1429
1430 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1431 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1432 DEFINE_THISCALL_WRAPPER(ctype_char_widen, 16)
1433 const char* __thiscall ctype_char_widen(const ctype_char *this,
1434 const char *first, const char *last, char *dest)
1435 {
1436 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1437 return call_ctype_char_do_widen(this, first, last, dest);
1438 }
1439
1440 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1441 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1442 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s, 20)
1443 const char* __thiscall ctype_char__Widen_s(const ctype_char *this,
1444 const char *first, const char *last, char *dest, MSVCP_size_t size)
1445 {
1446 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
1447 return call_ctype_char__Do_widen_s(this, first, last, dest, size);
1448 }
1449
1450 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1451 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1452 MSVCP_size_t __cdecl ctype_char__Getcat(const locale_facet **facet, const locale *loc)
1453 {
1454 TRACE("(%p %p)\n", facet, loc);
1455
1456 if(facet && !*facet) {
1457 _Locinfo locinfo;
1458
1459 *facet = MSVCRT_operator_new(sizeof(ctype_char));
1460 if(!*facet) {
1461 ERR("Out of memory\n");
1462 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
1463 return 0;
1464 }
1465
1466 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
1467 ctype_char_ctor_locinfo((ctype_char*)*facet, &locinfo, 0);
1468 _Locinfo_dtor(&locinfo);
1469 }
1470
1471 return LC_CTYPE;
1472 }
1473
1474 /* _Tolower */
1475 int __cdecl _Tolower(int ch, const _Ctypevec *ctype)
1476 {
1477 unsigned int cp;
1478
1479 TRACE("%d %p\n", ch, ctype);
1480
1481 if(ctype)
1482 cp = ctype->page;
1483 else
1484 cp = ___lc_codepage_func();
1485
1486 /* Don't convert to unicode in case of C locale */
1487 if(!cp) {
1488 if(ch>='A' && ch<='Z')
1489 ch = ch-'A'+'a';
1490 return ch;
1491 } else {
1492 WCHAR wide, lower;
1493 char str[2];
1494 int size;
1495
1496 if(ch > 255) {
1497 str[0] = (ch>>8) & 255;
1498 str[1] = ch & 255;
1499 size = 2;
1500 } else {
1501 str[0] = ch & 255;
1502 size = 1;
1503 }
1504
1505 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1506 return ch;
1507
1508 lower = tolowerW(wide);
1509 if(lower == wide)
1510 return ch;
1511
1512 WideCharToMultiByte(cp, 0, &lower, 1, str, 2, NULL, NULL);
1513
1514 return str[0] + (str[1]<<8);
1515 }
1516 }
1517
1518 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1519 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1520 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1521 char, (const ctype_char*, char), (this, ch))
1522 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch, 8)
1523 char __thiscall ctype_char_do_tolower_ch(const ctype_char *this, char ch)
1524 {
1525 TRACE("(%p %c)\n", this, ch);
1526 return _Tolower(ch, &this->ctype);
1527 }
1528
1529 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1530 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1531 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1532 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1533 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower, 12)
1534 const char* __thiscall ctype_char_do_tolower(const ctype_char *this, char *first, const char *last)
1535 {
1536 TRACE("(%p %p %p)\n", this, first, last);
1537 for(; first<last; first++)
1538 *first = _Tolower(*first, &this->ctype);
1539 return last;
1540 }
1541
1542 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1543 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1544 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch, 8)
1545 char __thiscall ctype_char_tolower_ch(const ctype_char *this, char ch)
1546 {
1547 TRACE("(%p %c)\n", this, ch);
1548 return call_ctype_char_do_tolower_ch(this, ch);
1549 }
1550
1551 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1552 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1553 DEFINE_THISCALL_WRAPPER(ctype_char_tolower, 12)
1554 const char* __thiscall ctype_char_tolower(const ctype_char *this, char *first, const char *last)
1555 {
1556 TRACE("(%p %p %p)\n", this, first, last);
1557 return call_ctype_char_do_tolower(this, first, last);
1558 }
1559
1560 /* _Toupper */
1561 int __cdecl _Toupper(int ch, const _Ctypevec *ctype)
1562 {
1563 unsigned int cp;
1564
1565 TRACE("%d %p\n", ch, ctype);
1566
1567 if(ctype)
1568 cp = ctype->page;
1569 else
1570 cp = ___lc_codepage_func();
1571
1572 /* Don't convert to unicode in case of C locale */
1573 if(!cp) {
1574 if(ch>='a' && ch<='z')
1575 ch = ch-'a'+'A';
1576 return ch;
1577 } else {
1578 WCHAR wide, upper;
1579 char str[2];
1580 int size;
1581
1582 if(ch > 255) {
1583 str[0] = (ch>>8) & 255;
1584 str[1] = ch & 255;
1585 size = 2;
1586 } else {
1587 str[0] = ch & 255;
1588 size = 1;
1589 }
1590
1591 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, str, size, &wide, 1))
1592 return ch;
1593
1594 upper = toupperW(wide);
1595 if(upper == wide)
1596 return ch;
1597
1598 WideCharToMultiByte(cp, 0, &upper, 1, str, 2, NULL, NULL);
1599
1600 return str[0] + (str[1]<<8);
1601 }
1602 }
1603
1604 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1605 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1606 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1607 char, (const ctype_char*, char), (this, ch))
1608 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch, 8)
1609 char __thiscall ctype_char_do_toupper_ch(const ctype_char *this, char ch)
1610 {
1611 TRACE("(%p %c)\n", this, ch);
1612 return _Toupper(ch, &this->ctype);
1613 }
1614
1615 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1616 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1617 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1618 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1619 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper, 12)
1620 const char* __thiscall ctype_char_do_toupper(const ctype_char *this,
1621 char *first, const char *last)
1622 {
1623 TRACE("(%p %p %p)\n", this, first, last);
1624 for(; first<last; first++)
1625 *first = _Toupper(*first, &this->ctype);
1626 return last;
1627 }
1628
1629 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1630 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1631 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch, 8)
1632 char __thiscall ctype_char_toupper_ch(const ctype_char *this, char ch)
1633 {
1634 TRACE("(%p %c)\n", this, ch);
1635 return call_ctype_char_do_toupper_ch(this, ch);
1636 }
1637
1638 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1639 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1640 DEFINE_THISCALL_WRAPPER(ctype_char_toupper, 12)
1641 const char* __thiscall ctype_char_toupper(const ctype_char *this, char *first, const char *last)
1642 {
1643 TRACE("(%p %p %p)\n", this, first, last);
1644 return call_ctype_char_do_toupper(this, first, last);
1645 }
1646
1647 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1648 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1649 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch, 12)
1650 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char *this, short mask, char ch)
1651 {
1652 TRACE("(%p %x %c)\n", this, mask, ch);
1653 return (this->ctype.table[(unsigned char)ch] & mask) != 0;
1654 }
1655
1656 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1657 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1658 DEFINE_THISCALL_WRAPPER(ctype_char_is, 16)
1659 const char* __thiscall ctype_char_is(const ctype_char *this, const char *first, const char *last, short *dest)
1660 {
1661 TRACE("(%p %p %p %p)\n", this, first, last, dest);
1662 for(; first<last; first++)
1663 *dest++ = this->ctype.table[(unsigned char)*first];
1664 return last;
1665 }
1666
1667 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1668 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1669 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is, 16)
1670 const char* __thiscall ctype_char_scan_is(const ctype_char *this, short mask, const char *first, const char *last)
1671 {
1672 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1673 for(; first<last; first++)
1674 if(!ctype_char_is_ch(this, mask, *first))
1675 break;
1676 return first;
1677 }
1678
1679 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1680 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1681 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not, 16)
1682 const char* __thiscall ctype_char_scan_not(const ctype_char *this, short mask, const char *first, const char *last)
1683 {
1684 TRACE("(%p %x %p %p)\n", this, mask, first, last);
1685 for(; first<last; first++)
1686 if(ctype_char_is_ch(this, mask, *first))
1687 break;
1688 return first;
1689 }
1690
1691 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1692 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1693 DEFINE_THISCALL_WRAPPER(ctype_char_table, 4)
1694 const short* __thiscall ctype_char_table(const ctype_char *this)
1695 {
1696 TRACE("(%p)\n", this);
1697 return this->ctype.table;
1698 }
1699
1700 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1701 locale_id ctype_wchar_id = {0};
1702 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1703 locale_id ctype_short_id = {0};
1704
1705 /* ??_7?$ctype@_W@std@@6B@ */
1706 extern const vtable_ptr MSVCP_ctype_wchar_vtable;
1707 /* ??_7?$ctype@G@std@@6B@ */
1708 extern const vtable_ptr MSVCP_ctype_short_vtable;
1709
1710 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1711 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1712 locale_id* __cdecl ctype_wchar__Id_func(void)
1713 {
1714 TRACE("()\n");
1715 return &ctype_wchar_id;
1716 }
1717
1718 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1719 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1720 locale_id* __cdecl ctype_short__Id_func(void)
1721 {
1722 TRACE("()\n");
1723 return &ctype_short_id;
1724 }
1725
1726 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1727 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1728 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1729 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1730 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init, 8)
1731 void __thiscall ctype_wchar__Init(ctype_wchar *this, _Locinfo *locinfo)
1732 {
1733 TRACE("(%p %p)\n", this, locinfo);
1734 _Locinfo__Getctype(locinfo, &this->ctype);
1735 _Locinfo__Getcvt(locinfo, &this->cvt);
1736 }
1737
1738 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1739 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1740 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo, 12)
1741 ctype_wchar* __thiscall ctype_wchar_ctor_locinfo(ctype_wchar *this,
1742 _Locinfo *locinfo, MSVCP_size_t refs)
1743 {
1744 TRACE("(%p %p %lu)\n", this, locinfo, refs);
1745 ctype_base_ctor_refs(&this->base, refs);
1746 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1747 ctype_wchar__Init(this, locinfo);
1748 return this;
1749 }
1750
1751 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1752 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1753 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo, 12)
1754 ctype_wchar* __thiscall ctype_short_ctor_locinfo(ctype_wchar *this,
1755 _Locinfo *locinfo, MSVCP_size_t refs)
1756 {
1757 ctype_wchar *ret = ctype_wchar_ctor_locinfo(this, locinfo, refs);
1758 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1759 return ret;
1760 }
1761
1762 /* ??0?$ctype@_W@std@@QAE@I@Z */
1763 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1764 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs, 8)
1765 ctype_wchar* __thiscall ctype_wchar_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1766 {
1767 _Locinfo locinfo;
1768
1769 TRACE("(%p %lu)\n", this, refs);
1770
1771 ctype_base_ctor_refs(&this->base, refs);
1772 this->base.facet.vtable = &MSVCP_ctype_wchar_vtable;
1773
1774 _Locinfo_ctor(&locinfo);
1775 ctype_wchar__Init(this, &locinfo);
1776 _Locinfo_dtor(&locinfo);
1777 return this;
1778 }
1779
1780 /* ??0?$ctype@G@std@@QAE@I@Z */
1781 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1782 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs, 8)
1783 ctype_wchar* __thiscall ctype_short_ctor_refs(ctype_wchar *this, MSVCP_size_t refs)
1784 {
1785 ctype_wchar *ret = ctype_wchar_ctor_refs(this, refs);
1786 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1787 return ret;
1788 }
1789
1790 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1791 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1792 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name, 12)
1793 ctype_wchar* __thiscall ctype_short_ctor_name(ctype_wchar *this,
1794 const char *name, MSVCP_size_t refs)
1795 {
1796 _Locinfo locinfo;
1797
1798 TRACE("(%p %s %lu)\n", this, debugstr_a(name), refs);
1799
1800 ctype_base_ctor_refs(&this->base, refs);
1801 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1802
1803 _Locinfo_ctor_cstr(&locinfo, name);
1804 ctype_wchar__Init(this, &locinfo);
1805 _Locinfo_dtor(&locinfo);
1806 return this;
1807 }
1808
1809 /* ??_F?$ctype@_W@std@@QAEXXZ */
1810 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1811 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor, 4)
1812 ctype_wchar* __thiscall ctype_wchar_ctor(ctype_wchar *this)
1813 {
1814 TRACE("(%p)\n", this);
1815 return ctype_short_ctor_refs(this, 0);
1816 }
1817
1818 /* ??_F?$ctype@G@std@@QAEXXZ */
1819 /* ??_F?$ctype@G@std@@QEAAXXZ */
1820 DEFINE_THISCALL_WRAPPER(ctype_short_ctor, 4)
1821 ctype_wchar* __thiscall ctype_short_ctor(ctype_wchar *this)
1822 {
1823 ctype_wchar *ret = ctype_wchar_ctor(this);
1824 this->base.facet.vtable = &MSVCP_ctype_short_vtable;
1825 return ret;
1826 }
1827
1828 /* ??1?$ctype@_W@std@@MAE@XZ */
1829 /* ??1?$ctype@_W@std@@MEAA@XZ */
1830 /* ??1?$ctype@G@std@@MAE@XZ */
1831 /* ??1?$ctype@G@std@@MEAA@XZ */
1832 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor, 4)
1833 void __thiscall ctype_wchar_dtor(ctype_wchar *this)
1834 {
1835 TRACE("(%p)\n", this);
1836 if(this->ctype.delfl)
1837 free((void*)this->ctype.table);
1838 }
1839
1840 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_wchar_vector_dtor, 8)
1841 ctype_wchar* __thiscall MSVCP_ctype_wchar_vector_dtor(ctype_wchar *this, unsigned int flags)
1842 {
1843 TRACE("(%p %x)\n", this, flags);
1844 if(flags & 2) {
1845 /* we have an array, with the number of elements stored before the first object */
1846 int i, *ptr = (int *)this-1;
1847
1848 for(i=*ptr-1; i>=0; i--)
1849 ctype_wchar_dtor(this+i);
1850 MSVCRT_operator_delete(ptr);
1851 } else {
1852 ctype_wchar_dtor(this);
1853 if(flags & 1)
1854 MSVCRT_operator_delete(this);
1855 }
1856
1857 return this;
1858 }
1859
1860 DEFINE_THISCALL_WRAPPER(MSVCP_ctype_short_vector_dtor, 8)
1861 ctype_wchar* __thiscall MSVCP_ctype_short_vector_dtor(ctype_wchar *this, unsigned int flags)
1862 {
1863 return MSVCP_ctype_wchar_vector_dtor(this, flags);
1864 }
1865
1866 /* _Wcrtomb */
1867 int __cdecl _Wcrtomb(char *s, wchar_t wch, int *state, const _Cvtvec *cvt)
1868 {
1869 int cp, size;
1870 BOOL def;
1871
1872 TRACE("%p %d %p %p\n", s, wch, state, cvt);
1873
1874 if(cvt)
1875 cp = cvt->page;
1876 else
1877 cp = ___lc_codepage_func();
1878
1879 if(!cp) {
1880 if(wch > 255) {
1881 *_errno() = EILSEQ;
1882 return -1;
1883 }
1884
1885 *s = wch & 255;
1886 return 1;
1887 }
1888
1889 size = WideCharToMultiByte(cp, 0, &wch, 1, s, MB_LEN_MAX, NULL, &def);
1890 if(!size || def) {
1891 *_errno() = EILSEQ;
1892 return -1;
1893 }
1894
1895 return size;
1896 }
1897
1898 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1899 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1900 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1901 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1902 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow, 12)
1903 char __thiscall ctype_wchar__Donarrow(const ctype_wchar *this, wchar_t ch, char dflt)
1904 {
1905 char buf[MB_LEN_MAX];
1906
1907 TRACE("(%p %d %d)\n", this, ch, dflt);
1908
1909 return _Wcrtomb(buf, ch, NULL, &this->cvt)==1 ? buf[0] : dflt;
1910 }
1911
1912 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1913 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1914 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1915 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1916 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch, 12)
1917 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
1918 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1919 char __thiscall ctype_wchar_do_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1920 {
1921 return ctype_wchar__Donarrow(this, ch, dflt);
1922 }
1923
1924 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1925 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1926 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1927 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1928 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow, 20)
1929 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
1930 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1931 (this, first, last, dflt, dest))
1932 const wchar_t* __thiscall ctype_wchar_do_narrow(const ctype_wchar *this,
1933 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1934 {
1935 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1936 for(; first<last; first++)
1937 *dest++ = ctype_wchar__Donarrow(this, *first, dflt);
1938 return last;
1939 }
1940
1941 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
1942 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
1943 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
1944 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
1945 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s, 24)
1946 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
1947 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
1948 (this, first, last, dflt, dest, size))
1949 const wchar_t* __thiscall ctype_wchar__Do_narrow_s(const ctype_wchar *this,
1950 const wchar_t *first, const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
1951 {
1952 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
1953 /* This function converts all multi-byte characters to dflt,
1954 * thanks to it result size is known before converting */
1955 if(last-first > size)
1956 ctype_base__Xran();
1957 return ctype_wchar_do_narrow(this, first, last, dflt, dest);
1958 }
1959
1960 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1961 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1962 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1963 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1964 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch, 12)
1965 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar *this, wchar_t ch, char dflt)
1966 {
1967 TRACE("(%p %d %d)\n", this, ch, dflt);
1968 return call_ctype_wchar_do_narrow_ch(this, ch, dflt);
1969 }
1970
1971 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1972 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1973 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1974 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
1975 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow, 20)
1976 const wchar_t* __thiscall ctype_wchar_narrow(const ctype_wchar *this,
1977 const wchar_t *first, const wchar_t *last, char dflt, char *dest)
1978 {
1979 TRACE("(%p %p %p %d %p)\n", this, first, last, dflt, dest);
1980 return call_ctype_wchar_do_narrow(this, first, last, dflt, dest);
1981 }
1982
1983 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
1984 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
1985 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
1986 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
1987 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s, 24)
1988 const wchar_t* __thiscall ctype_wchar__Narrow_s(const ctype_wchar *this, const wchar_t *first,
1989 const wchar_t *last, char dflt, char *dest, MSVCP_size_t size)
1990 {
1991 TRACE("(%p %p %p %d %p %lu)\n", this, first, last, dflt, dest, size);
1992 return call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size);
1993 }
1994
1995 /* _Mbrtowc */
1996 int __cdecl _Mbrtowc(wchar_t *out, const char *in, MSVCP_size_t len, int *state, const _Cvtvec *cvt)
1997 {
1998 int i, cp;
1999 CPINFO cp_info;
2000 BOOL is_lead;
2001
2002 TRACE("(%p %p %lu %p %p)\n", out, in, len, state, cvt);
2003
2004 if(!len)
2005 return 0;
2006
2007 if(cvt)
2008 cp = cvt->page;
2009 else
2010 cp = ___lc_codepage_func();
2011
2012 if(!cp) {
2013 if(out)
2014 *out = (unsigned char)*in;
2015
2016 *state = 0;
2017 return *in ? 1 : 0;
2018 }
2019
2020 if(*state) {
2021 ((char*)state)[1] = *in;
2022
2023 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, (char*)state, 2, out, out ? 1 : 0)) {
2024 *state = 0;
2025 *_errno() = EILSEQ;
2026 return -1;
2027 }
2028
2029 *state = 0;
2030 return 2;
2031 }
2032
2033 GetCPInfo(cp, &cp_info);
2034 is_lead = FALSE;
2035 for(i=0; i<MAX_LEADBYTES; i+=2) {
2036 if(!cp_info.LeadByte[i+1])
2037 break;
2038 if((unsigned char)*in>=cp_info.LeadByte[i] && (unsigned char)*in<=cp_info.LeadByte[i+1]) {
2039 is_lead = TRUE;
2040 break;
2041 }
2042 }
2043
2044 if(is_lead) {
2045 if(len == 1) {
2046 *state = (unsigned char)*in;
2047 return -2;
2048 }
2049
2050 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 2, out, out ? 1 : 0)) {
2051 *_errno() = EILSEQ;
2052 return -1;
2053 }
2054 return 2;
2055 }
2056
2057 if(!MultiByteToWideChar(cp, MB_ERR_INVALID_CHARS, in, 1, out, out ? 1 : 0)) {
2058 *_errno() = EILSEQ;
2059 return -1;
2060 }
2061 return 1;
2062 }
2063
2064 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2065 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2066 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2067 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2068 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden, 8)
2069 wchar_t __thiscall ctype_wchar__Dowiden(const ctype_wchar *this, char ch)
2070 {
2071 wchar_t ret;
2072 int state = 0;
2073 TRACE("(%p %d)\n", this, ch);
2074 return _Mbrtowc(&ret, &ch, 1, &state, &this->cvt)<0 ? WEOF : ret;
2075 }
2076
2077 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2078 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2079 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2080 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2081 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch, 8)
2082 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2083 wchar_t, (const ctype_wchar*, char), (this, ch))
2084 wchar_t __thiscall ctype_wchar_do_widen_ch(const ctype_wchar *this, char ch)
2085 {
2086 return ctype_wchar__Dowiden(this, ch);
2087 }
2088
2089 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2090 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2091 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2092 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2093 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen, 16)
2094 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2095 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2096 (this, first, last, dest))
2097 const char* __thiscall ctype_wchar_do_widen(const ctype_wchar *this,
2098 const char *first, const char *last, wchar_t *dest)
2099 {
2100 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2101 for(; first<last; first++)
2102 *dest++ = ctype_wchar__Dowiden(this, *first);
2103 return last;
2104 }
2105
2106 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2107 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2108 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2109 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2110 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s, 20)
2111 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2112 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2113 (this, first, last, dest, size))
2114 const char* __thiscall ctype_wchar__Do_widen_s(const ctype_wchar *this,
2115 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2116 {
2117 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2118 /* This function converts all multi-byte characters to WEOF,
2119 * thanks to it result size is known before converting */
2120 if(size < last-first)
2121 ctype_base__Xran();
2122 return ctype_wchar_do_widen(this, first, last, dest);
2123 }
2124
2125 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2126 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2127 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2128 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2129 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch, 8)
2130 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar *this, char ch)
2131 {
2132 TRACE("(%p %d)\n", this, ch);
2133 return call_ctype_wchar_do_widen_ch(this, ch);
2134 }
2135
2136 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2137 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2138 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2139 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2140 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen, 16)
2141 const char* __thiscall ctype_wchar_widen(const ctype_wchar *this,
2142 const char *first, const char *last, wchar_t *dest)
2143 {
2144 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2145 return call_ctype_wchar_do_widen(this, first, last, dest);
2146 }
2147
2148 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2149 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2150 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2151 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2152 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s, 20)
2153 const char* __thiscall ctype_wchar__Widen_s(const ctype_wchar *this,
2154 const char *first, const char *last, wchar_t *dest, MSVCP_size_t size)
2155 {
2156 TRACE("(%p %p %p %p %lu)\n", this, first, last, dest, size);
2157 return call_ctype_wchar__Do_widen_s(this, first, last, dest, size);
2158 }
2159
2160 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2161 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2162 MSVCP_size_t __cdecl ctype_wchar__Getcat(const locale_facet **facet, const locale *loc)
2163 {
2164 TRACE("(%p %p)\n", facet, loc);
2165
2166 if(facet && !*facet) {
2167 _Locinfo locinfo;
2168
2169 *facet = MSVCRT_operator_new(sizeof(ctype_wchar));
2170 if(!*facet) {
2171 ERR("Out of memory\n");
2172 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2173 return 0;
2174 }
2175
2176 _Locinfo_ctor_cstr(&locinfo, MSVCP_basic_string_char_c_str(&loc->ptr->name));
2177 ctype_wchar_ctor_locinfo((ctype_wchar*)*facet, &locinfo, 0);
2178 _Locinfo_dtor(&locinfo);
2179 }
2180
2181 return LC_CTYPE;
2182 }
2183
2184 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2185 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2186 MSVCP_size_t __cdecl ctype_short__Getcat(const locale_facet **facet, const locale *loc)
2187 {
2188 if(facet && !*facet) {
2189 ctype_wchar__Getcat(facet, loc);
2190 (*(locale_facet**)facet)->vtable = &MSVCP_ctype_short_vtable;
2191 }
2192
2193 return LC_CTYPE;
2194 }
2195
2196 /* _Towlower */
2197 wchar_t __cdecl _Towlower(wchar_t ch, const _Ctypevec *ctype)
2198 {
2199 TRACE("(%d %p)\n", ch, ctype);
2200 return tolowerW(ch);
2201 }
2202
2203 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2204 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2205 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2206 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2207 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch, 8)
2208 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2209 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2210 wchar_t __thiscall ctype_wchar_do_tolower_ch(const ctype_wchar *this, wchar_t ch)
2211 {
2212 return _Towlower(ch, &this->ctype);
2213 }
2214
2215 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2216 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2217 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2218 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2219 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower, 12)
2220 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2221 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2222 (this, first, last))
2223 const wchar_t* __thiscall ctype_wchar_do_tolower(const ctype_wchar *this,
2224 wchar_t *first, const wchar_t *last)
2225 {
2226 TRACE("(%p %p %p)\n", this, first, last);
2227 for(; first<last; first++)
2228 *first = _Towlower(*first, &this->ctype);
2229 return last;
2230 }
2231
2232 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2233 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2234 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2235 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2236 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch, 8)
2237 wchar_t __thiscall ctype_wchar_tolower_ch(const ctype_wchar *this, wchar_t ch)
2238 {
2239 TRACE("(%p %d)\n", this, ch);
2240 return call_ctype_wchar_do_tolower_ch(this, ch);
2241 }
2242
2243 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2244 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2245 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2246 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2247 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower, 12)
2248 const wchar_t* __thiscall ctype_wchar_tolower(const ctype_wchar *this,
2249 wchar_t *first, const wchar_t *last)
2250 {
2251 TRACE("(%p %p %p)\n", this, first, last);
2252 return call_ctype_wchar_do_tolower(this, first, last);
2253 }
2254
2255 /* _Towupper */
2256 wchar_t __cdecl _Towupper(wchar_t ch, const _Ctypevec *ctype)
2257 {
2258 TRACE("(%d %p)\n", ch, ctype);
2259 return toupperW(ch);
2260 }
2261
2262 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2263 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2264 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2265 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2266 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch, 8)
2267 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2268 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2269 wchar_t __thiscall ctype_wchar_do_toupper_ch(const ctype_wchar *this, wchar_t ch)
2270 {
2271 return _Towupper(ch, &this->ctype);
2272 }
2273
2274 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2275 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2276 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2277 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2278 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper, 12)
2279 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2280 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2281 (this, first, last))
2282 const wchar_t* __thiscall ctype_wchar_do_toupper(const ctype_wchar *this,
2283 wchar_t *first, const wchar_t *last)
2284 {
2285 TRACE("(%p %p %p)\n", this, first, last);
2286 for(; first<last; first++)
2287 *first = _Towupper(*first, &this->ctype);
2288 return last;
2289 }
2290
2291 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2292 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2293 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2294 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2295 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch, 8)
2296 wchar_t __thiscall ctype_wchar_toupper_ch(const ctype_wchar *this, wchar_t ch)
2297 {
2298 TRACE("(%p %d)\n", this, ch);
2299 return call_ctype_wchar_do_toupper_ch(this, ch);
2300 }
2301
2302 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2303 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2304 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2305 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2306 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper, 12)
2307 const wchar_t* __thiscall ctype_wchar_toupper(const ctype_wchar *this,
2308 wchar_t *first, const wchar_t *last)
2309 {
2310 TRACE("(%p %p %p)\n", this, first, last);
2311 return call_ctype_wchar_do_toupper(this, first, last);
2312 }
2313
2314 /* _Getwctypes */
2315 const wchar_t* __cdecl _Getwctypes(const wchar_t *first, const wchar_t *last,
2316 short *mask, const _Ctypevec *ctype)
2317 {
2318 TRACE("(%p %p %p %p)\n", first, last, mask, ctype);
2319 GetStringTypeW(CT_CTYPE1, first, last-first, (WORD*)mask);
2320 return last;
2321 }
2322
2323 /* _Getwctype */
2324 short __cdecl _Getwctype(wchar_t ch, const _Ctypevec *ctype)
2325 {
2326 short mask = 0;
2327 _Getwctypes(&ch, &ch+1, &mask, ctype);
2328 return mask;
2329 }
2330
2331 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2332 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2333 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2334 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2335 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch, 12)
2336 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2337 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2338 MSVCP_bool __thiscall ctype_wchar_do_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2339 {
2340 TRACE("(%p %x %d)\n", this, mask, ch);
2341 return (_Getwctype(ch, &this->ctype) & mask) != 0;
2342 }
2343
2344 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2345 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2346 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2347 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2348 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is, 16)
2349 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2350 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2351 (this, first, last, dest))
2352 const wchar_t* __thiscall ctype_wchar_do_is(const ctype_wchar *this,
2353 const wchar_t *first, const wchar_t *last, short *dest)
2354 {
2355 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2356 return _Getwctypes(first, last, dest, &this->ctype);
2357 }
2358
2359 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2360 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2361 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2362 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2363 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch, 12)
2364 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar *this, short mask, wchar_t ch)
2365 {
2366 TRACE("(%p %x %d)\n", this, mask, ch);
2367 return call_ctype_wchar_do_is_ch(this, mask, ch);
2368 }
2369
2370 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2371 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2372 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2373 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2374 DEFINE_THISCALL_WRAPPER(ctype_wchar_is, 16)
2375 const wchar_t* __thiscall ctype_wchar_is(const ctype_wchar *this,
2376 const wchar_t *first, const wchar_t *last, short *dest)
2377 {
2378 TRACE("(%p %p %p %p)\n", this, first, last, dest);
2379 return call_ctype_wchar_do_is(this, first, last, dest);
2380 }
2381
2382 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2383 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2384 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2385 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2386 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is, 16)
2387 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2388 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2389 (this, mask, first, last))
2390 const wchar_t* __thiscall ctype_wchar_do_scan_is(const ctype_wchar *this,
2391 short mask, const wchar_t *first, const wchar_t *last)
2392 {
2393 TRACE("(%p %d %p %p)\n", this, mask, first, last);
2394 for(; first<last; first++)
2395 if(!ctype_wchar_is_ch(this, mask, *first))
2396 break;
2397 return first;
2398 }
2399
2400 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2401 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2402 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2403 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2404 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is, 16)
2405 const wchar_t* __thiscall ctype_wchar_scan_is(const ctype_wchar *this,
2406 short mask, const wchar_t *first, const wchar_t *last)
2407 {
2408 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2409 return call_ctype_wchar_do_scan_is(this, mask, first, last);
2410 }
2411
2412 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2413 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2414 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2415 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2416 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not, 16)
2417 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2418 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2419 (this, mask, first, last))
2420 const wchar_t* __thiscall ctype_wchar_do_scan_not(const ctype_wchar *this,
2421 short mask, const wchar_t *first, const wchar_t *last)
2422 {
2423 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2424 for(; first<last; first++)
2425 if(ctype_wchar_is_ch(this, mask, *first))
2426 break;
2427 return first;
2428 }
2429
2430 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2431 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2432 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2433 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2434 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not, 16)
2435 const wchar_t* __thiscall ctype_wchar_scan_not(const ctype_wchar *this,
2436 short mask, const wchar_t *first, const wchar_t *last)
2437 {
2438 TRACE("(%p %x %p %p)\n", this, mask, first, last);
2439 return call_ctype_wchar_do_scan_not(this, mask, first, last);
2440 }
2441
2442 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
2443 locale_id numpunct_char_id = {0};
2444
2445 /* ??_7?$numpunct@D@std@@6B@ */
2446 extern const vtable_ptr MSVCP_numpunct_char_vtable;
2447
2448 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
2449 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2450 DEFINE_THISCALL_WRAPPER(numpunct_char__Init, 12)
2451 void __thiscall numpunct_char__Init(numpunct_char *this, _Locinfo *locinfo, MSVCP_bool isdef)
2452 {
2453 int len;
2454
2455 TRACE("(%p %p %d)\n", this, locinfo, isdef);
2456
2457 len = strlen(_Locinfo__Getfalse(locinfo))+1;
2458 this->false_name = MSVCRT_operator_new(len);
2459 if(this->false_name)
2460 memcpy((char*)this->false_name, _Locinfo__Getfalse(locinfo), len);
2461
2462 len = strlen(_Locinfo__Gettrue(locinfo))+1;
2463 this->true_name = MSVCRT_operator_new(len);
2464 if(this->true_name)
2465 memcpy((char*)this->true_name, _Locinfo__Gettrue(locinfo), len);
2466
2467 if(isdef) {
2468 this->grouping = MSVCRT_operator_new(1);
2469 if(this->grouping)
2470 *(char*)this->grouping = 0;
2471
2472 this->dp = '.';
2473 this->sep = ',';
2474 } else {
2475 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
2476
2477 len = strlen(lc->grouping)+1;
2478 this->grouping = MSVCRT_operator_new(len);
2479 if(this->grouping)
2480 memcpy((char*)this->grouping, lc->grouping, len);
2481
2482 this->dp = lc->decimal_point[0];
2483 this->sep = lc->thousands_sep[0];
2484 }
2485
2486 if(!this->false_name || !this->true_name || !this->grouping) {
2487 MSVCRT_operator_delete((char*)this->grouping);
2488 MSVCRT_operator_delete((char*)this->false_name);
2489 MSVCRT_operator_delete((char*)this->true_name);
2490
2491 ERR("Out of memory\n");
2492 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2493 }
2494 }
2495
2496 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
2497 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
2498 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy, 4)
2499 void __thiscall numpunct_char__Tidy(numpunct_char *this)
2500 {
2501 TRACE("(%p)\n", this);
2502
2503 MSVCRT_operator_delete((char*)this->grouping);
2504 MSVCRT_operator_delete((char*)this->false_name);
2505 MSVCRT_operator_delete((char*)this->true_name);
2506 }
2507
2508 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
2509 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2510 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo, 16)
2511 numpunct_char* __thiscall numpunct_char_ctor_locinfo(numpunct_char *this,
2512 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2513 {
2514 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
2515 locale_facet_ctor_refs(&this->facet, refs);
2516 this->facet.vtable = &MSVCP_numpunct_char_vtable;
2517 numpunct_char__Init(this, locinfo, usedef);
2518 return this;
2519 }
2520
2521 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
2522 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
2523 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name, 16)
2524 numpunct_char* __thiscall numpunct_char_ctor_name(numpunct_char *this,
2525 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2526 {
2527 _Locinfo locinfo;
2528
2529 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
2530 locale_facet_ctor_refs(&this->facet, refs);
2531 this->facet.vtable = &MSVCP_numpunct_char_vtable;
2532
2533 _Locinfo_ctor_cstr(&locinfo, name);
2534 numpunct_char__Init(this, &locinfo, usedef);
2535 _Locinfo_dtor(&locinfo);
2536 return this;
2537 }
2538
2539 /* ??0?$numpunct@D@std@@QAE@I@Z */
2540 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
2541 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs, 8)
2542 numpunct_char* __thiscall numpunct_char_ctor_refs(numpunct_char *this, MSVCP_size_t refs)
2543 {
2544 TRACE("(%p %lu)\n", this, refs);
2545 return numpunct_char_ctor_name(this, "C", refs, FALSE);
2546 }
2547
2548 /* ??_F?$numpunct@D@std@@QAEXXZ */
2549 /* ??_F?$numpunct@D@std@@QEAAXXZ */
2550 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor, 4)
2551 numpunct_char* __thiscall numpunct_char_ctor(numpunct_char *this)
2552 {
2553 return numpunct_char_ctor_refs(this, 0);
2554 }
2555
2556 /* ??1?$numpunct@D@std@@MAE@XZ */
2557 /* ??1?$numpunct@D@std@@MEAA@XZ */
2558 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor, 4)
2559 void __thiscall numpunct_char_dtor(numpunct_char *this)
2560 {
2561 TRACE("(%p)\n", this);
2562 numpunct_char__Tidy(this);
2563 }
2564
2565 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_char_vector_dtor, 8)
2566 numpunct_char* __thiscall MSVCP_numpunct_char_vector_dtor(numpunct_char *this, unsigned int flags)
2567 {
2568 TRACE("(%p %x)\n", this, flags);
2569 if(flags & 2) {
2570 /* we have an array, with the number of elements stored before the first object */
2571 int i, *ptr = (int *)this-1;
2572
2573 for(i=*ptr-1; i>=0; i--)
2574 numpunct_char_dtor(this+i);
2575 MSVCRT_operator_delete(ptr);
2576 } else {
2577 numpunct_char_dtor(this);
2578 if(flags & 1)
2579 MSVCRT_operator_delete(this);
2580 }
2581
2582 return this;
2583 }
2584
2585 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2586 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2587 MSVCP_size_t __cdecl numpunct_char__Getcat(const locale_facet **facet, const locale *loc)
2588 {
2589 TRACE("(%p %p)\n", facet, loc);
2590
2591 if(facet && !*facet) {
2592 *facet = MSVCRT_operator_new(sizeof(numpunct_char));
2593 if(!*facet) {
2594 ERR("Out of memory\n");
2595 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2596 return 0;
2597 }
2598 numpunct_char_ctor_name((numpunct_char*)*facet,
2599 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
2600 }
2601
2602 return LC_NUMERIC;
2603 }
2604
2605 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
2606 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
2607 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point, 4)
2608 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
2609 char, (const numpunct_char *this), (this))
2610 char __thiscall numpunct_char_do_decimal_point(const numpunct_char *this)
2611 {
2612 TRACE("(%p)\n", this);
2613 return this->dp;
2614 }
2615
2616 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
2617 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
2618 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point, 4)
2619 char __thiscall numpunct_char_decimal_point(const numpunct_char *this)
2620 {
2621 TRACE("(%p)\n", this);
2622 return call_numpunct_char_do_decimal_point(this);
2623 }
2624
2625 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
2626 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
2627 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep, 4)
2628 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
2629 char, (const numpunct_char*), (this))
2630 char __thiscall numpunct_char_do_thousands_sep(const numpunct_char *this)
2631 {
2632 TRACE("(%p)\n", this);
2633 return this->sep;
2634 }
2635
2636 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
2637 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
2638 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep, 4)
2639 char __thiscall numpunct_char_thousands_sep(const numpunct_char *this)
2640 {
2641 TRACE("(%p)\n", this);
2642 return call_numpunct_char_do_thousands_sep(this);
2643 }
2644
2645 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2646 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2647 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping, 8)
2648 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
2649 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2650 basic_string_char* __thiscall numpunct_char_do_grouping(
2651 const numpunct_char *this, basic_string_char *ret)
2652 {
2653 TRACE("(%p)\n", this);
2654 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
2655 }
2656
2657 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2658 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2659 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping, 8)
2660 basic_string_char* __thiscall numpunct_char_grouping(const numpunct_char *this, basic_string_char *ret)
2661 {
2662 TRACE("(%p)\n", this);
2663 return call_numpunct_char_do_grouping(this, ret);
2664 }
2665
2666 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2667 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2668 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename, 8)
2669 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
2670 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2671 basic_string_char* __thiscall numpunct_char_do_falsename(
2672 const numpunct_char *this, basic_string_char *ret)
2673 {
2674 TRACE("(%p)\n", this);
2675 return MSVCP_basic_string_char_ctor_cstr(ret, this->false_name);
2676 }
2677
2678 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2679 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2680 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename, 8)
2681 basic_string_char* __thiscall numpunct_char_falsename(const numpunct_char *this, basic_string_char *ret)
2682 {
2683 TRACE("(%p)\n", this);
2684 return call_numpunct_char_do_falsename(this, ret);
2685 }
2686
2687 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2688 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2689 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename, 8)
2690 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
2691 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
2692 basic_string_char* __thiscall numpunct_char_do_truename(
2693 const numpunct_char *this, basic_string_char *ret)
2694 {
2695 TRACE("(%p)\n", this);
2696 return MSVCP_basic_string_char_ctor_cstr(ret, this->true_name);
2697 }
2698
2699 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2700 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
2701 DEFINE_THISCALL_WRAPPER(numpunct_char_truename, 8)
2702 basic_string_char* __thiscall numpunct_char_truename(const numpunct_char *this, basic_string_char *ret)
2703 {
2704 TRACE("(%p)\n", this);
2705 return call_numpunct_char_do_truename(this, ret);
2706 }
2707
2708 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
2709 locale_id numpunct_wchar_id = {0};
2710 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
2711 locale_id numpunct_short_id = {0};
2712
2713 /* ??_7?$numpunct@_W@std@@6B@ */
2714 extern const vtable_ptr MSVCP_numpunct_wchar_vtable;
2715 /* ??_7?$numpunct@G@std@@6B@ */
2716 extern const vtable_ptr MSVCP_numpunct_short_vtable;
2717
2718 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
2719 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2720 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
2721 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
2722 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init, 12)
2723 void __thiscall numpunct_wchar__Init(numpunct_wchar *this, _Locinfo *locinfo, MSVCP_bool isdef)
2724 {
2725 const char *to_convert;
2726 _Cvtvec cvt;
2727 int len;
2728
2729 TRACE("(%p %p %d)\n", this, locinfo, isdef);
2730
2731 _Locinfo__Getcvt(locinfo, &cvt);
2732
2733 to_convert = _Locinfo__Getfalse(locinfo);
2734 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
2735 this->false_name = MSVCRT_operator_new(len*sizeof(WCHAR));
2736 if(this->false_name)
2737 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
2738 (wchar_t*)this->false_name, len);
2739
2740 to_convert = _Locinfo__Gettrue(locinfo);
2741 len = MultiByteToWideChar(cvt.page, 0, to_convert, -1, NULL, 0);
2742 this->true_name = MSVCRT_operator_new(len*sizeof(WCHAR));
2743 if(this->true_name)
2744 MultiByteToWideChar(cvt.page, 0, to_convert, -1,
2745 (wchar_t*)this->true_name, len);
2746
2747 if(isdef) {
2748 this->grouping = MSVCRT_operator_new(1);
2749 if(this->grouping)
2750 *(char*)this->grouping = 0;
2751
2752 this->dp = '.';
2753 this->sep = ',';
2754 } else {
2755 const struct lconv *lc = _Locinfo__Getlconv(locinfo);
2756
2757 len = strlen(lc->grouping)+1;
2758 this->grouping = MSVCRT_operator_new(len);
2759 if(this->grouping)
2760 memcpy((char*)this->grouping, lc->grouping, len);
2761
2762 this->dp = lc->decimal_point[0];
2763 this->sep = lc->thousands_sep[0];
2764 }
2765
2766 if(!this->false_name || !this->true_name || !this->grouping) {
2767 MSVCRT_operator_delete((char*)this->grouping);
2768 MSVCRT_operator_delete((wchar_t*)this->false_name);
2769 MSVCRT_operator_delete((wchar_t*)this->true_name);
2770
2771 ERR("Out of memory\n");
2772 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2773 }
2774 }
2775
2776 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
2777 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
2778 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
2779 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
2780 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy, 4)
2781 void __thiscall numpunct_wchar__Tidy(numpunct_wchar *this)
2782 {
2783 TRACE("(%p)\n", this);
2784
2785 MSVCRT_operator_delete((char*)this->grouping);
2786 MSVCRT_operator_delete((wchar_t*)this->false_name);
2787 MSVCRT_operator_delete((wchar_t*)this->true_name);
2788 }
2789
2790 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
2791 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2792 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo, 16)
2793 numpunct_wchar* __thiscall numpunct_wchar_ctor_locinfo(numpunct_wchar *this,
2794 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2795 {
2796 TRACE("(%p %p %lu %d)\n", this, locinfo, refs, usedef);
2797 locale_facet_ctor_refs(&this->facet, refs);
2798 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
2799 numpunct_wchar__Init(this, locinfo, usedef);
2800 return this;
2801 }
2802
2803 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
2804 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
2805 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo, 16)
2806 numpunct_wchar* __thiscall numpunct_short_ctor_locinfo(numpunct_wchar *this,
2807 _Locinfo *locinfo, MSVCP_size_t refs, MSVCP_bool usedef)
2808 {
2809 numpunct_wchar_ctor_locinfo(this, locinfo, refs, usedef);
2810 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2811 return this;
2812 }
2813
2814 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
2815 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
2816 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name, 16)
2817 numpunct_wchar* __thiscall numpunct_wchar_ctor_name(numpunct_wchar *this,
2818 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2819 {
2820 _Locinfo locinfo;
2821
2822 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name), refs, usedef);
2823 locale_facet_ctor_refs(&this->facet, refs);
2824 this->facet.vtable = &MSVCP_numpunct_wchar_vtable;
2825
2826 _Locinfo_ctor_cstr(&locinfo, name);
2827 numpunct_wchar__Init(this, &locinfo, usedef);
2828 _Locinfo_dtor(&locinfo);
2829 return this;
2830 }
2831
2832 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
2833 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
2834 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name, 16)
2835 numpunct_wchar* __thiscall numpunct_short_ctor_name(numpunct_wchar *this,
2836 const char *name, MSVCP_size_t refs, MSVCP_bool usedef)
2837 {
2838 numpunct_wchar_ctor_name(this, name, refs, usedef);
2839 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2840 return this;
2841 }
2842
2843 /* ??0?$numpunct@_W@std@@QAE@I@Z */
2844 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
2845 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs, 8)
2846 numpunct_wchar* __thiscall numpunct_wchar_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
2847 {
2848 TRACE("(%p %lu)\n", this, refs);
2849 return numpunct_wchar_ctor_name(this, "C", refs, FALSE);
2850 }
2851
2852 /* ??0?$numpunct@G@std@@QAE@I@Z */
2853 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
2854 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs, 8)
2855 numpunct_wchar* __thiscall numpunct_short_ctor_refs(numpunct_wchar *this, MSVCP_size_t refs)
2856 {
2857 numpunct_wchar_ctor_refs(this, refs);
2858 this->facet.vtable = &MSVCP_numpunct_short_vtable;
2859 return this;
2860 }
2861
2862 /* ??_F?$numpunct@_W@std@@QAEXXZ */
2863 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
2864 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor, 4)
2865 numpunct_wchar* __thiscall numpunct_wchar_ctor(numpunct_wchar *this)
2866 {
2867 return numpunct_wchar_ctor_refs(this, 0);
2868 }
2869
2870 /* ??_F?$numpunct@G@std@@QAEXXZ */
2871 /* ??_F?$numpunct@G@std@@QEAAXXZ */
2872 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor, 4)
2873 numpunct_wchar* __thiscall numpunct_short_ctor(numpunct_wchar *this)
2874 {
2875 return numpunct_short_ctor_refs(this, 0);
2876 }
2877
2878 /* ??1?$numpunct@_W@std@@MAE@XZ */
2879 /* ??1?$numpunct@_W@std@@MEAA@XZ */
2880 /* ??1?$numpunct@G@std@@MAE@XZ */
2881 /* ??1?$numpunct@G@std@@MEAA@XZ */
2882 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor, 4)
2883 void __thiscall numpunct_wchar_dtor(numpunct_wchar *this)
2884 {
2885 TRACE("(%p)\n", this);
2886 numpunct_wchar__Tidy(this);
2887 }
2888
2889 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_wchar_vector_dtor, 8)
2890 numpunct_wchar* __thiscall MSVCP_numpunct_wchar_vector_dtor(numpunct_wchar *this, unsigned int flags)
2891 {
2892 TRACE("(%p %x)\n", this, flags);
2893 if(flags & 2) {
2894 /* we have an array, with the number of elements stored before the first object */
2895 int i, *ptr = (int *)this-1;
2896
2897 for(i=*ptr-1; i>=0; i--)
2898 numpunct_wchar_dtor(this+i);
2899 MSVCRT_operator_delete(ptr);
2900 } else {
2901 numpunct_wchar_dtor(this);
2902 if(flags & 1)
2903 MSVCRT_operator_delete(this);
2904 }
2905
2906 return this;
2907 }
2908
2909 DEFINE_THISCALL_WRAPPER(MSVCP_numpunct_short_vector_dtor, 8)
2910 numpunct_wchar* __thiscall MSVCP_numpunct_short_vector_dtor(numpunct_wchar *this, unsigned int flags)
2911 {
2912 return MSVCP_numpunct_wchar_vector_dtor(this, flags);
2913 }
2914
2915 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2916 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2917 MSVCP_size_t __cdecl numpunct_wchar__Getcat(const locale_facet **facet, const locale *loc)
2918 {
2919 TRACE("(%p %p)\n", facet, loc);
2920
2921 if(facet && !*facet) {
2922 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
2923 if(!*facet) {
2924 ERR("Out of memory\n");
2925 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2926 return 0;
2927 }
2928 numpunct_wchar_ctor_name((numpunct_wchar*)*facet,
2929 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
2930 }
2931
2932 return LC_NUMERIC;
2933 }
2934
2935 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2936 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2937 MSVCP_size_t __cdecl numpunct_short__Getcat(const locale_facet **facet, const locale *loc)
2938 {
2939 TRACE("(%p %p)\n", facet, loc);
2940
2941 if(facet && !*facet) {
2942 *facet = MSVCRT_operator_new(sizeof(numpunct_wchar));
2943 if(!*facet) {
2944 ERR("Out of memory\n");
2945 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
2946 return 0;
2947 }
2948 numpunct_short_ctor_name((numpunct_wchar*)*facet,
2949 MSVCP_basic_string_char_c_str(&loc->ptr->name), 0, TRUE);
2950 }
2951
2952 return LC_NUMERIC;
2953 }
2954
2955 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
2956 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
2957 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
2958 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
2959 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point, 4)
2960 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
2961 wchar_t, (const numpunct_wchar *this), (this))
2962 wchar_t __thiscall numpunct_wchar_do_decimal_point(const numpunct_wchar *this)
2963 {
2964 TRACE("(%p)\n", this);
2965 return this->dp;
2966 }
2967
2968 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
2969 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
2970 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
2971 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
2972 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point, 4)
2973 wchar_t __thiscall numpunct_wchar_decimal_point(const numpunct_wchar *this)
2974 {
2975 TRACE("(%p)\n", this);
2976 return call_numpunct_wchar_do_decimal_point(this);
2977 }
2978
2979 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
2980 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
2981 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
2982 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
2983 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep, 4)
2984 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
2985 wchar_t, (const numpunct_wchar *this), (this))
2986 wchar_t __thiscall numpunct_wchar_do_thousands_sep(const numpunct_wchar *this)
2987 {
2988 TRACE("(%p)\n", this);
2989 return this->sep;
2990 }
2991
2992 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
2993 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
2994 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
2995 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
2996 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep, 4)
2997 wchar_t __thiscall numpunct_wchar_thousands_sep(const numpunct_wchar *this)
2998 {
2999 TRACE("(%p)\n", this);
3000 return call_numpunct_wchar_do_thousands_sep(this);
3001 }
3002
3003 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3004 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3005 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3006 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3007 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping, 8)
3008 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3009 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3010 basic_string_char* __thiscall numpunct_wchar_do_grouping(const numpunct_wchar *this, basic_string_char *ret)
3011 {
3012 TRACE("(%p)\n", this);
3013 return MSVCP_basic_string_char_ctor_cstr(ret, this->grouping);
3014 }
3015
3016 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3017 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3018 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3019 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3020 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping, 8)
3021 basic_string_char* __thiscall numpunct_wchar_grouping(const numpunct_wchar *this, basic_string_char *ret)
3022 {
3023 TRACE("(%p)\n", this);
3024 return call_numpunct_wchar_do_grouping(this, ret);
3025 }
3026
3027 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3028 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3029 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3030 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3031 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename, 8)
3032 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3033 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3034 basic_string_wchar* __thiscall numpunct_wchar_do_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3035 {
3036 TRACE("(%p)\n", this);
3037 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->false_name);
3038 }
3039
3040 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3041 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3042 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3043 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3044 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename, 8)
3045 basic_string_wchar* __thiscall numpunct_wchar_falsename(const numpunct_wchar *this, basic_string_wchar *ret)
3046 {
3047 TRACE("(%p)\n", this);
3048 return call_numpunct_wchar_do_falsename(this, ret);
3049 }
3050
3051 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3052 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3053 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3054 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3055 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename, 8)
3056 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3057 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3058 basic_string_wchar* __thiscall numpunct_wchar_do_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3059 {
3060 TRACE("(%p)\n", this);
3061 return MSVCP_basic_string_wchar_ctor_cstr(ret, this->true_name);
3062 }
3063
3064 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3065 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3066 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3067 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3068 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename, 8)
3069 basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *this, basic_string_wchar *ret)
3070 {
3071 TRACE("(%p)\n", this);
3072 return call_numpunct_wchar_do_truename(this, ret);
3073 }
3074
3075 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
3076 locale_id num_get_wchar_id = {0};
3077 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
3078 locale_id num_get_short_id = {0};
3079
3080 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
3081 extern const vtable_ptr MSVCP_num_get_wchar_vtable;
3082 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
3083 extern const vtable_ptr MSVCP_num_get_short_vtable;
3084
3085 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3086 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3087 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3088 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3089 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor__Init, 8)
3090 void __thiscall num_get_wchar_ctor__Init(num_get *this, const _Locinfo *locinfo)
3091 {
3092 FIXME("(%p %p) stub\n", this, locinfo);
3093 }
3094
3095 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3096 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3097 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo, 12)
3098 num_get* __thiscall num_get_wchar_ctor_locinfo(num_get *this,
3099 _Locinfo *locinfo, MSVCP_size_t refs)
3100 {
3101 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3102 return NULL;
3103 }
3104
3105 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3106 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3107 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo, 12)
3108 num_get* __thiscall num_get_short_ctor_locinfo(num_get *this,
3109 _Locinfo *locinfo, MSVCP_size_t refs)
3110 {
3111 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3112 return NULL;
3113 }
3114
3115 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
3116 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
3117 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs, 8)
3118 num_get* __thiscall num_get_wchar_ctor_refs(num_get *this, MSVCP_size_t refs)
3119 {
3120 FIXME("(%p %lu) stub\n", this, refs);
3121 return NULL;
3122 }
3123
3124 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
3125 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
3126 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs, 8)
3127 num_get* __thiscall num_get_short_ctor_refs(num_get *this, MSVCP_size_t refs)
3128 {
3129 FIXME("(%p %lu) stub\n", this, refs);
3130 return NULL;
3131 }
3132
3133 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3134 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3135 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor, 4)
3136 num_get* __thiscall num_get_wchar_ctor(num_get *this)
3137 {
3138 FIXME("(%p) stub\n", this);
3139 return NULL;
3140 }
3141
3142 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
3143 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
3144 DEFINE_THISCALL_WRAPPER(num_get_short_ctor, 4)
3145 num_get* __thiscall num_get_short_ctor(num_get *this)
3146 {
3147 FIXME("(%p) stub\n", this);
3148 return NULL;
3149 }
3150
3151 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
3152 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
3153 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
3154 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
3155 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor, 4)
3156 void __thiscall num_get_wchar_dtor(num_get *this)
3157 {
3158 FIXME("(%p) stub\n", this);
3159 }
3160
3161 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar_vector_dtor, 8)
3162 num_get* __thiscall MSVCP_num_get_wchar_vector_dtor(num_get *this, unsigned int flags)
3163 {
3164 TRACE("(%p %x)\n", this, flags);
3165 if(flags & 2) {
3166 /* we have an array, with the number of elements stored before the first object */
3167 int i, *ptr = (int *)this-1;
3168
3169 for(i=*ptr-1; i>=0; i--)
3170 num_get_wchar_dtor(this+i);
3171 MSVCRT_operator_delete(ptr);
3172 } else {
3173 num_get_wchar_dtor(this);
3174 if(flags & 1)
3175 MSVCRT_operator_delete(this);
3176 }
3177
3178 return this;
3179 }
3180
3181 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_short_vector_dtor, 8)
3182 num_get* __thiscall MSVCP_num_get_short_vector_dtor(num_get *this, unsigned int flags)
3183 {
3184 return MSVCP_num_get_wchar_vector_dtor(this, flags);
3185 }
3186
3187 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3188 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3189 MSVCP_size_t __cdecl num_get_wchar__Getcat(const locale_facet **facet, const locale *loc)
3190 {
3191 FIXME("(%p %p) stub\n", facet, loc);
3192 return -1;
3193 }
3194
3195 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3196 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3197 MSVCP_size_t __cdecl num_get_short__Getcat(const locale_facet **facet, const locale *loc)
3198 {
3199 FIXME("(%p %p) stub\n", facet, loc);
3200 return -1;
3201 }
3202
3203 /* ?_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 */
3204 /* ?_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 */
3205 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1ABVlocale@2@@Z */
3206 /* ?_Getffld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEBVlocale@2@@Z */
3207 int __cdecl num_get_wchar__Getffld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
3208 istreambuf_iterator_wchar *last, const locale *loc)
3209 {
3210 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
3211 return -1;
3212 }
3213
3214 /* ?_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 */
3215 /* ?_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 */
3216 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AAVios_base@2@PAH@Z */
3217 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEAVios_base@2@PEAH@Z */
3218 int __cdecl num_get_wchar__Getffldx(num_get *this, char *dest, istreambuf_iterator_wchar *first,
3219 istreambuf_iterator_wchar *last, struct _ios_base *ios, int *phexexp)
3220 {
3221 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
3222 return -1;
3223 }
3224
3225 /* ?_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 */
3226 /* ?_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 */
3227 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HABVlocale@2@@Z */
3228 /* ?_Getifld@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1HAEBVlocale@2@@Z */
3229 int __cdecl num_get_wchar__Getifld(num_get *this, char *dest, istreambuf_iterator_wchar *first,
3230 istreambuf_iterator_wchar *last, int fmtflags, const locale *loc)
3231 {
3232 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
3233 return -1;
3234 }
3235
3236 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
3237 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
3238 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
3239 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
3240 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig, 20)
3241 int __thiscall MSVCP_num_get_wchar__Hexdig(num_get *this, wchar_t dig, wchar_t e0, wchar_t al, wchar_t au)
3242 {
3243 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
3244 return -1;
3245 }
3246
3247 /* ?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 */
3248 /* ?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 */
3249 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
3250 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
3251 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void,36)
3252 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
3253 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
3254 {
3255 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3256 return ret;
3257 }
3258
3259 /* ?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 */
3260 /* ?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 */
3261 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAPAX@Z */
3262 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAPEAX@Z */
3263 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void,36)
3264 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get *this, istreambuf_iterator_wchar *ret,
3265 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, void **pval)
3266 {
3267 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3268 return ret;
3269 }
3270
3271 /* ?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 */
3272 /* ?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 */
3273 /* ?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 */
3274 /* ?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 */
3275 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
3276 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
3277 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
3278 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
3279 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double,36)
3280 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
3281 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
3282 {
3283 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3284 return ret;
3285 }
3286
3287 /* ?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 */
3288 /* ?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 */
3289 /* ?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 */
3290 /* ?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 */
3291 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAO@Z */
3292 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAO@Z */
3293 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAN@Z */
3294 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAN@Z */
3295 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double,36)
3296 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get *this, istreambuf_iterator_wchar *ret,
3297 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, double *pval)
3298 {
3299 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3300 return ret;
3301 }
3302
3303 /* ?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 */
3304 /* ?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 */
3305 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
3306 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
3307 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float,36)
3308 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
3309 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
3310 {
3311 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3312 return ret;
3313 }
3314
3315 /* ?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 */
3316 /* ?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 */
3317 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
3318 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
3319 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float,36)
3320 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_float(const num_get *this, istreambuf_iterator_wchar *ret,
3321 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, float *pval)
3322 {
3323 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3324 return ret;
3325 }
3326
3327 /* ?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 */
3328 /* ?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 */
3329 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
3330 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
3331 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64,36)
3332 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
3333 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
3334 {
3335 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3336 return ret;
3337 }
3338
3339 /* ?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 */
3340 /* ?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 */
3341 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_K@Z */
3342 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_K@Z */
3343 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64,36)
3344 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get *this, istreambuf_iterator_wchar *ret,
3345 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONGLONG *pval)
3346 {
3347 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3348 return ret;
3349 }
3350
3351 /* ?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 */
3352 /* ?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 */
3353 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
3354 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
3355 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64,36)
3356 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
3357 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
3358 {
3359 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3360 return ret;
3361 }
3362
3363 /* ?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 */
3364 /* ?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 */
3365 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_J@Z */
3366 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_J@Z */
3367 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64,36)
3368 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get *this, istreambuf_iterator_wchar *ret,
3369 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONGLONG *pval)
3370 {
3371 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3372 return ret;
3373 }
3374
3375 /* ?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 */
3376 /* ?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 */
3377 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
3378 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
3379 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong,36)
3380 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
3381 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
3382 {
3383 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3384 return ret;
3385 }
3386
3387 /* ?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 */
3388 /* ?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 */
3389 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAK@Z */
3390 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAK@Z */
3391 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong,36)
3392 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ulong(const num_get *this, istreambuf_iterator_wchar *ret,
3393 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, ULONG *pval)
3394 {
3395 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3396 return ret;
3397 }
3398
3399 /* ?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 */
3400 /* ?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 */
3401 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
3402 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
3403 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long,36)
3404 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
3405 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *pval)
3406 {
3407 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3408 return ret;
3409 }
3410
3411 /* ?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 */
3412 /* ?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 */
3413 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAJ@Z */
3414 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAJ@Z */
3415 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long,36)
3416 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_long(const num_get *this, istreambuf_iterator_wchar *ret,
3417 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, LONG *pval)
3418 {
3419 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3420 return ret;
3421 }
3422
3423 /* ?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 */
3424 /* ?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 */
3425 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
3426 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
3427 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint,36)
3428 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
3429 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *pval)
3430 {
3431 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3432 return ret;
3433 }
3434
3435 /* ?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 */
3436 /* ?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 */
3437 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
3438 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAI@Z */
3439 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint,36)
3440 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint(const num_get *this, istreambuf_iterator_wchar *ret,
3441 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned int *pval)
3442 {
3443 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3444 return ret;
3445 }
3446
3447 /* ?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 */
3448 /* ?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 */
3449 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAG@Z */
3450 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
3451 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort,36)
3452 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
3453 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *pval)
3454 {
3455 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3456 return ret;
3457 }
3458
3459 /* ?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 */
3460 /* ?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 */
3461 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAG@ */
3462 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEAG@Z */
3463 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort,36)
3464 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ushort(const num_get *this, istreambuf_iterator_wchar *ret,
3465 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, unsigned short *pval)
3466 {
3467 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3468 return ret;
3469 }
3470
3471 /* ?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 */
3472 /* ?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 */
3473 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
3474 /* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
3475 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool,36)
3476 istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
3477 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3478 {
3479 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3480 return ret;
3481 }
3482
3483 /* ?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 */
3484 /* ?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 */
3485 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAA_N@Z */
3486 /* ?get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AEAVios_base@2@AEAHAEA_N@Z */
3487 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool,36)
3488 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get *this, istreambuf_iterator_wchar *ret,
3489 istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3490 {
3491 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3492 return ret;
3493 }
3494
3495 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
3496 locale_id num_get_char_id = {0};
3497
3498 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
3499 extern const vtable_ptr MSVCP_num_get_char_vtable;
3500
3501 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
3502 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
3503 DEFINE_THISCALL_WRAPPER(num_get_char_ctor__Init, 8)
3504 void __thiscall num_get_char_ctor__Init(num_get *this, const _Locinfo *locinfo)
3505 {
3506 FIXME("(%p %p) stub\n", this, locinfo);
3507 }
3508
3509 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
3510 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3511 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo, 12)
3512 num_get* __thiscall num_get_char_ctor_locinfo(num_get *this,
3513 _Locinfo *locinfo, MSVCP_size_t refs)
3514 {
3515 FIXME("(%p %p %lu) stub\n", this, locinfo, refs);
3516 return NULL;
3517 }
3518
3519 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
3520 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
3521 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs, 8)
3522 num_get* __thiscall num_get_char_ctor_refs(num_get *this, MSVCP_size_t refs)
3523 {
3524 FIXME("(%p %lu) stub\n", this, refs);
3525 return NULL;
3526 }
3527
3528 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
3529 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
3530 DEFINE_THISCALL_WRAPPER(num_get_char_ctor, 4)
3531 num_get* __thiscall num_get_char_ctor(num_get *this)
3532 {
3533 FIXME("(%p) stub\n", this);
3534 return NULL;
3535 }
3536
3537 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
3538 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
3539 DEFINE_THISCALL_WRAPPER(num_get_char_dtor, 4)
3540 void __thiscall num_get_char_dtor(num_get *this)
3541 {
3542 FIXME("(%p) stub\n", this);
3543 }
3544
3545 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char_vector_dtor, 8)
3546 num_get* __thiscall MSVCP_num_get_char_vector_dtor(num_get *this, unsigned int flags)
3547 {
3548 TRACE("(%p %x)\n", this, flags);
3549 if(flags & 2) {
3550 /* we have an array, with the number of elements stored before the first object */
3551 int i, *ptr = (int *)this-1;
3552
3553 for(i=*ptr-1; i>=0; i--)
3554 num_get_char_dtor(this+i);
3555 MSVCRT_operator_delete(ptr);
3556 } else {
3557 num_get_char_dtor(this);
3558 if(flags & 1)
3559 MSVCRT_operator_delete(this);
3560 }
3561
3562 return this;
3563 }
3564
3565 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3566 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3567 MSVCP_size_t __cdecl num_get_char__Getcat(const locale_facet **facet, const locale *loc)
3568 {
3569 FIXME("(%p %p) stub\n", facet, loc);
3570 return -1;
3571 }
3572
3573 /* ?_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 */
3574 /* ?_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 */
3575 int __cdecl num_get_char__Getffld(num_get *this, char *dest, istreambuf_iterator_char *first,
3576 istreambuf_iterator_char *last, const locale *loc)
3577 {
3578 FIXME("(%p %p %p %p) stub\n", dest, first, last, loc);
3579 return -1;
3580 }
3581
3582 /* ?_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 */
3583 /* ?_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 */
3584 int __cdecl num_get_char__Getffldx(num_get *this, char *dest, istreambuf_iterator_char *first,
3585 istreambuf_iterator_char *last, struct _ios_base *ios, int *phexexp)
3586 {
3587 FIXME("(%p %p %p %p %p) stub\n", dest, first, last, ios, phexexp);
3588 return -1;
3589 }
3590
3591 /* ?_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 */
3592 /* ?_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 */
3593 int __cdecl num_get_char__Getifld(num_get *this, char *dest, istreambuf_iterator_char *first,
3594 istreambuf_iterator_char *last, int fmtflags, const locale *loc)
3595 {
3596 FIXME("(%p %p %p %04x %p) stub\n", dest, first, last, fmtflags, loc);
3597 return -1;
3598 }
3599
3600 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
3601 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
3602 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig, 20)
3603 int __thiscall MSVCP_num_get_char__Hexdig(num_get *this, char dig, char e0, char al, char au)
3604 {
3605 FIXME("(%p %c %c %c %c) stub\n", this, dig, e0, al, au);
3606 return -1;
3607 }
3608
3609 /* ?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 */
3610 /* ?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 */
3611 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void,36)
3612 istreambuf_iterator_char *__thiscall num_get_char_do_get_void(const num_get *this, istreambuf_iterator_char *ret,
3613 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
3614 {
3615 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3616 return ret;
3617 }
3618
3619 /* ?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 */
3620 /* ?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 */
3621 DEFINE_THISCALL_WRAPPER(num_get_char_get_void,36)
3622 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get *this, istreambuf_iterator_char *ret,
3623 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, void **pval)
3624 {
3625 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3626 return ret;
3627 }
3628
3629 /* ?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 */
3630 /* ?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 */
3631 /* ?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 */
3632 /* ?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 */
3633 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double,36)
3634 istreambuf_iterator_char *__thiscall num_get_char_do_get_double(const num_get *this, istreambuf_iterator_char *ret,
3635 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
3636 {
3637 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3638 return ret;
3639 }
3640
3641 /* ?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 */
3642 /* ?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 */
3643 /* ?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 */
3644 /* ?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 */
3645 DEFINE_THISCALL_WRAPPER(num_get_char_get_double,36)
3646 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get *this, istreambuf_iterator_char *ret,
3647 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, double *pval)
3648 {
3649 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3650 return ret;
3651 }
3652
3653 /* ?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 */
3654 /* ?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 */
3655 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float,36)
3656 istreambuf_iterator_char *__thiscall num_get_char_do_get_float(const num_get *this, istreambuf_iterator_char *ret,
3657 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
3658 {
3659 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3660 return ret;
3661 }
3662
3663 /* ?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 */
3664 /* ?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 */
3665 DEFINE_THISCALL_WRAPPER(num_get_char_get_float,36)
3666 istreambuf_iterator_char *__thiscall num_get_char_get_float(const num_get *this, istreambuf_iterator_char *ret,
3667 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, float *pval)
3668 {
3669 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3670 return ret;
3671 }
3672
3673 /* ?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 */
3674 /* ?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 */
3675 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64,36)
3676 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
3677 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
3678 {
3679 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3680 return ret;
3681 }
3682
3683 /* ?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 */
3684 /* ?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 */
3685 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64,36)
3686 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get *this, istreambuf_iterator_char *ret,
3687 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONGLONG *pval)
3688 {
3689 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3690 return ret;
3691 }
3692
3693 /* ?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 */
3694 /* ?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 */
3695 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64,36)
3696 istreambuf_iterator_char *__thiscall num_get_char_do_get_int64(const num_get *this, istreambuf_iterator_char *ret,
3697 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
3698 {
3699 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3700 return ret;
3701 }
3702
3703 /* ?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 */
3704 /* ?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 */
3705 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64,36)
3706 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get *this, istreambuf_iterator_char *ret,
3707 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONGLONG *pval)
3708 {
3709 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3710 return ret;
3711 }
3712
3713 /* ?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 */
3714 /* ?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 */
3715 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong,36)
3716 istreambuf_iterator_char *__thiscall num_get_char_do_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
3717 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
3718 {
3719 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3720 return ret;
3721 }
3722
3723 /* ?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 */
3724 /* ?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 */
3725 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong,36)
3726 istreambuf_iterator_char *__thiscall num_get_char_get_ulong(const num_get *this, istreambuf_iterator_char *ret,
3727 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, ULONG *pval)
3728 {
3729 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3730 return ret;
3731 }
3732
3733 /* ?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 */
3734 /* ?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 */
3735 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long,36)
3736 istreambuf_iterator_char *__thiscall num_get_char_do_get_long(const num_get *this, istreambuf_iterator_char *ret,
3737 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
3738 {
3739 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3740 return ret;
3741 }
3742
3743 /* ?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 */
3744 /* ?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 */
3745 DEFINE_THISCALL_WRAPPER(num_get_char_get_long,36)
3746 istreambuf_iterator_char *__thiscall num_get_char_get_long(const num_get *this, istreambuf_iterator_char *ret,
3747 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, LONG *pval)
3748 {
3749 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3750 return ret;
3751 }
3752
3753 /* ?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 */
3754 /* ?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 */
3755 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint,36)
3756 istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get *this, istreambuf_iterator_char *ret,
3757 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
3758 {
3759 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3760 return ret;
3761 }
3762
3763 /* ?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 */
3764 /* ?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 */
3765 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint,36)
3766 istreambuf_iterator_char *__thiscall num_get_char_get_uint(const num_get *this, istreambuf_iterator_char *ret,
3767 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned int *pval)
3768 {
3769 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3770 return ret;
3771 }
3772
3773 /* ?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 */
3774 /* ?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 */
3775 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort,36)
3776 istreambuf_iterator_char *__thiscall num_get_char_do_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
3777 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
3778 {
3779 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3780 return ret;
3781 }
3782
3783 /* ?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 */
3784 /* ?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 */
3785 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort,36)
3786 istreambuf_iterator_char *__thiscall num_get_char_get_ushort(const num_get *this, istreambuf_iterator_char *ret,
3787 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, unsigned short *pval)
3788 {
3789 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3790 return ret;
3791 }
3792
3793 /* ?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 */
3794 /* ?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 */
3795 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool,36)
3796 istreambuf_iterator_char *__thiscall num_get_char_do_get_bool(const num_get *this, istreambuf_iterator_char *ret,
3797 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3798 {
3799 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3800 return ret;
3801 }
3802
3803 /* ?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 */
3804 /* ?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 */
3805 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool,36)
3806 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get *this, istreambuf_iterator_char *ret,
3807 istreambuf_iterator_char first, istreambuf_iterator_char last, struct _ios_base *base, int *state, MSVCP_bool *pval)
3808 {
3809 FIXME("(%p %p %p %p %p) stub\n", this, ret, base, state, pval);
3810 return ret;
3811 }
3812
3813 /* ??0_Locimp@locale@std@@AAE@_N@Z */
3814 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
3815 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent, 8)
3816 locale__Locimp* __thiscall locale__Locimp_ctor_transparent(locale__Locimp *this, MSVCP_bool transparent)
3817 {
3818 TRACE("(%p %d)\n", this, transparent);
3819
3820 memset(this, 0, sizeof(locale__Locimp));
3821 locale_facet_ctor_refs(&this->facet, 1);
3822 this->transparent = transparent;
3823 MSVCP_basic_string_char_ctor_cstr(&this->name, "*");
3824 return this;
3825 }
3826
3827 /* ??_F_Locimp@locale@std@@QAEXXZ */
3828 /* ??_F_Locimp@locale@std@@QEAAXXZ */
3829 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor, 4)
3830 locale__Locimp* __thiscall locale__Locimp_ctor(locale__Locimp *this)
3831 {
3832 return locale__Locimp_ctor_transparent(this, FALSE);
3833 }
3834
3835 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
3836 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
3837 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor, 8)
3838 locale__Locimp* __thiscall locale__Locimp_copy_ctor(locale__Locimp *this, const locale__Locimp *copy)
3839 {
3840 _Lockit lock;
3841 MSVCP_size_t i;
3842
3843 TRACE("(%p %p)\n", this, copy);
3844
3845 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
3846 memcpy(this, copy, sizeof(locale__Locimp));
3847 locale_facet_ctor_refs(&this->facet, 1);
3848 if(copy->facetvec) {
3849 this->facetvec = MSVCRT_operator_new(copy->facet_cnt*sizeof(locale_facet*));
3850 if(!this->facetvec) {
3851 _Lockit_dtor(&lock);
3852 ERR("Out of memory\n");
3853 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3854 return NULL;
3855 }
3856 for(i=0; i<this->facet_cnt; i++)
3857 if(this->facetvec[i])
3858 locale_facet__Incref(this->facetvec[i]);
3859 }
3860 MSVCP_basic_string_char_copy_ctor(&this->name, ©->name);
3861 _Lockit_dtor(&lock);
3862 return this;
3863 }
3864
3865 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
3866 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
3867 locale__Locimp* __cdecl locale__Locimp__Locimp_ctor(locale__Locimp *this, const locale__Locimp *copy)
3868 {
3869 return locale__Locimp_copy_ctor(this, copy);
3870 }
3871
3872 /* ??1_Locimp@locale@std@@MAE@XZ */
3873 /* ??1_Locimp@locale@std@@MEAA@XZ */
3874 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor, 4)
3875 void __thiscall locale__Locimp_dtor(locale__Locimp *this)
3876 {
3877 TRACE("(%p)\n", this);
3878
3879 if(locale_facet__Decref(&this->facet)) {
3880 MSVCP_size_t i;
3881 for(i=0; i<this->facet_cnt; i++)
3882 if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i]))
3883 call_locale_facet_vector_dtor(this->facetvec[i], 0);
3884
3885 MSVCRT_operator_delete(this->facetvec);
3886 MSVCP_basic_string_char_dtor(&this->name);
3887 }
3888 }
3889
3890 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
3891 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
3892 void __cdecl locale__Locimp__Locimp_dtor(locale__Locimp *this)
3893 {
3894 locale__Locimp_dtor(this);
3895 }
3896
3897 DEFINE_THISCALL_WRAPPER(MSVCP_locale__Locimp_vector_dtor, 8)
3898 locale__Locimp* __thiscall MSVCP_locale__Locimp_vector_dtor(locale__Locimp *this, unsigned int flags)
3899 {
3900 TRACE("(%p %x)\n", this, flags);
3901 if(flags & 2) {
3902 /* we have an array, with the number of elements stored before the first object */
3903 int i, *ptr = (int *)this-1;
3904
3905 for(i=*ptr-1; i>=0; i--)
3906 locale__Locimp_dtor(this+i);
3907 MSVCRT_operator_delete(ptr);
3908 } else {
3909 locale__Locimp_dtor(this);
3910 if(flags & 1)
3911 MSVCRT_operator_delete(this);
3912 }
3913
3914 return this;
3915 }
3916
3917 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
3918 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
3919 void __cdecl locale__Locimp__Locimp_Addfac(locale__Locimp *locimp, locale_facet *facet, MSVCP_size_t id)
3920 {
3921 _Lockit lock;
3922
3923 TRACE("(%p %p %lu)\n", locimp, facet, id);
3924
3925 _Lockit_ctor_locktype(&lock, _LOCK_LOCALE);
3926 if(id >= locimp->facet_cnt) {
3927 MSVCP_size_t new_size = id+1;
3928 locale_facet **new_facetvec;
3929
3930 if(new_size < locale_id__Id_cnt+1)
3931 new_size = locale_id__Id_cnt+1;
3932
3933 new_facetvec = MSVCRT_operator_new(sizeof(locale_facet*)*new_size);
3934 if(!new_facetvec) {
3935 _Lockit_dtor(&lock);
3936 ERR("Out of memory\n");
3937 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
3938 return;
3939 }
3940
3941 memset(new_facetvec, 0, sizeof(locale_facet*)*new_size);
3942 memcpy(new_facetvec, locimp->facetvec, sizeof(locale_facet*)*locimp->facet_cnt);
3943 MSVCRT_operator_delete(locimp->facetvec);
3944 locimp->facetvec = new_facetvec;
3945 locimp->facet_cnt = new_size;
3946 }
3947
3948 if(locimp->facetvec[id] && locale_facet__Decref(locimp->facetvec[id]))
3949 call_locale_facet_vector_dtor(locimp->facetvec[id], 0);
3950
3951 locimp->facetvec[id] = facet;
3952 if(facet)
3953 locale_facet__Incref(facet);
3954 _Lockit_dtor(&lock);
3955 }
3956
3957 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
3958 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
3959 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac, 12)
3960 void __thiscall locale__Locimp__Addfac(locale__Locimp *this, locale_facet *facet, MSVCP_size_t id)
3961 {
3962 locale__Locimp__Locimp_Addfac(this, facet, id);
3963 }
3964
3965 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
3966 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
3967 locale__Locimp** __cdecl locale__Locimp__Clocptr_func(void)
3968 {
3969 FIXME("stub\n");
3970 return NULL;
3971 }
3972
3973 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
3974 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3975 locale__Locimp* __cdecl locale__Locimp__Makeloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3976 {
3977 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3978 return NULL;
3979 }
3980
3981 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3982 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3983 void __cdecl locale__Locimp__Makeushloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3984 {
3985 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3986 }
3987
3988 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3989 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3990 void __cdecl locale__Locimp__Makewloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3991 {
3992 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
3993 }
3994
3995 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
3996 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
3997 void __cdecl locale__Locimp__Makexloc(const _Locinfo *locinfo, category cat, locale__Locimp *locimp, const locale *loc)
3998 {
3999 FIXME("(%p %d %p %p) stub\n", locinfo, cat, locimp, loc);
4000 }
4001
4002 /* ??_7_Locimp@locale@std@@6B@ */
4003 const vtable_ptr MSVCP_locale__Locimp_vtable[] = {
4004 (vtable_ptr)THISCALL_NAME(MSVCP_locale__Locimp_vector_dtor)
4005 };
4006
4007 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
4008 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
4009 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp, 8)
4010 locale* __thiscall locale_ctor_locimp(locale *this, locale__Locimp *locimp)
4011 {
4012 TRACE("(%p %p)\n", this, locimp);
4013 /* Don't change locimp reference counter */
4014 this->ptr = locimp;
4015 return this;
4016 }
4017
4018 /* ??0locale@std@@QAE@ABV01@0H@Z */
4019 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
4020 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale, 16)
4021 locale* __thiscall locale_ctor_locale_locale(locale *this, const locale *loc, const locale *other, category cat)
4022 {
4023 FIXME("(%p %p %p %d) stub\n", this, loc, other, cat);
4024 return NULL;
4025 }
4026
4027 /* ??0locale@std@@QAE@ABV01@@Z */
4028 /* ??0locale@std@@QEAA@AEBV01@@Z */
4029 DEFINE_THISCALL_WRAPPER(locale_copy_ctor, 8)
4030 locale* __thiscall locale_copy_ctor(locale *this, const locale *copy)
4031 {
4032 TRACE("(%p %p)\n", this, copy);
4033 this->ptr = copy->ptr;
4034 locale_facet__Incref(&this->ptr->facet);
4035 return this;
4036 }
4037
4038 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
4039 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
4040 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr, 16)
4041 locale* __thiscall locale_ctor_locale_cstr(locale *this, const locale *loc, const char *locname, category cat)
4042 {
4043 FIXME("(%p %p %s %d) stub\n", this, loc, locname, cat);
4044 return NULL;
4045 }
4046
4047 /* ??0locale@std@@QAE@PBDH@Z */
4048 /* ??0locale@std@@QEAA@PEBDH@Z */
4049 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr, 12)
4050 locale* __thiscall locale_ctor_cstr(locale *this, const char *locname, category cat)
4051 {
4052 FIXME("(%p %s %d) stub\n", this, locname, cat);
4053 return NULL;
4054 }
4055
4056 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
4057 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
4058 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized, 8)
4059 locale* __thiscall locale_ctor_uninitialized(locale *this, int uninitialized)
4060 {
4061 TRACE("(%p)\n", this);
4062 this->ptr = NULL;
4063 return this;
4064 }
4065
4066 /* ??0locale@std@@QAE@XZ */
4067 /* ??0locale@std@@QEAA@XZ */
4068 DEFINE_THISCALL_WRAPPER(locale_ctor, 4)
4069 locale* __thiscall locale_ctor(locale *this)
4070 {
4071 TRACE("(%p)\n", this);
4072 this->ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
4073 if(!this->ptr) {
4074 ERR("Out of memory\n");
4075 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4076 return NULL;
4077 }
4078
4079 locale__Locimp_ctor(this->ptr);
4080 return this;
4081 }
4082
4083 /* ??1locale@std@@QAE@XZ */
4084 /* ??1locale@std@@QEAA@XZ */
4085 DEFINE_THISCALL_WRAPPER(locale_dtor, 4)
4086 void __thiscall locale_dtor(locale *this)
4087 {
4088 TRACE("(%p)\n", this);
4089 if(this->ptr)
4090 locale__Locimp_dtor(this->ptr);
4091 }
4092
4093 DEFINE_THISCALL_WRAPPER(MSVCP_locale_vector_dtor, 8)
4094 locale* __thiscall MSVCP_locale_vector_dtor(locale *this, unsigned int flags)
4095 {
4096 TRACE("(%p %x)\n", this, flags);
4097 if(flags & 2) {
4098 /* we have an array, with the number of elements stored before the first object */
4099 int i, *ptr = (int *)this-1;
4100
4101 for(i=*ptr-1; i>=0; i--)
4102 locale_dtor(this+i);
4103 MSVCRT_operator_delete(ptr);
4104 } else {
4105 locale_dtor(this);
4106 if(flags & 1)
4107 MSVCRT_operator_delete(this);
4108 }
4109
4110 return this;
4111 }
4112
4113 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
4114 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
4115 DEFINE_THISCALL_WRAPPER(locale_operator_assign, 8)
4116 locale* __thiscall locale_operator_assign(locale *this, const locale *loc)
4117 {
4118 FIXME("(%p %p) stub\n", this, loc);
4119 return NULL;
4120 }
4121
4122 /* ??8locale@std@@QBE_NABV01@@Z */
4123 /* ??8locale@std@@QEBA_NAEBV01@@Z */
4124 DEFINE_THISCALL_WRAPPER(locale_operator_equal, 8)
4125 MSVCP_bool __thiscall locale_operator_equal(const locale *this, const locale *loc)
4126 {
4127 FIXME("(%p %p) stub\n", this, loc);
4128 return 0;
4129 }
4130
4131 /* ??9locale@std@@QBE_NABV01@@Z */
4132 /* ??9locale@std@@QEBA_NAEBV01@@Z */
4133 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal, 8)
4134 MSVCP_bool __thiscall locale_operator_not_equal(const locale *this, locale const *loc)
4135 {
4136 FIXME("(%p %p) stub\n", this, loc);
4137 return 0;
4138 }
4139
4140 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
4141 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
4142 DEFINE_THISCALL_WRAPPER(locale__Addfac, 16)
4143 locale* __thiscall locale__Addfac(locale *this, locale_facet *facet, MSVCP_size_t id, MSVCP_size_t catmask)
4144 {
4145 TRACE("(%p %p %lu %lu)\n", this, facet, id, catmask);
4146
4147 if(this->ptr->facet.refs > 1) {
4148 locale__Locimp *new_ptr = MSVCRT_operator_new(sizeof(locale__Locimp));
4149 if(!new_ptr) {
4150 ERR("Out of memory\n");
4151 throw_exception(EXCEPTION_BAD_ALLOC, NULL);
4152 return NULL;
4153 }
4154 locale__Locimp_copy_ctor(new_ptr, this->ptr);
4155 locale_facet__Decref(&this->ptr->facet);
4156 this->ptr = new_ptr;
4157 }
4158
4159 locale__Locimp__Addfac(this->ptr, facet, id);
4160
4161 if(catmask) {
4162 MSVCP_basic_string_char_dtor(&this->ptr->name);
4163 MSVCP_basic_string_char_ctor_cstr(&this->ptr->name, "*");
4164 }
4165 return this;
4166 }
4167
4168 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
4169 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
4170 DEFINE_THISCALL_WRAPPER(locale__Getfacet, 8)
4171 const locale_facet* __thiscall locale__Getfacet(const locale *this, MSVCP_size_t id)
4172 {
4173 FIXME("(%p %lu) stub\n", this, id);
4174 return NULL;
4175 }
4176
4177 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
4178 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
4179 locale__Locimp* __cdecl locale__Init(void)
4180 {
4181 FIXME("stub\n");
4182 return NULL;
4183 }
4184
4185 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
4186 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
4187 locale__Locimp* __cdecl locale__Getgloballocale(void)
4188 {
4189 FIXME("stub\n");
4190 return NULL;
4191 }
4192
4193 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
4194 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
4195 void __cdecl locale__Setgloballocale(void *locimp)
4196 {
4197 FIXME("(%p) stub\n", locimp);
4198 }
4199
4200 /* ?classic@locale@std@@SAABV12@XZ */
4201 /* ?classic@locale@std@@SAAEBV12@XZ */
4202 const locale* __cdecl locale_classic(void)
4203 {
4204 FIXME("stub\n");
4205 return NULL;
4206 }
4207
4208 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4209 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4210 DEFINE_THISCALL_WRAPPER(locale_name, 8)
4211 basic_string_char* __thiscall locale_name(const locale *this, basic_string_char *ret)
4212 {
4213 TRACE( "(%p)\n", this);
4214 MSVCP_basic_string_char_copy_ctor(ret, &this->ptr->name);
4215 return ret;
4216 }
4217
4218 DEFINE_RTTI_DATA(locale_facet, 0, 0, NULL, NULL, NULL, ".?AVfacet@locale@std@@");
4219 DEFINE_RTTI_DATA(collate_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@D@std@@");
4220 DEFINE_RTTI_DATA(collate_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@_W@std@@");
4221 DEFINE_RTTI_DATA(collate_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$collate@G@std@@");
4222 DEFINE_RTTI_DATA(ctype_base, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AUctype_base@std@@");
4223 DEFINE_RTTI_DATA(ctype_char, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@D@std@@");
4224 DEFINE_RTTI_DATA(ctype_wchar, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@_W@std@@");
4225 DEFINE_RTTI_DATA(ctype_short, 0, 2, &ctype_base_rtti_base_descriptor, &locale_facet_rtti_base_descriptor, NULL, ".?AV?$ctype@G@std@@");
4226 DEFINE_RTTI_DATA(numpunct_char, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@D@std@@");
4227 DEFINE_RTTI_DATA(numpunct_wchar, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@_W@std@@");
4228 DEFINE_RTTI_DATA(numpunct_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$numpunct@G@std@@");
4229 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@@");
4230 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@@");
4231 DEFINE_RTTI_DATA(num_get_short, 0, 1, &locale_facet_rtti_base_descriptor, NULL, NULL, ".?AV?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@");
4232
4233 #ifndef __GNUC__
4234 void __asm_dummy_vtables(void) {
4235 #endif
4236 __ASM_VTABLE(locale_facet, "");
4237 __ASM_VTABLE(collate_char,
4238 VTABLE_ADD_FUNC(collate_char_do_compare)
4239 VTABLE_ADD_FUNC(collate_char_do_transform)
4240 VTABLE_ADD_FUNC(collate_char_do_hash));
4241 __ASM_VTABLE(collate_wchar,
4242 VTABLE_ADD_FUNC(collate_wchar_do_compare)
4243 VTABLE_ADD_FUNC(collate_wchar_do_transform)
4244 VTABLE_ADD_FUNC(collate_wchar_do_hash));
4245 __ASM_VTABLE(collate_short,
4246 VTABLE_ADD_FUNC(collate_wchar_do_compare)
4247 VTABLE_ADD_FUNC(collate_wchar_do_transform)
4248 VTABLE_ADD_FUNC(collate_wchar_do_hash));
4249 __ASM_VTABLE(ctype_base, "");
4250 __ASM_VTABLE(ctype_char,
4251 VTABLE_ADD_FUNC(ctype_char_do_tolower)
4252 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch)
4253 VTABLE_ADD_FUNC(ctype_char_do_toupper)
4254 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch)
4255 VTABLE_ADD_FUNC(ctype_char_do_widen)
4256 VTABLE_ADD_FUNC(ctype_char_do_widen_ch)
4257 VTABLE_ADD_FUNC(ctype_char__Do_widen_s)
4258 VTABLE_ADD_FUNC(ctype_char_do_narrow)
4259 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch)
4260 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s));
4261 __ASM_VTABLE(ctype_wchar,
4262 VTABLE_ADD_FUNC(ctype_wchar_do_is)
4263 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
4264 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
4265 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
4266 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
4267 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
4268 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
4269 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
4270 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
4271 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
4272 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
4273 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
4274 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
4275 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
4276 __ASM_VTABLE(ctype_short,
4277 VTABLE_ADD_FUNC(ctype_wchar_do_is)
4278 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch)
4279 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is)
4280 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not)
4281 VTABLE_ADD_FUNC(ctype_wchar_do_tolower)
4282 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch)
4283 VTABLE_ADD_FUNC(ctype_wchar_do_toupper)
4284 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch)
4285 VTABLE_ADD_FUNC(ctype_wchar_do_widen)
4286 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch)
4287 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s)
4288 VTABLE_ADD_FUNC(ctype_wchar_do_narrow)
4289 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch)
4290 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s));
4291 __ASM_VTABLE(numpunct_char,
4292 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point)
4293 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep)
4294 VTABLE_ADD_FUNC(numpunct_char_do_grouping)
4295 VTABLE_ADD_FUNC(numpunct_char_do_falsename)
4296 VTABLE_ADD_FUNC(numpunct_char_do_truename));
4297 __ASM_VTABLE(numpunct_wchar,
4298 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
4299 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
4300 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
4301 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
4302 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
4303 __ASM_VTABLE(numpunct_short,
4304 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point)
4305 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep)
4306 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping)
4307 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename)
4308 VTABLE_ADD_FUNC(numpunct_wchar_do_truename));
4309 __ASM_VTABLE(num_get_char,
4310 VTABLE_ADD_FUNC(num_get_char_do_get_void)
4311 VTABLE_ADD_FUNC(num_get_char_do_get_double)
4312 VTABLE_ADD_FUNC(num_get_char_do_get_double)
4313 VTABLE_ADD_FUNC(num_get_char_do_get_float)
4314 VTABLE_ADD_FUNC(num_get_char_do_get_uint64)
4315 VTABLE_ADD_FUNC(num_get_char_do_get_int64)
4316 VTABLE_ADD_FUNC(num_get_char_do_get_ulong)
4317 VTABLE_ADD_FUNC(num_get_char_do_get_long)
4318 VTABLE_ADD_FUNC(num_get_char_do_get_uint)
4319 VTABLE_ADD_FUNC(num_get_char_do_get_ushort)
4320 VTABLE_ADD_FUNC(num_get_char_do_get_bool));
4321 __ASM_VTABLE(num_get_short,
4322 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
4323 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4324 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4325 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
4326 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
4327 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
4328 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
4329 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
4330 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
4331 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
4332 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
4333 __ASM_VTABLE(num_get_wchar,
4334 VTABLE_ADD_FUNC(num_get_wchar_do_get_void)
4335 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4336 VTABLE_ADD_FUNC(num_get_wchar_do_get_double)
4337 VTABLE_ADD_FUNC(num_get_wchar_do_get_float)
4338 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64)
4339 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64)
4340 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong)
4341 VTABLE_ADD_FUNC(num_get_wchar_do_get_long)
4342 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint)
4343 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort)
4344 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool));
4345 #ifndef __GNUC__
4346 }
4347 #endif
4348
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.