2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/list.h"
35 #include "wine/unicode.h"
36 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
39 char* __cdecl
_Getdays(void);
40 char* __cdecl
_Getmonths(void);
41 void* __cdecl
_Gettnames(void);
42 unsigned int __cdecl
___lc_codepage_func(void);
43 LCID
* __cdecl
___lc_handle_func(void);
44 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
52 typedef struct _locale__Locimp
{
54 locale_facet
**facetvec
;
55 MSVCP_size_t facet_cnt
;
57 MSVCP_bool transparent
;
58 basic_string_char name
;
67 basic_string_char days
;
68 basic_string_char months
;
69 basic_string_char oldlocname
;
70 basic_string_char newlocname
;
88 const char *false_name
;
89 const char *true_name
;
97 const wchar_t *false_name
;
98 const wchar_t *true_name
;
101 /* ?_Id_cnt@id@locale@std@@0HA */
102 int locale_id__Id_cnt
= 0;
104 static locale__Locimp
*global_locale
;
105 static locale classic_locale
;
107 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
108 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
109 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
111 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
113 if(this->strbuf
&& !this->got
) {
114 int c
= basic_streambuf_char_sgetc(this->strbuf
);
125 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
127 if(this->strbuf
&& !this->got
) {
128 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
139 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
141 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
146 istreambuf_iterator_char_val(this);
150 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
152 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
157 istreambuf_iterator_wchar_val(this);
161 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
163 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
167 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
169 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
173 /* ??1facet@locale@std@@UAE@XZ */
174 /* ??1facet@locale@std@@UEAA@XZ */
175 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
176 void __thiscall
locale_facet_dtor(locale_facet
*this)
178 TRACE("(%p)\n", this);
181 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
182 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
183 locale_facet*, (locale_facet*, unsigned int), (this, flags))
184 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
186 TRACE("(%p %x)\n", this, flags
);
188 /* we have an array, with the number of elements stored before the first object */
189 int i
, *ptr
= (int *)this-1;
191 for(i
=*ptr
-1; i
>=0; i
--)
192 locale_facet_dtor(this+i
);
193 MSVCRT_operator_delete(ptr
);
195 locale_facet_dtor(this);
197 MSVCRT_operator_delete(this);
208 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
210 /* Not exported from msvcp90 */
211 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
212 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
213 void __cdecl
locale_facet_register(locale_facet
*add
)
215 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
217 ERR("Out of memory\n");
218 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
222 list_add_head(&lazy_facets
, &head
->entry
);
225 /* Not exported from msvcp90 */
226 /* ?_Register@facet@locale@std@@QAEXXZ */
227 /* ?_Register@facet@locale@std@@QEAAXXZ */
228 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
229 void __thiscall
locale_facet__Register(locale_facet
*this)
231 TRACE("(%p)\n", this);
232 locale_facet_register(this);
235 /* Not exported from msvcp90 */
236 /* ??_7facet@locale@std@@6B@ */
237 extern const vtable_ptr MSVCP_locale_facet_vtable
;
239 /* ??0id@locale@std@@QAE@I@Z */
240 /* ??0id@locale@std@@QEAA@_K@Z */
241 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
242 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
244 TRACE("(%p %lu)\n", this, id
);
250 /* ??_Fid@locale@std@@QAEXXZ */
251 /* ??_Fid@locale@std@@QEAAXXZ */
252 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
253 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
255 TRACE("(%p)\n", this);
261 /* ??Bid@locale@std@@QAEIXZ */
262 /* ??Bid@locale@std@@QEAA_KXZ */
263 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
264 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
268 TRACE("(%p)\n", this);
271 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
272 this->id
= ++locale_id__Id_cnt
;
279 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
280 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
281 int* __cdecl
locale_id__Id_cnt_func(void)
284 return &locale_id__Id_cnt
;
287 /* ??_Ffacet@locale@std@@QAEXXZ */
288 /* ??_Ffacet@locale@std@@QEAAXXZ */
289 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
290 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
292 TRACE("(%p)\n", this);
293 this->vtable
= &MSVCP_locale_facet_vtable
;
298 /* ??0facet@locale@std@@IAE@I@Z */
299 /* ??0facet@locale@std@@IEAA@_K@Z */
300 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
301 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
303 TRACE("(%p %lu)\n", this, refs
);
304 this->vtable
= &MSVCP_locale_facet_vtable
;
309 /* ?_Incref@facet@locale@std@@QAEXXZ */
310 /* ?_Incref@facet@locale@std@@QEAAXXZ */
311 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
312 void __thiscall
locale_facet__Incref(locale_facet
*this)
316 TRACE("(%p)\n", this);
318 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
323 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
324 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
325 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
326 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
331 TRACE("(%p)\n", this);
333 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
337 ret
= this->refs
? NULL
: this;
343 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
344 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
345 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
347 TRACE("(%p %p)\n", facet
, loc
);
351 /* ??0_Timevec@std@@QAE@ABV01@@Z */
352 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
353 /* This copy constructor modifies copied object */
354 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
355 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
357 TRACE("(%p %p)\n", this, copy
);
358 this->timeptr
= copy
->timeptr
;
359 copy
->timeptr
= NULL
;
363 /* ??0_Timevec@std@@QAE@PAX@Z */
364 /* ??0_Timevec@std@@QEAA@PEAX@Z */
365 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
366 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
368 TRACE("(%p %p)\n", this, timeptr
);
369 this->timeptr
= timeptr
;
373 /* ??_F_Timevec@std@@QAEXXZ */
374 /* ??_F_Timevec@std@@QEAAXXZ */
375 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
376 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
378 TRACE("(%p)\n", this);
379 this->timeptr
= NULL
;
383 /* ??1_Timevec@std@@QAE@XZ */
384 /* ??1_Timevec@std@@QEAA@XZ */
385 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
386 void __thiscall
_Timevec_dtor(_Timevec
*this)
388 TRACE("(%p)\n", this);
392 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
393 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
394 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
395 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
397 TRACE("(%p %p)\n", this, right
);
398 this->timeptr
= right
->timeptr
;
399 right
->timeptr
= NULL
;
403 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
404 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
405 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
406 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
408 TRACE("(%p)\n", this);
409 return this->timeptr
;
412 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
413 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
414 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
416 const char *locale
= NULL
;
418 /* This function is probably modifying more global objects */
419 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
422 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
424 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
425 MSVCP_basic_string_char_ctor_cstr(&locinfo
->days
, "");
426 MSVCP_basic_string_char_ctor_cstr(&locinfo
->months
, "");
427 MSVCP_basic_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
430 locale
= setlocale(LC_ALL
, locstr
);
432 locale
= setlocale(LC_ALL
, NULL
);
435 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
437 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
442 /* ??0_Locinfo@std@@QAE@HPBD@Z */
443 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
444 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
445 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
447 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
450 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
451 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
452 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
454 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
457 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
458 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
459 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
460 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
462 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
465 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
466 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
467 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
469 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
472 /* ??0_Locinfo@std@@QAE@PBD@Z */
473 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
474 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
475 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
477 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
480 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
481 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
482 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
484 TRACE("(%p)\n", locinfo
);
486 setlocale(LC_ALL
, MSVCP_basic_string_char_c_str(&locinfo
->oldlocname
));
487 MSVCP_basic_string_char_dtor(&locinfo
->days
);
488 MSVCP_basic_string_char_dtor(&locinfo
->months
);
489 MSVCP_basic_string_char_dtor(&locinfo
->oldlocname
);
490 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
491 _Lockit_dtor(&locinfo
->lock
);
494 /* ??_F_Locinfo@std@@QAEXXZ */
495 /* ??_F_Locinfo@std@@QEAAXXZ */
496 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
497 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
499 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
502 /* ??1_Locinfo@std@@QAE@XZ */
503 /* ??1_Locinfo@std@@QEAA@XZ */
504 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
505 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
507 _Locinfo__Locinfo_dtor(this);
510 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
511 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
512 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
514 const char *locale
= NULL
;
516 /* This function is probably modifying more global objects */
517 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
519 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
521 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
524 locale
= setlocale(LC_ALL
, locstr
);
526 locale
= setlocale(LC_ALL
, NULL
);
529 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
531 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
536 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
537 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
538 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
539 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
541 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
545 ULONGLONG __cdecl
_Getcoll(void)
551 _locale_t locale
= _get_current_locale();
555 ret
.collvec
.page
= locale
->locinfo
->lc_collate_cp
;
556 ret
.collvec
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
557 _free_locale(locale
);
561 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
562 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
563 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
564 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
566 ULONGLONG ull
= _Getcoll();
567 memcpy(ret
, &ull
, sizeof(ull
));
572 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
574 _locale_t locale
= _get_current_locale();
579 ret
->page
= locale
->locinfo
->lc_codepage
;
580 ret
->handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
582 table
= malloc(sizeof(short[256]));
584 _free_locale(locale
);
585 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
587 memcpy(table
, locale
->locinfo
->pctype
, sizeof(short[256]));
589 _free_locale(locale
);
593 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
594 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
595 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
596 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
598 return _Getctype(ret
);
602 ULONGLONG __cdecl
_Getcvt(void)
604 _locale_t locale
= _get_current_locale();
612 ret
.cvtvec
.page
= locale
->locinfo
->lc_codepage
;
613 ret
.cvtvec
.handle
= locale
->locinfo
->lc_handle
[LC_CTYPE
];
614 _free_locale(locale
);
618 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
619 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
620 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
621 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
623 ULONGLONG ull
= _Getcvt();
624 memcpy(ret
, &ull
, sizeof(ull
));
628 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
629 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
630 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
631 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
633 FIXME("(%p) stub\n", this);
637 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
638 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
639 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
640 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
642 char *days
= _Getdays();
644 TRACE("(%p)\n", this);
647 MSVCP_basic_string_char_dtor(&this->days
);
648 MSVCP_basic_string_char_ctor_cstr(&this->days
, days
);
652 return this->days
.size
? MSVCP_basic_string_char_c_str(&this->days
) :
653 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
656 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
657 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
658 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
659 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
661 char *months
= _Getmonths();
663 TRACE("(%p)\n", this);
666 MSVCP_basic_string_char_dtor(&this->months
);
667 MSVCP_basic_string_char_ctor_cstr(&this->months
, months
);
671 return this->months
.size
? MSVCP_basic_string_char_c_str(&this->months
) :
672 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
673 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
676 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
677 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
678 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
679 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
681 TRACE("(%p)\n", this);
685 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
686 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
687 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
688 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
690 TRACE("(%p)\n", this);
694 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
695 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
696 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
697 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
699 TRACE("(%p)\n", this);
703 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
704 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
705 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
706 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
708 TRACE("(%p)\n", this);
710 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
714 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
715 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
716 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
717 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
719 TRACE("(%p)\n", this);
721 _Timevec_ctor_timeptr(ret
, _Gettnames());
725 /* ?id@?$collate@D@std@@2V0locale@2@A */
726 locale_id collate_char_id
= {0};
728 /* ??_7?$collate@D@std@@6B@ */
729 extern const vtable_ptr MSVCP_collate_char_vtable
;
731 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
732 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
733 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
734 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
736 TRACE("(%p %p)\n", this, locinfo
);
737 _Locinfo__Getcoll(locinfo
, &this->coll
);
740 /* ??0?$collate@D@std@@IAE@PBDI@Z */
741 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
742 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
743 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
747 TRACE("(%p %s %lu)\n", this, name
, refs
);
749 locale_facet_ctor_refs(&this->facet
, refs
);
750 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
752 _Locinfo_ctor_cstr(&locinfo
, name
);
753 collate_char__Init(this, &locinfo
);
754 _Locinfo_dtor(&locinfo
);
758 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
759 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
760 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
761 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
763 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
765 locale_facet_ctor_refs(&this->facet
, refs
);
766 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
767 collate_char__Init(this, locinfo
);
771 /* ??0?$collate@D@std@@QAE@I@Z */
772 /* ??0?$collate@D@std@@QEAA@_K@Z */
773 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
774 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
776 return collate_char_ctor_name(this, "C", refs
);
779 /* ??1?$collate@D@std@@MAE@XZ */
780 /* ??1?$collate@D@std@@MEAA@XZ */
781 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
782 void __thiscall
collate_char_dtor(collate
*this)
784 TRACE("(%p)\n", this);
787 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
788 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
790 TRACE("(%p %x)\n", this, flags
);
792 /* we have an array, with the number of elements stored before the first object */
793 int i
, *ptr
= (int *)this-1;
795 for(i
=*ptr
-1; i
>=0; i
--)
796 collate_char_dtor(this+i
);
797 MSVCRT_operator_delete(ptr
);
799 collate_char_dtor(this);
801 MSVCRT_operator_delete(this);
807 /* ??_F?$collate@D@std@@QAEXXZ */
808 /* ??_F?$collate@D@std@@QEAAXXZ */
809 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
810 collate
* __thiscall
collate_char_ctor(collate
*this)
812 return collate_char_ctor_name(this, "C", 0);
815 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
816 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
817 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
819 TRACE("(%p %p)\n", facet
, loc
);
821 if(facet
&& !*facet
) {
822 *facet
= MSVCRT_operator_new(sizeof(collate
));
824 ERR("Out of memory\n");
825 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
828 collate_char_ctor_name((collate
*)*facet
,
829 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
836 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
837 const char *last2
, const _Collvec
*coll
)
841 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
846 lcid
= ___lc_handle_func()[LC_COLLATE
];
847 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
850 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
851 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
852 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
853 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
854 (const collate*, const char*, const char*, const char*, const char*), \
855 (this, first1, last1, first2, last2))
856 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
857 const char *last1
, const char *first2
, const char *last2
)
859 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
860 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
863 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
864 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
865 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
866 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
867 const char *last1
, const char *first2
, const char *last2
)
869 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
870 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
873 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
874 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
875 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
876 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
877 (const collate*, const char*, const char*), (this, first, last))
878 LONG __thiscall
collate_char_do_hash(const collate
*this,
879 const char *first
, const char *last
)
883 TRACE("(%p %p %p)\n", this, first
, last
);
885 for(; first
<last
; first
++)
886 ret
= (ret
<<8 | ret
>>24) + *first
;
890 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
891 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
892 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
893 LONG __thiscall
collate_char_hash(const collate
*this,
894 const char *first
, const char *last
)
896 TRACE("(%p %p %p)\n", this, first
, last
);
897 return call_collate_char_do_hash(this, first
, last
);
900 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
901 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
902 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
903 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
904 basic_string_char
*ret
, const char *first
, const char *last
)
906 FIXME("(%p %p %p) stub\n", this, first
, last
);
910 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
911 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
912 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
913 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
914 basic_string_char
*ret
, const char *first
, const char *last
)
916 FIXME("(%p %p %p) stub\n", this, first
, last
);
920 /* ?id@?$collate@_W@std@@2V0locale@2@A */
921 locale_id collate_wchar_id
= {0};
922 /* ?id@?$collate@G@std@@2V0locale@2@A */
923 locale_id collate_short_id
= {0};
925 /* ??_7?$collate@_W@std@@6B@ */
926 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
927 /* ??_7?$collate@G@std@@6B@ */
928 extern const vtable_ptr MSVCP_collate_short_vtable
;
930 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
931 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
932 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
933 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
934 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
935 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
937 TRACE("(%p %p)\n", this, locinfo
);
938 _Locinfo__Getcoll(locinfo
, &this->coll
);
941 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
942 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
943 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
944 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
948 TRACE("(%p %s %lu)\n", this, name
, refs
);
950 locale_facet_ctor_refs(&this->facet
, refs
);
951 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
953 _Locinfo_ctor_cstr(&locinfo
, name
);
954 collate_wchar__Init(this, &locinfo
);
955 _Locinfo_dtor(&locinfo
);
959 /* ??0?$collate@G@std@@IAE@PBDI@Z */
960 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
961 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
962 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
964 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
965 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
969 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
970 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
971 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
972 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
974 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
976 locale_facet_ctor_refs(&this->facet
, refs
);
977 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
978 collate_wchar__Init(this, locinfo
);
982 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
983 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
984 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
985 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
987 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
988 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
992 /* ??0?$collate@_W@std@@QAE@I@Z */
993 /* ??0?$collate@_W@std@@QEAA@_K@Z */
994 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
995 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
997 return collate_wchar_ctor_name(this, "C", refs
);
1000 /* ??0?$collate@G@std@@QAE@I@Z */
1001 /* ??0?$collate@G@std@@QEAA@_K@Z */
1002 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1003 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1005 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1006 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1010 /* ??1?$collate@_W@std@@MAE@XZ */
1011 /* ??1?$collate@_W@std@@MEAA@XZ */
1012 /* ??1?$collate@G@std@@MAE@XZ */
1013 /* ??1?$collate@G@std@@MEAA@XZ */
1014 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1015 void __thiscall
collate_wchar_dtor(collate
*this)
1017 TRACE("(%p)\n", this);
1020 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1021 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1023 TRACE("(%p %x)\n", this, flags
);
1025 /* we have an array, with the number of elements stored before the first object */
1026 int i
, *ptr
= (int *)this-1;
1028 for(i
=*ptr
-1; i
>=0; i
--)
1029 collate_wchar_dtor(this+i
);
1030 MSVCRT_operator_delete(ptr
);
1032 collate_wchar_dtor(this);
1034 MSVCRT_operator_delete(this);
1040 /* ??_F?$collate@_W@std@@QAEXXZ */
1041 /* ??_F?$collate@_W@std@@QEAAXXZ */
1042 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1043 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1045 return collate_wchar_ctor_name(this, "C", 0);
1048 /* ??_F?$collate@G@std@@QAEXXZ */
1049 /* ??_F?$collate@G@std@@QEAAXXZ */
1050 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1051 collate
* __thiscall
collate_short_ctor(collate
*this)
1053 collate
*ret
= collate_wchar_ctor(this);
1054 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1058 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1059 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1060 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1062 TRACE("(%p %p)\n", facet
, loc
);
1064 if(facet
&& !*facet
) {
1065 *facet
= MSVCRT_operator_new(sizeof(collate
));
1067 ERR("Out of memory\n");
1068 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1071 collate_wchar_ctor_name((collate
*)*facet
,
1072 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
1078 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1079 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1080 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1082 if(facet
&& !*facet
) {
1083 collate_wchar__Getcat(facet
, loc
);
1084 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1091 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1092 const wchar_t *last2
, const _Collvec
*coll
)
1096 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1099 lcid
= coll
->handle
;
1101 lcid
= ___lc_handle_func()[LC_COLLATE
];
1102 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1105 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1106 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1107 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1108 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1109 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1110 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1111 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1112 (this, first1, last1, first2, last2))
1113 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1114 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1116 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1117 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1120 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1121 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1122 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1123 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1124 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1125 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1126 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1128 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1129 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1132 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1133 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1134 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1135 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1136 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1137 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1138 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1139 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1140 const wchar_t *first
, const wchar_t *last
)
1144 TRACE("(%p %p %p)\n", this, first
, last
);
1146 for(; first
<last
; first
++)
1147 ret
= (ret
<<8 | ret
>>24) + *first
;
1151 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1152 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1153 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1154 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1155 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1156 LONG __thiscall
collate_wchar_hash(const collate
*this,
1157 const wchar_t *first
, const wchar_t *last
)
1159 TRACE("(%p %p %p)\n", this, first
, last
);
1160 return call_collate_wchar_do_hash(this, first
, last
);
1163 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1164 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1165 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1166 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1167 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1168 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1169 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1171 FIXME("(%p %p %p) stub\n", this, first
, last
);
1175 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1176 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1177 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1178 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1179 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1180 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1181 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1183 FIXME("(%p %p %p) stub\n", this, first
, last
);
1187 /* ??_7ctype_base@std@@6B@ */
1188 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1190 /* ??0ctype_base@std@@QAE@I@Z */
1191 /* ??0ctype_base@std@@QEAA@_K@Z */
1192 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1193 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1195 TRACE("(%p %lu)\n", this, refs
);
1196 locale_facet_ctor_refs(&this->facet
, refs
);
1197 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1201 /* ??_Fctype_base@std@@QAEXXZ */
1202 /* ??_Fctype_base@std@@QEAAXXZ */
1203 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1204 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1206 TRACE("(%p)\n", this);
1207 locale_facet_ctor_refs(&this->facet
, 0);
1208 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1212 /* ??1ctype_base@std@@UAE@XZ */
1213 /* ??1ctype_base@std@@UEAA@XZ */
1214 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1215 void __thiscall
ctype_base_dtor(ctype_base
*this)
1217 TRACE("(%p)\n", this);
1220 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1221 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1223 TRACE("(%p %x)\n", this, flags
);
1225 /* we have an array, with the number of elements stored before the first object */
1226 int i
, *ptr
= (int *)this-1;
1228 for(i
=*ptr
-1; i
>=0; i
--)
1229 ctype_base_dtor(this+i
);
1230 MSVCRT_operator_delete(ptr
);
1232 ctype_base_dtor(this);
1234 MSVCRT_operator_delete(this);
1240 /* ?_Xran@ctype_base@std@@KAXXZ */
1241 void __cdecl
ctype_base__Xran(void)
1243 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1246 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1247 locale_id ctype_char_id
= {0};
1248 /* ?table_size@?$ctype@D@std@@2IB */
1249 /* ?table_size@?$ctype@D@std@@2_KB */
1250 MSVCP_size_t ctype_char_table_size
= 256;
1252 /* ??_7?$ctype@D@std@@6B@ */
1253 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1255 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1256 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1257 locale_id
* __cdecl
ctype_char__Id_func(void)
1260 return &ctype_char_id
;
1263 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1264 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1265 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1266 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1268 TRACE("(%p %p)\n", this, locinfo
);
1269 _Locinfo__Getctype(locinfo
, &this->ctype
);
1272 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1273 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1274 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1275 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1277 TRACE("(%p)\n", this);
1279 if(this->ctype
.delfl
)
1280 free((short*)this->ctype
.table
);
1283 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1284 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1285 const short* __cdecl
ctype_char_classic_table(void)
1288 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1291 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1292 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1293 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1294 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1295 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1297 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1298 ctype_base_ctor_refs(&this->base
, refs
);
1299 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1300 ctype_char__Init(this, locinfo
);
1304 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1305 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1306 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1307 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1308 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1312 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1314 ctype_base_ctor_refs(&this->base
, refs
);
1315 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1317 _Locinfo_ctor(&locinfo
);
1318 ctype_char__Init(this, &locinfo
);
1319 _Locinfo_dtor(&locinfo
);
1322 ctype_char__Tidy(this);
1323 this->ctype
.table
= table
;
1324 this->ctype
.delfl
= delete;
1329 /* ??_F?$ctype@D@std@@QAEXXZ */
1330 /* ??_F?$ctype@D@std@@QEAAXXZ */
1331 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1332 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1334 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1337 /* ??1?$ctype@D@std@@MAE@XZ */
1338 /* ??1?$ctype@D@std@@MEAA@XZ */
1339 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1340 void __thiscall
ctype_char_dtor(ctype_char
*this)
1342 TRACE("(%p)\n", this);
1343 ctype_char__Tidy(this);
1346 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1347 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1349 TRACE("(%p %x)\n", this, flags
);
1351 /* we have an array, with the number of elements stored before the first object */
1352 int i
, *ptr
= (int *)this-1;
1354 for(i
=*ptr
-1; i
>=0; i
--)
1355 ctype_char_dtor(this+i
);
1356 MSVCRT_operator_delete(ptr
);
1358 ctype_char_dtor(this);
1360 MSVCRT_operator_delete(this);
1366 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1367 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1368 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1369 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1370 char, (const ctype_char*, char, char), (this, ch, unused))
1371 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1373 TRACE("(%p %c %c)\n", this, ch
, unused
);
1377 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1378 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1379 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1380 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1381 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1382 (this, first, last, unused, dest))
1383 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1384 const char *first
, const char *last
, char unused
, char *dest
)
1386 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1387 memcpy(dest
, first
, last
-first
);
1391 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1392 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1393 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1394 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1395 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1396 (this, first, last, unused, dest, size))
1397 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1398 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1400 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1401 memcpy_s(dest
, size
, first
, last
-first
);
1405 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1406 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1407 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1408 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1410 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1411 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1414 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1415 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1416 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1417 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1418 const char *first
, const char *last
, char dflt
, char *dest
)
1420 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1421 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1424 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1425 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1426 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1427 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1428 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1430 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1431 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1434 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1435 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1436 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1437 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1438 char, (const ctype_char*, char), (this, ch))
1439 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1441 TRACE("(%p %c)\n", this, ch
);
1445 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1446 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1447 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1448 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1449 const char*, (const ctype_char*, const char*, const char*, char*), \
1450 (this, first, last, dest))
1451 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1452 const char *first
, const char *last
, char *dest
)
1454 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1455 memcpy(dest
, first
, last
-first
);
1459 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1460 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1461 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1462 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1463 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1464 (this, first, last, dest, size))
1465 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1466 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1468 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1469 memcpy_s(dest
, size
, first
, last
-first
);
1473 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1474 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1475 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1476 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1478 TRACE("(%p %c)\n", this, ch
);
1479 return call_ctype_char_do_widen_ch(this, ch
);
1482 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1483 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1484 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1485 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1486 const char *first
, const char *last
, char *dest
)
1488 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1489 return call_ctype_char_do_widen(this, first
, last
, dest
);
1492 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1493 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1494 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1495 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1496 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1498 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1499 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1502 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1503 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1504 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1506 TRACE("(%p %p)\n", facet
, loc
);
1508 if(facet
&& !*facet
) {
1511 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1513 ERR("Out of memory\n");
1514 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1518 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
1519 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1520 _Locinfo_dtor(&locinfo
);
1526 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1528 static ctype_char
*obj
= NULL
;
1531 const locale_facet
*fac
;
1533 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1534 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1536 _Lockit_dtor(&lock
);
1537 return (ctype_char
*)fac
;
1541 _Lockit_dtor(&lock
);
1545 ctype_char__Getcat(&fac
, loc
);
1546 obj
= (ctype_char
*)fac
;
1547 locale_facet__Incref(&obj
->base
.facet
);
1548 locale_facet_register(&obj
->base
.facet
);
1549 _Lockit_dtor(&lock
);
1555 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1559 TRACE("%d %p\n", ch
, ctype
);
1564 cp
= ___lc_codepage_func();
1566 /* Don't convert to unicode in case of C locale */
1568 if(ch
>='A' && ch
<='Z')
1577 str
[0] = (ch
>>8) & 255;
1585 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1588 lower
= tolowerW(wide
);
1592 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1594 return str
[0] + (str
[1]<<8);
1598 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1599 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1600 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1601 char, (const ctype_char*, char), (this, ch))
1602 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1603 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1605 TRACE("(%p %c)\n", this, ch
);
1606 return _Tolower(ch
, &this->ctype
);
1609 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1610 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1611 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1612 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1613 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1614 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1616 TRACE("(%p %p %p)\n", this, first
, last
);
1617 for(; first
<last
; first
++)
1618 *first
= _Tolower(*first
, &this->ctype
);
1622 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1623 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1624 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1625 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1627 TRACE("(%p %c)\n", this, ch
);
1628 return call_ctype_char_do_tolower_ch(this, ch
);
1631 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1632 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1633 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1634 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1636 TRACE("(%p %p %p)\n", this, first
, last
);
1637 return call_ctype_char_do_tolower(this, first
, last
);
1641 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1645 TRACE("%d %p\n", ch
, ctype
);
1650 cp
= ___lc_codepage_func();
1652 /* Don't convert to unicode in case of C locale */
1654 if(ch
>='a' && ch
<='z')
1663 str
[0] = (ch
>>8) & 255;
1671 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1674 upper
= toupperW(wide
);
1678 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1680 return str
[0] + (str
[1]<<8);
1684 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1685 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1686 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1687 char, (const ctype_char*, char), (this, ch))
1688 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1689 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1691 TRACE("(%p %c)\n", this, ch
);
1692 return _Toupper(ch
, &this->ctype
);
1695 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1696 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1697 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1698 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1699 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1700 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1701 char *first
, const char *last
)
1703 TRACE("(%p %p %p)\n", this, first
, last
);
1704 for(; first
<last
; first
++)
1705 *first
= _Toupper(*first
, &this->ctype
);
1709 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1710 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1711 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1712 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1714 TRACE("(%p %c)\n", this, ch
);
1715 return call_ctype_char_do_toupper_ch(this, ch
);
1718 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1719 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1720 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1721 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1723 TRACE("(%p %p %p)\n", this, first
, last
);
1724 return call_ctype_char_do_toupper(this, first
, last
);
1727 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1728 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1729 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1730 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1732 TRACE("(%p %x %c)\n", this, mask
, ch
);
1733 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1736 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1737 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1738 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1739 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1741 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1742 for(; first
<last
; first
++)
1743 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1747 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1748 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1749 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1750 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1752 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1753 for(; first
<last
; first
++)
1754 if(!ctype_char_is_ch(this, mask
, *first
))
1759 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1760 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1761 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1762 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1764 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1765 for(; first
<last
; first
++)
1766 if(ctype_char_is_ch(this, mask
, *first
))
1771 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1772 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1773 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
1774 const short* __thiscall
ctype_char_table(const ctype_char
*this)
1776 TRACE("(%p)\n", this);
1777 return this->ctype
.table
;
1780 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1781 locale_id ctype_wchar_id
= {0};
1782 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1783 locale_id ctype_short_id
= {0};
1785 /* ??_7?$ctype@_W@std@@6B@ */
1786 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
1787 /* ??_7?$ctype@G@std@@6B@ */
1788 extern const vtable_ptr MSVCP_ctype_short_vtable
;
1790 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
1791 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
1792 locale_id
* __cdecl
ctype_wchar__Id_func(void)
1795 return &ctype_wchar_id
;
1798 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
1799 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
1800 locale_id
* __cdecl
ctype_short__Id_func(void)
1803 return &ctype_short_id
;
1806 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1807 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1808 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1809 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1810 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
1811 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
1813 TRACE("(%p %p)\n", this, locinfo
);
1814 _Locinfo__Getctype(locinfo
, &this->ctype
);
1815 _Locinfo__Getcvt(locinfo
, &this->cvt
);
1818 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1819 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1820 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
1821 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
1822 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1824 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1825 ctype_base_ctor_refs(&this->base
, refs
);
1826 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1827 ctype_wchar__Init(this, locinfo
);
1831 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1832 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1833 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
1834 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
1835 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1837 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
1838 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1842 /* ??0?$ctype@_W@std@@QAE@I@Z */
1843 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1844 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
1845 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1849 TRACE("(%p %lu)\n", this, refs
);
1851 ctype_base_ctor_refs(&this->base
, refs
);
1852 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1854 _Locinfo_ctor(&locinfo
);
1855 ctype_wchar__Init(this, &locinfo
);
1856 _Locinfo_dtor(&locinfo
);
1860 /* ??0?$ctype@G@std@@QAE@I@Z */
1861 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1862 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
1863 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1865 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
1866 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1870 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
1871 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
1872 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
1873 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
1874 const char *name
, MSVCP_size_t refs
)
1878 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
1880 ctype_base_ctor_refs(&this->base
, refs
);
1881 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1883 _Locinfo_ctor_cstr(&locinfo
, name
);
1884 ctype_wchar__Init(this, &locinfo
);
1885 _Locinfo_dtor(&locinfo
);
1889 /* ??_F?$ctype@_W@std@@QAEXXZ */
1890 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1891 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
1892 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
1894 TRACE("(%p)\n", this);
1895 return ctype_short_ctor_refs(this, 0);
1898 /* ??_F?$ctype@G@std@@QAEXXZ */
1899 /* ??_F?$ctype@G@std@@QEAAXXZ */
1900 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
1901 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
1903 ctype_wchar
*ret
= ctype_wchar_ctor(this);
1904 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1908 /* ??1?$ctype@_W@std@@MAE@XZ */
1909 /* ??1?$ctype@_W@std@@MEAA@XZ */
1910 /* ??1?$ctype@G@std@@MAE@XZ */
1911 /* ??1?$ctype@G@std@@MEAA@XZ */
1912 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
1913 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
1915 TRACE("(%p)\n", this);
1916 if(this->ctype
.delfl
)
1917 free((void*)this->ctype
.table
);
1920 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
1921 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1923 TRACE("(%p %x)\n", this, flags
);
1925 /* we have an array, with the number of elements stored before the first object */
1926 int i
, *ptr
= (int *)this-1;
1928 for(i
=*ptr
-1; i
>=0; i
--)
1929 ctype_wchar_dtor(this+i
);
1930 MSVCRT_operator_delete(ptr
);
1932 ctype_wchar_dtor(this);
1934 MSVCRT_operator_delete(this);
1941 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
1946 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
1951 cp
= ___lc_codepage_func();
1963 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
1972 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1973 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1974 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1975 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1976 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
1977 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1979 char buf
[MB_LEN_MAX
];
1981 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1983 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
1986 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1987 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1988 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1989 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1990 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
1991 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
1992 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1993 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1995 return ctype_wchar__Donarrow(this, ch
, dflt
);
1998 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1999 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2000 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2001 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2002 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2003 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2004 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2005 (this, first, last, dflt, dest))
2006 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2007 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2009 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2010 for(; first
<last
; first
++)
2011 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2015 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2016 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2017 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2018 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2019 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2020 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2021 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2022 (this, first, last, dflt, dest, size))
2023 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2024 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2026 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2027 /* This function converts all multi-byte characters to dflt,
2028 * thanks to it result size is known before converting */
2029 if(last
-first
> size
)
2031 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2034 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2035 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2036 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2037 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2038 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2039 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2041 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2042 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2045 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2046 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2047 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2048 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2049 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2050 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2051 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2053 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2054 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2057 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2058 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2059 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2060 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2061 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2062 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2063 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2065 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2066 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2070 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2076 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2084 cp
= ___lc_codepage_func();
2088 *out
= (unsigned char)*in
;
2095 ((char*)state
)[1] = *in
;
2097 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2107 GetCPInfo(cp
, &cp_info
);
2109 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2110 if(!cp_info
.LeadByte
[i
+1])
2112 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2120 *state
= (unsigned char)*in
;
2124 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2131 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2138 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2139 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2140 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2141 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2142 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2143 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2147 TRACE("(%p %d)\n", this, ch
);
2148 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2151 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2152 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2153 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2154 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2155 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2156 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2157 wchar_t, (const ctype_wchar*, char), (this, ch))
2158 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2160 return ctype_wchar__Dowiden(this, ch
);
2163 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2164 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2165 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2166 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2167 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2168 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2169 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2170 (this, first, last, dest))
2171 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2172 const char *first
, const char *last
, wchar_t *dest
)
2174 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2175 for(; first
<last
; first
++)
2176 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2180 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2181 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2182 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2183 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2184 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2185 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2186 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2187 (this, first, last, dest, size))
2188 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2189 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2191 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2192 /* This function converts all multi-byte characters to WEOF,
2193 * thanks to it result size is known before converting */
2194 if(size
< last
-first
)
2196 return ctype_wchar_do_widen(this, first
, last
, dest
);
2199 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2200 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2201 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2202 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2203 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2204 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2206 TRACE("(%p %d)\n", this, ch
);
2207 return call_ctype_wchar_do_widen_ch(this, ch
);
2210 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2211 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2212 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2213 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2214 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2215 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2216 const char *first
, const char *last
, wchar_t *dest
)
2218 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2219 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2222 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2223 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2224 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2225 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2226 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2227 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2228 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2230 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2231 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2234 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2235 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2236 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2238 TRACE("(%p %p)\n", facet
, loc
);
2240 if(facet
&& !*facet
) {
2243 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2245 ERR("Out of memory\n");
2246 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2250 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2251 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2252 _Locinfo_dtor(&locinfo
);
2258 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2259 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2260 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2262 if(facet
&& !*facet
) {
2263 ctype_wchar__Getcat(facet
, loc
);
2264 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2271 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2273 TRACE("(%d %p)\n", ch
, ctype
);
2274 return tolowerW(ch
);
2277 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2279 static ctype_wchar
*obj
= NULL
;
2282 const locale_facet
*fac
;
2284 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2285 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2287 _Lockit_dtor(&lock
);
2288 return (ctype_wchar
*)fac
;
2292 _Lockit_dtor(&lock
);
2296 ctype_wchar__Getcat(&fac
, loc
);
2297 obj
= (ctype_wchar
*)fac
;
2298 locale_facet__Incref(&obj
->base
.facet
);
2299 locale_facet_register(&obj
->base
.facet
);
2300 _Lockit_dtor(&lock
);
2305 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2307 static ctype_wchar
*obj
= NULL
;
2310 const locale_facet
*fac
;
2312 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2313 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2315 _Lockit_dtor(&lock
);
2316 return (ctype_wchar
*)fac
;
2320 _Lockit_dtor(&lock
);
2324 ctype_short__Getcat(&fac
, loc
);
2325 obj
= (ctype_wchar
*)fac
;
2326 locale_facet__Incref(&obj
->base
.facet
);
2327 locale_facet_register(&obj
->base
.facet
);
2328 _Lockit_dtor(&lock
);
2333 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2334 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2335 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2336 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2337 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2338 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2339 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2340 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2342 return _Towlower(ch
, &this->ctype
);
2345 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2346 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2347 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2348 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2349 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2350 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2351 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2352 (this, first, last))
2353 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2354 wchar_t *first
, const wchar_t *last
)
2356 TRACE("(%p %p %p)\n", this, first
, last
);
2357 for(; first
<last
; first
++)
2358 *first
= _Towlower(*first
, &this->ctype
);
2362 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2363 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2364 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2365 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2366 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2367 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2369 TRACE("(%p %d)\n", this, ch
);
2370 return call_ctype_wchar_do_tolower_ch(this, ch
);
2373 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2374 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2375 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2376 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2377 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2378 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2379 wchar_t *first
, const wchar_t *last
)
2381 TRACE("(%p %p %p)\n", this, first
, last
);
2382 return call_ctype_wchar_do_tolower(this, first
, last
);
2386 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2388 TRACE("(%d %p)\n", ch
, ctype
);
2389 return toupperW(ch
);
2392 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2393 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2394 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2395 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2396 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2397 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2398 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2399 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2401 return _Towupper(ch
, &this->ctype
);
2404 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2405 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2406 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2407 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2408 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2409 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2410 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2411 (this, first, last))
2412 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2413 wchar_t *first
, const wchar_t *last
)
2415 TRACE("(%p %p %p)\n", this, first
, last
);
2416 for(; first
<last
; first
++)
2417 *first
= _Towupper(*first
, &this->ctype
);
2421 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2422 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2423 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2424 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2425 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2426 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2428 TRACE("(%p %d)\n", this, ch
);
2429 return call_ctype_wchar_do_toupper_ch(this, ch
);
2432 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2433 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2434 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2435 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2436 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2437 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2438 wchar_t *first
, const wchar_t *last
)
2440 TRACE("(%p %p %p)\n", this, first
, last
);
2441 return call_ctype_wchar_do_toupper(this, first
, last
);
2445 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2446 short *mask
, const _Ctypevec
*ctype
)
2448 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2449 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2454 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2457 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2461 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2462 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2463 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2464 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2465 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2466 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2467 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2468 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2470 TRACE("(%p %x %d)\n", this, mask
, ch
);
2471 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2474 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2475 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2476 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2477 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2478 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2479 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2480 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2481 (this, first, last, dest))
2482 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2483 const wchar_t *first
, const wchar_t *last
, short *dest
)
2485 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2486 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2489 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2490 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2491 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2492 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2493 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2494 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2496 TRACE("(%p %x %d)\n", this, mask
, ch
);
2497 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2500 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2501 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2502 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2503 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2504 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2505 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2506 const wchar_t *first
, const wchar_t *last
, short *dest
)
2508 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2509 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2512 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2513 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2514 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2515 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2516 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2517 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2518 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2519 (this, mask, first, last))
2520 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2521 short mask
, const wchar_t *first
, const wchar_t *last
)
2523 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2524 for(; first
<last
; first
++)
2525 if(!ctype_wchar_is_ch(this, mask
, *first
))
2530 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2531 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2532 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2533 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2534 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2535 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2536 short mask
, const wchar_t *first
, const wchar_t *last
)
2538 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2539 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2542 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2543 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2544 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2545 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2546 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2547 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2548 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2549 (this, mask, first, last))
2550 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2551 short mask
, const wchar_t *first
, const wchar_t *last
)
2553 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2554 for(; first
<last
; first
++)
2555 if(ctype_wchar_is_ch(this, mask
, *first
))
2560 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2561 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2562 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2563 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2564 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2565 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2566 short mask
, const wchar_t *first
, const wchar_t *last
)
2568 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2569 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2572 /* ??_7codecvt_base@std@@6B@ */
2573 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2575 /* ??0codecvt_base@std@@QAE@I@Z */
2576 /* ??0codecvt_base@std@@QEAA@_K@Z */
2577 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2578 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2580 TRACE("(%p %lu)\n", this, refs
);
2581 locale_facet_ctor_refs(&this->facet
, refs
);
2582 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2586 /* ??_Fcodecvt_base@std@@QAEXXZ */
2587 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2588 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2589 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2591 return codecvt_base_ctor_refs(this, 0);
2594 /* ??1codecvt_base@std@@UAE@XZ */
2595 /* ??1codecvt_base@std@@UEAA@XZ */
2596 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2597 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2599 TRACE("(%p)\n", this);
2600 locale_facet_dtor(&this->facet
);
2603 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2604 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2606 TRACE("(%p %x)\n", this, flags
);
2608 /* we have an array, with the number of elements stored before the first object */
2609 int i
, *ptr
= (int *)this-1;
2611 for(i
=*ptr
-1; i
>=0; i
--)
2612 codecvt_base_dtor(this+i
);
2613 MSVCRT_operator_delete(ptr
);
2615 codecvt_base_dtor(this);
2617 MSVCRT_operator_delete(this);
2623 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2624 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2625 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2626 MSVCP_bool, (const codecvt_base*), (this))
2627 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2628 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2630 TRACE("(%p)\n", this);
2634 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2635 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2636 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2637 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2639 TRACE("(%p)\n", this);
2640 return call_codecvt_base_do_always_noconv(this);
2643 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2644 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2645 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2646 int, (const codecvt_base*), (this))
2647 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2648 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2650 TRACE("(%p)\n", this);
2654 /* ?max_length@codecvt_base@std@@QBEHXZ */
2655 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2656 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2657 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2659 TRACE("(%p)\n", this);
2660 return call_codecvt_base_do_max_length(this);
2663 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2664 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2665 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2666 int, (const codecvt_base*), (this))
2667 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
2668 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
2670 TRACE("(%p)\n", this);
2674 /* ?encoding@codecvt_base@std@@QBEHXZ */
2675 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2676 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
2677 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
2679 TRACE("(%p)\n", this);
2680 return call_codecvt_base_do_encoding(this);
2683 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2684 locale_id codecvt_char_id
= {0};
2686 /* ??_7?$codecvt@DDH@std@@6B@ */
2687 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
2689 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2690 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2691 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
2692 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
2694 TRACE("(%p %p)\n", this, locinfo
);
2697 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2698 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2699 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
2700 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2702 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2703 codecvt_base_ctor_refs(&this->base
, refs
);
2704 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
2708 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2709 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2710 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
2711 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
2713 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
2716 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2717 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2718 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
2719 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
2721 return codecvt_char_ctor_locinfo(this, NULL
, 0);
2724 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2725 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2726 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
2727 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
2729 TRACE("(%p)\n", this);
2730 codecvt_base_dtor(&this->base
);
2733 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
2734 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
2736 TRACE("(%p %x)\n", this, flags
);
2738 /* we have an array, with the number of elements stored before the first object */
2739 int i
, *ptr
= (int *)this-1;
2741 for(i
=*ptr
-1; i
>=0; i
--)
2742 codecvt_char_dtor(this+i
);
2743 MSVCRT_operator_delete(ptr
);
2745 codecvt_char_dtor(this);
2747 MSVCRT_operator_delete(this);
2753 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2754 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2755 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
2757 TRACE("(%p %p)\n", facet
, loc
);
2759 if(facet
&& !*facet
) {
2760 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
2762 ERR("Out of memory\n");
2763 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2766 codecvt_char_ctor((codecvt_char
*)*facet
);
2772 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
2774 static codecvt_char
*obj
= NULL
;
2777 const locale_facet
*fac
;
2779 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2780 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
2782 _Lockit_dtor(&lock
);
2783 return (codecvt_char
*)fac
;
2787 _Lockit_dtor(&lock
);
2791 codecvt_char__Getcat(&fac
, loc
);
2792 obj
= (codecvt_char
*)fac
;
2793 locale_facet__Incref(&obj
->base
.facet
);
2794 locale_facet_register(&obj
->base
.facet
);
2795 _Lockit_dtor(&lock
);
2800 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2801 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2802 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2803 CALL_VTBL_FUNC(this, 16, int, \
2804 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2805 (this, state, from, from_end, from_next, to, to_end, to_next))
2806 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
2807 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
2808 const char *from
, const char *from_end
, const char **from_next
,
2809 char *to
, char *to_end
, char **to_next
)
2811 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2812 from_next
, to
, to_end
, to_next
);
2815 return CODECVT_noconv
;
2818 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2819 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2820 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
2821 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
2822 const char *from
, const char *from_end
, const char **from_next
,
2823 char *to
, char *to_end
, char **to_next
)
2825 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2826 from_next
, to
, to_end
, to_next
);
2827 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
2828 to
, to_end
, to_next
);
2831 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2832 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2833 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2834 CALL_VTBL_FUNC(this, 20, int, \
2835 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2836 (this, state, from, from_end, from_next, to, to_end, to_next))
2837 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
2838 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
2839 const char *from
, const char *from_end
, const char **from_next
,
2840 char *to
, char *to_end
, char **to_next
)
2842 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2843 from_end
, from_next
, to
, to_end
, to_next
);
2846 return CODECVT_noconv
;
2849 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2850 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2851 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
2852 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
2853 const char *from
, const char *from_end
, const char **from_next
,
2854 char *to
, char *to_end
, char **to_next
)
2856 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2857 from_next
, to
, to_end
, to_next
);
2858 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
2859 to
, to_end
, to_next
);
2862 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2863 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2864 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2865 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2866 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
2867 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
2868 int *state
, char *to
, char *to_end
, char **to_next
)
2870 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2872 return CODECVT_noconv
;
2875 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2876 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2877 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
2878 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
2879 int *state
, char *to
, char *to_end
, char **to_next
)
2881 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2882 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
2885 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2886 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2887 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2888 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2889 (this, state, from, from_end, max))
2890 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
2891 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
2892 const char *from
, const char *from_end
, MSVCP_size_t max
)
2894 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2895 return (from_end
-from
> max
? max
: from_end
-from
);
2898 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2899 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2900 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
2901 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
2902 const char *from
, const char *from_end
, MSVCP_size_t max
)
2904 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2905 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
2908 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2909 locale_id codecvt_wchar_id
= {0};
2910 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2911 locale_id codecvt_short_id
= {0};
2913 /* ??_7?$codecvt@_WDH@std@@6B@ */
2914 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
2915 /* ??_7?$codecvt@GDH@std@@6B@ */
2916 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
2918 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2919 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2920 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2921 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2922 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
2923 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
2925 TRACE("(%p %p)\n", this, locinfo
);
2926 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2929 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2930 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2931 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
2932 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2934 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2936 codecvt_base_ctor_refs(&this->base
, refs
);
2937 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
2939 codecvt_wchar__Init(this, locinfo
);
2943 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2944 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2945 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
2946 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2948 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2950 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
2951 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
2955 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2956 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2957 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
2958 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2962 TRACE("(%p %ld)\n", this, refs
);
2964 _Locinfo_ctor(&locinfo
);
2965 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
2966 _Locinfo_dtor(&locinfo
);
2970 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2971 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2972 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
2973 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2977 TRACE("(%p %ld)\n", this, refs
);
2979 _Locinfo_ctor(&locinfo
);
2980 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2981 _Locinfo_dtor(&locinfo
);
2985 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
2986 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
2987 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
2988 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
2992 TRACE("(%p %s %ld)\n", this, name
, refs
);
2994 _Locinfo_ctor_cstr(&locinfo
, name
);
2995 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2996 _Locinfo_dtor(&locinfo
);
3000 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3001 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3002 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3003 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3005 return codecvt_wchar_ctor_refs(this, 0);
3008 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3009 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3010 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3011 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3013 return codecvt_short_ctor_refs(this, 0);
3016 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3017 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3018 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3019 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3020 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3021 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3023 TRACE("(%p)\n", this);
3024 codecvt_base_dtor(&this->base
);
3027 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3028 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3030 TRACE("(%p %x)\n", this, flags
);
3032 /* we have an array, with the number of elements stored before the first object */
3033 int i
, *ptr
= (int *)this-1;
3035 for(i
=*ptr
-1; i
>=0; i
--)
3036 codecvt_wchar_dtor(this+i
);
3037 MSVCRT_operator_delete(ptr
);
3039 codecvt_wchar_dtor(this);
3041 MSVCRT_operator_delete(this);
3047 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3048 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3049 unsigned int __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3051 TRACE("(%p %p)\n", facet
, loc
);
3053 if(facet
&& !*facet
) {
3056 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3058 ERR("Out of memory\n");
3059 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3063 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
3064 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3065 _Locinfo_dtor(&locinfo
);
3071 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3073 static codecvt_wchar
*obj
= NULL
;
3076 const locale_facet
*fac
;
3078 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3079 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3081 _Lockit_dtor(&lock
);
3082 return (codecvt_wchar
*)fac
;
3086 _Lockit_dtor(&lock
);
3090 codecvt_wchar__Getcat(&fac
, loc
);
3091 obj
= (codecvt_wchar
*)fac
;
3092 locale_facet__Incref(&obj
->base
.facet
);
3093 locale_facet_register(&obj
->base
.facet
);
3094 _Lockit_dtor(&lock
);
3099 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3100 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3101 unsigned int __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3103 TRACE("(%p %p)\n", facet
, loc
);
3105 if(facet
&& !*facet
) {
3108 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3110 ERR("Out of memory\n");
3111 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3115 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
3116 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3117 _Locinfo_dtor(&locinfo
);
3123 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3125 static codecvt_wchar
*obj
= NULL
;
3128 const locale_facet
*fac
;
3130 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3131 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3133 _Lockit_dtor(&lock
);
3134 return (codecvt_wchar
*)fac
;
3138 _Lockit_dtor(&lock
);
3142 codecvt_short__Getcat(&fac
, loc
);
3143 obj
= (codecvt_wchar
*)fac
;
3144 locale_facet__Incref(&obj
->base
.facet
);
3145 locale_facet_register(&obj
->base
.facet
);
3146 _Lockit_dtor(&lock
);
3151 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3152 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3153 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3156 return &codecvt_wchar_id
;
3159 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3160 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3161 locale_id
* __cdecl
codecvt_short__Id_func(void)
3164 return &codecvt_short_id
;
3167 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3168 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3169 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3170 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3171 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3172 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3174 TRACE("(%p)\n", this);
3178 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3179 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3180 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3181 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3182 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3183 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3185 TRACE("(%p)\n", this);
3189 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3190 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3191 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3192 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3193 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3194 CALL_VTBL_FUNC(this, 16, int, \
3195 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3196 (this, state, from, from_end, from_next, to, to_end, to_next))
3197 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3198 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3199 const char *from
, const char *from_end
, const char **from_next
,
3200 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3202 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3203 from_end
, from_next
, to
, to_end
, to_next
);
3208 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3209 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3211 *from_next
= from_end
;
3212 return CODECVT_partial
;
3214 return CODECVT_error
;
3228 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3229 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3230 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3231 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3232 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3233 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3234 const char *from
, const char *from_end
, const char **from_next
,
3235 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3237 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3238 from_end
, from_next
, to
, to_end
, to_next
);
3239 return call_codecvt_wchar_do_in(this, state
, from
,
3240 from_end
, from_next
, to
, to_end
, to_next
);
3243 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3244 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3245 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3246 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3247 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3248 CALL_VTBL_FUNC(this, 20, int, \
3249 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3250 (this, state, from, from_end, from_next, to, to_end, to_next))
3251 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3252 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3253 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3254 char *to
, char *to_end
, char **to_next
)
3256 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3257 from_end
, from_next
, to
, to_end
, to_next
);
3262 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3263 int old_state
= *state
, size
;
3264 char buf
[MB_LEN_MAX
];
3266 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3268 return CODECVT_error
;
3270 if(size
> from_end
-*from_next
) {
3272 return CODECVT_partial
;
3283 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3284 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3285 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3286 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3287 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3288 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3289 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3290 char *to
, char *to_end
, char **to_next
)
3292 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3293 from_end
, from_next
, to
, to_end
, to_next
);
3294 return call_codecvt_wchar_do_out(this, state
, from
,
3295 from_end
, from_next
, to
, to_end
, to_next
);
3298 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3299 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3300 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3301 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3302 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3303 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3304 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3305 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3306 int *state
, char *to
, char *to_end
, char **to_next
)
3308 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3310 WARN("unexpected state: %x\n", *state
);
3316 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3317 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3318 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3319 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3320 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3321 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3322 int *state
, char *to
, char *to_end
, char **to_next
)
3324 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3325 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3328 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3329 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3330 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3331 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3332 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3333 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3334 (this, state, from, from_end, max))
3335 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3336 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3337 const char *from
, const char *from_end
, MSVCP_size_t max
)
3339 int tmp_state
= *state
, ret
=0;
3341 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3343 while(ret
<max
&& from
!=from_end
) {
3344 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3361 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3362 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3363 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3364 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3365 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3366 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3367 const char *from
, const char *from_end
, MSVCP_size_t max
)
3369 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3370 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3373 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3374 locale_id numpunct_char_id
= {0};
3376 /* ??_7?$numpunct@D@std@@6B@ */
3377 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3379 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3380 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3381 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3382 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3386 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3388 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3389 this->false_name
= MSVCRT_operator_new(len
);
3390 if(this->false_name
)
3391 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3393 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3394 this->true_name
= MSVCRT_operator_new(len
);
3396 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3399 this->grouping
= MSVCRT_operator_new(1);
3401 *(char*)this->grouping
= 0;
3406 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3408 len
= strlen(lc
->grouping
)+1;
3409 this->grouping
= MSVCRT_operator_new(len
);
3411 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3413 this->dp
= lc
->decimal_point
[0];
3414 this->sep
= lc
->thousands_sep
[0];
3417 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3418 MSVCRT_operator_delete((char*)this->grouping
);
3419 MSVCRT_operator_delete((char*)this->false_name
);
3420 MSVCRT_operator_delete((char*)this->true_name
);
3422 ERR("Out of memory\n");
3423 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3427 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3428 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3429 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3430 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3432 TRACE("(%p)\n", this);
3434 MSVCRT_operator_delete((char*)this->grouping
);
3435 MSVCRT_operator_delete((char*)this->false_name
);
3436 MSVCRT_operator_delete((char*)this->true_name
);
3439 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3440 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3441 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
3442 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
3443 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3445 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3446 locale_facet_ctor_refs(&this->facet
, refs
);
3447 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3448 numpunct_char__Init(this, locinfo
, usedef
);
3452 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3453 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3454 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
3455 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
3456 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3460 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3461 locale_facet_ctor_refs(&this->facet
, refs
);
3462 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3464 _Locinfo_ctor_cstr(&locinfo
, name
);
3465 numpunct_char__Init(this, &locinfo
, usedef
);
3466 _Locinfo_dtor(&locinfo
);
3470 /* ??0?$numpunct@D@std@@QAE@I@Z */
3471 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3472 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3473 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3475 TRACE("(%p %lu)\n", this, refs
);
3476 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3479 /* ??_F?$numpunct@D@std@@QAEXXZ */
3480 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3481 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3482 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3484 return numpunct_char_ctor_refs(this, 0);
3487 /* ??1?$numpunct@D@std@@MAE@XZ */
3488 /* ??1?$numpunct@D@std@@MEAA@XZ */
3489 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3490 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3492 TRACE("(%p)\n", this);
3493 numpunct_char__Tidy(this);
3496 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3497 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3499 TRACE("(%p %x)\n", this, flags
);
3501 /* we have an array, with the number of elements stored before the first object */
3502 int i
, *ptr
= (int *)this-1;
3504 for(i
=*ptr
-1; i
>=0; i
--)
3505 numpunct_char_dtor(this+i
);
3506 MSVCRT_operator_delete(ptr
);
3508 numpunct_char_dtor(this);
3510 MSVCRT_operator_delete(this);
3516 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3517 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3518 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3520 TRACE("(%p %p)\n", facet
, loc
);
3522 if(facet
&& !*facet
) {
3523 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3525 ERR("Out of memory\n");
3526 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3529 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3530 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3536 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3538 static numpunct_char
*obj
= NULL
;
3541 const locale_facet
*fac
;
3543 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3544 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
3546 _Lockit_dtor(&lock
);
3547 return (numpunct_char
*)fac
;
3551 _Lockit_dtor(&lock
);
3555 numpunct_char__Getcat(&fac
, loc
);
3556 obj
= (numpunct_char
*)fac
;
3557 locale_facet__Incref(&obj
->facet
);
3558 locale_facet_register(&obj
->facet
);
3559 _Lockit_dtor(&lock
);
3564 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3565 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3566 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3567 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3568 char, (const numpunct_char *this), (this))
3569 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3571 TRACE("(%p)\n", this);
3575 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3576 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3577 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
3578 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
3580 TRACE("(%p)\n", this);
3581 return call_numpunct_char_do_decimal_point(this);
3584 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3585 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3586 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
3587 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3588 char, (const numpunct_char*), (this))
3589 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
3591 TRACE("(%p)\n", this);
3595 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3596 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3597 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
3598 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
3600 TRACE("(%p)\n", this);
3601 return call_numpunct_char_do_thousands_sep(this);
3604 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3605 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3606 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
3607 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3608 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3609 basic_string_char
* __thiscall
numpunct_char_do_grouping(
3610 const numpunct_char
*this, basic_string_char
*ret
)
3612 TRACE("(%p)\n", this);
3613 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3616 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3617 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3618 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
3619 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
3621 TRACE("(%p)\n", this);
3622 return call_numpunct_char_do_grouping(this, ret
);
3625 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3626 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3627 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
3628 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3629 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3630 basic_string_char
* __thiscall
numpunct_char_do_falsename(
3631 const numpunct_char
*this, basic_string_char
*ret
)
3633 TRACE("(%p)\n", this);
3634 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
3637 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3638 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3639 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
3640 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
3642 TRACE("(%p)\n", this);
3643 return call_numpunct_char_do_falsename(this, ret
);
3646 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3647 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3648 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
3649 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3650 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3651 basic_string_char
* __thiscall
numpunct_char_do_truename(
3652 const numpunct_char
*this, basic_string_char
*ret
)
3654 TRACE("(%p)\n", this);
3655 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
3658 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3659 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3660 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
3661 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
3663 TRACE("(%p)\n", this);
3664 return call_numpunct_char_do_truename(this, ret
);
3667 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3668 locale_id numpunct_wchar_id
= {0};
3669 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3670 locale_id numpunct_short_id
= {0};
3672 /* ??_7?$numpunct@_W@std@@6B@ */
3673 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
3674 /* ??_7?$numpunct@G@std@@6B@ */
3675 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
3677 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3678 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3679 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3680 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3681 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
3682 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
3683 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3685 const char *to_convert
;
3689 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3691 _Locinfo__Getcvt(locinfo
, &cvt
);
3693 to_convert
= _Locinfo__Getfalse(locinfo
);
3694 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3695 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3696 if(this->false_name
)
3697 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3698 (wchar_t*)this->false_name
, len
);
3700 to_convert
= _Locinfo__Gettrue(locinfo
);
3701 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3702 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3704 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3705 (wchar_t*)this->true_name
, len
);
3708 this->grouping
= MSVCRT_operator_new(1);
3710 *(char*)this->grouping
= 0;
3715 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3717 len
= strlen(lc
->grouping
)+1;
3718 this->grouping
= MSVCRT_operator_new(len
);
3720 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3722 this->dp
= lc
->decimal_point
[0];
3723 this->sep
= lc
->thousands_sep
[0];
3726 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3727 MSVCRT_operator_delete((char*)this->grouping
);
3728 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3729 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3731 ERR("Out of memory\n");
3732 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3736 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3737 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3738 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3739 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3740 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
3741 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
3743 TRACE("(%p)\n", this);
3745 MSVCRT_operator_delete((char*)this->grouping
);
3746 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3747 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3750 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3751 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3752 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
3753 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
3754 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3756 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3757 locale_facet_ctor_refs(&this->facet
, refs
);
3758 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3759 numpunct_wchar__Init(this, locinfo
, usedef
);
3763 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3764 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3765 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
3766 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
3767 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3769 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
3770 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3774 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3775 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3776 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
3777 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
3778 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3782 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3783 locale_facet_ctor_refs(&this->facet
, refs
);
3784 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3786 _Locinfo_ctor_cstr(&locinfo
, name
);
3787 numpunct_wchar__Init(this, &locinfo
, usedef
);
3788 _Locinfo_dtor(&locinfo
);
3792 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3793 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3794 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
3795 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
3796 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3798 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
3799 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3803 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3804 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3805 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
3806 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3808 TRACE("(%p %lu)\n", this, refs
);
3809 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
3812 /* ??0?$numpunct@G@std@@QAE@I@Z */
3813 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3814 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
3815 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3817 numpunct_wchar_ctor_refs(this, refs
);
3818 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3822 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3823 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3824 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
3825 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
3827 return numpunct_wchar_ctor_refs(this, 0);
3830 /* ??_F?$numpunct@G@std@@QAEXXZ */
3831 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3832 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
3833 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
3835 return numpunct_short_ctor_refs(this, 0);
3838 /* ??1?$numpunct@_W@std@@MAE@XZ */
3839 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3840 /* ??1?$numpunct@G@std@@MAE@XZ */
3841 /* ??1?$numpunct@G@std@@MEAA@XZ */
3842 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
3843 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
3845 TRACE("(%p)\n", this);
3846 numpunct_wchar__Tidy(this);
3849 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
3850 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3852 TRACE("(%p %x)\n", this, flags
);
3854 /* we have an array, with the number of elements stored before the first object */
3855 int i
, *ptr
= (int *)this-1;
3857 for(i
=*ptr
-1; i
>=0; i
--)
3858 numpunct_wchar_dtor(this+i
);
3859 MSVCRT_operator_delete(ptr
);
3861 numpunct_wchar_dtor(this);
3863 MSVCRT_operator_delete(this);
3869 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3870 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3871 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3873 TRACE("(%p %p)\n", facet
, loc
);
3875 if(facet
&& !*facet
) {
3876 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3878 ERR("Out of memory\n");
3879 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3882 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
3883 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3889 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
3891 static numpunct_wchar
*obj
= NULL
;
3894 const locale_facet
*fac
;
3896 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3897 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
3899 _Lockit_dtor(&lock
);
3900 return (numpunct_wchar
*)fac
;
3904 _Lockit_dtor(&lock
);
3908 numpunct_wchar__Getcat(&fac
, loc
);
3909 obj
= (numpunct_wchar
*)fac
;
3910 locale_facet__Incref(&obj
->facet
);
3911 locale_facet_register(&obj
->facet
);
3912 _Lockit_dtor(&lock
);
3917 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3918 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3919 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3921 TRACE("(%p %p)\n", facet
, loc
);
3923 if(facet
&& !*facet
) {
3924 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3926 ERR("Out of memory\n");
3927 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3930 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
3931 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3937 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
3939 static numpunct_wchar
*obj
= NULL
;
3942 const locale_facet
*fac
;
3944 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3945 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
3947 _Lockit_dtor(&lock
);
3948 return (numpunct_wchar
*)fac
;
3952 _Lockit_dtor(&lock
);
3956 numpunct_short__Getcat(&fac
, loc
);
3957 obj
= (numpunct_wchar
*)fac
;
3958 locale_facet__Incref(&obj
->facet
);
3959 locale_facet_register(&obj
->facet
);
3960 _Lockit_dtor(&lock
);
3965 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3966 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3967 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3968 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3969 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
3970 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3971 wchar_t, (const numpunct_wchar *this), (this))
3972 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
3974 TRACE("(%p)\n", this);
3978 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3979 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3980 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3981 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3982 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
3983 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
3985 TRACE("(%p)\n", this);
3986 return call_numpunct_wchar_do_decimal_point(this);
3989 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3990 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3991 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3992 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3993 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
3994 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3995 wchar_t, (const numpunct_wchar *this), (this))
3996 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
3998 TRACE("(%p)\n", this);
4002 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4003 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4004 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4005 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4006 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4007 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4009 TRACE("(%p)\n", this);
4010 return call_numpunct_wchar_do_thousands_sep(this);
4013 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4014 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4015 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4016 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4017 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4018 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4019 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4020 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4022 TRACE("(%p)\n", this);
4023 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4026 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4027 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4028 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4029 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4030 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4031 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4033 TRACE("(%p)\n", this);
4034 return call_numpunct_wchar_do_grouping(this, ret
);
4037 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4038 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4039 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4040 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4041 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4042 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4043 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4044 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4046 TRACE("(%p)\n", this);
4047 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4050 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4051 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4052 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4053 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4054 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4055 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4057 TRACE("(%p)\n", this);
4058 return call_numpunct_wchar_do_falsename(this, ret
);
4061 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4062 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4063 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4064 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4065 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4066 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4067 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4068 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4070 TRACE("(%p)\n", this);
4071 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4074 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4075 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4076 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4077 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4078 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4079 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4081 TRACE("(%p)\n", this);
4082 return call_numpunct_wchar_do_truename(this, ret
);
4085 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4087 double ret
= strtod(buf
, buf_end
);
4090 ret
*= pow(10, exp
);
4094 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4100 ret
= _Stod(buf
, buf_end
, exp
);
4110 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4112 return _Stod(buf
, buf_end
, exp
);
4115 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4117 return _Stodx(buf
, buf_end
, exp
, err
);
4120 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4122 return _strtoi64(buf
, buf_end
, base
);
4125 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4131 ret
= _strtoi64(buf
, buf_end
, base
);
4141 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4143 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4144 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4149 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4151 return _strtoui64(buf
, buf_end
, base
);
4154 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4156 unsigned __int64 ret
;
4160 ret
= _strtoui64(buf
, buf_end
, base
);
4170 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4173 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4174 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4176 return buf
[0]=='-' ? -i
: i
;
4179 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4181 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4182 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4184 return buf
[0]=='-' ? -i
: i
;
4187 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4188 locale_id num_get_wchar_id
= {0};
4189 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4190 locale_id num_get_short_id
= {0};
4192 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4193 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4194 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4195 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4197 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4198 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4199 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4200 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4201 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4202 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4204 TRACE("(%p %p)\n", this, locinfo
);
4205 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4208 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4209 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4210 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4211 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4212 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4214 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4216 locale_facet_ctor_refs(&this->facet
, refs
);
4217 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4219 num_get_wchar__Init(this, locinfo
);
4223 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4224 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4225 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4226 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4227 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4229 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4230 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4234 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4235 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4236 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4237 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4241 TRACE("(%p %lu)\n", this, refs
);
4243 _Locinfo_ctor(&locinfo
);
4244 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4245 _Locinfo_dtor(&locinfo
);
4249 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4250 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4251 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4252 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4254 num_get_wchar_ctor_refs(this, refs
);
4255 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4259 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4260 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4261 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4262 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4264 return num_get_wchar_ctor_refs(this, 0);
4267 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4268 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4269 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4270 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4272 return num_get_short_ctor_refs(this, 0);
4275 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4276 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4277 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4278 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4279 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4280 void __thiscall
num_get_wchar_dtor(num_get
*this)
4282 TRACE("(%p)\n", this);
4283 locale_facet_dtor(&this->facet
);
4286 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4287 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4289 TRACE("(%p %x)\n", this, flags
);
4291 /* we have an array, with the number of elements stored before the first object */
4292 int i
, *ptr
= (int *)this-1;
4294 for(i
=*ptr
-1; i
>=0; i
--)
4295 num_get_wchar_dtor(this+i
);
4296 MSVCRT_operator_delete(ptr
);
4298 num_get_wchar_dtor(this);
4300 MSVCRT_operator_delete(this);
4306 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4307 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4308 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4310 TRACE("(%p %p)\n", facet
, loc
);
4312 if(facet
&& !*facet
) {
4315 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4317 ERR("Out of memory\n");
4318 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4322 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
4323 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4324 _Locinfo_dtor(&locinfo
);
4330 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4332 static num_get
*obj
= NULL
;
4335 const locale_facet
*fac
;
4337 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4338 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4340 _Lockit_dtor(&lock
);
4341 return (num_get
*)fac
;
4345 _Lockit_dtor(&lock
);
4349 num_get_wchar__Getcat(&fac
, loc
);
4350 obj
= (num_get
*)fac
;
4351 locale_facet__Incref(&obj
->facet
);
4352 locale_facet_register(&obj
->facet
);
4353 _Lockit_dtor(&lock
);
4358 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4359 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4360 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4362 if(facet
&& !*facet
) {
4363 num_get_wchar__Getcat(facet
, loc
);
4364 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4370 num_get
* num_get_short_use_facet(const locale
*loc
)
4372 static num_get
*obj
= NULL
;
4375 const locale_facet
*fac
;
4377 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4378 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4380 _Lockit_dtor(&lock
);
4381 return (num_get
*)fac
;
4385 _Lockit_dtor(&lock
);
4389 num_get_short__Getcat(&fac
, loc
);
4390 obj
= (num_get
*)fac
;
4391 locale_facet__Incref(&obj
->facet
);
4392 locale_facet_register(&obj
->facet
);
4393 _Lockit_dtor(&lock
);
4398 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
4403 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
4406 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4407 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4409 basic_string_char grouping_bstr
;
4410 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4411 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
;
4412 wchar_t sep
, digits
[11], *digits_pos
;
4413 const char *grouping
;
4414 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
4416 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4419 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4422 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4423 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4424 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : (wchar_t)0;
4426 istreambuf_iterator_wchar_val(first
);
4427 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4429 istreambuf_iterator_wchar_inc(first
);
4430 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4432 istreambuf_iterator_wchar_inc(first
);
4436 groups_no
= strlen(grouping
)+2;
4437 groups
= calloc(groups_no
, sizeof(char));
4440 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4441 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4442 if(sep
&& first
->val
==sep
) {
4443 if(cur_group
== groups_no
+1) {
4444 if(groups
[1] != groups
[2]) {
4448 memmove(groups
+1, groups
+2, groups_no
);
4449 groups
[cur_group
] = 0;
4459 if(dest_empty
&& first
->val
== digits
[0])
4463 *dest
++ = '0'+digits_pos
-digits
;
4466 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4467 groups
[cur_group
]++;
4471 if(cur_group
&& !groups
[cur_group
])
4476 for(; cur_group
>=0 && !error
; cur_group
--) {
4477 if(*grouping
== CHAR_MAX
) {
4481 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4482 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4485 }else if(grouping
[1]) {
4489 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4495 }else if(dest_empty
) {
4499 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4501 *dest
++ = *localeconv()->decimal_point
;
4502 istreambuf_iterator_wchar_inc(first
);
4505 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
)) {
4510 if(!first
->strbuf
|| !wcschr(digits
, first
->val
))
4515 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4516 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4518 else if(dest
<num_end
) {
4520 *dest
++ = '0'+digits_pos
-digits
;
4529 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4531 istreambuf_iterator_wchar_inc(first
);
4533 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4535 istreambuf_iterator_wchar_inc(first
);
4536 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4538 istreambuf_iterator_wchar_inc(first
);
4541 error
= dest_empty
= TRUE
;
4542 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4545 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
4546 error
= dest_empty
= FALSE
;
4548 *dest
++ = '0'+digits_pos
-digits
;
4554 }else if(dest_empty
) {
4563 /* ?_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 */
4564 /* ?_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 */
4565 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4566 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4568 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
4571 /* ?_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 */
4572 /* ?_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 */
4573 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4574 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4576 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
4579 /* ?_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 */
4580 /* ?_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 */
4581 /* ?_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 */
4582 /* ?_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 */
4583 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4584 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
4586 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
4590 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4591 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
4593 wchar_t digits
[23], *digits_pos
, sep
;
4594 basic_string_char grouping_bstr
;
4595 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
4596 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
;
4597 const char *grouping
;
4598 BOOL error
= TRUE
, dest_empty
= TRUE
;
4600 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
4603 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4604 for(i
=0; i
<6; i
++) {
4605 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
4606 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
4609 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4610 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4611 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
4613 basefield
= fmtflags
& FMTFLAG_basefield
;
4614 if(basefield
== FMTFLAG_oct
)
4616 else if(basefield
== FMTFLAG_hex
)
4617 base
= 22; /* equal to the size of digits buffer */
4623 istreambuf_iterator_wchar_val(first
);
4624 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4626 istreambuf_iterator_wchar_inc(first
);
4627 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4629 istreambuf_iterator_wchar_inc(first
);
4632 if(!base
&& first
->strbuf
&& first
->val
==digits
[0]) {
4633 istreambuf_iterator_wchar_inc(first
);
4634 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('x', &this->cvt
))) {
4635 istreambuf_iterator_wchar_inc(first
);
4647 groups_no
= strlen(grouping
)+2;
4648 groups
= calloc(groups_no
, sizeof(char));
4651 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4652 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4653 if(sep
&& first
->val
==sep
) {
4654 if(cur_group
== groups_no
+1) {
4655 if(groups
[1] != groups
[2]) {
4659 memmove(groups
+1, groups
+2, groups_no
);
4660 groups
[cur_group
] = 0;
4670 if(dest_empty
&& first
->val
== digits
[0])
4673 /* skip digits that can't be copied to dest buffer, other
4674 * functions are responsible for detecting overflows */
4676 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
4677 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
4678 'A'+digits_pos
-digits
-16));
4679 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4680 groups
[cur_group
]++;
4684 if(cur_group
&& !groups
[cur_group
])
4689 for(; cur_group
>=0 && !error
; cur_group
--) {
4690 if(*grouping
== CHAR_MAX
) {
4694 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4695 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4698 }else if(grouping
[1]) {
4702 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4711 return (base
==22 ? 16 : base
);
4714 /* ?_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 */
4715 /* ?_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 */
4716 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4717 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4719 return num_get__Getifld(this, dest
, first
, last
,
4720 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
4723 /* ?_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 */
4724 /* ?_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 */
4725 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4726 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4728 return num_get__Getifld(this, dest
, first
, last
,
4729 fmtflags
, loc
, numpunct_short_use_facet(loc
));
4732 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
4733 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
4734 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
4735 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
4736 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
4737 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
4739 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
4743 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
4744 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4745 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4746 void **pval
, numpunct_wchar
*numpunct
)
4752 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4754 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4755 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
4756 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
4757 *state
|= IOSTATE_failbit
;
4758 else if(end
!=tmp
&& !err
)
4759 *pval
= (void*)((INT_PTR
)v
);
4761 *state
|= IOSTATE_failbit
;
4764 *state
|= IOSTATE_eofbit
;
4770 /* ?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 */
4771 /* ?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 */
4772 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
4773 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
4774 (this, ret, first, last, base, state, pval))
4775 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
4776 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4777 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4779 return num_get_do_get_void(this, ret
, first
, last
, base
,
4780 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4783 /* ?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 */
4784 /* ?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 */
4785 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
4786 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4787 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4789 return num_get_do_get_void(this, ret
, first
, last
, base
,
4790 state
, pval
, numpunct_short_use_facet(base
->loc
));
4793 /* ?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 */
4794 /* ?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 */
4795 /* ?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 */
4796 /* ?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 */
4797 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
4798 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4799 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4801 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4802 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
4805 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
4806 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4807 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4808 double *pval
, numpunct_wchar
*numpunct
)
4814 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4816 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
4817 if(end
!=tmp
&& !err
)
4820 *state
|= IOSTATE_failbit
;
4823 *state
|= IOSTATE_eofbit
;
4829 /* ?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 */
4830 /* ?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 */
4831 /* ?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 */
4832 /* ?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 */
4833 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
4834 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4835 (this, ret, first, last, base, state, pval))
4836 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
4837 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4838 (this, ret, first, last, base, state, pval))
4839 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
4840 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4841 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4843 return num_get_do_get_double(this, ret
, first
, last
, base
,
4844 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4847 /* ?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 */
4848 /* ?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 */
4849 /* ?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 */
4850 /* ?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 */
4851 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
4852 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4853 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4855 return num_get_do_get_double(this, ret
, first
, last
, base
,
4856 state
, pval
, numpunct_short_use_facet(base
->loc
));
4859 /* ?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 */
4860 /* ?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 */
4861 /* ?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 */
4862 /* ?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 */
4863 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
4864 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4865 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4867 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4868 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
4871 /* ?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 */
4872 /* ?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 */
4873 /* ?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 */
4874 /* ?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 */
4875 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
4876 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4877 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4879 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4880 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
4883 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
4884 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4885 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4886 float *pval
, numpunct_wchar
*numpunct
)
4892 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4894 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
4895 &last
, base
->loc
, numpunct
), &err
);
4896 if(end
!=tmp
&& !err
)
4899 *state
|= IOSTATE_failbit
;
4902 *state
|= IOSTATE_eofbit
;
4908 /* ?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 */
4909 /* ?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 */
4910 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
4911 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
4912 (this, ret, first, last, base, state, pval))
4913 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
4914 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4915 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4917 return num_get_do_get_float(this, ret
, first
, last
, base
,
4918 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4921 /* ?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 */
4922 /* ?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 */
4923 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
4924 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4925 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4927 return num_get_do_get_float(this, ret
, first
, last
, base
,
4928 state
, pval
, numpunct_short_use_facet(base
->loc
));
4931 /* ?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 */
4932 /* ?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 */
4933 /* ?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 */
4934 /* ?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 */
4935 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
4936 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4937 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4939 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4940 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
4943 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
4944 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4945 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4946 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
4952 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4954 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4955 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4956 if(end
!=tmp
&& !err
)
4959 *state
|= IOSTATE_failbit
;
4962 *state
|= IOSTATE_eofbit
;
4968 /* ?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 */
4969 /* ?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 */
4970 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
4971 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
4972 (this, ret, first, last, base, state, pval))
4973 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
4974 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4975 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4977 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4978 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4981 /* ?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 */
4982 /* ?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 */
4983 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
4984 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4985 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4987 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4988 state
, pval
, numpunct_short_use_facet(base
->loc
));
4991 /* ?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 */
4992 /* ?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 */
4993 /* ?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 */
4994 /* ?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 */
4995 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
4996 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4997 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4999 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5000 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5003 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5004 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5005 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5006 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5012 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5014 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5015 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5016 if(end
!=tmp
&& !err
)
5019 *state
|= IOSTATE_failbit
;
5022 *state
|= IOSTATE_eofbit
;
5028 /* ?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 */
5029 /* ?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 */
5030 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5031 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5032 (this, ret, first, last, base, state, pval))
5033 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5034 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5035 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5037 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5038 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5041 /* ?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 */
5042 /* ?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 */
5043 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5044 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5045 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5047 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5048 state
, pval
, numpunct_short_use_facet(base
->loc
));
5051 /* ?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 */
5052 /* ?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 */
5053 /* ?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 */
5054 /* ?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 */
5055 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5056 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5057 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5059 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5060 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5063 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5064 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5065 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5066 ULONG
*pval
, numpunct_wchar
*numpunct
)
5072 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5074 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5075 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5076 if(end
!=tmp
&& !err
)
5079 *state
|= IOSTATE_failbit
;
5082 *state
|= IOSTATE_eofbit
;
5088 /* ?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 */
5089 /* ?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 */
5090 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5091 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5092 (this, ret, first, last, base, state, pval))
5093 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5094 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5095 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5097 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5098 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5101 /* ?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 */
5102 /* ?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 */
5103 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5104 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5105 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5107 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5108 state
, pval
, numpunct_short_use_facet(base
->loc
));
5111 /* ?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 */
5112 /* ?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 */
5113 /* ?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 */
5114 /* ?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 */
5115 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5116 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5117 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5119 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5120 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5123 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5124 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5125 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5126 LONG
*pval
, numpunct_wchar
*numpunct
)
5132 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5134 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5135 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5136 if(end
!=tmp
&& !err
)
5139 *state
|= IOSTATE_failbit
;
5142 *state
|= IOSTATE_eofbit
;
5148 /* ?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 */
5149 /* ?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 */
5150 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5151 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5152 (this, ret, first, last, base, state, pval))
5153 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5154 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5155 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5157 return num_get_do_get_long(this, ret
, first
, last
, base
,
5158 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5161 /* ?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 */
5162 /* ?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 */
5163 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5164 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5165 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5167 return num_get_do_get_long(this, ret
, first
, last
, base
,
5168 state
, pval
, numpunct_short_use_facet(base
->loc
));
5171 /* ?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 */
5172 /* ?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 */
5173 /* ?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 */
5174 /* ?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 */
5175 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5176 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5177 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5179 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5180 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5183 /* ?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 */
5184 /* ?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 */
5185 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5186 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5187 (this, ret, first, last, base, state, pval))
5188 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5189 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5190 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5192 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5193 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5196 /* ?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 */
5197 /* ?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 */
5198 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5199 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5200 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5202 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5203 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5206 /* ?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 */
5207 /* ?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 */
5208 /* ?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 */
5209 /* ?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 */
5210 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5211 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5212 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5214 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5215 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5218 /* ?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 */
5219 /* ?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 */
5220 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5221 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5222 (this, ret, first, last, base, state, pval))
5223 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5224 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5225 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5228 char tmp
[25], *beg
, *end
;
5231 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5233 b
= num_get_wchar__Getifld(this, tmp
,
5234 &first
, &last
, base
->fmtfl
, base
->loc
);
5235 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5236 v
= _Stoulx(beg
, &end
, b
, &err
);
5238 if(v
!= (ULONG
)((unsigned short)v
))
5239 *state
|= IOSTATE_failbit
;
5240 else if(end
!=beg
&& !err
)
5241 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5243 *state
|= IOSTATE_failbit
;
5246 *state
|= IOSTATE_eofbit
;
5252 /* ?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 */
5253 /* ?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 */
5254 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5255 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5256 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5258 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5262 /* ?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 */
5263 /* ?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 */
5264 /* ?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@ */
5265 /* ?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 */
5266 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5267 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5268 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5270 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5271 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5274 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5275 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5276 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5277 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5279 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5281 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5282 basic_string_wchar false_bstr
, true_bstr
;
5283 const wchar_t *pfalse
, *ptrue
;
5285 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5286 numpunct_wchar_truename(numpunct
, &true_bstr
);
5287 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5288 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5290 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;
5291 istreambuf_iterator_wchar_inc(&first
)) {
5292 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5294 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5297 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5299 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5307 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5316 *state
|= IOSTATE_failbit
;
5318 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5319 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5323 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5324 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5326 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5329 *state
|= IOSTATE_failbit
;
5333 *state
|= IOSTATE_eofbit
;
5334 memcpy(ret
, &first
, sizeof(first
));
5338 /* ?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 */
5339 /* ?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 */
5340 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5341 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5342 (this, ret, first, last, base, state, pval))
5343 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5344 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5345 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5347 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5348 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
5351 /* ?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 */
5352 /* ?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 */
5353 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5354 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5355 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5357 return num_get_do_get_bool(this, ret
, first
, last
, base
,
5358 state
, pval
, numpunct_short_use_facet(base
->loc
));
5361 /* ?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 */
5362 /* ?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 */
5363 /* ?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 */
5364 /* ?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 */
5365 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
5366 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5367 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5369 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5370 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5373 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5374 locale_id num_get_char_id
= {0};
5376 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5377 extern const vtable_ptr MSVCP_num_get_char_vtable
;
5379 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5380 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5381 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
5382 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
5384 TRACE("(%p %p)\n", this, locinfo
);
5385 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5388 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5389 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5390 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
5391 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
5392 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
5394 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
5396 locale_facet_ctor_refs(&this->facet
, refs
);
5397 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
5399 num_get_char__Init(this, locinfo
);
5403 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5404 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5405 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
5406 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
5410 TRACE("(%p %lu)\n", this, refs
);
5412 _Locinfo_ctor(&locinfo
);
5413 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
5414 _Locinfo_dtor(&locinfo
);
5418 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5419 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5420 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
5421 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
5423 return num_get_char_ctor_refs(this, 0);
5426 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5427 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5428 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
5429 void __thiscall
num_get_char_dtor(num_get
*this)
5431 TRACE("(%p)\n", this);
5432 locale_facet_dtor(&this->facet
);
5435 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
5436 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
5438 TRACE("(%p %x)\n", this, flags
);
5440 /* we have an array, with the number of elements stored before the first object */
5441 int i
, *ptr
= (int *)this-1;
5443 for(i
=*ptr
-1; i
>=0; i
--)
5444 num_get_char_dtor(this+i
);
5445 MSVCRT_operator_delete(ptr
);
5447 num_get_char_dtor(this);
5449 MSVCRT_operator_delete(this);
5455 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5456 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5457 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
5459 TRACE("(%p %p)\n", facet
, loc
);
5461 if(facet
&& !*facet
) {
5464 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5466 ERR("Out of memory\n");
5467 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5471 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
5472 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5473 _Locinfo_dtor(&locinfo
);
5479 num_get
* num_get_char_use_facet(const locale
*loc
)
5481 static num_get
*obj
= NULL
;
5484 const locale_facet
*fac
;
5486 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5487 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
5489 _Lockit_dtor(&lock
);
5490 return (num_get
*)fac
;
5494 _Lockit_dtor(&lock
);
5498 num_get_char__Getcat(&fac
, loc
);
5499 obj
= (num_get
*)fac
;
5500 locale_facet__Incref(&obj
->facet
);
5501 locale_facet_register(&obj
->facet
);
5502 _Lockit_dtor(&lock
);
5507 /* ?_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 */
5508 /* ?_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 */
5509 /* Copies number to dest buffer, validates grouping and skips separators.
5510 * Updates first so it points past the number, all digits are skipped.
5511 * Returns how exponent needs to changed.
5512 * Size of dest buffer is not specified, assuming it's not smaller than 32:
5513 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
5515 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5516 istreambuf_iterator_char
*last
, const locale
*loc
)
5518 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5519 basic_string_char grouping_bstr
;
5520 int groups_no
= 0, cur_group
= 0, exp
= 0;
5521 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
, sep
;
5522 const char *grouping
;
5523 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
5525 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5527 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5528 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5529 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5531 istreambuf_iterator_char_val(first
);
5532 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5533 *dest
++ = first
->val
;
5534 istreambuf_iterator_char_inc(first
);
5538 groups_no
= strlen(grouping
)+2;
5539 groups
= calloc(groups_no
, sizeof(char));
5542 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5543 if(first
->val
<'0' || first
->val
>'9') {
5544 if(sep
&& first
->val
==sep
) {
5545 if(cur_group
== groups_no
+1) {
5546 if(groups
[1] != groups
[2]) {
5550 memmove(groups
+1, groups
+2, groups_no
);
5551 groups
[cur_group
] = 0;
5561 if(dest_empty
&& first
->val
== '0')
5565 *dest
++ = first
->val
;
5568 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5569 groups
[cur_group
]++;
5573 if(cur_group
&& !groups
[cur_group
])
5578 for(; cur_group
>=0 && !error
; cur_group
--) {
5579 if(*grouping
== CHAR_MAX
) {
5583 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5584 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5587 }else if(grouping
[1]) {
5591 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5597 }else if(dest_empty
) {
5601 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
5603 *dest
++ = *localeconv()->decimal_point
;
5604 istreambuf_iterator_char_inc(first
);
5607 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
)) {
5612 if(!first
->strbuf
|| first
->val
<'1' || first
->val
>'9')
5617 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5618 if(first
->val
<'0' || first
->val
>'9')
5620 else if(dest
<num_end
) {
5622 *dest
++ = first
->val
;
5631 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
5632 *dest
++ = first
->val
;
5633 istreambuf_iterator_char_inc(first
);
5635 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5636 *dest
++ = first
->val
;
5637 istreambuf_iterator_char_inc(first
);
5640 error
= dest_empty
= TRUE
;
5641 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5644 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
5645 error
= dest_empty
= FALSE
;
5647 *dest
++ = first
->val
;
5653 }else if(dest_empty
) {
5662 /* ?_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 */
5663 /* ?_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 */
5664 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5665 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
5667 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5671 /* ?_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 */
5672 /* ?_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 */
5673 /* Copies number to dest buffer, validates grouping and skips separators.
5674 * Updates first so it points past the number, all digits are skipped.
5675 * Returns number base (8, 10 or 16).
5676 * Size of dest buffer is not specified, assuming it's not smaller than 25:
5677 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
5679 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5680 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
5682 static const char digits
[] = "0123456789abcdefABCDEF";
5684 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5685 basic_string_char grouping_bstr
;
5686 int basefield
, base
, groups_no
= 0, cur_group
= 0;
5687 char *dest_beg
= dest
, *dest_end
= dest
+24, *groups
= NULL
, sep
;
5688 const char *grouping
;
5689 BOOL error
= TRUE
, dest_empty
= TRUE
;
5691 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5693 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5694 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5695 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5697 basefield
= fmtflags
& FMTFLAG_basefield
;
5698 if(basefield
== FMTFLAG_oct
)
5700 else if(basefield
== FMTFLAG_hex
)
5701 base
= 22; /* equal to the size of digits buffer */
5707 istreambuf_iterator_char_val(first
);
5708 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5709 *dest
++ = first
->val
;
5710 istreambuf_iterator_char_inc(first
);
5713 if(!base
&& first
->strbuf
&& first
->val
=='0') {
5714 istreambuf_iterator_char_inc(first
);
5715 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
5716 istreambuf_iterator_char_inc(first
);
5727 groups_no
= strlen(grouping
)+2;
5728 groups
= calloc(groups_no
, sizeof(char));
5731 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5732 if(!memchr(digits
, first
->val
, base
)) {
5733 if(sep
&& first
->val
==sep
) {
5734 if(cur_group
== groups_no
+1) {
5735 if(groups
[1] != groups
[2]) {
5739 memmove(groups
+1, groups
+2, groups_no
);
5740 groups
[cur_group
] = 0;
5750 if(dest_empty
&& first
->val
== '0')
5753 /* skip digits that can't be copied to dest buffer, other
5754 * functions are responsible for detecting overflows */
5756 *dest
++ = first
->val
;
5757 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5758 groups
[cur_group
]++;
5762 if(cur_group
&& !groups
[cur_group
])
5767 for(; cur_group
>=0 && !error
; cur_group
--) {
5768 if(*grouping
== CHAR_MAX
) {
5772 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5773 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5776 }else if(grouping
[1]) {
5780 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5789 return (base
==22 ? 16 : base
);
5792 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
5793 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
5794 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
5795 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
5797 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5801 /* ?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 */
5802 /* ?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 */
5803 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
5804 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
5805 (this, ret, first, last, base, state, pval))
5806 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
5807 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5808 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5814 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5816 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5817 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
5818 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5819 *state
|= IOSTATE_failbit
;
5820 else if(end
!=tmp
&& !err
)
5821 *pval
= (void*)((INT_PTR
)v
);
5823 *state
|= IOSTATE_failbit
;
5826 *state
|= IOSTATE_eofbit
;
5832 /* ?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 */
5833 /* ?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 */
5834 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
5835 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5836 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5838 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5839 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5842 /* ?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 */
5843 /* ?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 */
5844 /* ?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 */
5845 /* ?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 */
5846 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
5847 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5848 (this, ret, first, last, base, state, pval))
5849 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
5850 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5851 (this, ret, first, last, base, state, pval))
5852 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
5853 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5854 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5860 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5862 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5863 if(end
!=tmp
&& !err
)
5866 *state
|= IOSTATE_failbit
;
5869 *state
|= IOSTATE_eofbit
;
5875 /* ?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 */
5876 /* ?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 */
5877 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
5878 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
5879 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5881 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5882 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5885 /* ?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 */
5886 /* ?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 */
5887 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
5888 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5889 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5891 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5892 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5895 /* ?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 */
5896 /* ?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 */
5897 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
5898 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
5899 (this, ret, first, last, base, state, pval))
5900 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
5901 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5902 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5908 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5910 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5911 if(end
!=tmp
&& !err
)
5914 *state
|= IOSTATE_failbit
;
5917 *state
|= IOSTATE_eofbit
;
5923 /* ?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 */
5924 /* ?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 */
5925 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
5926 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5927 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5929 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5930 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5933 /* ?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 */
5934 /* ?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 */
5935 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5936 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5937 (this, ret, first, last, base, state, pval))
5938 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
5939 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5940 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5946 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5948 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5949 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5950 if(end
!=tmp
&& !err
)
5953 *state
|= IOSTATE_failbit
;
5956 *state
|= IOSTATE_eofbit
;
5962 /* ?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 */
5963 /* ?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 */
5964 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
5965 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5966 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5968 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5969 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5972 /* ?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 */
5973 /* ?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 */
5974 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5975 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5976 (this, ret, first, last, base, state, pval))
5977 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
5978 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5979 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5985 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5987 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5988 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5989 if(end
!=tmp
&& !err
)
5992 *state
|= IOSTATE_failbit
;
5995 *state
|= IOSTATE_eofbit
;
6001 /* ?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 */
6002 /* ?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 */
6003 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6004 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6005 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6007 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6008 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6011 /* ?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 */
6012 /* ?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 */
6013 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6014 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6015 (this, ret, first, last, base, state, pval))
6016 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6017 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6018 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6024 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6026 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6027 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6028 if(end
!=tmp
&& !err
)
6031 *state
|= IOSTATE_failbit
;
6034 *state
|= IOSTATE_eofbit
;
6040 /* ?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 */
6041 /* ?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 */
6042 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6043 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6044 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6046 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6047 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6050 /* ?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 */
6051 /* ?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 */
6052 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6053 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6054 (this, ret, first, last, base, state, pval))
6055 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6056 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6057 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6063 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6065 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6066 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6067 if(end
!=tmp
&& !err
)
6070 *state
|= IOSTATE_failbit
;
6073 *state
|= IOSTATE_eofbit
;
6079 /* ?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 */
6080 /* ?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 */
6081 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6082 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6083 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6085 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6086 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6089 /* ?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 */
6090 /* ?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 */
6091 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6092 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6093 (this, ret, first, last, base, state, pval))
6094 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6095 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6096 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6098 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6099 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6102 /* ?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 */
6103 /* ?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 */
6104 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6105 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6106 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6108 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6109 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6112 /* ?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 */
6113 /* ?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 */
6114 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6115 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6116 (this, ret, first, last, base, state, pval))
6117 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6118 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6119 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6122 char tmp
[25], *beg
, *end
;
6125 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6127 b
= num_get_char__Getifld(this, tmp
,
6128 &first
, &last
, base
->fmtfl
, base
->loc
);
6129 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6130 v
= _Stoulx(beg
, &end
, b
, &err
);
6132 if(v
!= (ULONG
)((unsigned short)v
))
6133 *state
|= IOSTATE_failbit
;
6134 else if(end
!=beg
&& !err
)
6135 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6137 *state
|= IOSTATE_failbit
;
6140 *state
|= IOSTATE_eofbit
;
6146 /* ?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 */
6147 /* ?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 */
6148 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6149 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6150 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6152 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6153 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6156 /* ?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 */
6157 /* ?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 */
6158 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6159 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6160 (this, ret, first, last, base, state, pval))
6161 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
6162 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6163 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6165 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6167 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6168 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6169 basic_string_char false_bstr
, true_bstr
;
6170 const char *pfalse
, *ptrue
;
6172 numpunct_char_falsename(numpunct
, &false_bstr
);
6173 numpunct_char_truename(numpunct
, &true_bstr
);
6174 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
6175 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
6177 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;
6178 istreambuf_iterator_char_inc(&first
)) {
6179 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6181 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6184 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6186 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6194 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6203 *state
|= IOSTATE_failbit
;
6205 MSVCP_basic_string_char_dtor(&false_bstr
);
6206 MSVCP_basic_string_char_dtor(&true_bstr
);
6210 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6211 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6213 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6216 *state
|= IOSTATE_failbit
;
6220 *state
|= IOSTATE_eofbit
;
6221 memcpy(ret
, &first
, sizeof(first
));
6225 /* ?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 */
6226 /* ?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 */
6227 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6228 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6229 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6231 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6232 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6235 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6236 locale_id num_put_char_id
= {0};
6238 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6239 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6241 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6242 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6243 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6244 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6246 TRACE("(%p %p)\n", this, locinfo
);
6247 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6250 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6251 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6252 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6253 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6255 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6257 locale_facet_ctor_refs(&this->facet
, refs
);
6258 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6260 num_put_char__Init(this, locinfo
);
6264 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6265 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6266 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6267 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6271 TRACE("(%p %lu)\n", this, refs
);
6273 _Locinfo_ctor(&locinfo
);
6274 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
6275 _Locinfo_dtor(&locinfo
);
6279 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6280 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6281 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
6282 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
6284 return num_put_char_ctor_refs(this, 0);
6287 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6288 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6289 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
6290 void __thiscall
num_put_char_dtor(num_put
*this)
6292 TRACE("(%p)\n", this);
6293 locale_facet_dtor(&this->facet
);
6296 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
6297 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
6299 TRACE("(%p %x)\n", this, flags
);
6301 /* we have an array, with the number of elements stored before the first object */
6302 int i
, *ptr
= (int *)this-1;
6304 for(i
=*ptr
-1; i
>=0; i
--)
6305 num_put_char_dtor(this+i
);
6306 MSVCRT_operator_delete(ptr
);
6308 num_put_char_dtor(this);
6310 MSVCRT_operator_delete(this);
6316 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6317 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6318 unsigned int __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6320 TRACE("(%p %p)\n", facet
, loc
);
6322 if(facet
&& !*facet
) {
6325 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6327 ERR("Out of memory\n");
6328 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6332 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6333 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6334 _Locinfo_dtor(&locinfo
);
6340 num_put
* num_put_char_use_facet(const locale
*loc
)
6342 static num_put
*obj
= NULL
;
6345 const locale_facet
*fac
;
6347 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6348 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
6350 _Lockit_dtor(&lock
);
6351 return (num_put
*)fac
;
6355 _Lockit_dtor(&lock
);
6359 num_put_char__Getcat(&fac
, loc
);
6360 obj
= (num_put
*)fac
;
6361 locale_facet__Incref(&obj
->facet
);
6362 locale_facet_register(&obj
->facet
);
6363 _Lockit_dtor(&lock
);
6368 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDI@Z */
6369 /* ?_Put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_K@Z */
6370 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
6371 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6373 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6375 for(; count
>0; count
--)
6376 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6382 /* ?_Putc@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDI@Z */
6383 /* ?_Putc@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_K@Z */
6384 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
6385 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6387 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6389 for(; count
>0; count
--)
6390 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6396 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PBDID@Z */
6397 /* ?_Putgrouped@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@PEBD_KD@Z */
6398 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
6399 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
6401 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6405 /* ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@DI@Z */
6406 /* ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@D_K@Z */
6407 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
6408 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
6410 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6412 for(; count
>0; count
--)
6413 ostreambuf_iterator_char_put(&dest
, c
);
6419 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
6420 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6421 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6423 int type
= fmtfl
& FMTFLAG_floatfield
;
6426 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6429 if(fmtfl
& FMTFLAG_showpos
)
6431 if(fmtfl
& FMTFLAG_showbase
)
6438 if(type
== FMTFLAG_fixed
)
6440 else if(type
== FMTFLAG_scientific
)
6441 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6442 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6443 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6445 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6451 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBDIIII@Z */
6452 /* ?_Fput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBD_K333@Z */
6453 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6454 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
6455 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6457 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6458 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6462 /* TODO: This function should be removed when num_put_char__Fput is implemented */
6463 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6464 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6466 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6467 basic_string_char grouping_bstr
;
6468 const char *grouping
;
6469 char *p
, sep
= *localeconv()->decimal_point
;
6470 int cur_group
= 0, group_size
= 0;
6471 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6474 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6476 /* Change decimal point */
6477 for(p
=buf
; p
<buf
+count
; p
++) {
6479 *p
= numpunct_char_decimal_point(numpunct
);
6485 /* Add separators to number */
6486 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6487 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6488 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6490 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6492 if(group_size
== grouping
[cur_group
]) {
6494 if(grouping
[cur_group
+1])
6497 memmove(p
+1, p
, buf
+count
-p
);
6502 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6504 /* Display number with padding */
6505 if(count
>= base
->wide
)
6508 pad
= base
->wide
-count
;
6511 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6512 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6515 if(adjustfield
!= FMTFLAG_left
) {
6516 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6519 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6520 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6523 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
6524 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6525 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6527 int base
= fmtfl
& FMTFLAG_basefield
;
6530 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6533 if(fmtfl
& FMTFLAG_showpos
)
6535 if(fmtfl
& FMTFLAG_showbase
)
6542 if(base
== FMTFLAG_oct
)
6544 else if(base
== FMTFLAG_hex
)
6545 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6553 /* ?_Iput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPADI@Z */
6554 /* ?_Iput@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEAD_K@Z */
6555 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6556 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6558 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6559 basic_string_char grouping_bstr
;
6560 const char *grouping
;
6562 int cur_group
= 0, group_size
= 0;
6563 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6566 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6568 /* Add separators to number */
6569 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6570 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6571 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6573 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6575 if(group_size
== grouping
[cur_group
]) {
6577 if(grouping
[cur_group
+1])
6580 memmove(p
+1, p
, buf
+count
-p
);
6585 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6587 /* Display number with padding */
6588 if(count
>= base
->wide
)
6591 pad
= base
->wide
-count
;
6594 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6595 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6597 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6598 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
6601 if(adjustfield
!= FMTFLAG_left
) {
6602 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6605 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6606 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6609 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */
6610 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DJ@Z */
6611 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
6612 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
6613 (this, ret, dest, base, fill, v))
6614 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
6615 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6616 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6618 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6619 char fmt
[7]; /* strlen("%+#lld")+1 */
6621 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6623 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6624 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6627 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */
6628 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DJ@Z */
6629 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
6630 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6631 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6633 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6634 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
6637 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DK@Z */
6638 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DK@Z */
6639 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
6640 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
6641 (this, ret, dest, base, fill, v))
6642 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
6643 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6644 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6646 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6647 char fmt
[7]; /* strlen("%+#lld")+1 */
6649 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6651 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6652 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6655 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DK@Z */
6656 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DK@Z */
6657 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
6658 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6659 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6661 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6662 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6665 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */
6666 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DN@Z */
6667 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DO@Z */
6668 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DO@Z */
6669 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
6670 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6671 (this, ret, dest, base, fill, v))
6672 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
6673 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6674 (this, ret, dest, base, fill, v))
6675 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
6676 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6677 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6680 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6683 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6685 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6686 size
= _scprintf(fmt
, base
->prec
, v
);
6688 /* TODO: don't use dynamic allocation */
6689 tmp
= MSVCRT_operator_new(size
*2);
6691 ERR("Out of memory\n");
6692 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6694 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
));
6695 MSVCRT_operator_delete(tmp
);
6699 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DN@Z */
6700 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DN@Z */
6701 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
6702 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6703 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6705 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6706 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
6709 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DO@Z */
6710 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DO@Z */
6711 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
6712 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
6713 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6715 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6716 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6719 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBX@Z */
6720 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBX@Z */
6721 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
6722 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
6723 (this, ret, dest, base, fill, v))
6724 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
6725 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6726 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6728 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6730 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6732 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6735 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBX@Z */
6736 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBX@Z */
6737 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
6738 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6739 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6741 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6742 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
6745 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_J@Z */
6746 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_J@Z */
6747 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
6748 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
6749 (this, ret, dest, base, fill, v))
6750 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
6751 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6752 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6754 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6755 char fmt
[7]; /* strlen("%+#lld")+1 */
6757 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6759 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6760 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
6763 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_J@Z */
6764 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_J@Z */
6765 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
6766 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6767 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6769 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6770 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
6773 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_K@Z */
6774 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_K@Z */
6775 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
6776 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
6777 (this, ret, dest, base, fill, v))
6778 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
6779 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6780 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6782 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6783 char fmt
[7]; /* strlen("%+#lld")+1 */
6785 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6787 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6788 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
6791 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_K@Z */
6792 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_K@Z */
6793 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
6794 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6795 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6797 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6798 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
6801 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_N@Z */
6802 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_N@Z */
6803 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
6804 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
6805 (this, ret, dest, base, fill, v))
6806 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
6807 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6808 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6810 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6812 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6813 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6814 basic_string_char str
;
6815 MSVCP_size_t pad
, len
;
6818 numpunct_char_truename(numpunct
, &str
);
6820 numpunct_char_falsename(numpunct
, &str
);
6822 len
= MSVCP_basic_string_char_length(&str
);
6823 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
6826 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6827 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
6830 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
6831 MSVCP_basic_string_char_dtor(&str
);
6832 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6835 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
6838 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@D_N@Z */
6839 /* ?put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@D_N@Z */
6840 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
6841 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6842 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6844 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6845 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
6848 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
6849 locale_id num_put_wchar_id
= {0};
6850 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
6851 locale_id num_put_short_id
= {0};
6853 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
6854 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
6855 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
6856 extern const vtable_ptr MSVCP_num_put_short_vtable
;
6858 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6859 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6860 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
6861 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
6863 TRACE("(%p %p)\n", this, locinfo
);
6864 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6867 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6868 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6869 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
6870 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6872 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6874 locale_facet_ctor_refs(&this->facet
, refs
);
6875 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
6877 num_put_wchar__Init(this, locinfo
);
6881 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6882 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6883 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
6884 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6886 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
6887 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6891 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
6892 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
6893 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
6894 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6898 TRACE("(%p %lu)\n", this, refs
);
6900 _Locinfo_ctor(&locinfo
);
6901 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
6902 _Locinfo_dtor(&locinfo
);
6906 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
6907 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
6908 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
6909 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6911 num_put_wchar_ctor_refs(this, refs
);
6912 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6916 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
6917 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
6918 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
6919 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
6921 return num_put_wchar_ctor_refs(this, 0);
6924 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
6925 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
6926 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
6927 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
6929 return num_put_short_ctor_refs(this, 0);
6932 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
6933 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
6934 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
6935 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
6936 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
6937 void __thiscall
num_put_wchar_dtor(num_put
*this)
6939 TRACE("(%p)\n", this);
6940 locale_facet_dtor(&this->facet
);
6943 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
6944 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
6946 TRACE("(%p %x)\n", this, flags
);
6948 /* we have an array, with the number of elements stored before the first object */
6949 int i
, *ptr
= (int *)this-1;
6951 for(i
=*ptr
-1; i
>=0; i
--)
6952 num_put_wchar_dtor(this+i
);
6953 MSVCRT_operator_delete(ptr
);
6955 num_put_wchar_dtor(this);
6957 MSVCRT_operator_delete(this);
6963 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6964 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6965 unsigned int __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
6967 TRACE("(%p %p)\n", facet
, loc
);
6969 if(facet
&& !*facet
) {
6972 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6974 ERR("Out of memory\n");
6975 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6979 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6980 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6981 _Locinfo_dtor(&locinfo
);
6987 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6988 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6989 unsigned int __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
6991 TRACE("(%p %p)\n", facet
, loc
);
6993 if(facet
&& !*facet
) {
6996 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6998 ERR("Out of memory\n");
6999 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7003 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
7004 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7005 _Locinfo_dtor(&locinfo
);
7011 num_put
* num_put_wchar_use_facet(const locale
*loc
)
7013 static num_put
*obj
= NULL
;
7016 const locale_facet
*fac
;
7018 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7019 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
7021 _Lockit_dtor(&lock
);
7022 return (num_put
*)fac
;
7026 _Lockit_dtor(&lock
);
7030 num_put_wchar__Getcat(&fac
, loc
);
7031 obj
= (num_put
*)fac
;
7032 locale_facet__Incref(&obj
->facet
);
7033 locale_facet_register(&obj
->facet
);
7034 _Lockit_dtor(&lock
);
7039 num_put
* num_put_short_use_facet(const locale
*loc
)
7041 static num_put
*obj
= NULL
;
7044 const locale_facet
*fac
;
7046 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7047 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
7049 _Lockit_dtor(&lock
);
7050 return (num_put
*)fac
;
7054 _Lockit_dtor(&lock
);
7058 num_put_short__Getcat(&fac
, loc
);
7059 obj
= (num_put
*)fac
;
7060 locale_facet__Incref(&obj
->facet
);
7061 locale_facet_register(&obj
->facet
);
7062 _Lockit_dtor(&lock
);
7067 /* ?_Put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PB_WI@Z */
7068 /* ?_Put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEB_W_K@Z */
7069 /* ?_Put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBGI@Z */
7070 /* ?_Put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBG_K@Z */
7071 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7072 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
7074 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
7076 for(; count
>0; count
--)
7077 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
7083 /* ?_Putc@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PBDI@Z */
7084 /* ?_Putc@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEBD_K@Z */
7085 /* ?_Putc@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBDI@Z */
7086 /* ?_Putc@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBD_K@Z */
7087 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7088 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
7093 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
7095 for(; count
>0; count
--) {
7096 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
7097 ostreambuf_iterator_wchar_put(&dest
, ch
);
7104 /* ?_Putgrouped@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PBDI_W@Z */
7105 /* ?_Putgrouped@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEBD_K_W@Z */
7106 /* ?_Putgrouped@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PBDIG@Z */
7107 /* ?_Putgrouped@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@PEBD_KG@Z */
7108 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7109 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
7111 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7115 /* ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_WI@Z */
7116 /* ?_Rep@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_W_K@Z */
7117 /* ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@GI@Z */
7118 /* ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@G_K@Z */
7119 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7120 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
7122 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7124 for(; count
>0; count
--)
7125 ostreambuf_iterator_wchar_put(&dest
, c
);
7131 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
7132 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7133 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
7134 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7135 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7137 int type
= fmtfl
& FMTFLAG_floatfield
;
7140 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7143 if(fmtfl
& FMTFLAG_showpos
)
7145 if(fmtfl
& FMTFLAG_showbase
)
7152 if(type
== FMTFLAG_fixed
)
7154 else if(type
== FMTFLAG_scientific
)
7155 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7156 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7157 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7159 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7165 /* ?_Fput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBDIIII@Z */
7166 /* ?_Fput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBD_K444@Z */
7167 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7168 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
7169 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7171 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7172 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7176 /* ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBDIIII@Z */
7177 /* ?_Fput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBD_K333@Z */
7178 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7179 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
7180 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7182 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7183 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7187 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
7188 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7189 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
7190 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7192 basic_string_char grouping_bstr
;
7193 const char *grouping
;
7194 char *p
, dec_point
= *localeconv()->decimal_point
;
7196 int cur_group
= 0, group_size
= 0;
7197 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7198 MSVCP_size_t i
, pad
;
7200 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7202 for(p
=buf
; p
<buf
+count
; p
++) {
7208 /* Add separators to number */
7209 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7210 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7211 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7213 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7215 if(group_size
== grouping
[cur_group
]) {
7217 if(grouping
[cur_group
+1])
7220 memmove(p
+1, p
, buf
+count
-p
);
7221 *p
= '\0'; /* mark thousands separator positions */
7225 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7227 /* Display number with padding */
7228 if(count
>= base
->wide
)
7231 pad
= base
->wide
-count
;
7234 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7235 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7238 if(adjustfield
!= FMTFLAG_left
) {
7239 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7243 for(i
=0; i
<count
; i
++) {
7244 if(buf
[i
] == dec_point
)
7245 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
7247 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7249 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7252 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7255 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
7256 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7257 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
7258 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7259 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7261 int base
= fmtfl
& FMTFLAG_basefield
;
7264 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7267 if(fmtfl
& FMTFLAG_showpos
)
7269 if(fmtfl
& FMTFLAG_showbase
)
7276 if(base
== FMTFLAG_oct
)
7278 else if(base
== FMTFLAG_hex
)
7279 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7287 static ostreambuf_iterator_wchar
* __cdecl
num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7288 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
7289 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7291 basic_string_char grouping_bstr
;
7292 const char *grouping
;
7295 int cur_group
= 0, group_size
= 0;
7296 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7297 MSVCP_size_t i
, pad
;
7299 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7301 /* Add separators to number */
7302 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7303 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7304 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7306 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7308 if(group_size
== grouping
[cur_group
]) {
7310 if(grouping
[cur_group
+1])
7313 memmove(p
+1, p
, buf
+count
-p
);
7314 *p
= '\0'; /* mark thousands separator positions */
7318 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7320 /* Display number with padding */
7321 if(count
>= base
->wide
)
7324 pad
= base
->wide
-count
;
7327 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7328 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7330 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7331 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
7334 if(adjustfield
!= FMTFLAG_left
) {
7335 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7339 for(i
=0; i
<count
; i
++) {
7341 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7343 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7346 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7349 /* ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPADI@Z */
7350 /* ?_Iput@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEAD_K@Z */
7351 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7352 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7354 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(base
->loc
));
7357 /* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPADI@Z */
7358 /* ?_Iput@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEAD_K@Z */
7359 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7360 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7362 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(base
->loc
));
7365 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
7366 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WJ@Z */
7367 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
7368 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
7369 (this, ret, dest, base, fill, v))
7370 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
7371 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7372 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7374 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7375 char fmt
[7]; /* strlen("%+#lld")+1 */
7377 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7379 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7380 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7383 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GJ@Z */
7384 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GJ@Z */
7385 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
7386 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7387 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7389 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7390 char fmt
[7]; /* strlen("%+#lld")+1 */
7392 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7394 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7395 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7398 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WJ@Z */
7399 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WJ@Z */
7400 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GJ@Z */
7401 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GJ@Z */
7402 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
7403 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7404 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7406 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7407 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
7410 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WK@Z */
7411 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WK@Z */
7412 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
7413 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
7414 (this, ret, dest, base, fill, v))
7415 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
7416 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7417 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7419 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7420 char fmt
[7]; /* strlen("%+#lld")+1 */
7422 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7424 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7425 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7428 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GK@Z */
7429 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GK@Z */
7430 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
7431 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7432 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7434 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7435 char fmt
[7]; /* strlen("%+#lld")+1 */
7437 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7439 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7440 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7443 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WK@Z */
7444 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WK@Z */
7445 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GK@Z */
7446 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GK@Z */
7447 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
7448 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7449 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7451 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7452 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7455 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WN@Z */
7456 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WN@Z */
7457 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WO@Z */
7458 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WO@Z */
7459 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
7460 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7461 (this, ret, dest, base, fill, v))
7462 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
7463 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7464 (this, ret, dest, base, fill, v))
7465 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
7466 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7467 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7470 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7473 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7475 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7476 size
= _scprintf(fmt
, base
->prec
, v
);
7478 /* TODO: don't use dynamic allocation */
7479 tmp
= MSVCRT_operator_new(size
*2);
7481 ERR("Out of memory\n");
7482 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7484 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7485 numpunct_wchar_use_facet(base
->loc
));
7486 MSVCRT_operator_delete(tmp
);
7490 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GN@Z */
7491 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GN@Z */
7492 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GO@Z */
7493 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GO@Z */
7494 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
7495 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7496 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7499 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7502 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7504 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7505 size
= _scprintf(fmt
, base
->prec
, v
);
7507 /* TODO: don't use dynamic allocation */
7508 tmp
= MSVCRT_operator_new(size
*2);
7510 ERR("Out of memory\n");
7511 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7513 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7514 numpunct_short_use_facet(base
->loc
));
7515 MSVCRT_operator_delete(tmp
);
7519 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WN@Z */
7520 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WN@Z */
7521 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GN@Z */
7522 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GN@Z */
7523 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
7524 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7525 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7527 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7528 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
7531 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WO@Z */
7532 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WO@Z */
7533 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GO@Z */
7534 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GO@Z */
7535 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
7536 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7537 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7539 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7540 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7543 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBX@Z */
7544 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBX@Z */
7545 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
7546 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
7547 (this, ret, dest, base, fill, v))
7548 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
7549 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7550 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7552 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7554 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7556 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7559 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBX@Z */
7560 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBX@Z */
7561 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
7562 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7563 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7565 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7567 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7569 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7572 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_WPBX@Z */
7573 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_WPEBX@Z */
7574 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@GPBX@Z */
7575 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@GPEBX@Z */
7576 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
7577 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7578 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7580 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7581 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7584 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_J@Z */
7585 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_J@Z */
7586 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
7587 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
7588 (this, ret, dest, base, fill, v))
7589 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
7590 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7591 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7593 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7594 char fmt
[7]; /* strlen("%+#lld")+1 */
7596 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7598 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7599 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7602 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_J@Z */
7603 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_J@Z */
7604 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
7605 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7606 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7608 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7609 char fmt
[7]; /* strlen("%+#lld")+1 */
7611 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7613 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7614 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7617 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_J@Z */
7618 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_J@Z */
7619 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_J@Z */
7620 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_J@Z */
7621 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
7622 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7623 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7625 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7626 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7629 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_K@Z */
7630 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_K@Z */
7631 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
7632 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
7633 (this, ret, dest, base, fill, v))
7634 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
7635 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7636 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7638 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7639 char fmt
[7]; /* strlen("%+#lld")+1 */
7641 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7643 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7644 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7647 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_K@Z */
7648 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_K@Z */
7649 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
7650 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7651 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7653 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7654 char fmt
[7]; /* strlen("%+#lld")+1 */
7656 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7658 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7659 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7662 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_K@Z */
7663 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_K@Z */
7664 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_K@Z */
7665 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_K@Z */
7666 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
7667 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7668 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7670 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7671 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7674 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_N@Z */
7675 /* ?do_put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_N@Z */
7676 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
7677 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
7678 (this, ret, dest, base, fill, v))
7679 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
7680 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7681 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7683 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7685 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7686 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7687 basic_string_wchar str
;
7688 MSVCP_size_t pad
, len
;
7691 numpunct_wchar_truename(numpunct
, &str
);
7693 numpunct_wchar_falsename(numpunct
, &str
);
7695 len
= MSVCP_basic_string_wchar_length(&str
);
7696 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7699 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7700 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7703 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7704 MSVCP_basic_string_wchar_dtor(&str
);
7705 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7708 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7711 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_N@Z */
7712 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_N@Z */
7713 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
7714 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7715 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7717 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7719 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7720 numpunct_wchar
*numpunct
= numpunct_short_use_facet(base
->loc
);
7721 basic_string_wchar str
;
7722 MSVCP_size_t pad
, len
;
7725 numpunct_wchar_truename(numpunct
, &str
);
7727 numpunct_wchar_falsename(numpunct
, &str
);
7729 len
= MSVCP_basic_string_wchar_length(&str
);
7730 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7733 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7734 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7737 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7738 MSVCP_basic_string_wchar_dtor(&str
);
7739 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7742 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7745 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AAVios_base@2@_W_N@Z */
7746 /* ?put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@AEAVios_base@2@_W_N@Z */
7747 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_N@Z */
7748 /* ?put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_N@Z */
7749 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
7750 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7751 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7753 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7754 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7757 /* ??0_Locimp@locale@std@@AAE@_N@Z */
7758 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
7759 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
7760 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
7762 TRACE("(%p %d)\n", this, transparent
);
7764 memset(this, 0, sizeof(locale__Locimp
));
7765 locale_facet_ctor_refs(&this->facet
, 1);
7766 this->transparent
= transparent
;
7767 MSVCP_basic_string_char_ctor_cstr(&this->name
, "*");
7771 /* ??_F_Locimp@locale@std@@QAEXXZ */
7772 /* ??_F_Locimp@locale@std@@QEAAXXZ */
7773 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
7774 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
7776 return locale__Locimp_ctor_transparent(this, FALSE
);
7779 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
7780 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
7781 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
7782 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7787 TRACE("(%p %p)\n", this, copy
);
7789 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7790 memcpy(this, copy
, sizeof(locale__Locimp
));
7791 locale_facet_ctor_refs(&this->facet
, 1);
7792 if(copy
->facetvec
) {
7793 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
7794 if(!this->facetvec
) {
7795 _Lockit_dtor(&lock
);
7796 ERR("Out of memory\n");
7797 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7800 for(i
=0; i
<this->facet_cnt
; i
++)
7801 if(this->facetvec
[i
])
7802 locale_facet__Incref(this->facetvec
[i
]);
7804 MSVCP_basic_string_char_copy_ctor(&this->name
, ©
->name
);
7805 _Lockit_dtor(&lock
);
7809 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
7810 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
7811 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7813 return locale__Locimp_copy_ctor(this, copy
);
7816 /* ??1_Locimp@locale@std@@MAE@XZ */
7817 /* ??1_Locimp@locale@std@@MEAA@XZ */
7818 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
7819 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
7821 TRACE("(%p)\n", this);
7823 if(locale_facet__Decref(&this->facet
)) {
7825 for(i
=0; i
<this->facet_cnt
; i
++)
7826 if(this->facetvec
[i
] && locale_facet__Decref(this->facetvec
[i
]))
7827 call_locale_facet_vector_dtor(this->facetvec
[i
], 0);
7829 MSVCRT_operator_delete(this->facetvec
);
7830 MSVCP_basic_string_char_dtor(&this->name
);
7834 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
7835 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
7836 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
7838 locale__Locimp_dtor(this);
7841 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
7842 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
7844 TRACE("(%p %x)\n", this, flags
);
7846 /* we have an array, with the number of elements stored before the first object */
7847 int i
, *ptr
= (int *)this-1;
7849 for(i
=*ptr
-1; i
>=0; i
--)
7850 locale__Locimp_dtor(this+i
);
7851 MSVCRT_operator_delete(ptr
);
7853 locale__Locimp_dtor(this);
7855 MSVCRT_operator_delete(this);
7861 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
7862 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
7863 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
7867 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
7869 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7870 if(id
>= locimp
->facet_cnt
) {
7871 MSVCP_size_t new_size
= id
+1;
7872 locale_facet
**new_facetvec
;
7874 if(new_size
< locale_id__Id_cnt
+1)
7875 new_size
= locale_id__Id_cnt
+1;
7877 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
7879 _Lockit_dtor(&lock
);
7880 ERR("Out of memory\n");
7881 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7885 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
7886 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
7887 MSVCRT_operator_delete(locimp
->facetvec
);
7888 locimp
->facetvec
= new_facetvec
;
7889 locimp
->facet_cnt
= new_size
;
7892 if(locimp
->facetvec
[id
] && locale_facet__Decref(locimp
->facetvec
[id
]))
7893 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 0);
7895 locimp
->facetvec
[id
] = facet
;
7897 locale_facet__Incref(facet
);
7898 _Lockit_dtor(&lock
);
7901 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
7902 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
7903 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
7904 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
7906 locale__Locimp__Locimp_Addfac(this, facet
, id
);
7909 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
7910 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
7911 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
7917 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7918 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7919 /* List of missing facets:
7920 * num_put, collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7922 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7924 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7926 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
7930 ctype
= ctype_short_use_facet(loc
);
7932 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7934 ERR("Out of memory\n");
7935 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7937 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
7939 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
7942 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
7946 numget
= num_get_short_use_facet(loc
);
7948 numget
= MSVCRT_operator_new(sizeof(num_get
));
7950 ERR("Out of memory\n");
7951 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7953 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
7955 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
7958 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
7962 numput
= num_put_short_use_facet(loc
);
7964 numput
= MSVCRT_operator_new(sizeof(num_put
));
7966 ERR("Out of memory\n");
7967 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7969 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
7971 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
7974 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
7975 numpunct_wchar
*numpunct
;
7978 numpunct
= numpunct_short_use_facet(loc
);
7980 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7982 ERR("Out of memory\n");
7983 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7985 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7987 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
7990 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
7991 codecvt_wchar
*codecvt
;
7994 codecvt
= codecvt_short_use_facet(loc
);
7996 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7998 ERR("Out of memory\n");
7999 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8001 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
8003 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
8007 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
8008 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
8009 /* List of missing facets:
8010 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
8012 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
8014 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
8016 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
8020 ctype
= ctype_wchar_use_facet(loc
);
8022 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
8024 ERR("Out of memory\n");
8025 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8027 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
8029 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
8032 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
8036 numget
= num_get_wchar_use_facet(loc
);
8038 numget
= MSVCRT_operator_new(sizeof(num_get
));
8040 ERR("Out of memory\n");
8041 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8043 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
8045 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
8048 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
8052 numput
= num_put_wchar_use_facet(loc
);
8054 numput
= MSVCRT_operator_new(sizeof(num_put
));
8056 ERR("Out of memory\n");
8057 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8059 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
8061 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
8064 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
8065 numpunct_wchar
*numpunct
;
8068 numpunct
= numpunct_wchar_use_facet(loc
);
8070 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
8072 ERR("Out of memory\n");
8073 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8075 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
8077 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
8080 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
8081 codecvt_wchar
*codecvt
;
8084 codecvt
= codecvt_wchar_use_facet(loc
);
8086 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
8088 ERR("Out of memory\n");
8089 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8091 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
8093 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
8097 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
8098 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
8099 /* List of missing facets:
8100 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
8102 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
8104 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
8106 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
8110 ctype
= ctype_char_use_facet(loc
);
8112 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
8114 ERR("Out of memory\n");
8115 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8117 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
8119 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
8122 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
8126 numget
= num_get_char_use_facet(loc
);
8128 numget
= MSVCRT_operator_new(sizeof(num_get
));
8130 ERR("Out of memory\n");
8131 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8133 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
8135 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
8138 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
8142 numput
= num_put_char_use_facet(loc
);
8144 numput
= MSVCRT_operator_new(sizeof(num_put
));
8146 ERR("Out of memory\n");
8147 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8149 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
8151 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
8154 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
8155 numpunct_char
*numpunct
;
8158 numpunct
= numpunct_char_use_facet(loc
);
8160 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
8162 ERR("Out of memory\n");
8163 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8165 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
8167 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
8170 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
8171 codecvt_char
*codecvt
;
8174 codecvt
= codecvt_char_use_facet(loc
);
8176 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
8178 ERR("Out of memory\n");
8179 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8181 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
8183 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
8187 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
8188 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
8189 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
8191 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
8193 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
8194 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
8195 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
8197 locimp
->catmask
|= cat
;
8198 MSVCP_basic_string_char_copy_ctor(&locimp
->name
, &locinfo
->newlocname
);
8202 /* ??_7_Locimp@locale@std@@6B@ */
8203 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
8204 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
8207 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
8208 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
8209 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
8210 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
8212 TRACE("(%p %p)\n", this, locimp
);
8213 /* Don't change locimp reference counter */
8218 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
8219 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
8220 locale__Locimp
* __cdecl
locale__Init(void)
8226 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8228 _Lockit_dtor(&lock
);
8229 return global_locale
;
8232 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8233 if(!global_locale
) {
8234 _Lockit_dtor(&lock
);
8235 ERR("Out of memory\n");
8236 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8240 locale__Locimp_ctor(global_locale
);
8241 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
8242 MSVCP_basic_string_char_dtor(&global_locale
->name
);
8243 MSVCP_basic_string_char_ctor_cstr(&global_locale
->name
, "C");
8245 locale__Locimp__Clocptr
= global_locale
;
8246 global_locale
->facet
.refs
++;
8247 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
8248 _Lockit_dtor(&lock
);
8250 return global_locale
;
8253 /* ??0locale@std@@QAE@ABV01@0H@Z */
8254 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
8255 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
8256 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
8258 FIXME("(%p %p %p %d) stub\n", this, loc
, other
, cat
);
8262 /* ??0locale@std@@QAE@ABV01@@Z */
8263 /* ??0locale@std@@QEAA@AEBV01@@Z */
8264 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
8265 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
8267 TRACE("(%p %p)\n", this, copy
);
8268 this->ptr
= copy
->ptr
;
8269 locale_facet__Incref(&this->ptr
->facet
);
8273 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
8274 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
8275 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
8276 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
8278 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
8282 /* ??0locale@std@@QAE@PBDH@Z */
8283 /* ??0locale@std@@QEAA@PEBDH@Z */
8284 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
8285 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
8289 TRACE("(%p %s %d)\n", this, locname
, cat
);
8291 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8293 ERR("Out of memory\n");
8294 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8296 this->ptr
= locale__Init();
8298 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
8299 if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
8300 _Locinfo_dtor(&locinfo
);
8301 MSVCRT_operator_delete(this->ptr
);
8302 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
8305 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
8306 _Locinfo_dtor(&locinfo
);
8311 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
8312 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
8313 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
8314 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
8316 TRACE("(%p)\n", this);
8321 /* ??0locale@std@@QAE@XZ */
8322 /* ??0locale@std@@QEAA@XZ */
8323 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
8324 locale
* __thiscall
locale_ctor(locale
*this)
8326 TRACE("(%p)\n", this);
8327 this->ptr
= locale__Init();
8328 locale_facet__Incref(&this->ptr
->facet
);
8332 /* ??1locale@std@@QAE@XZ */
8333 /* ??1locale@std@@QEAA@XZ */
8334 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
8335 void __thiscall
locale_dtor(locale
*this)
8337 TRACE("(%p)\n", this);
8339 locale__Locimp_dtor(this->ptr
);
8342 DEFINE_THISCALL_WRAPPER(locale_vector_dtor
, 8)
8343 locale
* __thiscall
locale_vector_dtor(locale
*this, unsigned int flags
)
8345 TRACE("(%p %x)\n", this, flags
);
8347 /* we have an array, with the number of elements stored before the first object */
8348 int i
, *ptr
= (int *)this-1;
8350 for(i
=*ptr
-1; i
>=0; i
--)
8351 locale_dtor(this+i
);
8352 MSVCRT_operator_delete(ptr
);
8356 MSVCRT_operator_delete(this);
8362 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
8363 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
8364 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
8365 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
8367 FIXME("(%p %p) stub\n", this, loc
);
8371 /* ??8locale@std@@QBE_NABV01@@Z */
8372 /* ??8locale@std@@QEBA_NAEBV01@@Z */
8373 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
8374 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
8376 FIXME("(%p %p) stub\n", this, loc
);
8380 /* ??9locale@std@@QBE_NABV01@@Z */
8381 /* ??9locale@std@@QEBA_NAEBV01@@Z */
8382 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
8383 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
8385 FIXME("(%p %p) stub\n", this, loc
);
8389 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
8390 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
8391 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
8392 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
8394 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
8396 if(this->ptr
->facet
.refs
> 1) {
8397 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8399 ERR("Out of memory\n");
8400 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8403 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
8404 locale_facet__Decref(&this->ptr
->facet
);
8405 this->ptr
= new_ptr
;
8408 locale__Locimp__Addfac(this->ptr
, facet
, id
);
8411 MSVCP_basic_string_char_dtor(&this->ptr
->name
);
8412 MSVCP_basic_string_char_ctor_cstr(&this->ptr
->name
, "*");
8417 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
8418 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
8419 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
8420 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
8424 TRACE("(%p %lu)\n", this, id
);
8426 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
8427 if(fac
|| !this->ptr
->transparent
)
8430 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
8433 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
8434 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
8435 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
8438 return global_locale
;
8441 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
8442 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
8443 void __cdecl
locale__Setgloballocale(void *locimp
)
8445 TRACE("(%p)\n", locimp
);
8446 global_locale
= locimp
;
8449 /* ?classic@locale@std@@SAABV12@XZ */
8450 /* ?classic@locale@std@@SAAEBV12@XZ */
8451 const locale
* __cdecl
locale_classic(void)
8455 return &classic_locale
;
8458 /* ?empty@locale@std@@SA?AV12@XZ */
8459 locale
* __cdecl
locale_empty(locale
*ret
)
8465 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8467 ERR("Out of memory\n");
8468 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8470 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
8474 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8475 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8476 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
8477 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
8479 TRACE( "(%p)\n", this);
8480 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
8484 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
8485 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
8486 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
8491 TRACE("(%p %p)\n", loc
, ret
);
8493 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8496 if(loc
->ptr
!= global_locale
) {
8497 locale_facet__Decref(&global_locale
->facet
);
8498 global_locale
= loc
->ptr
;
8499 locale_facet__Incref(&global_locale
->facet
);
8501 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
8502 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
8504 setlocale(i
, MSVCP_basic_string_char_c_str(&global_locale
->name
));
8507 _Lockit_dtor(&lock
);
8511 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@");
8512 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@");
8513 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@");
8514 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@");
8515 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@");
8516 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@");
8517 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@");
8518 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@");
8519 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@");
8520 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@");
8521 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@");
8522 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@");
8523 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@");
8524 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@");
8525 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@");
8526 DEFINE_RTTI_DATA1(num_get_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@");
8527 DEFINE_RTTI_DATA1(num_get_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@");
8528 DEFINE_RTTI_DATA1(num_get_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@");
8529 DEFINE_RTTI_DATA1(num_put_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@");
8530 DEFINE_RTTI_DATA1(num_put_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@");
8531 DEFINE_RTTI_DATA1(num_put_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@");
8534 void __asm_dummy_vtables(void) {
8536 __ASM_VTABLE(locale_facet
,
8537 VTABLE_ADD_FUNC(locale_facet_vector_dtor
));
8538 __ASM_VTABLE(collate_char
,
8539 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
8540 VTABLE_ADD_FUNC(collate_char_do_compare
)
8541 VTABLE_ADD_FUNC(collate_char_do_transform
)
8542 VTABLE_ADD_FUNC(collate_char_do_hash
));
8543 __ASM_VTABLE(collate_wchar
,
8544 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8545 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8546 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8547 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8548 __ASM_VTABLE(collate_short
,
8549 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8550 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8551 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8552 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8553 __ASM_VTABLE(ctype_base
,
8554 VTABLE_ADD_FUNC(ctype_base_vector_dtor
));
8555 __ASM_VTABLE(ctype_char
,
8556 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
8557 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
8558 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
8559 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
8560 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
8561 VTABLE_ADD_FUNC(ctype_char_do_widen
)
8562 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
8563 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
8564 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
));
8565 __ASM_VTABLE(ctype_wchar
,
8566 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8567 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8568 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8569 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8570 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8571 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8572 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8573 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8574 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8575 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8576 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8577 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8578 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8579 __ASM_VTABLE(ctype_short
,
8580 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8581 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8582 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8583 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8584 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8585 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8586 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8587 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8588 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8589 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8590 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8591 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8592 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8593 __ASM_VTABLE(codecvt_base
,
8594 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
8595 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8596 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8597 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
8598 __ASM_VTABLE(codecvt_char
,
8599 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
8600 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8601 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8602 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8603 VTABLE_ADD_FUNC(codecvt_char_do_in
)
8604 VTABLE_ADD_FUNC(codecvt_char_do_out
)
8605 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
8606 VTABLE_ADD_FUNC(codecvt_char_do_length
));
8607 __ASM_VTABLE(codecvt_wchar
,
8608 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8609 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8610 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8611 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8612 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8613 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8614 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8615 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8616 __ASM_VTABLE(codecvt_short
,
8617 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8618 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8619 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8620 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8621 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8622 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8623 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8624 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8625 __ASM_VTABLE(numpunct_char
,
8626 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
8627 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
8628 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
8629 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
8630 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
8631 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
8632 __ASM_VTABLE(numpunct_wchar
,
8633 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8634 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8635 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8636 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8637 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8638 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8639 __ASM_VTABLE(numpunct_short
,
8640 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8641 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8642 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8643 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8644 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8645 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8646 __ASM_VTABLE(num_get_char
,
8647 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
8648 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
8649 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8650 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8651 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
8652 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
8653 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
8654 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
8655 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
8656 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
8657 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
8658 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
8659 __ASM_VTABLE(num_get_short
,
8660 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8661 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
8662 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8663 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8664 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
8665 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
8666 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
8667 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
8668 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
8669 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
8670 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
8671 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
8672 __ASM_VTABLE(num_get_wchar
,
8673 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8674 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
8675 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8676 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8677 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
8678 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
8679 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
8680 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
8681 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
8682 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
8683 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
8684 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
8685 __ASM_VTABLE(num_put_char
,
8686 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
8687 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
8688 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8689 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8690 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
8691 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
8692 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
8693 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
8694 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
8695 __ASM_VTABLE(num_put_wchar
,
8696 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8697 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
8698 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8699 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8700 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
8701 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
8702 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
8703 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
8704 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
8705 __ASM_VTABLE(num_put_short
,
8706 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8707 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
8708 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8709 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8710 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
8711 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
8712 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
8713 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
8714 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
8719 void free_locale(void)
8721 facets_elem
*iter
, *safe
;
8724 locale__Locimp_dtor(global_locale
);
8725 locale_dtor(&classic_locale
);
8728 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
8729 list_remove(&iter
->entry
);
8730 if(locale_facet__Decref(iter
->fac
))
8731 call_locale_facet_vector_dtor(iter
->fac
, 1);
8732 MSVCRT_operator_delete(iter
);