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
);
45 const locale
* __cdecl
locale_classic(void);
53 typedef struct _locale__Locimp
{
55 locale_facet
**facetvec
;
56 MSVCP_size_t facet_cnt
;
58 MSVCP_bool transparent
;
59 basic_string_char name
;
68 basic_string_char days
;
69 basic_string_char months
;
70 basic_string_char oldlocname
;
71 basic_string_char newlocname
;
89 const char *false_name
;
90 const char *true_name
;
98 const wchar_t *false_name
;
99 const wchar_t *true_name
;
102 /* ?_Id_cnt@id@locale@std@@0HA */
103 int locale_id__Id_cnt
= 0;
105 static locale__Locimp
*global_locale
;
106 static locale classic_locale
;
108 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
109 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
110 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
112 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
114 if(this->strbuf
&& !this->got
) {
115 int c
= basic_streambuf_char_sgetc(this->strbuf
);
126 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
128 if(this->strbuf
&& !this->got
) {
129 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
140 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
142 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
147 istreambuf_iterator_char_val(this);
151 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
153 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
158 istreambuf_iterator_wchar_val(this);
162 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
164 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
168 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
170 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
174 /* ??1facet@locale@std@@UAE@XZ */
175 /* ??1facet@locale@std@@UEAA@XZ */
176 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
177 void __thiscall
locale_facet_dtor(locale_facet
*this)
179 TRACE("(%p)\n", this);
182 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
183 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
184 locale_facet*, (locale_facet*, unsigned int), (this, flags))
185 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
187 TRACE("(%p %x)\n", this, flags
);
189 /* we have an array, with the number of elements stored before the first object */
190 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
192 for(i
=*ptr
-1; i
>=0; i
--)
193 locale_facet_dtor(this+i
);
194 MSVCRT_operator_delete(ptr
);
196 locale_facet_dtor(this);
198 MSVCRT_operator_delete(this);
209 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
211 /* Not exported from msvcp90 */
212 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
213 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
214 static void locale_facet_register(locale_facet
*add
)
216 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
218 ERR("Out of memory\n");
219 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
223 list_add_head(&lazy_facets
, &head
->entry
);
226 /* Not exported from msvcp90 */
227 /* ?_Register@facet@locale@std@@QAEXXZ */
228 /* ?_Register@facet@locale@std@@QEAAXXZ */
229 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
230 void __thiscall
locale_facet__Register(locale_facet
*this)
232 TRACE("(%p)\n", this);
233 locale_facet_register(this);
236 /* Not exported from msvcp90 */
237 /* ??_7facet@locale@std@@6B@ */
238 extern const vtable_ptr MSVCP_locale_facet_vtable
;
240 /* ??0id@locale@std@@QAE@I@Z */
241 /* ??0id@locale@std@@QEAA@_K@Z */
242 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
243 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
245 TRACE("(%p %lu)\n", this, id
);
251 /* ??_Fid@locale@std@@QAEXXZ */
252 /* ??_Fid@locale@std@@QEAAXXZ */
253 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
254 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
256 TRACE("(%p)\n", this);
262 /* ??Bid@locale@std@@QAEIXZ */
263 /* ??Bid@locale@std@@QEAA_KXZ */
264 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
265 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
269 TRACE("(%p)\n", this);
272 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
273 this->id
= ++locale_id__Id_cnt
;
280 /* ??_Ffacet@locale@std@@QAEXXZ */
281 /* ??_Ffacet@locale@std@@QEAAXXZ */
282 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
283 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
285 TRACE("(%p)\n", this);
286 this->vtable
= &MSVCP_locale_facet_vtable
;
291 /* ??0facet@locale@std@@IAE@I@Z */
292 /* ??0facet@locale@std@@IEAA@_K@Z */
293 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
294 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
296 TRACE("(%p %lu)\n", this, refs
);
297 this->vtable
= &MSVCP_locale_facet_vtable
;
302 /* ?_Incref@facet@locale@std@@QAEXXZ */
303 /* ?_Incref@facet@locale@std@@QEAAXXZ */
304 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
305 void __thiscall
locale_facet__Incref(locale_facet
*this)
309 TRACE("(%p)\n", this);
311 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
316 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
317 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
318 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
319 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
324 TRACE("(%p)\n", this);
326 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
330 ret
= this->refs
? NULL
: this;
336 /* ??0_Timevec@std@@QAE@ABV01@@Z */
337 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
338 /* This copy constructor modifies copied object */
339 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
340 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
342 TRACE("(%p %p)\n", this, copy
);
343 this->timeptr
= copy
->timeptr
;
344 copy
->timeptr
= NULL
;
348 /* ??0_Timevec@std@@QAE@PAX@Z */
349 /* ??0_Timevec@std@@QEAA@PEAX@Z */
350 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
351 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
353 TRACE("(%p %p)\n", this, timeptr
);
354 this->timeptr
= timeptr
;
358 /* ??_F_Timevec@std@@QAEXXZ */
359 /* ??_F_Timevec@std@@QEAAXXZ */
360 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
361 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
363 TRACE("(%p)\n", this);
364 this->timeptr
= NULL
;
368 /* ??1_Timevec@std@@QAE@XZ */
369 /* ??1_Timevec@std@@QEAA@XZ */
370 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
371 void __thiscall
_Timevec_dtor(_Timevec
*this)
373 TRACE("(%p)\n", this);
377 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
378 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
379 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
380 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
382 TRACE("(%p %p)\n", this, right
);
383 this->timeptr
= right
->timeptr
;
384 right
->timeptr
= NULL
;
388 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
389 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
390 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
391 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
393 TRACE("(%p)\n", this);
394 return this->timeptr
;
397 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
398 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
399 static _Locinfo
* _Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
401 const char *locale
= NULL
;
403 /* This function is probably modifying more global objects */
404 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
407 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
409 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
410 MSVCP_basic_string_char_ctor_cstr(&locinfo
->days
, "");
411 MSVCP_basic_string_char_ctor_cstr(&locinfo
->months
, "");
412 MSVCP_basic_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
415 locale
= setlocale(LC_ALL
, locstr
);
417 locale
= setlocale(LC_ALL
, NULL
);
420 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
422 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
427 /* ??0_Locinfo@std@@QAE@HPBD@Z */
428 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
429 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
430 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
432 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
435 /* ??0_Locinfo@std@@QAE@PBD@Z */
436 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
437 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
438 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
440 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
443 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
444 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
445 static void _Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
447 TRACE("(%p)\n", locinfo
);
449 setlocale(LC_ALL
, MSVCP_basic_string_char_c_str(&locinfo
->oldlocname
));
450 MSVCP_basic_string_char_dtor(&locinfo
->days
);
451 MSVCP_basic_string_char_dtor(&locinfo
->months
);
452 MSVCP_basic_string_char_dtor(&locinfo
->oldlocname
);
453 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
454 _Lockit_dtor(&locinfo
->lock
);
457 /* ??_F_Locinfo@std@@QAEXXZ */
458 /* ??_F_Locinfo@std@@QEAAXXZ */
459 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
460 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
462 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
465 /* ??1_Locinfo@std@@QAE@XZ */
466 /* ??1_Locinfo@std@@QEAA@XZ */
467 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
468 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
470 _Locinfo__Locinfo_dtor(this);
473 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
474 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
475 static _Locinfo
* _Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
477 const char *locale
= NULL
;
479 /* This function is probably modifying more global objects */
480 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
482 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
484 MSVCP_basic_string_char_dtor(&locinfo
->newlocname
);
487 locale
= setlocale(LC_ALL
, locstr
);
489 locale
= setlocale(LC_ALL
, NULL
);
492 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
494 MSVCP_basic_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
499 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
500 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
501 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
502 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
504 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
508 ULONGLONG __cdecl
_Getcoll(void)
514 _locale_t locale
= _get_current_locale();
518 ret
.collvec
.page
= locale
->locinfo
->lc_collate_cp
;
519 ret
.collvec
.handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
520 _free_locale(locale
);
524 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
525 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
526 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
527 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
529 ULONGLONG ull
= _Getcoll();
530 memcpy(ret
, &ull
, sizeof(ull
));
535 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
537 _locale_t locale
= _get_current_locale();
542 ret
->page
= locale
->locinfo
->lc_codepage
;
543 ret
->handle
= locale
->locinfo
->lc_handle
[LC_COLLATE
];
545 table
= malloc(sizeof(short[256]));
547 _free_locale(locale
);
548 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
550 memcpy(table
, locale
->locinfo
->pctype
, sizeof(short[256]));
552 _free_locale(locale
);
556 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
557 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
558 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
559 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
561 return _Getctype(ret
);
565 ULONGLONG __cdecl
_Getcvt(void)
567 _locale_t locale
= _get_current_locale();
575 ret
.cvtvec
.page
= locale
->locinfo
->lc_codepage
;
576 ret
.cvtvec
.handle
= locale
->locinfo
->lc_handle
[LC_CTYPE
];
577 _free_locale(locale
);
581 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
582 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
583 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
584 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
586 ULONGLONG ull
= _Getcvt();
587 memcpy(ret
, &ull
, sizeof(ull
));
591 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
592 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
593 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
594 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
596 FIXME("(%p) stub\n", this);
600 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
601 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
602 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
603 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
605 char *days
= _Getdays();
607 TRACE("(%p)\n", this);
610 MSVCP_basic_string_char_dtor(&this->days
);
611 MSVCP_basic_string_char_ctor_cstr(&this->days
, days
);
615 return this->days
.size
? MSVCP_basic_string_char_c_str(&this->days
) :
616 ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
619 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
620 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
621 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
622 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
624 char *months
= _Getmonths();
626 TRACE("(%p)\n", this);
629 MSVCP_basic_string_char_dtor(&this->months
);
630 MSVCP_basic_string_char_ctor_cstr(&this->months
, months
);
634 return this->months
.size
? MSVCP_basic_string_char_c_str(&this->months
) :
635 ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
636 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
639 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
640 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
641 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
642 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
644 TRACE("(%p)\n", this);
648 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
649 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
650 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
651 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
653 TRACE("(%p)\n", this);
657 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
658 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
659 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
660 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
662 TRACE("(%p)\n", this);
666 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
667 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
668 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
669 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
671 TRACE("(%p)\n", this);
673 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
677 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
678 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
679 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
680 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
682 TRACE("(%p)\n", this);
684 _Timevec_ctor_timeptr(ret
, _Gettnames());
688 /* ?id@?$collate@D@std@@2V0locale@2@A */
689 locale_id collate_char_id
= {0};
691 /* ??_7?$collate@D@std@@6B@ */
692 extern const vtable_ptr MSVCP_collate_char_vtable
;
694 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
695 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
696 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
697 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
699 TRACE("(%p %p)\n", this, locinfo
);
700 _Locinfo__Getcoll(locinfo
, &this->coll
);
703 /* ??0?$collate@D@std@@IAE@PBDI@Z */
704 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
705 static collate
* collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
709 TRACE("(%p %s %lu)\n", this, name
, refs
);
711 locale_facet_ctor_refs(&this->facet
, refs
);
712 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
714 _Locinfo_ctor_cstr(&locinfo
, name
);
715 collate_char__Init(this, &locinfo
);
716 _Locinfo_dtor(&locinfo
);
720 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
721 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
722 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
723 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
725 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
727 locale_facet_ctor_refs(&this->facet
, refs
);
728 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
729 collate_char__Init(this, locinfo
);
733 /* ??0?$collate@D@std@@QAE@I@Z */
734 /* ??0?$collate@D@std@@QEAA@_K@Z */
735 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
736 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
738 return collate_char_ctor_name(this, "C", refs
);
741 /* ??1?$collate@D@std@@MAE@XZ */
742 /* ??1?$collate@D@std@@MEAA@XZ */
743 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
744 void __thiscall
collate_char_dtor(collate
*this)
746 TRACE("(%p)\n", this);
749 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
750 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
752 TRACE("(%p %x)\n", this, flags
);
754 /* we have an array, with the number of elements stored before the first object */
755 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
757 for(i
=*ptr
-1; i
>=0; i
--)
758 collate_char_dtor(this+i
);
759 MSVCRT_operator_delete(ptr
);
761 collate_char_dtor(this);
763 MSVCRT_operator_delete(this);
769 /* ??_F?$collate@D@std@@QAEXXZ */
770 /* ??_F?$collate@D@std@@QEAAXXZ */
771 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
772 collate
* __thiscall
collate_char_ctor(collate
*this)
774 return collate_char_ctor_name(this, "C", 0);
777 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
778 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
779 static MSVCP_size_t
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
781 TRACE("(%p %p)\n", facet
, loc
);
783 if(facet
&& !*facet
) {
784 *facet
= MSVCRT_operator_new(sizeof(collate
));
786 ERR("Out of memory\n");
787 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
790 collate_char_ctor_name((collate
*)*facet
,
791 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
797 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
798 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
799 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
801 return collate_char__Getcat(facet
, locale_classic());
805 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
806 const char *last2
, const _Collvec
*coll
)
810 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
815 lcid
= ___lc_handle_func()[LC_COLLATE
];
816 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
819 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
820 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
821 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
822 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
823 (const collate*, const char*, const char*, const char*, const char*), \
824 (this, first1, last1, first2, last2))
825 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
826 const char *last1
, const char *first2
, const char *last2
)
828 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
829 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
832 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
833 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
834 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
835 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
836 const char *last1
, const char *first2
, const char *last2
)
838 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
839 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
842 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
843 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
844 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
845 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
846 (const collate*, const char*, const char*), (this, first, last))
847 LONG __thiscall
collate_char_do_hash(const collate
*this,
848 const char *first
, const char *last
)
852 TRACE("(%p %p %p)\n", this, first
, last
);
854 for(; first
<last
; first
++)
855 ret
= (ret
<<8 | ret
>>24) + *first
;
859 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
860 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
861 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
862 LONG __thiscall
collate_char_hash(const collate
*this,
863 const char *first
, const char *last
)
865 TRACE("(%p %p %p)\n", this, first
, last
);
866 return call_collate_char_do_hash(this, first
, last
);
869 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
870 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
871 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
872 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
873 basic_string_char
*ret
, const char *first
, const char *last
)
875 FIXME("(%p %p %p) stub\n", this, first
, last
);
879 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
880 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
881 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
882 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
883 basic_string_char
*ret
, const char *first
, const char *last
)
885 FIXME("(%p %p %p) stub\n", this, first
, last
);
889 /* ?id@?$collate@_W@std@@2V0locale@2@A */
890 locale_id collate_wchar_id
= {0};
891 /* ?id@?$collate@G@std@@2V0locale@2@A */
892 locale_id collate_short_id
= {0};
894 /* ??_7?$collate@_W@std@@6B@ */
895 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
896 /* ??_7?$collate@G@std@@6B@ */
897 extern const vtable_ptr MSVCP_collate_short_vtable
;
899 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
900 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
901 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
902 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
903 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
904 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
906 TRACE("(%p %p)\n", this, locinfo
);
907 _Locinfo__Getcoll(locinfo
, &this->coll
);
910 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
911 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
912 static collate
* collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
916 TRACE("(%p %s %lu)\n", this, name
, refs
);
918 locale_facet_ctor_refs(&this->facet
, refs
);
919 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
921 _Locinfo_ctor_cstr(&locinfo
, name
);
922 collate_wchar__Init(this, &locinfo
);
923 _Locinfo_dtor(&locinfo
);
927 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
928 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
929 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
930 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
932 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
934 locale_facet_ctor_refs(&this->facet
, refs
);
935 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
936 collate_wchar__Init(this, locinfo
);
940 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
941 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
942 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
943 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, _Locinfo
*locinfo
, MSVCP_size_t refs
)
945 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
946 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
950 /* ??0?$collate@_W@std@@QAE@I@Z */
951 /* ??0?$collate@_W@std@@QEAA@_K@Z */
952 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
953 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
955 return collate_wchar_ctor_name(this, "C", refs
);
958 /* ??0?$collate@G@std@@QAE@I@Z */
959 /* ??0?$collate@G@std@@QEAA@_K@Z */
960 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
961 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
963 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
964 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
968 /* ??1?$collate@_W@std@@MAE@XZ */
969 /* ??1?$collate@_W@std@@MEAA@XZ */
970 /* ??1?$collate@G@std@@MAE@XZ */
971 /* ??1?$collate@G@std@@MEAA@XZ */
972 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
973 void __thiscall
collate_wchar_dtor(collate
*this)
975 TRACE("(%p)\n", this);
978 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
979 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
981 TRACE("(%p %x)\n", this, flags
);
983 /* we have an array, with the number of elements stored before the first object */
984 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
986 for(i
=*ptr
-1; i
>=0; i
--)
987 collate_wchar_dtor(this+i
);
988 MSVCRT_operator_delete(ptr
);
990 collate_wchar_dtor(this);
992 MSVCRT_operator_delete(this);
998 /* ??_F?$collate@_W@std@@QAEXXZ */
999 /* ??_F?$collate@_W@std@@QEAAXXZ */
1000 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1001 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1003 return collate_wchar_ctor_name(this, "C", 0);
1006 /* ??_F?$collate@G@std@@QAEXXZ */
1007 /* ??_F?$collate@G@std@@QEAAXXZ */
1008 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1009 collate
* __thiscall
collate_short_ctor(collate
*this)
1011 collate
*ret
= collate_wchar_ctor(this);
1012 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1016 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1017 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1018 static MSVCP_size_t
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1020 TRACE("(%p %p)\n", facet
, loc
);
1022 if(facet
&& !*facet
) {
1023 *facet
= MSVCRT_operator_new(sizeof(collate
));
1025 ERR("Out of memory\n");
1026 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1029 collate_wchar_ctor_name((collate
*)*facet
,
1030 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0);
1036 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1037 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1038 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1040 return collate_wchar__Getcat(facet
, locale_classic());
1043 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1044 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1045 static MSVCP_size_t
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1047 if(facet
&& !*facet
) {
1048 collate_wchar__Getcat(facet
, loc
);
1049 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1055 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1056 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1057 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1059 return collate_short__Getcat(facet
, locale_classic());
1063 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1064 const wchar_t *last2
, const _Collvec
*coll
)
1068 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1071 lcid
= coll
->handle
;
1073 lcid
= ___lc_handle_func()[LC_COLLATE
];
1074 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1077 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1078 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1079 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1080 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1081 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1082 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1083 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1084 (this, first1, last1, first2, last2))
1085 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1086 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1088 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1089 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1092 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1093 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1094 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1095 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1096 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1097 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1098 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1100 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1101 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1104 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1105 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1106 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1107 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1108 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1109 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1110 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1111 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1112 const wchar_t *first
, const wchar_t *last
)
1116 TRACE("(%p %p %p)\n", this, first
, last
);
1118 for(; first
<last
; first
++)
1119 ret
= (ret
<<8 | ret
>>24) + *first
;
1123 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1124 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1125 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1126 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1127 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1128 LONG __thiscall
collate_wchar_hash(const collate
*this,
1129 const wchar_t *first
, const wchar_t *last
)
1131 TRACE("(%p %p %p)\n", this, first
, last
);
1132 return call_collate_wchar_do_hash(this, first
, last
);
1135 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1136 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1137 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1138 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1139 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1140 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1141 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1143 FIXME("(%p %p %p) stub\n", this, first
, last
);
1147 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1148 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1149 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1150 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1151 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1152 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1153 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1155 FIXME("(%p %p %p) stub\n", this, first
, last
);
1159 /* ??_7ctype_base@std@@6B@ */
1160 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1162 /* ??0ctype_base@std@@QAE@I@Z */
1163 /* ??0ctype_base@std@@QEAA@_K@Z */
1164 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1165 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1167 TRACE("(%p %lu)\n", this, refs
);
1168 locale_facet_ctor_refs(&this->facet
, refs
);
1169 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1173 /* ??_Fctype_base@std@@QAEXXZ */
1174 /* ??_Fctype_base@std@@QEAAXXZ */
1175 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1176 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1178 TRACE("(%p)\n", this);
1179 locale_facet_ctor_refs(&this->facet
, 0);
1180 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1184 /* ??1ctype_base@std@@UAE@XZ */
1185 /* ??1ctype_base@std@@UEAA@XZ */
1186 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1187 void __thiscall
ctype_base_dtor(ctype_base
*this)
1189 TRACE("(%p)\n", this);
1192 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1193 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1195 TRACE("(%p %x)\n", this, flags
);
1197 /* we have an array, with the number of elements stored before the first object */
1198 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1200 for(i
=*ptr
-1; i
>=0; i
--)
1201 ctype_base_dtor(this+i
);
1202 MSVCRT_operator_delete(ptr
);
1204 ctype_base_dtor(this);
1206 MSVCRT_operator_delete(this);
1212 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1213 locale_id ctype_char_id
= {0};
1214 /* ?table_size@?$ctype@D@std@@2IB */
1215 /* ?table_size@?$ctype@D@std@@2_KB */
1216 MSVCP_size_t ctype_char_table_size
= 256;
1218 /* ??_7?$ctype@D@std@@6B@ */
1219 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1221 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1222 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1223 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1224 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1226 TRACE("(%p %p)\n", this, locinfo
);
1227 _Locinfo__Getctype(locinfo
, &this->ctype
);
1230 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1231 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1232 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1233 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1235 TRACE("(%p)\n", this);
1237 if(this->ctype
.delfl
)
1238 free((short*)this->ctype
.table
);
1241 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1242 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1243 const short* __cdecl
ctype_char_classic_table(void)
1246 return &((short*)GetProcAddress(GetModuleHandleA("msvcrt.dll"), "_ctype"))[1];
1249 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1250 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1251 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1252 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1253 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1255 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1256 ctype_base_ctor_refs(&this->base
, refs
);
1257 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1258 ctype_char__Init(this, locinfo
);
1262 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1263 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1264 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1265 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1266 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1270 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1272 ctype_base_ctor_refs(&this->base
, refs
);
1273 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1275 _Locinfo_ctor(&locinfo
);
1276 ctype_char__Init(this, &locinfo
);
1277 _Locinfo_dtor(&locinfo
);
1280 ctype_char__Tidy(this);
1281 this->ctype
.table
= table
;
1282 this->ctype
.delfl
= delete;
1287 /* ??_F?$ctype@D@std@@QAEXXZ */
1288 /* ??_F?$ctype@D@std@@QEAAXXZ */
1289 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1290 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1292 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1295 /* ??1?$ctype@D@std@@MAE@XZ */
1296 /* ??1?$ctype@D@std@@MEAA@XZ */
1297 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1298 void __thiscall
ctype_char_dtor(ctype_char
*this)
1300 TRACE("(%p)\n", this);
1301 ctype_char__Tidy(this);
1304 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1305 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1307 TRACE("(%p %x)\n", this, flags
);
1309 /* we have an array, with the number of elements stored before the first object */
1310 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1312 for(i
=*ptr
-1; i
>=0; i
--)
1313 ctype_char_dtor(this+i
);
1314 MSVCRT_operator_delete(ptr
);
1316 ctype_char_dtor(this);
1318 MSVCRT_operator_delete(this);
1324 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1325 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1326 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1327 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1328 char, (const ctype_char*, char, char), (this, ch, unused))
1329 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1331 TRACE("(%p %c %c)\n", this, ch
, unused
);
1335 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1336 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1337 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1338 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1339 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1340 (this, first, last, unused, dest))
1341 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1342 const char *first
, const char *last
, char unused
, char *dest
)
1344 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1345 memcpy(dest
, first
, last
-first
);
1349 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1350 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1351 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1352 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1354 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1355 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1358 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1359 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1360 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1361 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1362 const char *first
, const char *last
, char dflt
, char *dest
)
1364 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1365 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1368 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1369 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1370 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1371 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1372 char, (const ctype_char*, char), (this, ch))
1373 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1375 TRACE("(%p %c)\n", this, ch
);
1379 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1380 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1381 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1382 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1383 const char*, (const ctype_char*, const char*, const char*, char*), \
1384 (this, first, last, dest))
1385 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1386 const char *first
, const char *last
, char *dest
)
1388 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1389 memcpy(dest
, first
, last
-first
);
1393 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1394 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1395 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1396 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1398 TRACE("(%p %c)\n", this, ch
);
1399 return call_ctype_char_do_widen_ch(this, ch
);
1402 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1403 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1404 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1405 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1406 const char *first
, const char *last
, char *dest
)
1408 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1409 return call_ctype_char_do_widen(this, first
, last
, dest
);
1412 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1413 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1414 static MSVCP_size_t
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1416 TRACE("(%p %p)\n", facet
, loc
);
1418 if(facet
&& !*facet
) {
1421 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1423 ERR("Out of memory\n");
1424 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1428 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
1429 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1430 _Locinfo_dtor(&locinfo
);
1436 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1437 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1438 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1440 return ctype_char__Getcat(facet
, locale_classic());
1443 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1445 static ctype_char
*obj
= NULL
;
1448 const locale_facet
*fac
;
1450 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1451 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1453 _Lockit_dtor(&lock
);
1454 return (ctype_char
*)fac
;
1458 _Lockit_dtor(&lock
);
1462 ctype_char__Getcat(&fac
, loc
);
1463 obj
= (ctype_char
*)fac
;
1464 locale_facet__Incref(&obj
->base
.facet
);
1465 locale_facet_register(&obj
->base
.facet
);
1466 _Lockit_dtor(&lock
);
1472 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1476 TRACE("%d %p\n", ch
, ctype
);
1481 cp
= ___lc_codepage_func();
1483 /* Don't convert to unicode in case of C locale */
1485 if(ch
>='A' && ch
<='Z')
1494 str
[0] = (ch
>>8) & 255;
1502 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1505 lower
= tolowerW(wide
);
1509 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1511 return str
[0] + (str
[1]<<8);
1515 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1516 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1517 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1518 char, (const ctype_char*, char), (this, ch))
1519 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1520 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1522 TRACE("(%p %c)\n", this, ch
);
1523 return _Tolower(ch
, &this->ctype
);
1526 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1527 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1528 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1529 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1530 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1531 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1533 TRACE("(%p %p %p)\n", this, first
, last
);
1534 for(; first
<last
; first
++)
1535 *first
= _Tolower(*first
, &this->ctype
);
1539 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1540 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1541 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1542 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1544 TRACE("(%p %c)\n", this, ch
);
1545 return call_ctype_char_do_tolower_ch(this, ch
);
1548 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1549 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1550 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1551 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1553 TRACE("(%p %p %p)\n", this, first
, last
);
1554 return call_ctype_char_do_tolower(this, first
, last
);
1558 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1562 TRACE("%d %p\n", ch
, ctype
);
1567 cp
= ___lc_codepage_func();
1569 /* Don't convert to unicode in case of C locale */
1571 if(ch
>='a' && ch
<='z')
1580 str
[0] = (ch
>>8) & 255;
1588 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1591 upper
= toupperW(wide
);
1595 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1597 return str
[0] + (str
[1]<<8);
1601 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1602 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1603 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1604 char, (const ctype_char*, char), (this, ch))
1605 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1606 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1608 TRACE("(%p %c)\n", this, ch
);
1609 return _Toupper(ch
, &this->ctype
);
1612 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
1613 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1614 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
1615 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1616 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
1617 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
1618 char *first
, const char *last
)
1620 TRACE("(%p %p %p)\n", this, first
, last
);
1621 for(; first
<last
; first
++)
1622 *first
= _Toupper(*first
, &this->ctype
);
1626 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
1627 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
1628 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
1629 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
1631 TRACE("(%p %c)\n", this, ch
);
1632 return call_ctype_char_do_toupper_ch(this, ch
);
1635 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
1636 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1637 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
1638 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
1640 TRACE("(%p %p %p)\n", this, first
, last
);
1641 return call_ctype_char_do_toupper(this, first
, last
);
1644 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
1645 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
1646 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
1647 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
1649 TRACE("(%p %x %c)\n", this, mask
, ch
);
1650 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
1653 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
1654 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
1655 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
1656 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
1658 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1659 for(; first
<last
; first
++)
1660 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
1664 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
1665 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1666 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
1667 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1669 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1670 for(; first
<last
; first
++)
1671 if(!ctype_char_is_ch(this, mask
, *first
))
1676 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
1677 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
1678 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
1679 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
1681 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
1682 for(; first
<last
; first
++)
1683 if(ctype_char_is_ch(this, mask
, *first
))
1688 /* ?table@?$ctype@D@std@@IBEPBFXZ */
1689 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
1690 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
1691 const short* __thiscall
ctype_char_table(const ctype_char
*this)
1693 TRACE("(%p)\n", this);
1694 return this->ctype
.table
;
1697 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
1698 locale_id ctype_wchar_id
= {0};
1699 /* ?id@?$ctype@G@std@@2V0locale@2@A */
1700 locale_id ctype_short_id
= {0};
1702 /* ??_7?$ctype@_W@std@@6B@ */
1703 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
1704 /* ??_7?$ctype@G@std@@6B@ */
1705 extern const vtable_ptr MSVCP_ctype_short_vtable
;
1707 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
1708 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1709 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
1710 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1711 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
1712 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
1714 TRACE("(%p %p)\n", this, locinfo
);
1715 _Locinfo__Getctype(locinfo
, &this->ctype
);
1716 _Locinfo__Getcvt(locinfo
, &this->cvt
);
1719 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1720 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1721 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
1722 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
1723 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1725 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1726 ctype_base_ctor_refs(&this->base
, refs
);
1727 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1728 ctype_wchar__Init(this, locinfo
);
1732 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
1733 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1734 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
1735 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
1736 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1738 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
1739 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1743 /* ??0?$ctype@_W@std@@QAE@I@Z */
1744 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
1745 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
1746 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1750 TRACE("(%p %lu)\n", this, refs
);
1752 ctype_base_ctor_refs(&this->base
, refs
);
1753 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
1755 _Locinfo_ctor(&locinfo
);
1756 ctype_wchar__Init(this, &locinfo
);
1757 _Locinfo_dtor(&locinfo
);
1761 /* ??0?$ctype@G@std@@QAE@I@Z */
1762 /* ??0?$ctype@G@std@@QEAA@_K@Z */
1763 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
1764 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
1766 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
1767 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1771 /* ??_F?$ctype@_W@std@@QAEXXZ */
1772 /* ??_F?$ctype@_W@std@@QEAAXXZ */
1773 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
1774 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
1776 TRACE("(%p)\n", this);
1777 return ctype_short_ctor_refs(this, 0);
1780 /* ??_F?$ctype@G@std@@QAEXXZ */
1781 /* ??_F?$ctype@G@std@@QEAAXXZ */
1782 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
1783 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
1785 ctype_wchar
*ret
= ctype_wchar_ctor(this);
1786 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
1790 /* ??1?$ctype@_W@std@@MAE@XZ */
1791 /* ??1?$ctype@_W@std@@MEAA@XZ */
1792 /* ??1?$ctype@G@std@@MAE@XZ */
1793 /* ??1?$ctype@G@std@@MEAA@XZ */
1794 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
1795 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
1797 TRACE("(%p)\n", this);
1798 if(this->ctype
.delfl
)
1799 free((void*)this->ctype
.table
);
1802 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
1803 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
1805 TRACE("(%p %x)\n", this, flags
);
1807 /* we have an array, with the number of elements stored before the first object */
1808 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1810 for(i
=*ptr
-1; i
>=0; i
--)
1811 ctype_wchar_dtor(this+i
);
1812 MSVCRT_operator_delete(ptr
);
1814 ctype_wchar_dtor(this);
1816 MSVCRT_operator_delete(this);
1823 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
1828 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
1833 cp
= ___lc_codepage_func();
1845 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
1854 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
1855 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
1856 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
1857 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
1858 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
1859 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1861 char buf
[MB_LEN_MAX
];
1863 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1865 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
1868 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
1869 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
1870 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
1871 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
1872 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
1873 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
1874 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
1875 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1877 return ctype_wchar__Donarrow(this, ch
, dflt
);
1880 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
1881 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
1882 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
1883 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
1884 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
1885 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
1886 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
1887 (this, first, last, dflt, dest))
1888 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
1889 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1891 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1892 for(; first
<last
; first
++)
1893 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
1897 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
1898 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
1899 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
1900 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
1901 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
1902 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
1904 TRACE("(%p %d %d)\n", this, ch
, dflt
);
1905 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
1908 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
1909 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
1910 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
1911 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
1912 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
1913 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
1914 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
1916 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
1917 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
1921 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
1927 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
1935 cp
= ___lc_codepage_func();
1939 *out
= (unsigned char)*in
;
1946 ((char*)state
)[1] = *in
;
1948 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
1958 GetCPInfo(cp
, &cp_info
);
1960 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
1961 if(!cp_info
.LeadByte
[i
+1])
1963 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
1971 *state
= (unsigned char)*in
;
1975 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
1982 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
1989 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
1990 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
1991 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
1992 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
1993 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
1994 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
1998 TRACE("(%p %d)\n", this, ch
);
1999 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2002 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2003 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2004 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2005 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2006 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2007 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2008 wchar_t, (const ctype_wchar*, char), (this, ch))
2009 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2011 return ctype_wchar__Dowiden(this, ch
);
2014 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2015 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2016 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2017 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2018 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2019 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2020 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2021 (this, first, last, dest))
2022 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2023 const char *first
, const char *last
, wchar_t *dest
)
2025 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2026 for(; first
<last
; first
++)
2027 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2031 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2032 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2033 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2034 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2035 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2036 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2038 TRACE("(%p %d)\n", this, ch
);
2039 return call_ctype_wchar_do_widen_ch(this, ch
);
2042 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2043 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2044 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2045 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2046 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2047 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2048 const char *first
, const char *last
, wchar_t *dest
)
2050 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2051 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2054 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2055 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2056 static MSVCP_size_t
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2058 TRACE("(%p %p)\n", facet
, loc
);
2060 if(facet
&& !*facet
) {
2063 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2065 ERR("Out of memory\n");
2066 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2070 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2071 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2072 _Locinfo_dtor(&locinfo
);
2078 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2079 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2080 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2082 return ctype_wchar__Getcat(facet
, locale_classic());
2085 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2086 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2087 static MSVCP_size_t
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2089 if(facet
&& !*facet
) {
2090 ctype_wchar__Getcat(facet
, loc
);
2091 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2097 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2098 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2099 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2101 return ctype_short__Getcat(facet
, locale_classic());
2105 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2107 TRACE("(%d %p)\n", ch
, ctype
);
2108 return tolowerW(ch
);
2111 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2113 static ctype_wchar
*obj
= NULL
;
2116 const locale_facet
*fac
;
2118 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2119 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2121 _Lockit_dtor(&lock
);
2122 return (ctype_wchar
*)fac
;
2126 _Lockit_dtor(&lock
);
2130 ctype_wchar__Getcat(&fac
, loc
);
2131 obj
= (ctype_wchar
*)fac
;
2132 locale_facet__Incref(&obj
->base
.facet
);
2133 locale_facet_register(&obj
->base
.facet
);
2134 _Lockit_dtor(&lock
);
2139 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2141 static ctype_wchar
*obj
= NULL
;
2144 const locale_facet
*fac
;
2146 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2147 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2149 _Lockit_dtor(&lock
);
2150 return (ctype_wchar
*)fac
;
2154 _Lockit_dtor(&lock
);
2158 ctype_short__Getcat(&fac
, loc
);
2159 obj
= (ctype_wchar
*)fac
;
2160 locale_facet__Incref(&obj
->base
.facet
);
2161 locale_facet_register(&obj
->base
.facet
);
2162 _Lockit_dtor(&lock
);
2167 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2168 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2169 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2170 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2171 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2172 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2173 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2174 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2176 return _Towlower(ch
, &this->ctype
);
2179 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2180 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2181 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2182 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2183 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2184 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2185 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2186 (this, first, last))
2187 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2188 wchar_t *first
, const wchar_t *last
)
2190 TRACE("(%p %p %p)\n", this, first
, last
);
2191 for(; first
<last
; first
++)
2192 *first
= _Towlower(*first
, &this->ctype
);
2196 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2197 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2198 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2199 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2200 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2201 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2203 TRACE("(%p %d)\n", this, ch
);
2204 return call_ctype_wchar_do_tolower_ch(this, ch
);
2207 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2208 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2209 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2210 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2211 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2212 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2213 wchar_t *first
, const wchar_t *last
)
2215 TRACE("(%p %p %p)\n", this, first
, last
);
2216 return call_ctype_wchar_do_tolower(this, first
, last
);
2220 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2222 TRACE("(%d %p)\n", ch
, ctype
);
2223 return toupperW(ch
);
2226 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2227 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2228 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2229 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2230 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2231 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2232 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2233 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2235 return _Towupper(ch
, &this->ctype
);
2238 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2239 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2240 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2241 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2242 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2243 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2244 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2245 (this, first, last))
2246 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2247 wchar_t *first
, const wchar_t *last
)
2249 TRACE("(%p %p %p)\n", this, first
, last
);
2250 for(; first
<last
; first
++)
2251 *first
= _Towupper(*first
, &this->ctype
);
2255 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2256 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2257 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2258 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2259 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2260 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2262 TRACE("(%p %d)\n", this, ch
);
2263 return call_ctype_wchar_do_toupper_ch(this, ch
);
2266 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2267 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2268 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2269 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2270 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2271 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2272 wchar_t *first
, const wchar_t *last
)
2274 TRACE("(%p %p %p)\n", this, first
, last
);
2275 return call_ctype_wchar_do_toupper(this, first
, last
);
2279 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2280 short *mask
, const _Ctypevec
*ctype
)
2282 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2283 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2288 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2291 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2295 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2296 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2297 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2298 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2299 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2300 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2301 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2302 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2304 TRACE("(%p %x %d)\n", this, mask
, ch
);
2305 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2308 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2309 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2310 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2311 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2312 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2313 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2314 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2315 (this, first, last, dest))
2316 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2317 const wchar_t *first
, const wchar_t *last
, short *dest
)
2319 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2320 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2323 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2324 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2325 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2326 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2327 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2328 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2330 TRACE("(%p %x %d)\n", this, mask
, ch
);
2331 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2334 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2335 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2336 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2337 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2338 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2339 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2340 const wchar_t *first
, const wchar_t *last
, short *dest
)
2342 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2343 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2346 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2347 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2348 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2349 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2350 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2351 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2352 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2353 (this, mask, first, last))
2354 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2355 short mask
, const wchar_t *first
, const wchar_t *last
)
2357 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2358 for(; first
<last
; first
++)
2359 if(!ctype_wchar_is_ch(this, mask
, *first
))
2364 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2365 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2366 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2367 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2368 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2369 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2370 short mask
, const wchar_t *first
, const wchar_t *last
)
2372 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2373 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2376 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2377 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2378 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2379 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2380 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2381 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2382 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2383 (this, mask, first, last))
2384 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2385 short mask
, const wchar_t *first
, const wchar_t *last
)
2387 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2388 for(; first
<last
; first
++)
2389 if(ctype_wchar_is_ch(this, mask
, *first
))
2394 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2395 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2396 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2397 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2398 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2399 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2400 short mask
, const wchar_t *first
, const wchar_t *last
)
2402 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2403 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2406 /* ??_7codecvt_base@std@@6B@ */
2407 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2409 /* ??0codecvt_base@std@@QAE@I@Z */
2410 /* ??0codecvt_base@std@@QEAA@_K@Z */
2411 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2412 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2414 TRACE("(%p %lu)\n", this, refs
);
2415 locale_facet_ctor_refs(&this->facet
, refs
);
2416 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2420 /* ??_Fcodecvt_base@std@@QAEXXZ */
2421 /* ??_Fcodecvt_base@std@@QEAAXXZ */
2422 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
2423 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
2425 return codecvt_base_ctor_refs(this, 0);
2428 /* ??1codecvt_base@std@@UAE@XZ */
2429 /* ??1codecvt_base@std@@UEAA@XZ */
2430 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
2431 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
2433 TRACE("(%p)\n", this);
2434 locale_facet_dtor(&this->facet
);
2437 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
2438 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
2440 TRACE("(%p %x)\n", this, flags
);
2442 /* we have an array, with the number of elements stored before the first object */
2443 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2445 for(i
=*ptr
-1; i
>=0; i
--)
2446 codecvt_base_dtor(this+i
);
2447 MSVCRT_operator_delete(ptr
);
2449 codecvt_base_dtor(this);
2451 MSVCRT_operator_delete(this);
2457 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
2458 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
2459 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
2460 MSVCP_bool, (const codecvt_base*), (this))
2461 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
2462 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
2464 TRACE("(%p)\n", this);
2468 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
2469 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
2470 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
2471 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
2473 TRACE("(%p)\n", this);
2474 return call_codecvt_base_do_always_noconv(this);
2477 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
2478 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
2479 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
2480 int, (const codecvt_base*), (this))
2481 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
2482 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
2484 TRACE("(%p)\n", this);
2488 /* ?max_length@codecvt_base@std@@QBEHXZ */
2489 /* ?max_length@codecvt_base@std@@QEBAHXZ */
2490 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
2491 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
2493 TRACE("(%p)\n", this);
2494 return call_codecvt_base_do_max_length(this);
2497 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
2498 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
2499 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
2500 int, (const codecvt_base*), (this))
2501 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
2502 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
2504 TRACE("(%p)\n", this);
2508 /* ?encoding@codecvt_base@std@@QBEHXZ */
2509 /* ?encoding@codecvt_base@std@@QEBAHXZ */
2510 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
2511 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
2513 TRACE("(%p)\n", this);
2514 return call_codecvt_base_do_encoding(this);
2517 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
2518 locale_id codecvt_char_id
= {0};
2520 /* ??_7?$codecvt@DDH@std@@6B@ */
2521 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
2523 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
2524 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2525 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
2526 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
2528 TRACE("(%p %p)\n", this, locinfo
);
2531 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
2532 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2533 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
2534 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2536 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2537 codecvt_base_ctor_refs(&this->base
, refs
);
2538 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
2542 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
2543 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
2544 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
2545 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
2547 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
2550 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
2551 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
2552 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
2553 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
2555 return codecvt_char_ctor_locinfo(this, NULL
, 0);
2558 /* ??1?$codecvt@DDH@std@@MAE@XZ */
2559 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
2560 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
2561 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
2563 TRACE("(%p)\n", this);
2564 codecvt_base_dtor(&this->base
);
2567 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
2568 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
2570 TRACE("(%p %x)\n", this, flags
);
2572 /* we have an array, with the number of elements stored before the first object */
2573 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2575 for(i
=*ptr
-1; i
>=0; i
--)
2576 codecvt_char_dtor(this+i
);
2577 MSVCRT_operator_delete(ptr
);
2579 codecvt_char_dtor(this);
2581 MSVCRT_operator_delete(this);
2587 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2588 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2589 static MSVCP_size_t
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
2591 TRACE("(%p %p)\n", facet
, loc
);
2593 if(facet
&& !*facet
) {
2594 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
2596 ERR("Out of memory\n");
2597 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2600 codecvt_char_ctor((codecvt_char
*)*facet
);
2606 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
2607 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2608 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
2610 return codecvt_char__Getcat(facet
, locale_classic());
2613 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
2615 static codecvt_char
*obj
= NULL
;
2618 const locale_facet
*fac
;
2620 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2621 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
2623 _Lockit_dtor(&lock
);
2624 return (codecvt_char
*)fac
;
2628 _Lockit_dtor(&lock
);
2632 codecvt_char__Getcat(&fac
, loc
);
2633 obj
= (codecvt_char
*)fac
;
2634 locale_facet__Incref(&obj
->base
.facet
);
2635 locale_facet_register(&obj
->base
.facet
);
2636 _Lockit_dtor(&lock
);
2641 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2642 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2643 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
2644 CALL_VTBL_FUNC(this, 16, int, \
2645 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2646 (this, state, from, from_end, from_next, to, to_end, to_next))
2647 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
2648 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
2649 const char *from
, const char *from_end
, const char **from_next
,
2650 char *to
, char *to_end
, char **to_next
)
2652 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2653 from_next
, to
, to_end
, to_next
);
2656 return CODECVT_noconv
;
2659 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2660 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2661 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
2662 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
2663 const char *from
, const char *from_end
, const char **from_next
,
2664 char *to
, char *to_end
, char **to_next
)
2666 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2667 from_next
, to
, to_end
, to_next
);
2668 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
2669 to
, to_end
, to_next
);
2672 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2673 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2674 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
2675 CALL_VTBL_FUNC(this, 20, int, \
2676 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
2677 (this, state, from, from_end, from_next, to, to_end, to_next))
2678 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
2679 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
2680 const char *from
, const char *from_end
, const char **from_next
,
2681 char *to
, char *to_end
, char **to_next
)
2683 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
2684 from_end
, from_next
, to
, to_end
, to_next
);
2687 return CODECVT_noconv
;
2690 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
2691 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
2692 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
2693 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
2694 const char *from
, const char *from_end
, const char **from_next
,
2695 char *to
, char *to_end
, char **to_next
)
2697 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
2698 from_next
, to
, to_end
, to_next
);
2699 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
2700 to
, to_end
, to_next
);
2703 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
2704 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
2705 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
2706 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
2707 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
2708 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
2709 int *state
, char *to
, char *to_end
, char **to_next
)
2711 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2713 return CODECVT_noconv
;
2716 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
2717 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
2718 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
2719 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
2720 int *state
, char *to
, char *to_end
, char **to_next
)
2722 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
2723 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
2726 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
2727 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
2728 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
2729 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
2730 (this, state, from, from_end, max))
2731 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
2732 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
2733 const char *from
, const char *from_end
, MSVCP_size_t max
)
2735 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2736 return (from_end
-from
> max
? max
: from_end
-from
);
2739 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
2740 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
2741 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
2742 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
2743 const char *from
, const char *from_end
, MSVCP_size_t max
)
2745 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
2746 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
2749 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
2750 locale_id codecvt_wchar_id
= {0};
2751 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
2752 locale_id codecvt_short_id
= {0};
2754 /* ??_7?$codecvt@_WDH@std@@6B@ */
2755 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
2756 /* ??_7?$codecvt@GDH@std@@6B@ */
2757 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
2759 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
2760 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2761 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
2762 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
2763 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
2764 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
2766 TRACE("(%p %p)\n", this, locinfo
);
2767 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2770 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
2771 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2772 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
2773 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2775 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2777 codecvt_base_ctor_refs(&this->base
, refs
);
2778 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
2780 codecvt_wchar__Init(this, locinfo
);
2784 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
2785 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2786 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
2787 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2789 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
2791 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
2792 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
2796 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
2797 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
2798 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
2799 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2803 TRACE("(%p %ld)\n", this, refs
);
2805 _Locinfo_ctor(&locinfo
);
2806 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
2807 _Locinfo_dtor(&locinfo
);
2811 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
2812 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
2813 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
2814 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
2818 TRACE("(%p %ld)\n", this, refs
);
2820 _Locinfo_ctor(&locinfo
);
2821 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
2822 _Locinfo_dtor(&locinfo
);
2826 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
2827 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
2828 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
2829 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
2831 return codecvt_wchar_ctor_refs(this, 0);
2834 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
2835 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
2836 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
2837 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
2839 return codecvt_short_ctor_refs(this, 0);
2842 /* ??1?$codecvt@GDH@std@@MAE@XZ */
2843 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
2844 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
2845 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
2846 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
2847 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
2849 TRACE("(%p)\n", this);
2850 codecvt_base_dtor(&this->base
);
2853 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
2854 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
2856 TRACE("(%p %x)\n", this, flags
);
2858 /* we have an array, with the number of elements stored before the first object */
2859 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2861 for(i
=*ptr
-1; i
>=0; i
--)
2862 codecvt_wchar_dtor(this+i
);
2863 MSVCRT_operator_delete(ptr
);
2865 codecvt_wchar_dtor(this);
2867 MSVCRT_operator_delete(this);
2873 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2874 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2875 static MSVCP_size_t
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2877 TRACE("(%p %p)\n", facet
, loc
);
2879 if(facet
&& !*facet
) {
2882 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2884 ERR("Out of memory\n");
2885 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2889 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2890 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
2891 _Locinfo_dtor(&locinfo
);
2897 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
2898 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2899 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
2901 return codecvt_wchar__Getcat(facet
, locale_classic());
2904 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
2906 static codecvt_wchar
*obj
= NULL
;
2909 const locale_facet
*fac
;
2911 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2912 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
2914 _Lockit_dtor(&lock
);
2915 return (codecvt_wchar
*)fac
;
2919 _Lockit_dtor(&lock
);
2923 codecvt_wchar__Getcat(&fac
, loc
);
2924 obj
= (codecvt_wchar
*)fac
;
2925 locale_facet__Incref(&obj
->base
.facet
);
2926 locale_facet_register(&obj
->base
.facet
);
2927 _Lockit_dtor(&lock
);
2932 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2933 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2934 static MSVCP_size_t
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2936 TRACE("(%p %p)\n", facet
, loc
);
2938 if(facet
&& !*facet
) {
2941 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
2943 ERR("Out of memory\n");
2944 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2948 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
2949 codecvt_short_ctor((codecvt_wchar
*)*facet
);
2950 _Locinfo_dtor(&locinfo
);
2956 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
2957 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2958 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
2960 return codecvt_short__Getcat(facet
, locale_classic());
2963 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
2965 static codecvt_wchar
*obj
= NULL
;
2968 const locale_facet
*fac
;
2970 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2971 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
2973 _Lockit_dtor(&lock
);
2974 return (codecvt_wchar
*)fac
;
2978 _Lockit_dtor(&lock
);
2982 codecvt_short__Getcat(&fac
, loc
);
2983 obj
= (codecvt_wchar
*)fac
;
2984 locale_facet__Incref(&obj
->base
.facet
);
2985 locale_facet_register(&obj
->base
.facet
);
2986 _Lockit_dtor(&lock
);
2991 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
2992 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
2993 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
2994 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
2995 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
2996 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
2998 TRACE("(%p)\n", this);
3002 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3003 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3004 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3005 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3006 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3007 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3009 TRACE("(%p)\n", this);
3013 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3014 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3015 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3016 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3017 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3018 CALL_VTBL_FUNC(this, 16, int, \
3019 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3020 (this, state, from, from_end, from_next, to, to_end, to_next))
3021 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3022 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3023 const char *from
, const char *from_end
, const char **from_next
,
3024 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3026 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3027 from_end
, from_next
, to
, to_end
, to_next
);
3032 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3033 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3035 *from_next
= from_end
;
3036 return CODECVT_partial
;
3038 return CODECVT_error
;
3052 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3053 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3054 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3055 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3056 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3057 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3058 const char *from
, const char *from_end
, const char **from_next
,
3059 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3061 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3062 from_end
, from_next
, to
, to_end
, to_next
);
3063 return call_codecvt_wchar_do_in(this, state
, from
,
3064 from_end
, from_next
, to
, to_end
, to_next
);
3067 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3068 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3069 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3070 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3071 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3072 CALL_VTBL_FUNC(this, 20, int, \
3073 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3074 (this, state, from, from_end, from_next, to, to_end, to_next))
3075 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3076 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3077 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3078 char *to
, char *to_end
, char **to_next
)
3080 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3081 from_end
, from_next
, to
, to_end
, to_next
);
3086 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3087 int old_state
= *state
, size
;
3088 char buf
[MB_LEN_MAX
];
3090 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3092 return CODECVT_error
;
3094 if(size
> from_end
-*from_next
) {
3096 return CODECVT_partial
;
3107 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3108 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3109 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3110 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3111 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3112 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3113 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3114 char *to
, char *to_end
, char **to_next
)
3116 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3117 from_end
, from_next
, to
, to_end
, to_next
);
3118 return call_codecvt_wchar_do_out(this, state
, from
,
3119 from_end
, from_next
, to
, to_end
, to_next
);
3122 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3123 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3124 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3125 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3126 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3127 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3128 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3129 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3130 int *state
, char *to
, char *to_end
, char **to_next
)
3132 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3134 WARN("unexpected state: %x\n", *state
);
3140 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3141 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3142 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3143 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3144 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3145 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3146 int *state
, char *to
, char *to_end
, char **to_next
)
3148 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3149 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3152 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3153 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3154 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3155 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3156 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3157 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3158 (this, state, from, from_end, max))
3159 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3160 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3161 const char *from
, const char *from_end
, MSVCP_size_t max
)
3163 int tmp_state
= *state
, ret
=0;
3165 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3167 while(ret
<max
&& from
!=from_end
) {
3168 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3185 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3186 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3187 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3188 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3189 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3190 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3191 const char *from
, const char *from_end
, MSVCP_size_t max
)
3193 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3194 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3197 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3198 locale_id numpunct_char_id
= {0};
3200 /* ??_7?$numpunct@D@std@@6B@ */
3201 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3203 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3204 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3205 static void numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3209 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3211 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3212 this->false_name
= MSVCRT_operator_new(len
);
3213 if(this->false_name
)
3214 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3216 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3217 this->true_name
= MSVCRT_operator_new(len
);
3219 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3222 this->grouping
= MSVCRT_operator_new(1);
3224 *(char*)this->grouping
= 0;
3229 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3231 len
= strlen(lc
->grouping
)+1;
3232 this->grouping
= MSVCRT_operator_new(len
);
3234 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3236 this->dp
= lc
->decimal_point
[0];
3237 this->sep
= lc
->thousands_sep
[0];
3240 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3241 MSVCRT_operator_delete((char*)this->grouping
);
3242 MSVCRT_operator_delete((char*)this->false_name
);
3243 MSVCRT_operator_delete((char*)this->true_name
);
3245 ERR("Out of memory\n");
3246 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3250 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3251 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3252 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3253 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3255 TRACE("(%p)\n", this);
3257 MSVCRT_operator_delete((char*)this->grouping
);
3258 MSVCRT_operator_delete((char*)this->false_name
);
3259 MSVCRT_operator_delete((char*)this->true_name
);
3262 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3263 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3264 static numpunct_char
* numpunct_char_ctor_locinfo(numpunct_char
*this,
3265 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3267 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3268 locale_facet_ctor_refs(&this->facet
, refs
);
3269 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3270 numpunct_char__Init(this, locinfo
, usedef
);
3274 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3275 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3276 static numpunct_char
* numpunct_char_ctor_name(numpunct_char
*this,
3277 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3281 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3282 locale_facet_ctor_refs(&this->facet
, refs
);
3283 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3285 _Locinfo_ctor_cstr(&locinfo
, name
);
3286 numpunct_char__Init(this, &locinfo
, usedef
);
3287 _Locinfo_dtor(&locinfo
);
3291 /* ??0?$numpunct@D@std@@QAE@I@Z */
3292 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3293 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3294 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3296 TRACE("(%p %lu)\n", this, refs
);
3297 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3300 /* ??_F?$numpunct@D@std@@QAEXXZ */
3301 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3302 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3303 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3305 return numpunct_char_ctor_refs(this, 0);
3308 /* ??1?$numpunct@D@std@@MAE@XZ */
3309 /* ??1?$numpunct@D@std@@MEAA@XZ */
3310 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3311 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3313 TRACE("(%p)\n", this);
3314 numpunct_char__Tidy(this);
3317 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
3318 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
3320 TRACE("(%p %x)\n", this, flags
);
3322 /* we have an array, with the number of elements stored before the first object */
3323 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3325 for(i
=*ptr
-1; i
>=0; i
--)
3326 numpunct_char_dtor(this+i
);
3327 MSVCRT_operator_delete(ptr
);
3329 numpunct_char_dtor(this);
3331 MSVCRT_operator_delete(this);
3337 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3338 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3339 static MSVCP_size_t
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3341 TRACE("(%p %p)\n", facet
, loc
);
3343 if(facet
&& !*facet
) {
3344 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
3346 ERR("Out of memory\n");
3347 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3350 numpunct_char_ctor_name((numpunct_char
*)*facet
,
3351 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3357 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
3358 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3359 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
3361 return numpunct_char__Getcat(facet
, locale_classic());
3364 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
3366 static numpunct_char
*obj
= NULL
;
3369 const locale_facet
*fac
;
3371 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3372 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
3374 _Lockit_dtor(&lock
);
3375 return (numpunct_char
*)fac
;
3379 _Lockit_dtor(&lock
);
3383 numpunct_char__Getcat(&fac
, loc
);
3384 obj
= (numpunct_char
*)fac
;
3385 locale_facet__Incref(&obj
->facet
);
3386 locale_facet_register(&obj
->facet
);
3387 _Lockit_dtor(&lock
);
3392 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
3393 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
3394 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
3395 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3396 char, (const numpunct_char *this), (this))
3397 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
3399 TRACE("(%p)\n", this);
3403 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
3404 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
3405 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
3406 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
3408 TRACE("(%p)\n", this);
3409 return call_numpunct_char_do_decimal_point(this);
3412 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
3413 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
3414 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
3415 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3416 char, (const numpunct_char*), (this))
3417 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
3419 TRACE("(%p)\n", this);
3423 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
3424 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
3425 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
3426 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
3428 TRACE("(%p)\n", this);
3429 return call_numpunct_char_do_thousands_sep(this);
3432 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3433 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3434 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
3435 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3436 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3437 basic_string_char
* __thiscall
numpunct_char_do_grouping(
3438 const numpunct_char
*this, basic_string_char
*ret
)
3440 TRACE("(%p)\n", this);
3441 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3444 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3445 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3446 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
3447 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
3449 TRACE("(%p)\n", this);
3450 return call_numpunct_char_do_grouping(this, ret
);
3453 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3454 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3455 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
3456 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3457 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3458 basic_string_char
* __thiscall
numpunct_char_do_falsename(
3459 const numpunct_char
*this, basic_string_char
*ret
)
3461 TRACE("(%p)\n", this);
3462 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
3465 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3466 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3467 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
3468 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
3470 TRACE("(%p)\n", this);
3471 return call_numpunct_char_do_falsename(this, ret
);
3474 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3475 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3476 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
3477 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3478 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
3479 basic_string_char
* __thiscall
numpunct_char_do_truename(
3480 const numpunct_char
*this, basic_string_char
*ret
)
3482 TRACE("(%p)\n", this);
3483 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
3486 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3487 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3488 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
3489 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
3491 TRACE("(%p)\n", this);
3492 return call_numpunct_char_do_truename(this, ret
);
3495 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
3496 locale_id numpunct_wchar_id
= {0};
3497 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
3498 locale_id numpunct_short_id
= {0};
3500 /* ??_7?$numpunct@_W@std@@6B@ */
3501 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
3502 /* ??_7?$numpunct@G@std@@6B@ */
3503 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
3505 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
3506 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3507 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
3508 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3509 static void numpunct_wchar__Init(numpunct_wchar
*this,
3510 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3512 const char *to_convert
;
3516 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3518 _Locinfo__Getcvt(locinfo
, &cvt
);
3520 to_convert
= _Locinfo__Getfalse(locinfo
);
3521 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3522 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3523 if(this->false_name
)
3524 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3525 (wchar_t*)this->false_name
, len
);
3527 to_convert
= _Locinfo__Gettrue(locinfo
);
3528 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
3529 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
3531 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
3532 (wchar_t*)this->true_name
, len
);
3535 this->grouping
= MSVCRT_operator_new(1);
3537 *(char*)this->grouping
= 0;
3542 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3544 len
= strlen(lc
->grouping
)+1;
3545 this->grouping
= MSVCRT_operator_new(len
);
3547 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3549 this->dp
= lc
->decimal_point
[0];
3550 this->sep
= lc
->thousands_sep
[0];
3553 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3554 MSVCRT_operator_delete((char*)this->grouping
);
3555 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3556 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3558 ERR("Out of memory\n");
3559 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3563 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
3564 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
3565 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
3566 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
3567 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
3568 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
3570 TRACE("(%p)\n", this);
3572 MSVCRT_operator_delete((char*)this->grouping
);
3573 MSVCRT_operator_delete((wchar_t*)this->false_name
);
3574 MSVCRT_operator_delete((wchar_t*)this->true_name
);
3577 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
3578 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3579 static numpunct_wchar
* numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
3580 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3582 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3583 locale_facet_ctor_refs(&this->facet
, refs
);
3584 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3585 numpunct_wchar__Init(this, locinfo
, usedef
);
3589 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
3590 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3591 static numpunct_wchar
* numpunct_short_ctor_locinfo(numpunct_wchar
*this,
3592 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3594 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
3595 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3599 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
3600 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
3601 static numpunct_wchar
* numpunct_wchar_ctor_name(numpunct_wchar
*this,
3602 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3606 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3607 locale_facet_ctor_refs(&this->facet
, refs
);
3608 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
3610 _Locinfo_ctor_cstr(&locinfo
, name
);
3611 numpunct_wchar__Init(this, &locinfo
, usedef
);
3612 _Locinfo_dtor(&locinfo
);
3616 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
3617 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
3618 static numpunct_wchar
* numpunct_short_ctor_name(numpunct_wchar
*this,
3619 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3621 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
3622 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3626 /* ??0?$numpunct@_W@std@@QAE@I@Z */
3627 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
3628 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
3629 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3631 TRACE("(%p %lu)\n", this, refs
);
3632 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
3635 /* ??0?$numpunct@G@std@@QAE@I@Z */
3636 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
3637 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
3638 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
3640 numpunct_wchar_ctor_refs(this, refs
);
3641 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
3645 /* ??_F?$numpunct@_W@std@@QAEXXZ */
3646 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
3647 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
3648 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
3650 return numpunct_wchar_ctor_refs(this, 0);
3653 /* ??_F?$numpunct@G@std@@QAEXXZ */
3654 /* ??_F?$numpunct@G@std@@QEAAXXZ */
3655 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
3656 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
3658 return numpunct_short_ctor_refs(this, 0);
3661 /* ??1?$numpunct@_W@std@@MAE@XZ */
3662 /* ??1?$numpunct@_W@std@@MEAA@XZ */
3663 /* ??1?$numpunct@G@std@@MAE@XZ */
3664 /* ??1?$numpunct@G@std@@MEAA@XZ */
3665 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
3666 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
3668 TRACE("(%p)\n", this);
3669 numpunct_wchar__Tidy(this);
3672 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
3673 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
3675 TRACE("(%p %x)\n", this, flags
);
3677 /* we have an array, with the number of elements stored before the first object */
3678 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3680 for(i
=*ptr
-1; i
>=0; i
--)
3681 numpunct_wchar_dtor(this+i
);
3682 MSVCRT_operator_delete(ptr
);
3684 numpunct_wchar_dtor(this);
3686 MSVCRT_operator_delete(this);
3692 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3693 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3694 static MSVCP_size_t
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3696 TRACE("(%p %p)\n", facet
, loc
);
3698 if(facet
&& !*facet
) {
3699 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3701 ERR("Out of memory\n");
3702 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3705 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
3706 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3712 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
3713 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3714 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
3716 return numpunct_wchar__Getcat(facet
, locale_classic());
3719 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
3721 static numpunct_wchar
*obj
= NULL
;
3724 const locale_facet
*fac
;
3726 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3727 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
3729 _Lockit_dtor(&lock
);
3730 return (numpunct_wchar
*)fac
;
3734 _Lockit_dtor(&lock
);
3738 numpunct_wchar__Getcat(&fac
, loc
);
3739 obj
= (numpunct_wchar
*)fac
;
3740 locale_facet__Incref(&obj
->facet
);
3741 locale_facet_register(&obj
->facet
);
3742 _Lockit_dtor(&lock
);
3747 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3748 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3749 static MSVCP_size_t
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3751 TRACE("(%p %p)\n", facet
, loc
);
3753 if(facet
&& !*facet
) {
3754 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
3756 ERR("Out of memory\n");
3757 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3760 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
3761 MSVCP_basic_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
3767 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
3768 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3769 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
3771 return numpunct_short__Getcat(facet
, locale_classic());
3774 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
3776 static numpunct_wchar
*obj
= NULL
;
3779 const locale_facet
*fac
;
3781 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3782 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
3784 _Lockit_dtor(&lock
);
3785 return (numpunct_wchar
*)fac
;
3789 _Lockit_dtor(&lock
);
3793 numpunct_short__Getcat(&fac
, loc
);
3794 obj
= (numpunct_wchar
*)fac
;
3795 locale_facet__Incref(&obj
->facet
);
3796 locale_facet_register(&obj
->facet
);
3797 _Lockit_dtor(&lock
);
3802 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
3803 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
3804 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
3805 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
3806 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
3807 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
3808 wchar_t, (const numpunct_wchar *this), (this))
3809 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
3811 TRACE("(%p)\n", this);
3815 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
3816 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
3817 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
3818 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
3819 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
3820 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
3822 TRACE("(%p)\n", this);
3823 return call_numpunct_wchar_do_decimal_point(this);
3826 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
3827 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
3828 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
3829 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
3830 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
3831 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
3832 wchar_t, (const numpunct_wchar *this), (this))
3833 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
3835 TRACE("(%p)\n", this);
3839 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
3840 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
3841 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
3842 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
3843 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
3844 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
3846 TRACE("(%p)\n", this);
3847 return call_numpunct_wchar_do_thousands_sep(this);
3850 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3851 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3852 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3853 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3854 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
3855 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
3856 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
3857 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3859 TRACE("(%p)\n", this);
3860 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
3863 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3864 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3865 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3866 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
3867 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
3868 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
3870 TRACE("(%p)\n", this);
3871 return call_numpunct_wchar_do_grouping(this, ret
);
3874 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3875 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3876 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3877 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3878 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
3879 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
3880 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3881 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3883 TRACE("(%p)\n", this);
3884 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
3887 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3888 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3889 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3890 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3891 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
3892 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3894 TRACE("(%p)\n", this);
3895 return call_numpunct_wchar_do_falsename(this, ret
);
3898 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3899 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3900 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3901 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3902 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
3903 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
3904 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
3905 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3907 TRACE("(%p)\n", this);
3908 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
3911 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3912 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
3913 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3914 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
3915 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
3916 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
3918 TRACE("(%p)\n", this);
3919 return call_numpunct_wchar_do_truename(this, ret
);
3922 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
3924 double ret
= strtod(buf
, buf_end
);
3927 ret
*= pow(10, exp
);
3931 static double _Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3937 ret
= _Stod(buf
, buf_end
, exp
);
3947 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
3949 return _Stod(buf
, buf_end
, exp
);
3952 static float _Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
3954 return _Stodx(buf
, buf_end
, exp
, err
);
3957 static __int64
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
3963 ret
= _strtoi64(buf
, buf_end
, base
);
3973 static LONG
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
3975 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
3976 if(!*err
&& i
!=(__int64
)((LONG
)i
))
3981 static unsigned __int64
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
3983 unsigned __int64 ret
;
3987 ret
= _strtoui64(buf
, buf_end
, base
);
3997 static ULONG
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
3999 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4000 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4002 return buf
[0]=='-' ? -i
: i
;
4005 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4006 locale_id num_get_wchar_id
= {0};
4007 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4008 locale_id num_get_short_id
= {0};
4010 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4011 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4012 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4013 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4015 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4016 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4017 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4018 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4019 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4020 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4022 TRACE("(%p %p)\n", this, locinfo
);
4023 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4026 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4027 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4028 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4029 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4030 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4032 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4034 locale_facet_ctor_refs(&this->facet
, refs
);
4035 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4037 num_get_wchar__Init(this, locinfo
);
4041 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4042 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4043 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4044 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4045 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4047 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4048 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4052 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4053 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4054 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4055 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4059 TRACE("(%p %lu)\n", this, refs
);
4061 _Locinfo_ctor(&locinfo
);
4062 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4063 _Locinfo_dtor(&locinfo
);
4067 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4068 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4069 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4070 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4072 num_get_wchar_ctor_refs(this, refs
);
4073 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4077 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4078 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4079 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4080 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4082 return num_get_wchar_ctor_refs(this, 0);
4085 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4086 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4087 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4088 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4090 return num_get_short_ctor_refs(this, 0);
4093 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4094 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4095 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4096 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4097 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4098 void __thiscall
num_get_wchar_dtor(num_get
*this)
4100 TRACE("(%p)\n", this);
4101 locale_facet_dtor(&this->facet
);
4104 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4105 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4107 TRACE("(%p %x)\n", this, flags
);
4109 /* we have an array, with the number of elements stored before the first object */
4110 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4112 for(i
=*ptr
-1; i
>=0; i
--)
4113 num_get_wchar_dtor(this+i
);
4114 MSVCRT_operator_delete(ptr
);
4116 num_get_wchar_dtor(this);
4118 MSVCRT_operator_delete(this);
4124 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4125 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4126 static MSVCP_size_t
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4128 TRACE("(%p %p)\n", facet
, loc
);
4130 if(facet
&& !*facet
) {
4133 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4135 ERR("Out of memory\n");
4136 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4140 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
4141 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4142 _Locinfo_dtor(&locinfo
);
4148 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4150 static num_get
*obj
= NULL
;
4153 const locale_facet
*fac
;
4155 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4156 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4158 _Lockit_dtor(&lock
);
4159 return (num_get
*)fac
;
4163 _Lockit_dtor(&lock
);
4167 num_get_wchar__Getcat(&fac
, loc
);
4168 obj
= (num_get
*)fac
;
4169 locale_facet__Incref(&obj
->facet
);
4170 locale_facet_register(&obj
->facet
);
4171 _Lockit_dtor(&lock
);
4176 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4177 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4178 static MSVCP_size_t
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4180 if(facet
&& !*facet
) {
4181 num_get_wchar__Getcat(facet
, loc
);
4182 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4188 num_get
* num_get_short_use_facet(const locale
*loc
)
4190 static num_get
*obj
= NULL
;
4193 const locale_facet
*fac
;
4195 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4196 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4198 _Lockit_dtor(&lock
);
4199 return (num_get
*)fac
;
4203 _Lockit_dtor(&lock
);
4207 num_get_short__Getcat(&fac
, loc
);
4208 obj
= (num_get
*)fac
;
4209 locale_facet__Incref(&obj
->facet
);
4210 locale_facet_register(&obj
->facet
);
4211 _Lockit_dtor(&lock
);
4216 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
4221 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
4224 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4225 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4227 basic_string_char grouping_bstr
;
4228 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4229 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
;
4230 wchar_t sep
, digits
[11], *digits_pos
;
4231 const char *grouping
;
4232 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
4234 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
4237 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4240 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4241 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4242 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : (wchar_t)0;
4244 istreambuf_iterator_wchar_val(first
);
4245 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4247 istreambuf_iterator_wchar_inc(first
);
4248 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4250 istreambuf_iterator_wchar_inc(first
);
4254 groups_no
= strlen(grouping
)+2;
4255 groups
= calloc(groups_no
, sizeof(char));
4258 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4259 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4260 if(sep
&& first
->val
==sep
) {
4261 if(cur_group
== groups_no
+1) {
4262 if(groups
[1] != groups
[2]) {
4266 memmove(groups
+1, groups
+2, groups_no
);
4267 groups
[cur_group
] = 0;
4277 if(dest_empty
&& first
->val
== digits
[0])
4281 *dest
++ = '0'+digits_pos
-digits
;
4284 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
4285 groups
[cur_group
]++;
4289 if(cur_group
&& !groups
[cur_group
])
4294 for(; cur_group
>=0 && !error
; cur_group
--) {
4295 if(*grouping
== CHAR_MAX
) {
4299 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4300 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4303 }else if(grouping
[1]) {
4307 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4313 }else if(dest_empty
) {
4317 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
4319 *dest
++ = *localeconv()->decimal_point
;
4320 istreambuf_iterator_wchar_inc(first
);
4323 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
)) {
4328 if(!first
->strbuf
|| !wcschr(digits
, first
->val
))
4333 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4334 if(!(digits_pos
= wcschr(digits
, first
->val
)))
4336 else if(dest
<num_end
) {
4338 *dest
++ = '0'+digits_pos
-digits
;
4347 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
4349 istreambuf_iterator_wchar_inc(first
);
4351 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4353 istreambuf_iterator_wchar_inc(first
);
4354 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4356 istreambuf_iterator_wchar_inc(first
);
4359 error
= dest_empty
= TRUE
;
4360 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
4363 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
4364 error
= dest_empty
= FALSE
;
4366 *dest
++ = '0'+digits_pos
-digits
;
4372 }else if(dest_empty
) {
4381 /* ?_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 */
4382 /* ?_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 */
4383 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4384 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4386 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
4389 /* ?_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 */
4390 /* ?_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 */
4391 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4392 istreambuf_iterator_wchar
*last
, const locale
*loc
)
4394 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
4397 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4398 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
4400 wchar_t digits
[23], *digits_pos
, sep
;
4401 basic_string_char grouping_bstr
;
4402 basic_string_char groups_found
;
4403 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
4404 char *dest_beg
= dest
, *dest_end
= dest
+24;
4405 const char *grouping
, *groups
;
4406 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
4408 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
4411 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
4412 for(i
=0; i
<6; i
++) {
4413 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
4414 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
4417 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
4418 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
4419 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
4421 basefield
= fmtflags
& FMTFLAG_basefield
;
4422 if(basefield
== FMTFLAG_oct
)
4424 else if(basefield
== FMTFLAG_hex
)
4425 base
= 22; /* equal to the size of digits buffer */
4431 istreambuf_iterator_wchar_val(first
);
4432 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
4434 istreambuf_iterator_wchar_inc(first
);
4435 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
4437 istreambuf_iterator_wchar_inc(first
);
4440 if(first
->strbuf
&& first
->val
==digits
[0]) {
4442 istreambuf_iterator_wchar_inc(first
);
4443 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
4444 if(!base
|| base
== 22) {
4446 istreambuf_iterator_wchar_inc(first
);
4456 if(!base
) base
= 10;
4461 MSVCP_basic_string_char_ctor(&groups_found
);
4462 if(found_zero
) ++groups_no
;
4465 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
4466 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
4467 if(sep
&& first
->val
==sep
) {
4468 if(!groups_no
) break; /* empty group - stop parsing */
4469 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
4477 if(dest_empty
&& first
->val
== digits
[0]) {
4483 /* skip digits that can't be copied to dest buffer, other
4484 * functions are responsible for detecting overflows */
4486 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
4487 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
4488 'A'+digits_pos
-digits
-16));
4489 if(sep
&& groups_no
<CHAR_MAX
)
4494 if(sep
&& groups_no
)
4495 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
4497 groups
= MSVCP_basic_string_char_c_str(&groups_found
);
4498 if(cur_group
&& !groups
[cur_group
])
4500 error
= TRUE
; /* trailing empty */
4502 }else if(!cur_group
) /* no groups, skip loop */
4505 for(; cur_group
>=0 && !error
; cur_group
--) {
4506 if(*grouping
== CHAR_MAX
) {
4510 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
4511 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
4514 }else if(grouping
[1]) {
4519 MSVCP_basic_string_char_dtor(&grouping_bstr
);
4521 MSVCP_basic_string_char_dtor(&groups_found
);
4528 }else if(dest_empty
)
4532 return (base
==22 ? 16 : base
);
4535 /* ?_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 */
4536 /* ?_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 */
4537 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4538 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4540 return num_get__Getifld(this, dest
, first
, last
,
4541 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
4544 /* ?_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 */
4545 /* ?_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 */
4546 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4547 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
4549 return num_get__Getifld(this, dest
, first
, last
,
4550 fmtflags
, loc
, numpunct_short_use_facet(loc
));
4553 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
4554 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4555 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4556 void **pval
, numpunct_wchar
*numpunct
)
4562 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4564 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4565 &last
, FMTFLAG_hex
, base
->loc
, numpunct
), &err
);
4566 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
4567 *state
|= IOSTATE_failbit
;
4568 else if(end
!=tmp
&& !err
)
4569 *pval
= (void*)((INT_PTR
)v
);
4571 *state
|= IOSTATE_failbit
;
4574 *state
|= IOSTATE_eofbit
;
4580 /* ?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 */
4581 /* ?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 */
4582 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
4583 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
4584 (this, ret, first, last, base, state, pval))
4585 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
4586 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4587 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4589 return num_get_do_get_void(this, ret
, first
, last
, base
,
4590 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4593 /* ?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 */
4594 /* ?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 */
4595 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
4596 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4597 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4599 return num_get_do_get_void(this, ret
, first
, last
, base
,
4600 state
, pval
, numpunct_short_use_facet(base
->loc
));
4603 /* ?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 */
4604 /* ?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 */
4605 /* ?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 */
4606 /* ?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 */
4607 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
4608 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4609 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
4611 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4612 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
4615 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
4616 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4617 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4618 double *pval
, numpunct_wchar
*numpunct
)
4624 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4626 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, base
->loc
, numpunct
), &err
);
4627 if(end
!=tmp
&& !err
)
4630 *state
|= IOSTATE_failbit
;
4633 *state
|= IOSTATE_eofbit
;
4639 /* ?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 */
4640 /* ?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 */
4641 /* ?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 */
4642 /* ?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 */
4643 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
4644 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4645 (this, ret, first, last, base, state, pval))
4646 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
4647 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
4648 (this, ret, first, last, base, state, pval))
4649 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
4650 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4651 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4653 return num_get_do_get_double(this, ret
, first
, last
, base
,
4654 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4657 /* ?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 */
4658 /* ?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 */
4659 /* ?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 */
4660 /* ?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 */
4661 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
4662 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4663 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4665 return num_get_do_get_double(this, ret
, first
, last
, base
,
4666 state
, pval
, numpunct_short_use_facet(base
->loc
));
4669 /* ?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 */
4670 /* ?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 */
4671 /* ?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 */
4672 /* ?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 */
4673 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
4674 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4675 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4677 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4678 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
4681 /* ?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 */
4682 /* ?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 */
4683 /* ?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 */
4684 /* ?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 */
4685 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
4686 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4687 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
4689 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4690 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
4693 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
4694 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4695 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4696 float *pval
, numpunct_wchar
*numpunct
)
4702 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4704 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
4705 &last
, base
->loc
, numpunct
), &err
);
4706 if(end
!=tmp
&& !err
)
4709 *state
|= IOSTATE_failbit
;
4712 *state
|= IOSTATE_eofbit
;
4718 /* ?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 */
4719 /* ?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 */
4720 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
4721 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
4722 (this, ret, first, last, base, state, pval))
4723 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
4724 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4725 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4727 return num_get_do_get_float(this, ret
, first
, last
, base
,
4728 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4731 /* ?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 */
4732 /* ?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 */
4733 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
4734 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4735 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4737 return num_get_do_get_float(this, ret
, first
, last
, base
,
4738 state
, pval
, numpunct_short_use_facet(base
->loc
));
4741 /* ?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 */
4742 /* ?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 */
4743 /* ?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 */
4744 /* ?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 */
4745 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
4746 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4747 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
4749 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4750 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
4753 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
4754 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4755 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4756 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
4762 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4764 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4765 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4766 if(end
!=tmp
&& !err
)
4769 *state
|= IOSTATE_failbit
;
4772 *state
|= IOSTATE_eofbit
;
4778 /* ?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 */
4779 /* ?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 */
4780 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
4781 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
4782 (this, ret, first, last, base, state, pval))
4783 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
4784 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4785 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4787 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4788 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4791 /* ?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 */
4792 /* ?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 */
4793 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
4794 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4795 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4797 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
4798 state
, pval
, numpunct_short_use_facet(base
->loc
));
4801 /* ?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 */
4802 /* ?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 */
4803 /* ?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 */
4804 /* ?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 */
4805 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
4806 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4807 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
4809 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4810 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
4813 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
4814 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4815 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4816 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
4822 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4824 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4825 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4826 if(end
!=tmp
&& !err
)
4829 *state
|= IOSTATE_failbit
;
4832 *state
|= IOSTATE_eofbit
;
4838 /* ?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 */
4839 /* ?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 */
4840 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
4841 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
4842 (this, ret, first, last, base, state, pval))
4843 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
4844 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4845 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4847 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4848 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4851 /* ?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 */
4852 /* ?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 */
4853 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
4854 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4855 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4857 return num_get_do_get_int64(this, ret
, first
, last
, base
,
4858 state
, pval
, numpunct_short_use_facet(base
->loc
));
4861 /* ?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 */
4862 /* ?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 */
4863 /* ?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 */
4864 /* ?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 */
4865 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
4866 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4867 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
4869 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4870 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
4873 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
4874 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4875 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4876 ULONG
*pval
, numpunct_wchar
*numpunct
)
4882 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4884 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4885 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4886 if(end
!=tmp
&& !err
)
4889 *state
|= IOSTATE_failbit
;
4892 *state
|= IOSTATE_eofbit
;
4898 /* ?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 */
4899 /* ?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 */
4900 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
4901 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
4902 (this, ret, first, last, base, state, pval))
4903 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
4904 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4905 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4907 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4908 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4911 /* ?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 */
4912 /* ?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 */
4913 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
4914 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4915 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4917 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
4918 state
, pval
, numpunct_short_use_facet(base
->loc
));
4921 /* ?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 */
4922 /* ?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 */
4923 /* ?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 */
4924 /* ?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 */
4925 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
4926 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4927 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
4929 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4930 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
4933 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
4934 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
4935 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
4936 LONG
*pval
, numpunct_wchar
*numpunct
)
4942 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4944 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
4945 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
4946 if(end
!=tmp
&& !err
)
4949 *state
|= IOSTATE_failbit
;
4952 *state
|= IOSTATE_eofbit
;
4958 /* ?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 */
4959 /* ?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 */
4960 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
4961 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
4962 (this, ret, first, last, base, state, pval))
4963 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
4964 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4965 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4967 return num_get_do_get_long(this, ret
, first
, last
, base
,
4968 state
, pval
, numpunct_wchar_use_facet(base
->loc
));
4971 /* ?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 */
4972 /* ?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 */
4973 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
4974 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4975 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4977 return num_get_do_get_long(this, ret
, first
, last
, base
,
4978 state
, pval
, numpunct_short_use_facet(base
->loc
));
4981 /* ?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 */
4982 /* ?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 */
4983 /* ?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 */
4984 /* ?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 */
4985 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
4986 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
4987 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
4989 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
4990 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
4993 /* ?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 */
4994 /* ?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 */
4995 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
4996 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
4997 (this, ret, first, last, base, state, pval))
4998 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
4999 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5000 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5002 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5003 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5006 /* ?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 */
5007 /* ?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 */
5008 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5009 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5010 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5012 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5013 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5016 /* ?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 */
5017 /* ?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 */
5018 /* ?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 */
5019 /* ?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 */
5020 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5021 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5022 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5024 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5025 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
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@AAHAAG@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@AEAHAEAG@Z */
5030 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5031 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5032 (this, ret, first, last, base, state, pval))
5033 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5034 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5035 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5038 char tmp
[25], *beg
, *end
;
5041 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5043 b
= num_get_wchar__Getifld(this, tmp
,
5044 &first
, &last
, base
->fmtfl
, base
->loc
);
5045 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5046 v
= _Stoulx(beg
, &end
, b
, &err
);
5048 if(v
!= (ULONG
)((unsigned short)v
))
5049 *state
|= IOSTATE_failbit
;
5050 else if(end
!=beg
&& !err
)
5051 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5053 *state
|= IOSTATE_failbit
;
5056 *state
|= IOSTATE_eofbit
;
5062 /* ?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 */
5063 /* ?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 */
5064 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5065 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5066 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5068 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5072 /* ?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 */
5073 /* ?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 */
5074 /* ?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@ */
5075 /* ?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 */
5076 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5077 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5078 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5080 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5081 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5084 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5085 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5086 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5087 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5089 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5091 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5092 basic_string_wchar false_bstr
, true_bstr
;
5093 const wchar_t *pfalse
, *ptrue
;
5095 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5096 numpunct_wchar_truename(numpunct
, &true_bstr
);
5097 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5098 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5100 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;
5101 istreambuf_iterator_wchar_inc(&first
)) {
5102 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5104 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5107 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5109 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5117 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5126 *state
|= IOSTATE_failbit
;
5128 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5129 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5133 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5134 &last
, base
->fmtfl
, base
->loc
, numpunct
), &err
);
5136 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5139 *state
|= IOSTATE_failbit
;
5143 *state
|= IOSTATE_eofbit
;
5144 memcpy(ret
, &first
, sizeof(first
));
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@AAHAA_N@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@AEAHAEA_N@Z */
5150 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5151 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
5152 (this, ret, first, last, base, state, pval))
5153 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
5154 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5155 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5157 return num_get_do_get_bool(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@AAHAA_N@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@AEAHAEA_N@Z */
5163 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
5164 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5165 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5167 return num_get_do_get_bool(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@AAHAA_N@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@AEAHAEA_N@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@AAHAA_N@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@AEAHAEA_N@Z */
5175 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
5176 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5177 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5179 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5180 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
5183 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
5184 locale_id num_get_char_id
= {0};
5186 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
5187 extern const vtable_ptr MSVCP_num_get_char_vtable
;
5189 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
5190 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
5191 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
5192 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
5194 TRACE("(%p %p)\n", this, locinfo
);
5195 _Locinfo__Getcvt(locinfo
, &this->cvt
);
5198 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
5199 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
5200 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
5201 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
5202 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
5204 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
5206 locale_facet_ctor_refs(&this->facet
, refs
);
5207 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
5209 num_get_char__Init(this, locinfo
);
5213 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
5214 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
5215 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
5216 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
5220 TRACE("(%p %lu)\n", this, refs
);
5222 _Locinfo_ctor(&locinfo
);
5223 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
5224 _Locinfo_dtor(&locinfo
);
5228 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
5229 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
5230 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
5231 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
5233 return num_get_char_ctor_refs(this, 0);
5236 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
5237 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
5238 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
5239 void __thiscall
num_get_char_dtor(num_get
*this)
5241 TRACE("(%p)\n", this);
5242 locale_facet_dtor(&this->facet
);
5245 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
5246 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
5248 TRACE("(%p %x)\n", this, flags
);
5250 /* we have an array, with the number of elements stored before the first object */
5251 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5253 for(i
=*ptr
-1; i
>=0; i
--)
5254 num_get_char_dtor(this+i
);
5255 MSVCRT_operator_delete(ptr
);
5257 num_get_char_dtor(this);
5259 MSVCRT_operator_delete(this);
5265 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5266 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5267 static MSVCP_size_t
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
5269 TRACE("(%p %p)\n", facet
, loc
);
5271 if(facet
&& !*facet
) {
5274 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5276 ERR("Out of memory\n");
5277 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5281 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
5282 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5283 _Locinfo_dtor(&locinfo
);
5289 num_get
* num_get_char_use_facet(const locale
*loc
)
5291 static num_get
*obj
= NULL
;
5294 const locale_facet
*fac
;
5296 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5297 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
5299 _Lockit_dtor(&lock
);
5300 return (num_get
*)fac
;
5304 _Lockit_dtor(&lock
);
5308 num_get_char__Getcat(&fac
, loc
);
5309 obj
= (num_get
*)fac
;
5310 locale_facet__Incref(&obj
->facet
);
5311 locale_facet_register(&obj
->facet
);
5312 _Lockit_dtor(&lock
);
5317 /* ?_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 */
5318 /* ?_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 */
5319 /* Copies number to dest buffer, validates grouping and skips separators.
5320 * Updates first so it points past the number, all digits are skipped.
5321 * Returns how exponent needs to changed.
5322 * Size of dest buffer is not specified, assuming it's not smaller than 32:
5323 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
5325 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5326 istreambuf_iterator_char
*last
, const locale
*loc
)
5328 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5329 basic_string_char grouping_bstr
;
5330 int groups_no
= 0, cur_group
= 0, exp
= 0;
5331 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, *groups
= NULL
, sep
;
5332 const char *grouping
;
5333 BOOL error
= FALSE
, got_digit
= FALSE
, dest_empty
= TRUE
;
5335 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5337 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5338 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5339 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5341 istreambuf_iterator_char_val(first
);
5342 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5343 *dest
++ = first
->val
;
5344 istreambuf_iterator_char_inc(first
);
5348 groups_no
= strlen(grouping
)+2;
5349 groups
= calloc(groups_no
, sizeof(char));
5352 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5353 if(first
->val
<'0' || first
->val
>'9') {
5354 if(sep
&& first
->val
==sep
) {
5355 if(cur_group
== groups_no
+1) {
5356 if(groups
[1] != groups
[2]) {
5360 memmove(groups
+1, groups
+2, groups_no
);
5361 groups
[cur_group
] = 0;
5371 if(dest_empty
&& first
->val
== '0')
5375 *dest
++ = first
->val
;
5378 if(sep
&& groups
[cur_group
]<CHAR_MAX
)
5379 groups
[cur_group
]++;
5383 if(cur_group
&& !groups
[cur_group
])
5388 for(; cur_group
>=0 && !error
; cur_group
--) {
5389 if(*grouping
== CHAR_MAX
) {
5393 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5394 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5397 }else if(grouping
[1]) {
5401 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5407 }else if(dest_empty
) {
5411 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
5413 *dest
++ = *localeconv()->decimal_point
;
5414 istreambuf_iterator_char_inc(first
);
5417 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
)) {
5422 if(!first
->strbuf
|| first
->val
<'1' || first
->val
>'9')
5427 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5428 if(first
->val
<'0' || first
->val
>'9')
5430 else if(dest
<num_end
) {
5432 *dest
++ = first
->val
;
5441 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
5442 *dest
++ = first
->val
;
5443 istreambuf_iterator_char_inc(first
);
5445 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5446 *dest
++ = first
->val
;
5447 istreambuf_iterator_char_inc(first
);
5450 error
= dest_empty
= TRUE
;
5451 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
5454 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
5455 error
= dest_empty
= FALSE
;
5457 *dest
++ = first
->val
;
5463 }else if(dest_empty
) {
5472 /* ?_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 */
5473 /* ?_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 */
5474 /* Copies number to dest buffer, validates grouping and skips separators.
5475 * Updates first so it points past the number, all digits are skipped.
5476 * Returns number base (8, 10 or 16).
5477 * Size of dest buffer is not specified, assuming it's not smaller than 25:
5478 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
5480 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
5481 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
5483 static const char digits
[] = "0123456789abcdefABCDEF";
5485 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
5486 basic_string_char grouping_bstr
;
5487 basic_string_char groups_found
;
5488 int basefield
, base
, groups_no
= 0, cur_group
= 0;
5489 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
;
5490 const char *grouping
, *groups
;
5491 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5493 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5495 numpunct_char_grouping(numpunct
, &grouping_bstr
);
5496 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5497 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
5499 basefield
= fmtflags
& FMTFLAG_basefield
;
5500 if(basefield
== FMTFLAG_oct
)
5502 else if(basefield
== FMTFLAG_hex
)
5503 base
= 22; /* equal to the size of digits buffer */
5509 istreambuf_iterator_char_val(first
);
5510 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
5511 *dest
++ = first
->val
;
5512 istreambuf_iterator_char_inc(first
);
5515 if(first
->strbuf
&& first
->val
=='0') {
5517 istreambuf_iterator_char_inc(first
);
5518 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
5519 if(!base
|| base
== 22) {
5521 istreambuf_iterator_char_inc(first
);
5531 if (!base
) base
= 10;
5536 MSVCP_basic_string_char_ctor(&groups_found
);
5537 if(found_zero
) ++groups_no
;
5540 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
5541 if(!memchr(digits
, first
->val
, base
)) {
5542 if(sep
&& first
->val
==sep
) {
5543 if(!groups_no
) break; /* empty group - stop parsing */
5544 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5552 if(dest_empty
&& first
->val
== '0')
5559 /* skip digits that can't be copied to dest buffer, other
5560 * functions are responsible for detecting overflows */
5562 *dest
++ = first
->val
;
5563 if(sep
&& groups_no
<CHAR_MAX
)
5568 if(sep
&& groups_no
)
5569 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5571 groups
= MSVCP_basic_string_char_c_str(&groups_found
);
5572 if(cur_group
&& !groups
[cur_group
])
5574 error
= TRUE
; /* trailing empty */
5576 }else if(!cur_group
) /* no groups, skip loop */
5579 for(; cur_group
>=0 && !error
; cur_group
--) {
5580 if(*grouping
== CHAR_MAX
) {
5584 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5585 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5588 }else if(grouping
[1]) {
5593 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5595 MSVCP_basic_string_char_dtor(&groups_found
);
5602 }else if(dest_empty
)
5606 return (base
==22 ? 16 : base
);
5609 /* ?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 */
5610 /* ?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 */
5611 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
5612 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
5613 (this, ret, first, last, base, state, pval))
5614 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
5615 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5616 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5622 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5624 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5625 &first
, &last
, FMTFLAG_hex
, base
->loc
), &err
);
5626 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5627 *state
|= IOSTATE_failbit
;
5628 else if(end
!=tmp
&& !err
)
5629 *pval
= (void*)((INT_PTR
)v
);
5631 *state
|= IOSTATE_failbit
;
5634 *state
|= IOSTATE_eofbit
;
5640 /* ?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 */
5641 /* ?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 */
5642 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
5643 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
5644 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
5646 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5647 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5650 /* ?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 */
5651 /* ?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 */
5652 /* ?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 */
5653 /* ?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 */
5654 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
5655 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5656 (this, ret, first, last, base, state, pval))
5657 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
5658 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
5659 (this, ret, first, last, base, state, pval))
5660 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
5661 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5662 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5668 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5670 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5671 if(end
!=tmp
&& !err
)
5674 *state
|= IOSTATE_failbit
;
5677 *state
|= IOSTATE_eofbit
;
5683 /* ?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 */
5684 /* ?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 */
5685 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
5686 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
5687 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5689 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5690 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5693 /* ?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 */
5694 /* ?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 */
5695 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
5696 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
5697 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
5699 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5700 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5703 /* ?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 */
5704 /* ?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 */
5705 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
5706 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
5707 (this, ret, first, last, base, state, pval))
5708 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
5709 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5710 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5716 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5718 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, base
->loc
), &err
);
5719 if(end
!=tmp
&& !err
)
5722 *state
|= IOSTATE_failbit
;
5725 *state
|= IOSTATE_eofbit
;
5731 /* ?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 */
5732 /* ?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 */
5733 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
5734 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
5735 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
5737 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5738 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5741 /* ?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 */
5742 /* ?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 */
5743 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
5744 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
5745 (this, ret, first, last, base, state, pval))
5746 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
5747 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5748 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5754 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5756 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5757 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5758 if(end
!=tmp
&& !err
)
5761 *state
|= IOSTATE_failbit
;
5764 *state
|= IOSTATE_eofbit
;
5770 /* ?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 */
5771 /* ?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 */
5772 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
5773 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
5774 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5776 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5777 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5780 /* ?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 */
5781 /* ?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 */
5782 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
5783 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
5784 (this, ret, first, last, base, state, pval))
5785 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
5786 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5787 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5793 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5795 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5796 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5797 if(end
!=tmp
&& !err
)
5800 *state
|= IOSTATE_failbit
;
5803 *state
|= IOSTATE_eofbit
;
5809 /* ?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 */
5810 /* ?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 */
5811 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
5812 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
5813 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5815 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5816 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5819 /* ?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 */
5820 /* ?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 */
5821 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
5822 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
5823 (this, ret, first, last, base, state, pval))
5824 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
5825 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5826 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5832 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5834 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5835 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5836 if(end
!=tmp
&& !err
)
5839 *state
|= IOSTATE_failbit
;
5842 *state
|= IOSTATE_eofbit
;
5848 /* ?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 */
5849 /* ?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 */
5850 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
5851 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
5852 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
5854 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5855 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5858 /* ?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 */
5859 /* ?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 */
5860 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
5861 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
5862 (this, ret, first, last, base, state, pval))
5863 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
5864 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5865 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5871 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5873 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
5874 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
5875 if(end
!=tmp
&& !err
)
5878 *state
|= IOSTATE_failbit
;
5881 *state
|= IOSTATE_eofbit
;
5887 /* ?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 */
5888 /* ?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 */
5889 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
5890 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
5891 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
5893 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5894 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5897 /* ?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 */
5898 /* ?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 */
5899 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
5900 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
5901 (this, ret, first, last, base, state, pval))
5902 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
5903 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5904 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5906 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5907 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5910 /* ?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 */
5911 /* ?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 */
5912 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
5913 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
5914 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
5916 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5917 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5920 /* ?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 */
5921 /* ?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 */
5922 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
5923 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
5924 (this, ret, first, last, base, state, pval))
5925 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
5926 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5927 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5930 char tmp
[25], *beg
, *end
;
5933 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5935 b
= num_get_char__Getifld(this, tmp
,
5936 &first
, &last
, base
->fmtfl
, base
->loc
);
5937 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5938 v
= _Stoulx(beg
, &end
, b
, &err
);
5940 if(v
!= (ULONG
)((unsigned short)v
))
5941 *state
|= IOSTATE_failbit
;
5942 else if(end
!=beg
&& !err
)
5943 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5945 *state
|= IOSTATE_failbit
;
5948 *state
|= IOSTATE_eofbit
;
5954 /* ?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 */
5955 /* ?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 */
5956 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
5957 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
5958 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
5960 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5961 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5964 /* ?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 */
5965 /* ?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 */
5966 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
5967 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
5968 (this, ret, first, last, base, state, pval))
5969 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
5970 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
5971 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
5973 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5975 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5976 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
5977 basic_string_char false_bstr
, true_bstr
;
5978 const char *pfalse
, *ptrue
;
5980 numpunct_char_falsename(numpunct
, &false_bstr
);
5981 numpunct_char_truename(numpunct
, &true_bstr
);
5982 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
5983 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
5985 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;
5986 istreambuf_iterator_char_inc(&first
)) {
5987 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5989 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5992 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5994 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6002 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6011 *state
|= IOSTATE_failbit
;
6013 MSVCP_basic_string_char_dtor(&false_bstr
);
6014 MSVCP_basic_string_char_dtor(&true_bstr
);
6018 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6019 &first
, &last
, base
->fmtfl
, base
->loc
), &err
);
6021 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6024 *state
|= IOSTATE_failbit
;
6028 *state
|= IOSTATE_eofbit
;
6029 memcpy(ret
, &first
, sizeof(first
));
6033 /* ?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 */
6034 /* ?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 */
6035 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6036 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6037 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6039 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6040 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6043 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6044 locale_id num_put_char_id
= {0};
6046 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6047 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6049 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6050 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6051 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6052 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6054 TRACE("(%p %p)\n", this, locinfo
);
6055 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6058 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6059 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6060 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
6061 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6063 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6065 locale_facet_ctor_refs(&this->facet
, refs
);
6066 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
6068 num_put_char__Init(this, locinfo
);
6072 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6073 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6074 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
6075 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6079 TRACE("(%p %lu)\n", this, refs
);
6081 _Locinfo_ctor(&locinfo
);
6082 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
6083 _Locinfo_dtor(&locinfo
);
6087 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6088 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6089 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
6090 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
6092 return num_put_char_ctor_refs(this, 0);
6095 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6096 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6097 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
6098 void __thiscall
num_put_char_dtor(num_put
*this)
6100 TRACE("(%p)\n", this);
6101 locale_facet_dtor(&this->facet
);
6104 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
6105 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
6107 TRACE("(%p %x)\n", this, flags
);
6109 /* we have an array, with the number of elements stored before the first object */
6110 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6112 for(i
=*ptr
-1; i
>=0; i
--)
6113 num_put_char_dtor(this+i
);
6114 MSVCRT_operator_delete(ptr
);
6116 num_put_char_dtor(this);
6118 MSVCRT_operator_delete(this);
6124 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6125 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6126 static MSVCP_size_t
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6128 TRACE("(%p %p)\n", facet
, loc
);
6130 if(facet
&& !*facet
) {
6133 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6135 ERR("Out of memory\n");
6136 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6140 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6141 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6142 _Locinfo_dtor(&locinfo
);
6148 num_put
* num_put_char_use_facet(const locale
*loc
)
6150 static num_put
*obj
= NULL
;
6153 const locale_facet
*fac
;
6155 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6156 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
6158 _Lockit_dtor(&lock
);
6159 return (num_put
*)fac
;
6163 _Lockit_dtor(&lock
);
6167 num_put_char__Getcat(&fac
, loc
);
6168 obj
= (num_put
*)fac
;
6169 locale_facet__Incref(&obj
->facet
);
6170 locale_facet_register(&obj
->facet
);
6171 _Lockit_dtor(&lock
);
6176 /* ?_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 */
6177 /* ?_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 */
6178 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
6179 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6181 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6183 for(; count
>0; count
--)
6184 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6190 /* ?_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 */
6191 /* ?_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 */
6192 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
6193 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
6195 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
6197 for(; count
>0; count
--)
6198 ostreambuf_iterator_char_put(&dest
, *ptr
++);
6204 /* ?_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 */
6205 /* ?_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 */
6206 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
6207 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
6209 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6213 /* ?_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 */
6214 /* ?_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 */
6215 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
6216 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
6218 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6220 for(; count
>0; count
--)
6221 ostreambuf_iterator_char_put(&dest
, c
);
6227 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
6228 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6229 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6231 int type
= fmtfl
& FMTFLAG_floatfield
;
6234 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6237 if(fmtfl
& FMTFLAG_showpos
)
6239 if(fmtfl
& FMTFLAG_showbase
)
6246 if(type
== FMTFLAG_fixed
)
6248 else if(type
== FMTFLAG_scientific
)
6249 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6250 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6251 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6253 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6259 /* ?_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 */
6260 /* ?_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 */
6261 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6262 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
6263 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6265 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6266 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6270 /* TODO: This function should be removed when num_put_char__Fput is implemented */
6271 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6272 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6274 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6275 basic_string_char grouping_bstr
;
6276 const char *grouping
;
6277 char *p
, sep
= *localeconv()->decimal_point
;
6278 int cur_group
= 0, group_size
= 0;
6279 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6282 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6284 /* Change decimal point */
6285 for(p
=buf
; p
<buf
+count
; p
++) {
6287 *p
= numpunct_char_decimal_point(numpunct
);
6293 /* Add separators to number */
6294 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6295 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6296 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6298 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6300 if(group_size
== grouping
[cur_group
]) {
6302 if(grouping
[cur_group
+1])
6305 memmove(p
+1, p
, buf
+count
-p
);
6310 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6312 /* Display number with padding */
6313 if(count
>= base
->wide
)
6316 pad
= base
->wide
-count
;
6319 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6320 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6323 if(adjustfield
!= FMTFLAG_left
) {
6324 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6327 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6328 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6331 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
6332 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
6333 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
6335 int base
= fmtfl
& FMTFLAG_basefield
;
6338 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
6341 if(fmtfl
& FMTFLAG_showpos
)
6343 if(fmtfl
& FMTFLAG_showbase
)
6350 if(base
== FMTFLAG_oct
)
6352 else if(base
== FMTFLAG_hex
)
6353 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
6361 /* ?_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 */
6362 /* ?_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 */
6363 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
6364 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
6366 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6367 basic_string_char grouping_bstr
;
6368 const char *grouping
;
6370 int cur_group
= 0, group_size
= 0;
6371 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
6374 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
6376 /* Add separators to number */
6377 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6378 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6379 sep
= grouping
[0] ? numpunct_char_thousands_sep(numpunct
) : '\0';
6381 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
6383 if(group_size
== grouping
[cur_group
]) {
6385 if(grouping
[cur_group
+1])
6388 memmove(p
+1, p
, buf
+count
-p
);
6393 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6395 /* Display number with padding */
6396 if(count
>= base
->wide
)
6399 pad
= base
->wide
-count
;
6402 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
6403 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
6405 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
6406 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
6409 if(adjustfield
!= FMTFLAG_left
) {
6410 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6413 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
6414 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6417 /* ?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 */
6418 /* ?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 */
6419 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
6420 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
6421 (this, ret, dest, base, fill, v))
6422 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
6423 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6424 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6426 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6427 char fmt
[7]; /* strlen("%+#lld")+1 */
6429 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6431 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6432 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
6435 /* ?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 */
6436 /* ?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 */
6437 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
6438 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
6439 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
6441 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6442 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
6445 /* ?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 */
6446 /* ?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 */
6447 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
6448 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
6449 (this, ret, dest, base, fill, v))
6450 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
6451 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6452 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6454 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6455 char fmt
[7]; /* strlen("%+#lld")+1 */
6457 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6459 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6460 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
6463 /* ?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 */
6464 /* ?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 */
6465 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
6466 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
6467 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
6469 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6470 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
6473 /* ?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 */
6474 /* ?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 */
6475 /* ?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 */
6476 /* ?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 */
6477 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
6478 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6479 (this, ret, dest, base, fill, v))
6480 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
6481 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
6482 (this, ret, dest, base, fill, v))
6483 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
6484 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6485 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6488 char fmt
[8]; /* strlen("%+#.*lg")+1 */
6491 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6493 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
6494 size
= _scprintf(fmt
, base
->prec
, v
);
6496 /* TODO: don't use dynamic allocation */
6497 tmp
= MSVCRT_operator_new(size
*2);
6499 ERR("Out of memory\n");
6500 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6502 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
));
6503 MSVCRT_operator_delete(tmp
);
6507 /* ?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 */
6508 /* ?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 */
6509 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
6510 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
6511 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6513 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6514 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
6517 /* ?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 */
6518 /* ?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 */
6519 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
6520 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
6521 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
6523 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
6524 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
6527 /* ?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 */
6528 /* ?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 */
6529 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
6530 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
6531 (this, ret, dest, base, fill, v))
6532 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
6533 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6534 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6536 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
6538 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6540 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
6543 /* ?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 */
6544 /* ?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 */
6545 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
6546 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
6547 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
6549 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
6550 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
6553 /* ?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 */
6554 /* ?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 */
6555 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
6556 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
6557 (this, ret, dest, base, fill, v))
6558 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
6559 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6560 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6562 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6563 char fmt
[7]; /* strlen("%+#lld")+1 */
6565 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6567 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6568 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
6571 /* ?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 */
6572 /* ?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 */
6573 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
6574 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6575 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
6577 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6578 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
6581 /* ?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 */
6582 /* ?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 */
6583 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
6584 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
6585 (this, ret, dest, base, fill, v))
6586 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
6587 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6588 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6590 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
6591 char fmt
[7]; /* strlen("%+#lld")+1 */
6593 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6595 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
6596 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
6599 /* ?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 */
6600 /* ?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 */
6601 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
6602 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
6603 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
6605 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
6606 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
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@D_N@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@D_N@Z */
6611 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
6612 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
6613 (this, ret, dest, base, fill, v))
6614 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
6615 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6616 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6618 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6620 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6621 numpunct_char
*numpunct
= numpunct_char_use_facet(base
->loc
);
6622 basic_string_char str
;
6623 MSVCP_size_t pad
, len
;
6626 numpunct_char_truename(numpunct
, &str
);
6628 numpunct_char_falsename(numpunct
, &str
);
6630 len
= MSVCP_basic_string_char_length(&str
);
6631 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
6634 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
6635 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
6638 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
6639 MSVCP_basic_string_char_dtor(&str
);
6640 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
6643 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
6646 /* ?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 */
6647 /* ?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 */
6648 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
6649 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
6650 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
6652 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
6653 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
6656 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
6657 locale_id num_put_wchar_id
= {0};
6658 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
6659 locale_id num_put_short_id
= {0};
6661 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
6662 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
6663 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
6664 extern const vtable_ptr MSVCP_num_put_short_vtable
;
6666 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6667 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6668 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
6669 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
6671 TRACE("(%p %p)\n", this, locinfo
);
6672 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6675 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6676 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6677 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
6678 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6680 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
6682 locale_facet_ctor_refs(&this->facet
, refs
);
6683 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
6685 num_put_wchar__Init(this, locinfo
);
6689 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6690 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6691 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
6692 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6694 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
6695 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6699 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
6700 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
6701 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
6702 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6706 TRACE("(%p %lu)\n", this, refs
);
6708 _Locinfo_ctor(&locinfo
);
6709 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
6710 _Locinfo_dtor(&locinfo
);
6714 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
6715 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
6716 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
6717 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
6719 num_put_wchar_ctor_refs(this, refs
);
6720 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
6724 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
6725 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
6726 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
6727 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
6729 return num_put_wchar_ctor_refs(this, 0);
6732 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
6733 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
6734 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
6735 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
6737 return num_put_short_ctor_refs(this, 0);
6740 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
6741 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
6742 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
6743 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
6744 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
6745 void __thiscall
num_put_wchar_dtor(num_put
*this)
6747 TRACE("(%p)\n", this);
6748 locale_facet_dtor(&this->facet
);
6751 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
6752 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
6754 TRACE("(%p %x)\n", this, flags
);
6756 /* we have an array, with the number of elements stored before the first object */
6757 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6759 for(i
=*ptr
-1; i
>=0; i
--)
6760 num_put_wchar_dtor(this+i
);
6761 MSVCRT_operator_delete(ptr
);
6763 num_put_wchar_dtor(this);
6765 MSVCRT_operator_delete(this);
6771 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6772 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6773 static MSVCP_size_t
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
6775 TRACE("(%p %p)\n", facet
, loc
);
6777 if(facet
&& !*facet
) {
6780 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6782 ERR("Out of memory\n");
6783 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6787 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6788 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6789 _Locinfo_dtor(&locinfo
);
6795 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6796 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6797 static MSVCP_size_t
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
6799 TRACE("(%p %p)\n", facet
, loc
);
6801 if(facet
&& !*facet
) {
6804 *facet
= MSVCRT_operator_new(sizeof(num_put
));
6806 ERR("Out of memory\n");
6807 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6811 _Locinfo_ctor_cstr(&locinfo
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
6812 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
6813 _Locinfo_dtor(&locinfo
);
6819 num_put
* num_put_wchar_use_facet(const locale
*loc
)
6821 static num_put
*obj
= NULL
;
6824 const locale_facet
*fac
;
6826 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6827 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
6829 _Lockit_dtor(&lock
);
6830 return (num_put
*)fac
;
6834 _Lockit_dtor(&lock
);
6838 num_put_wchar__Getcat(&fac
, loc
);
6839 obj
= (num_put
*)fac
;
6840 locale_facet__Incref(&obj
->facet
);
6841 locale_facet_register(&obj
->facet
);
6842 _Lockit_dtor(&lock
);
6847 num_put
* num_put_short_use_facet(const locale
*loc
)
6849 static num_put
*obj
= NULL
;
6852 const locale_facet
*fac
;
6854 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6855 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
6857 _Lockit_dtor(&lock
);
6858 return (num_put
*)fac
;
6862 _Lockit_dtor(&lock
);
6866 num_put_short__Getcat(&fac
, loc
);
6867 obj
= (num_put
*)fac
;
6868 locale_facet__Incref(&obj
->facet
);
6869 locale_facet_register(&obj
->facet
);
6870 _Lockit_dtor(&lock
);
6875 /* ?_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 */
6876 /* ?_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 */
6877 /* ?_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 */
6878 /* ?_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 */
6879 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6880 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
6882 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
6884 for(; count
>0; count
--)
6885 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
6891 /* ?_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 */
6892 /* ?_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 */
6893 /* ?_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 */
6894 /* ?_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 */
6895 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6896 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
6901 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
6903 for(; count
>0; count
--) {
6904 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
6905 ostreambuf_iterator_wchar_put(&dest
, ch
);
6912 /* ?_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 */
6913 /* ?_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 */
6914 /* ?_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 */
6915 /* ?_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 */
6916 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6917 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
6919 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
6923 /* ?_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 */
6924 /* ?_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 */
6925 /* ?_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 */
6926 /* ?_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 */
6927 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6928 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
6930 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
6932 for(; count
>0; count
--)
6933 ostreambuf_iterator_wchar_put(&dest
, c
);
6939 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
6940 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6941 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
6942 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
6943 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
6945 int type
= fmtfl
& FMTFLAG_floatfield
;
6948 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
6951 if(fmtfl
& FMTFLAG_showpos
)
6953 if(fmtfl
& FMTFLAG_showbase
)
6960 if(type
== FMTFLAG_fixed
)
6962 else if(type
== FMTFLAG_scientific
)
6963 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
6964 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
6965 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
6967 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
6973 /* ?_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 */
6974 /* ?_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 */
6975 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6976 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
6977 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6979 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6980 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6984 /* ?_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 */
6985 /* ?_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 */
6986 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6987 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
6988 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
6990 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
6991 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
6995 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
6996 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
6997 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
6998 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7000 basic_string_char grouping_bstr
;
7001 const char *grouping
;
7002 char *p
, dec_point
= *localeconv()->decimal_point
;
7004 int cur_group
= 0, group_size
= 0;
7005 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7006 MSVCP_size_t i
, pad
;
7008 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7010 for(p
=buf
; p
<buf
+count
; p
++) {
7016 /* Add separators to number */
7017 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7018 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7019 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7021 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7023 if(group_size
== grouping
[cur_group
]) {
7025 if(grouping
[cur_group
+1])
7028 memmove(p
+1, p
, buf
+count
-p
);
7029 *p
= '\0'; /* mark thousands separator positions */
7033 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7035 /* Display number with padding */
7036 if(count
>= base
->wide
)
7039 pad
= base
->wide
-count
;
7042 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7043 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7046 if(adjustfield
!= FMTFLAG_left
) {
7047 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7051 for(i
=0; i
<count
; i
++) {
7052 if(buf
[i
] == dec_point
)
7053 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
7055 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7057 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7060 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7063 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
7064 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7065 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
7066 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7067 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7069 int base
= fmtfl
& FMTFLAG_basefield
;
7072 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7075 if(fmtfl
& FMTFLAG_showpos
)
7077 if(fmtfl
& FMTFLAG_showbase
)
7084 if(base
== FMTFLAG_oct
)
7086 else if(base
== FMTFLAG_hex
)
7087 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7095 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7096 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
7097 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
7099 basic_string_char grouping_bstr
;
7100 const char *grouping
;
7103 int cur_group
= 0, group_size
= 0;
7104 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7105 MSVCP_size_t i
, pad
;
7107 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7109 /* Add separators to number */
7110 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
7111 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7112 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
7114 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7116 if(group_size
== grouping
[cur_group
]) {
7118 if(grouping
[cur_group
+1])
7121 memmove(p
+1, p
, buf
+count
-p
);
7122 *p
= '\0'; /* mark thousands separator positions */
7126 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7128 /* Display number with padding */
7129 if(count
>= base
->wide
)
7132 pad
= base
->wide
-count
;
7135 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7136 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
7138 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7139 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
7142 if(adjustfield
!= FMTFLAG_left
) {
7143 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7147 for(i
=0; i
<count
; i
++) {
7149 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
7151 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
7154 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7157 /* ?_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 */
7158 /* ?_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 */
7159 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7160 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7162 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(base
->loc
));
7165 /* ?_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 */
7166 /* ?_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 */
7167 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7168 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
7170 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(base
->loc
));
7173 /* ?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 */
7174 /* ?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 */
7175 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
7176 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
7177 (this, ret, dest, base, fill, v))
7178 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
7179 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7180 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7182 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7183 char fmt
[7]; /* strlen("%+#lld")+1 */
7185 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7187 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7188 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7191 /* ?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 */
7192 /* ?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 */
7193 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
7194 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7195 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7197 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7198 char fmt
[7]; /* strlen("%+#lld")+1 */
7200 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7202 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7203 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7206 /* ?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 */
7207 /* ?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 */
7208 /* ?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 */
7209 /* ?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 */
7210 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
7211 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7212 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
7214 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7215 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
7218 /* ?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 */
7219 /* ?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 */
7220 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
7221 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
7222 (this, ret, dest, base, fill, v))
7223 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
7224 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7225 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7227 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7228 char fmt
[7]; /* strlen("%+#lld")+1 */
7230 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7232 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7233 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7236 /* ?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 */
7237 /* ?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 */
7238 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
7239 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7240 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7242 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7243 char fmt
[7]; /* strlen("%+#lld")+1 */
7245 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7247 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7248 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7251 /* ?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 */
7252 /* ?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 */
7253 /* ?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 */
7254 /* ?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 */
7255 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
7256 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7257 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
7259 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7260 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7263 /* ?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 */
7264 /* ?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 */
7265 /* ?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 */
7266 /* ?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 */
7267 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
7268 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7269 (this, ret, dest, base, fill, v))
7270 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
7271 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
7272 (this, ret, dest, base, fill, v))
7273 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
7274 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7275 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7278 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7281 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7283 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7284 size
= _scprintf(fmt
, base
->prec
, v
);
7286 /* TODO: don't use dynamic allocation */
7287 tmp
= MSVCRT_operator_new(size
*2);
7289 ERR("Out of memory\n");
7290 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7292 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7293 numpunct_wchar_use_facet(base
->loc
));
7294 MSVCRT_operator_delete(tmp
);
7298 /* ?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 */
7299 /* ?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 */
7300 /* ?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 */
7301 /* ?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 */
7302 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
7303 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7304 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7307 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7310 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7312 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7313 size
= _scprintf(fmt
, base
->prec
, v
);
7315 /* TODO: don't use dynamic allocation */
7316 tmp
= MSVCRT_operator_new(size
*2);
7318 ERR("Out of memory\n");
7319 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7321 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, base
->prec
, v
),
7322 numpunct_short_use_facet(base
->loc
));
7323 MSVCRT_operator_delete(tmp
);
7327 /* ?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 */
7328 /* ?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 */
7329 /* ?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 */
7330 /* ?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 */
7331 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
7332 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7333 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7335 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7336 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
7339 /* ?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 */
7340 /* ?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 */
7341 /* ?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 */
7342 /* ?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 */
7343 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
7344 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7345 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
7347 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7348 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7351 /* ?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 */
7352 /* ?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 */
7353 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
7354 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
7355 (this, ret, dest, base, fill, v))
7356 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
7357 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7358 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7360 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7362 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7364 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7367 /* ?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 */
7368 /* ?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 */
7369 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
7370 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7371 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7373 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7375 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7377 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7380 /* ?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 */
7381 /* ?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 */
7382 /* ?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 */
7383 /* ?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 */
7384 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
7385 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7386 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
7388 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7389 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7392 /* ?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 */
7393 /* ?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 */
7394 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
7395 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
7396 (this, ret, dest, base, fill, v))
7397 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
7398 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7399 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7401 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7402 char fmt
[7]; /* strlen("%+#lld")+1 */
7404 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7406 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7407 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7410 /* ?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 */
7411 /* ?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 */
7412 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
7413 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7414 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7416 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7417 char fmt
[7]; /* strlen("%+#lld")+1 */
7419 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7421 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7422 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7425 /* ?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 */
7426 /* ?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 */
7427 /* ?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 */
7428 /* ?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 */
7429 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
7430 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7431 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
7433 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7434 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7437 /* ?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 */
7438 /* ?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 */
7439 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
7440 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
7441 (this, ret, dest, base, fill, v))
7442 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
7443 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7444 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7446 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7447 char fmt
[7]; /* strlen("%+#lld")+1 */
7449 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7451 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
7452 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7455 /* ?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 */
7456 /* ?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 */
7457 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
7458 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7459 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7461 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7462 char fmt
[7]; /* strlen("%+#lld")+1 */
7464 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7466 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
7467 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7470 /* ?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 */
7471 /* ?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 */
7472 /* ?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 */
7473 /* ?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 */
7474 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
7475 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7476 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
7478 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7479 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7482 /* ?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 */
7483 /* ?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 */
7484 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
7485 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
7486 (this, ret, dest, base, fill, v))
7487 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
7488 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7489 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7491 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7493 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7494 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(base
->loc
);
7495 basic_string_wchar str
;
7496 MSVCP_size_t pad
, len
;
7499 numpunct_wchar_truename(numpunct
, &str
);
7501 numpunct_wchar_falsename(numpunct
, &str
);
7503 len
= MSVCP_basic_string_wchar_length(&str
);
7504 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7507 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7508 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7511 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7512 MSVCP_basic_string_wchar_dtor(&str
);
7513 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7516 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7519 /* ?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 */
7520 /* ?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 */
7521 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
7522 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7523 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7525 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7527 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7528 numpunct_wchar
*numpunct
= numpunct_short_use_facet(base
->loc
);
7529 basic_string_wchar str
;
7530 MSVCP_size_t pad
, len
;
7533 numpunct_wchar_truename(numpunct
, &str
);
7535 numpunct_wchar_falsename(numpunct
, &str
);
7537 len
= MSVCP_basic_string_wchar_length(&str
);
7538 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7541 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7542 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
7545 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
7546 MSVCP_basic_string_wchar_dtor(&str
);
7547 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
7550 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
7553 /* ?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 */
7554 /* ?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 */
7555 /* ?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 */
7556 /* ?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 */
7557 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
7558 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7559 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
7561 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7562 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7565 /* ??0_Locimp@locale@std@@AAE@_N@Z */
7566 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
7567 static locale__Locimp
* locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
7569 TRACE("(%p %d)\n", this, transparent
);
7571 memset(this, 0, sizeof(locale__Locimp
));
7572 locale_facet_ctor_refs(&this->facet
, 1);
7573 this->transparent
= transparent
;
7574 MSVCP_basic_string_char_ctor_cstr(&this->name
, "*");
7578 /* ??_F_Locimp@locale@std@@QAEXXZ */
7579 /* ??_F_Locimp@locale@std@@QEAAXXZ */
7580 static locale__Locimp
* locale__Locimp_ctor(locale__Locimp
*this)
7582 return locale__Locimp_ctor_transparent(this, FALSE
);
7585 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
7586 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
7587 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
7588 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
7593 TRACE("(%p %p)\n", this, copy
);
7595 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7596 memcpy(this, copy
, sizeof(locale__Locimp
));
7597 locale_facet_ctor_refs(&this->facet
, 1);
7598 if(copy
->facetvec
) {
7599 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
7600 if(!this->facetvec
) {
7601 _Lockit_dtor(&lock
);
7602 ERR("Out of memory\n");
7603 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7606 for(i
=0; i
<this->facet_cnt
; i
++)
7608 this->facetvec
[i
] = copy
->facetvec
[i
];
7609 if(this->facetvec
[i
])
7610 locale_facet__Incref(this->facetvec
[i
]);
7613 MSVCP_basic_string_char_copy_ctor(&this->name
, ©
->name
);
7614 _Lockit_dtor(&lock
);
7618 /* ??1_Locimp@locale@std@@MAE@XZ */
7619 /* ??1_Locimp@locale@std@@MEAA@XZ */
7620 static void locale__Locimp_dtor(locale__Locimp
*this)
7622 TRACE("(%p)\n", this);
7624 if(locale_facet__Decref(&this->facet
)) {
7626 for(i
=0; i
<this->facet_cnt
; i
++)
7627 if(this->facetvec
[i
] && locale_facet__Decref(this->facetvec
[i
]))
7628 call_locale_facet_vector_dtor(this->facetvec
[i
], 0);
7630 MSVCRT_operator_delete(this->facetvec
);
7631 MSVCP_basic_string_char_dtor(&this->name
);
7635 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
7636 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
7638 TRACE("(%p %x)\n", this, flags
);
7640 /* we have an array, with the number of elements stored before the first object */
7641 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7643 for(i
=*ptr
-1; i
>=0; i
--)
7644 locale__Locimp_dtor(this+i
);
7645 MSVCRT_operator_delete(ptr
);
7647 locale__Locimp_dtor(this);
7649 MSVCRT_operator_delete(this);
7655 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
7656 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
7657 static void locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
7661 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
7663 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7664 if(id
>= locimp
->facet_cnt
) {
7665 MSVCP_size_t new_size
= id
+1;
7666 locale_facet
**new_facetvec
;
7668 if(new_size
< locale_id__Id_cnt
+1)
7669 new_size
= locale_id__Id_cnt
+1;
7671 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
7673 _Lockit_dtor(&lock
);
7674 ERR("Out of memory\n");
7675 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7679 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
7680 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
7681 MSVCRT_operator_delete(locimp
->facetvec
);
7682 locimp
->facetvec
= new_facetvec
;
7683 locimp
->facet_cnt
= new_size
;
7686 if(locimp
->facetvec
[id
] && locale_facet__Decref(locimp
->facetvec
[id
]))
7687 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 0);
7689 locimp
->facetvec
[id
] = facet
;
7691 locale_facet__Incref(facet
);
7692 _Lockit_dtor(&lock
);
7695 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
7696 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
7697 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
7698 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
7700 locale__Locimp__Locimp_Addfac(this, facet
, id
);
7703 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7704 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7705 /* List of missing facets:
7706 * num_put, collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7708 static void locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7710 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7712 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
7716 ctype
= ctype_short_use_facet(loc
);
7718 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7720 ERR("Out of memory\n");
7721 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7723 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
7725 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
7728 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
7732 numget
= num_get_short_use_facet(loc
);
7734 numget
= MSVCRT_operator_new(sizeof(num_get
));
7736 ERR("Out of memory\n");
7737 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7739 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
7741 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
7744 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
7748 numput
= num_put_short_use_facet(loc
);
7750 numput
= MSVCRT_operator_new(sizeof(num_put
));
7752 ERR("Out of memory\n");
7753 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7755 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
7757 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
7760 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
7761 numpunct_wchar
*numpunct
;
7764 numpunct
= numpunct_short_use_facet(loc
);
7766 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7768 ERR("Out of memory\n");
7769 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7771 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7773 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
7776 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
7777 codecvt_wchar
*codecvt
;
7780 codecvt
= codecvt_short_use_facet(loc
);
7782 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7784 ERR("Out of memory\n");
7785 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7787 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
7789 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
7793 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7794 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7795 /* List of missing facets:
7796 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7798 static void locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7800 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7802 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
7806 ctype
= ctype_wchar_use_facet(loc
);
7808 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
7810 ERR("Out of memory\n");
7811 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7813 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
7815 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
7818 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
7822 numget
= num_get_wchar_use_facet(loc
);
7824 numget
= MSVCRT_operator_new(sizeof(num_get
));
7826 ERR("Out of memory\n");
7827 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7829 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
7831 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
7834 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
7838 numput
= num_put_wchar_use_facet(loc
);
7840 numput
= MSVCRT_operator_new(sizeof(num_put
));
7842 ERR("Out of memory\n");
7843 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7845 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
7847 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
7850 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
7851 numpunct_wchar
*numpunct
;
7854 numpunct
= numpunct_wchar_use_facet(loc
);
7856 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
7858 ERR("Out of memory\n");
7859 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7861 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7863 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
7866 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
7867 codecvt_wchar
*codecvt
;
7870 codecvt
= codecvt_wchar_use_facet(loc
);
7872 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
7874 ERR("Out of memory\n");
7875 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7877 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
7879 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
7883 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
7884 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7885 /* List of missing facets:
7886 * collate, messages, money_get, money_put, moneypunct, moneypunct, time_get, time_put
7888 static void locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7890 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
7892 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
7896 ctype
= ctype_char_use_facet(loc
);
7898 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
7900 ERR("Out of memory\n");
7901 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7903 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
7905 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
7908 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
7912 numget
= num_get_char_use_facet(loc
);
7914 numget
= MSVCRT_operator_new(sizeof(num_get
));
7916 ERR("Out of memory\n");
7917 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7919 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
7921 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
7924 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
7928 numput
= num_put_char_use_facet(loc
);
7930 numput
= MSVCRT_operator_new(sizeof(num_put
));
7932 ERR("Out of memory\n");
7933 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7935 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
7937 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
7940 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
7941 numpunct_char
*numpunct
;
7944 numpunct
= numpunct_char_use_facet(loc
);
7946 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
7948 ERR("Out of memory\n");
7949 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7951 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
7953 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
7956 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
7957 codecvt_char
*codecvt
;
7960 codecvt
= codecvt_char_use_facet(loc
);
7962 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
7964 ERR("Out of memory\n");
7965 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7967 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
7969 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
7973 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
7974 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
7975 static locale__Locimp
* locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
7977 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
7979 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
7980 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
7981 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
7983 locimp
->catmask
|= cat
;
7984 MSVCP_basic_string_char_copy_ctor(&locimp
->name
, &locinfo
->newlocname
);
7988 /* ??_7_Locimp@locale@std@@6B@ */
7989 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
7990 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
7993 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
7994 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
7995 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
7996 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
7998 TRACE("(%p %p)\n", this, locimp
);
7999 /* Don't change locimp reference counter */
8004 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
8005 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
8006 locale__Locimp
* __cdecl
locale__Init(void)
8012 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8014 _Lockit_dtor(&lock
);
8015 return global_locale
;
8018 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8019 if(!global_locale
) {
8020 _Lockit_dtor(&lock
);
8021 ERR("Out of memory\n");
8022 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8026 locale__Locimp_ctor(global_locale
);
8027 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
8028 MSVCP_basic_string_char_dtor(&global_locale
->name
);
8029 MSVCP_basic_string_char_ctor_cstr(&global_locale
->name
, "C");
8031 locale__Locimp__Clocptr
= global_locale
;
8032 global_locale
->facet
.refs
++;
8033 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
8034 _Lockit_dtor(&lock
);
8036 return global_locale
;
8039 /* ??0locale@std@@QAE@ABV01@0H@Z */
8040 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
8041 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
8042 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
8046 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
8048 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8050 ERR("Out of memory\n");
8051 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8053 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
8055 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, MSVCP_basic_string_char_c_str(&loc
->ptr
->name
));
8056 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, MSVCP_basic_string_char_c_str(&other
->ptr
->name
));
8057 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
8058 _Locinfo_dtor(&locinfo
);
8063 /* ??0locale@std@@QAE@ABV01@@Z */
8064 /* ??0locale@std@@QEAA@AEBV01@@Z */
8065 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
8066 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
8068 TRACE("(%p %p)\n", this, copy
);
8069 this->ptr
= copy
->ptr
;
8070 locale_facet__Incref(&this->ptr
->facet
);
8074 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
8075 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
8076 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
8077 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
8079 FIXME("(%p %p %s %d) stub\n", this, loc
, locname
, cat
);
8083 /* ??0locale@std@@QAE@PBDH@Z */
8084 /* ??0locale@std@@QEAA@PEBDH@Z */
8085 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
8086 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
8090 TRACE("(%p %s %d)\n", this, locname
, cat
);
8092 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8094 ERR("Out of memory\n");
8095 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8097 locale__Locimp_ctor(this->ptr
);
8101 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
8102 if(!memcmp(MSVCP_basic_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
8103 _Locinfo_dtor(&locinfo
);
8104 MSVCRT_operator_delete(this->ptr
);
8105 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
8108 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
8109 _Locinfo_dtor(&locinfo
);
8114 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
8115 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
8116 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
8117 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
8119 TRACE("(%p)\n", this);
8124 /* ??0locale@std@@QAE@XZ */
8125 /* ??0locale@std@@QEAA@XZ */
8126 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
8127 locale
* __thiscall
locale_ctor(locale
*this)
8129 TRACE("(%p)\n", this);
8130 this->ptr
= locale__Init();
8131 locale_facet__Incref(&this->ptr
->facet
);
8135 /* ??1locale@std@@QAE@XZ */
8136 /* ??1locale@std@@QEAA@XZ */
8137 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
8138 void __thiscall
locale_dtor(locale
*this)
8140 TRACE("(%p)\n", this);
8142 locale__Locimp_dtor(this->ptr
);
8145 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
8146 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
8147 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
8148 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
8150 FIXME("(%p %p) stub\n", this, loc
);
8154 /* ??8locale@std@@QBE_NABV01@@Z */
8155 /* ??8locale@std@@QEBA_NAEBV01@@Z */
8156 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
8157 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
8159 FIXME("(%p %p) stub\n", this, loc
);
8163 /* ??9locale@std@@QBE_NABV01@@Z */
8164 /* ??9locale@std@@QEBA_NAEBV01@@Z */
8165 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
8166 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
8168 FIXME("(%p %p) stub\n", this, loc
);
8172 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
8173 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
8174 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
8175 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
8177 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
8179 if(this->ptr
->facet
.refs
> 1) {
8180 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8182 ERR("Out of memory\n");
8183 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8186 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
8187 locale_facet__Decref(&this->ptr
->facet
);
8188 this->ptr
= new_ptr
;
8191 locale__Locimp__Addfac(this->ptr
, facet
, id
);
8194 MSVCP_basic_string_char_dtor(&this->ptr
->name
);
8195 MSVCP_basic_string_char_ctor_cstr(&this->ptr
->name
, "*");
8200 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
8201 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
8202 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
8203 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
8207 TRACE("(%p %lu)\n", this, id
);
8209 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
8210 if(fac
|| !this->ptr
->transparent
)
8213 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
8216 /* ?classic@locale@std@@SAABV12@XZ */
8217 /* ?classic@locale@std@@SAAEBV12@XZ */
8218 const locale
* __cdecl
locale_classic(void)
8222 return &classic_locale
;
8225 /* ?empty@locale@std@@SA?AV12@XZ */
8226 locale
* __cdecl
locale_empty(locale
*ret
)
8232 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
8234 ERR("Out of memory\n");
8235 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8237 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
8241 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8242 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
8243 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
8244 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
8246 TRACE( "(%p)\n", this);
8247 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
8251 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
8252 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
8253 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
8258 TRACE("(%p %p)\n", loc
, ret
);
8260 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8263 if(loc
->ptr
!= global_locale
) {
8264 locale_facet__Decref(&global_locale
->facet
);
8265 global_locale
= loc
->ptr
;
8266 locale_facet__Incref(&global_locale
->facet
);
8268 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
8269 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
8271 setlocale(i
, MSVCP_basic_string_char_c_str(&global_locale
->name
));
8274 _Lockit_dtor(&lock
);
8278 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@");
8279 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@");
8280 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@");
8281 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@");
8282 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@");
8283 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@");
8284 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@");
8285 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@");
8286 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@");
8287 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@");
8288 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@");
8289 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@");
8290 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@");
8291 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@");
8292 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@");
8293 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@@");
8294 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@@");
8295 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@@");
8296 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@@");
8297 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@@");
8298 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@@");
8301 void __asm_dummy_vtables(void) {
8303 __ASM_VTABLE(locale_facet
,
8304 VTABLE_ADD_FUNC(locale_facet_vector_dtor
));
8305 __ASM_VTABLE(collate_char
,
8306 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
8307 VTABLE_ADD_FUNC(collate_char_do_compare
)
8308 VTABLE_ADD_FUNC(collate_char_do_transform
)
8309 VTABLE_ADD_FUNC(collate_char_do_hash
));
8310 __ASM_VTABLE(collate_wchar
,
8311 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8312 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8313 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8314 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8315 __ASM_VTABLE(collate_short
,
8316 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
8317 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
8318 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
8319 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
8320 __ASM_VTABLE(ctype_base
,
8321 VTABLE_ADD_FUNC(ctype_base_vector_dtor
));
8322 __ASM_VTABLE(ctype_char
,
8323 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
8324 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
8325 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
8326 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
8327 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
8328 VTABLE_ADD_FUNC(ctype_char_do_widen
)
8329 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
8330 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
8331 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
));
8332 __ASM_VTABLE(ctype_wchar
,
8333 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8334 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8335 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8336 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8337 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8338 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8339 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8340 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8341 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8342 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8343 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8344 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8345 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8346 __ASM_VTABLE(ctype_short
,
8347 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
8348 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
8349 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
8350 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
8351 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
8352 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
8353 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
8354 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
8355 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
8356 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
8357 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
8358 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
8359 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
));
8360 __ASM_VTABLE(codecvt_base
,
8361 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
8362 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8363 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8364 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
8365 __ASM_VTABLE(codecvt_char
,
8366 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
8367 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
8368 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
8369 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8370 VTABLE_ADD_FUNC(codecvt_char_do_in
)
8371 VTABLE_ADD_FUNC(codecvt_char_do_out
)
8372 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
8373 VTABLE_ADD_FUNC(codecvt_char_do_length
));
8374 __ASM_VTABLE(codecvt_wchar
,
8375 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8376 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8377 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8378 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8379 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8380 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8381 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8382 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8383 __ASM_VTABLE(codecvt_short
,
8384 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
8385 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
8386 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
8387 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
8388 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
8389 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
8390 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
8391 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
8392 __ASM_VTABLE(numpunct_char
,
8393 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
8394 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
8395 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
8396 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
8397 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
8398 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
8399 __ASM_VTABLE(numpunct_wchar
,
8400 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8401 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8402 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8403 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8404 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8405 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8406 __ASM_VTABLE(numpunct_short
,
8407 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
8408 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
8409 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
8410 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
8411 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
8412 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
8413 __ASM_VTABLE(num_get_char
,
8414 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
8415 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
8416 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8417 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
8418 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
8419 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
8420 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
8421 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
8422 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
8423 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
8424 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
8425 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
8426 __ASM_VTABLE(num_get_short
,
8427 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8428 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
8429 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8430 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
8431 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
8432 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
8433 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
8434 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
8435 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
8436 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
8437 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
8438 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
8439 __ASM_VTABLE(num_get_wchar
,
8440 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
8441 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
8442 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8443 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
8444 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
8445 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
8446 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
8447 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
8448 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
8449 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
8450 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
8451 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
8452 __ASM_VTABLE(num_put_char
,
8453 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
8454 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
8455 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8456 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
8457 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
8458 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
8459 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
8460 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
8461 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
8462 __ASM_VTABLE(num_put_wchar
,
8463 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8464 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
8465 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8466 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
8467 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
8468 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
8469 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
8470 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
8471 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
8472 __ASM_VTABLE(num_put_short
,
8473 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
8474 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
8475 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8476 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
8477 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
8478 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
8479 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
8480 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
8481 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
8486 void init_locale(void *base
)
8489 init_locale_facet_rtti(base
);
8490 init_collate_char_rtti(base
);
8491 init_collate_wchar_rtti(base
);
8492 init_collate_short_rtti(base
);
8493 init_ctype_base_rtti(base
);
8494 init_ctype_char_rtti(base
);
8495 init_ctype_wchar_rtti(base
);
8496 init_ctype_short_rtti(base
);
8497 init_codecvt_base_rtti(base
);
8498 init_codecvt_char_rtti(base
);
8499 init_codecvt_wchar_rtti(base
);
8500 init_codecvt_short_rtti(base
);
8501 init_numpunct_char_rtti(base
);
8502 init_numpunct_wchar_rtti(base
);
8503 init_numpunct_short_rtti(base
);
8504 init_num_get_char_rtti(base
);
8505 init_num_get_wchar_rtti(base
);
8506 init_num_get_short_rtti(base
);
8507 init_num_put_char_rtti(base
);
8508 init_num_put_wchar_rtti(base
);
8509 init_num_put_short_rtti(base
);
8513 void free_locale(void)
8515 facets_elem
*iter
, *safe
;
8518 locale__Locimp_dtor(global_locale
);
8519 locale_dtor(&classic_locale
);
8522 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
8523 list_remove(&iter
->entry
);
8524 if(locale_facet__Decref(iter
->fac
))
8525 call_locale_facet_vector_dtor(iter
->fac
, 1);
8526 MSVCRT_operator_delete(iter
);