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
37 #include "wine/unicode.h"
38 #include "wine/list.h"
39 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
51 char* __cdecl
_Getdays(void);
52 wchar_t* __cdecl
_W_Getdays(void);
53 char* __cdecl
_Getmonths(void);
54 wchar_t* __cdecl
_W_Getmonths(void);
55 void* __cdecl
_Gettnames(void);
56 unsigned int __cdecl
___lc_codepage_func(void);
57 int __cdecl
___lc_collate_cp_func(void);
58 const unsigned short* __cdecl
__pctype_func(void);
59 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
60 MSVCP_size_t __cdecl
_Strftime(char*, MSVCP_size_t
, const char*,
61 const struct tm
*, struct __lc_time_data
*);
62 const locale
* __cdecl
locale_classic(void);
65 wchar_t ** __cdecl
___lc_locale_name_func(void);
67 LCID
* __cdecl
___lc_handle_func(void);
71 #define locale_string basic_string_char
72 #define locale_string_char_ctor(this) MSVCP_basic_string_char_ctor(this)
73 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
74 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
75 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
76 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
77 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
79 #define locale_string _Yarn_char
80 #define locale_string_char_ctor(this) _Yarn_char_ctor(this)
81 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
82 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
83 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
84 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
85 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
87 #define locale_string_wchar _Yarn_wchar
88 #define locale_string_wchar_ctor(this) _Yarn_wchar_ctor(this)
89 #define locale_string_wchar_dtor(this) _Yarn_wchar_dtor(this)
90 #define locale_string_wchar_c_str(this) _Yarn_wchar__C_str(this)
91 #define locale_string_wchar_assign(this,str) _Yarn_wchar_op_assign_cstr(this,str)
100 typedef struct _locale__Locimp
{
102 locale_facet
**facetvec
;
103 MSVCP_size_t facet_cnt
;
105 MSVCP_bool transparent
;
116 locale_string months
;
117 #if _MSVCP_VER >= 110
118 locale_string_wchar wdays
;
119 locale_string_wchar wmonths
;
121 locale_string oldlocname
;
122 locale_string newlocname
;
130 #if _MSVCP_VER >= 110
142 const char *grouping
;
145 const char *false_name
;
146 const char *true_name
;
151 const char *grouping
;
154 const wchar_t *false_name
;
155 const wchar_t *true_name
;
161 #if _MSVCP_VER <= 100
174 /* ?_Id_cnt@id@locale@std@@0HA */
175 int locale_id__Id_cnt
= 0;
177 static locale classic_locale
;
179 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
180 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
181 locale__Locimp
*global_locale
= NULL
;
183 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
184 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
185 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
187 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
189 if(this->strbuf
&& !this->got
) {
190 int c
= basic_streambuf_char_sgetc(this->strbuf
);
201 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
203 if(this->strbuf
&& !this->got
) {
204 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
215 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
217 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
222 istreambuf_iterator_char_val(this);
226 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
228 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
233 istreambuf_iterator_wchar_val(this);
237 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
239 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
243 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
245 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
249 /* ??1facet@locale@std@@UAE@XZ */
250 /* ??1facet@locale@std@@UEAA@XZ */
251 /* ??1facet@locale@std@@MAA@XZ */
252 /* ??1facet@locale@std@@MAE@XZ */
253 /* ??1facet@locale@std@@MEAA@XZ */
254 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
255 void __thiscall
locale_facet_dtor(locale_facet
*this)
257 TRACE("(%p)\n", this);
260 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
261 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
262 locale_facet*, (locale_facet*, unsigned int), (this, flags))
263 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
265 TRACE("(%p %x)\n", this, flags
);
267 /* we have an array, with the number of elements stored before the first object */
268 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
270 for(i
=*ptr
-1; i
>=0; i
--)
271 locale_facet_dtor(this+i
);
272 MSVCRT_operator_delete(ptr
);
274 locale_facet_dtor(this);
276 MSVCRT_operator_delete(this);
287 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
289 /* Not exported from msvcp90 */
290 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
291 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
292 void __cdecl
locale_facet_register(locale_facet
*add
)
294 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
296 ERR("Out of memory\n");
297 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
301 list_add_head(&lazy_facets
, &head
->entry
);
304 /* Not exported from msvcp90 */
305 /* ?_Register@facet@locale@std@@QAEXXZ */
306 /* ?_Register@facet@locale@std@@QEAAXXZ */
307 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
308 void __thiscall
locale_facet__Register(locale_facet
*this)
310 TRACE("(%p)\n", this);
311 locale_facet_register(this);
314 /* Not exported from msvcp90 */
315 /* ??_7facet@locale@std@@6B@ */
316 extern const vtable_ptr MSVCP_locale_facet_vtable
;
318 /* ??0id@locale@std@@QAE@I@Z */
319 /* ??0id@locale@std@@QEAA@_K@Z */
320 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
321 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
323 TRACE("(%p %lu)\n", this, id
);
329 /* ??_Fid@locale@std@@QAEXXZ */
330 /* ??_Fid@locale@std@@QEAAXXZ */
331 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
332 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
334 TRACE("(%p)\n", this);
340 /* ??Bid@locale@std@@QAEIXZ */
341 /* ??Bid@locale@std@@QEAA_KXZ */
342 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
343 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
347 TRACE("(%p)\n", this);
350 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
351 this->id
= ++locale_id__Id_cnt
;
358 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
359 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
360 int* __cdecl
locale_id__Id_cnt_func(void)
363 return &locale_id__Id_cnt
;
366 /* ??_Ffacet@locale@std@@QAEXXZ */
367 /* ??_Ffacet@locale@std@@QEAAXXZ */
368 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
369 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
371 TRACE("(%p)\n", this);
372 this->vtable
= &MSVCP_locale_facet_vtable
;
377 /* ??0facet@locale@std@@IAE@I@Z */
378 /* ??0facet@locale@std@@IEAA@_K@Z */
379 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
380 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
382 TRACE("(%p %lu)\n", this, refs
);
383 this->vtable
= &MSVCP_locale_facet_vtable
;
388 /* ?_Incref@facet@locale@std@@QAEXXZ */
389 /* ?_Incref@facet@locale@std@@QEAAXXZ */
390 /* ?_Incref@facet@locale@std@@UAEXXZ */
391 /* ?_Incref@facet@locale@std@@UEAAXXZ */
392 #if _MSVCP_VER >= 110
393 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
395 #define call_locale_facet__Incref locale_facet__Incref
397 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
398 void __thiscall
locale_facet__Incref(locale_facet
*this)
402 TRACE("(%p)\n", this);
404 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
409 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
410 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
411 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
412 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
413 #if _MSVCP_VER >= 110
414 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
415 locale_facet*, (locale_facet*), (this))
417 #define call_locale_facet__Decref locale_facet__Decref
419 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
420 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
425 TRACE("(%p)\n", this);
427 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
431 ret
= this->refs
? NULL
: this;
437 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
438 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
439 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
441 TRACE("(%p %p)\n", facet
, loc
);
445 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
446 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
447 MSVCP_size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
449 TRACE("(%p)\n", facet
);
453 /* ??0_Timevec@std@@QAE@ABV01@@Z */
454 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
455 /* This copy constructor modifies copied object */
456 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
457 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
459 TRACE("(%p %p)\n", this, copy
);
460 this->timeptr
= copy
->timeptr
;
461 copy
->timeptr
= NULL
;
465 /* ??0_Timevec@std@@QAE@PAX@Z */
466 /* ??0_Timevec@std@@QEAA@PEAX@Z */
467 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
468 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
470 TRACE("(%p %p)\n", this, timeptr
);
471 this->timeptr
= timeptr
;
475 /* ??_F_Timevec@std@@QAEXXZ */
476 /* ??_F_Timevec@std@@QEAAXXZ */
477 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
478 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
480 TRACE("(%p)\n", this);
481 this->timeptr
= NULL
;
485 /* ??1_Timevec@std@@QAE@XZ */
486 /* ??1_Timevec@std@@QEAA@XZ */
487 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
488 void __thiscall
_Timevec_dtor(_Timevec
*this)
490 TRACE("(%p)\n", this);
494 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
495 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
496 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
497 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
499 TRACE("(%p %p)\n", this, right
);
500 this->timeptr
= right
->timeptr
;
501 right
->timeptr
= NULL
;
505 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
506 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
507 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
508 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
510 TRACE("(%p)\n", this);
511 return this->timeptr
;
514 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
515 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
516 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
518 const char *locale
= NULL
;
520 /* This function is probably modifying more global objects */
521 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
524 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
526 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
527 locale_string_char_ctor(&locinfo
->days
);
528 locale_string_char_ctor(&locinfo
->months
);
529 #if _MSVCP_VER >= 110
530 locale_string_wchar_ctor(&locinfo
->wdays
);
531 locale_string_wchar_ctor(&locinfo
->wmonths
);
533 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
536 locale
= setlocale(LC_ALL
, locstr
);
538 locale
= setlocale(LC_ALL
, NULL
);
541 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
543 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
548 /* ??0_Locinfo@std@@QAE@HPBD@Z */
549 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
550 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
551 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
553 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
556 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
557 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
558 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
560 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
563 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
564 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
565 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
566 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
568 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
571 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
572 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
573 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
575 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
578 /* ??0_Locinfo@std@@QAE@PBD@Z */
579 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
580 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
581 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
583 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
586 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
587 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
588 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
590 TRACE("(%p)\n", locinfo
);
592 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
593 locale_string_char_dtor(&locinfo
->days
);
594 locale_string_char_dtor(&locinfo
->months
);
595 #if _MSVCP_VER >= 110
596 locale_string_wchar_dtor(&locinfo
->wdays
);
597 locale_string_wchar_dtor(&locinfo
->wmonths
);
599 locale_string_char_dtor(&locinfo
->oldlocname
);
600 locale_string_char_dtor(&locinfo
->newlocname
);
601 _Lockit_dtor(&locinfo
->lock
);
604 /* ??_F_Locinfo@std@@QAEXXZ */
605 /* ??_F_Locinfo@std@@QEAAXXZ */
606 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
607 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
609 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
612 /* ??1_Locinfo@std@@QAE@XZ */
613 /* ??1_Locinfo@std@@QEAA@XZ */
614 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
615 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
617 _Locinfo__Locinfo_dtor(this);
620 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
621 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
622 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
624 const char *locale
= NULL
;
626 /* This function is probably modifying more global objects */
627 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
629 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
631 locale_string_char_dtor(&locinfo
->newlocname
);
634 locale
= setlocale(LC_ALL
, locstr
);
636 locale
= setlocale(LC_ALL
, NULL
);
639 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
641 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
646 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
647 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
648 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
649 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
651 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
654 static _Collvec
* getcoll(_Collvec
*ret
)
658 ret
->page
= ___lc_collate_cp_func();
660 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
662 ret
->lc_name
= ___lc_locale_name_func()[LC_COLLATE
];
668 #if defined(__i386__) || _MSVCP_VER<110
669 ULONGLONG __cdecl
_Getcoll(void)
673 C_ASSERT(sizeof(_Collvec
) <= sizeof(ULONGLONG
));
675 getcoll((_Collvec
*)&ret
);
679 _Collvec
* __cdecl
_Getcoll(_Collvec
*ret
)
685 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
686 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
687 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
688 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
694 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
697 #if _MSVCP_VER >= 110
704 ret
->page
= ___lc_codepage_func();
706 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
708 if((name
= ___lc_locale_name_func()[LC_COLLATE
])) {
709 size
= wcslen(name
)+1;
710 ret
->name
= malloc(size
*sizeof(*name
));
711 if(!ret
->name
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
712 memcpy(ret
->name
, name
, size
*sizeof(*name
));
718 table
= malloc(sizeof(short[256]));
719 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
720 memcpy(table
, __pctype_func(), sizeof(short[256]));
725 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
726 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
727 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
728 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
730 return _Getctype(ret
);
735 ULONGLONG __cdecl
_Getcvt(void)
744 ret
.cvtvec
.page
= ___lc_codepage_func();
745 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
749 _Cvtvec
* __cdecl
_Getcvt(_Cvtvec
*ret
)
755 memset(ret
, 0, sizeof(*ret
));
756 ret
->page
= ___lc_codepage_func();
757 ret
->mb_max
= ___mb_cur_max_func();
759 if(ret
->mb_max
> 1) {
761 if(_ismbblead(i
)) ret
->isleadbyte
[i
/8] |= 1 << (i
&7);
767 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
768 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
769 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
770 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
773 ULONGLONG ull
= _Getcvt();
774 memcpy(ret
, &ull
, sizeof(ull
));
778 memcpy(ret
, &cvtvec
, sizeof(cvtvec
));
783 int __cdecl
_Getdateorder(void)
788 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
789 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
790 return DATEORDER_no_order
;
792 if(!GetLocaleInfoEx(___lc_locale_name_func()[LC_TIME
], LOCALE_ILDATE
,
793 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
794 return DATEORDER_no_order
;
797 if(*date_fmt
== '0') return DATEORDER_mdy
;
798 if(*date_fmt
== '1') return DATEORDER_dmy
;
799 if(*date_fmt
== '2') return DATEORDER_ymd
;
800 return DATEORDER_no_order
;
803 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
804 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
805 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
806 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
808 TRACE("(%p)\n", this);
809 return _Getdateorder();
812 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
813 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
814 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
815 const char* __thiscall
_Locinfo__Getdays(const _Locinfo
*this)
817 char *days
= _Getdays();
820 TRACE("(%p)\n", this);
823 locale_string_char_dtor((locale_string
*)&this->days
);
824 locale_string_char_ctor_cstr((locale_string
*)&this->days
, days
);
828 ret
= locale_string_char_c_str(&this->days
);
829 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
833 #if _MSVCP_VER >= 110
834 /* ?_W_Getdays@_Locinfo@std@@QBEPBGXZ */
835 /* ?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ */
836 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getdays
, 4)
837 const wchar_t* __thiscall
_Locinfo__W_Getdays(const _Locinfo
*this)
839 static const wchar_t defdays
[] =
841 ':','S','u','n',':','S','u','n','d','a','y',
842 ':','M','o','n',':','M','o','n','d','a','y',
843 ':','T','u','e',':','T','u','e','s','d','a','y',
844 ':','W','e','d',':','W','e','d','n','e','s','d','a','y',
845 ':','T','h','u',':','T','h','u','r','s','d','a','y',
846 ':','F','r','i',':','F','r','i','d','a','y',
847 ':','S','a','t',':','S','a','t','u','r','d','a','y'
849 wchar_t *wdays
= _W_Getdays();
852 TRACE("(%p)\n", this);
855 locale_string_wchar_assign((locale_string_wchar
*)&this->wdays
, wdays
);
859 ret
= locale_string_wchar_c_str(&this->wdays
);
860 if (!ret
[0]) ret
= defdays
;
864 /* ?_W_Getmonths@_Locinfo@std@@QBEPBGXZ */
865 /* ?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ */
866 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getmonths
, 4)
867 const wchar_t* __thiscall
_Locinfo__W_Getmonths(const _Locinfo
*this)
869 static const wchar_t defmonths
[] =
871 ':','J','a','n',':','J','a','n','u','a','r','y',
872 ':','F','e','b',':','F','e','b','r','u','a','r','y',
873 ':','M','a','r',':','M','a','r','c','h',
874 ':','A','p','r',':','A','p','r','i','l',
875 ':','M','a','y',':','M','a','y',
876 ':','J','u','n',':','J','u','n','e',
877 ':','J','u','l',':','J','u','l','y',
878 ':','A','u','g',':','A','u','g','u','s','t',
879 ':','S','e','p',':','S','e','p','t','e','m','b','e','r',
880 ':','O','c','t',':','O','c','t','o','b','e','r',
881 ':','N','o','v',':','N','o','v','e','m','b','e','r',
882 ':','D','e','c',':','D','e','c','e','m','b','e','r'
884 wchar_t *wmonths
= _W_Getmonths();
887 TRACE("(%p)\n", this);
890 locale_string_wchar_assign((locale_string_wchar
*)&this->wmonths
, wmonths
);
894 ret
= locale_string_wchar_c_str(&this->wmonths
);
895 if (!ret
[0]) ret
= defmonths
;
900 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
901 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
902 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
903 const char* __thiscall
_Locinfo__Getmonths(const _Locinfo
*this)
905 char *months
= _Getmonths();
908 TRACE("(%p)\n", this);
911 locale_string_char_dtor((locale_string
*)&this->months
);
912 locale_string_char_ctor_cstr((locale_string
*)&this->months
, months
);
916 ret
= locale_string_char_c_str(&this->months
);
917 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
918 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
922 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
923 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
924 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
925 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
927 TRACE("(%p)\n", this);
931 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
932 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
933 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
934 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
936 TRACE("(%p)\n", this);
940 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
941 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
942 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
943 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
945 TRACE("(%p)\n", this);
949 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
950 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
951 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
952 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
954 TRACE("(%p)\n", this);
956 _Timevec_ctor_timeptr(ret
, _Gettnames());
960 /* ?id@?$collate@D@std@@2V0locale@2@A */
961 locale_id collate_char_id
= {0};
963 /* ??_7?$collate@D@std@@6B@ */
964 extern const vtable_ptr MSVCP_collate_char_vtable
;
966 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
967 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
968 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
969 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
971 TRACE("(%p %p)\n", this, locinfo
);
972 _Locinfo__Getcoll(locinfo
, &this->coll
);
975 /* ??0?$collate@D@std@@IAE@PBDI@Z */
976 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
977 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
978 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
982 TRACE("(%p %s %lu)\n", this, name
, refs
);
984 locale_facet_ctor_refs(&this->facet
, refs
);
985 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
987 _Locinfo_ctor_cstr(&locinfo
, name
);
988 collate_char__Init(this, &locinfo
);
989 _Locinfo_dtor(&locinfo
);
993 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
994 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
995 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
996 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
998 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1000 locale_facet_ctor_refs(&this->facet
, refs
);
1001 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
1002 collate_char__Init(this, locinfo
);
1006 /* ??0?$collate@D@std@@QAE@I@Z */
1007 /* ??0?$collate@D@std@@QEAA@_K@Z */
1008 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
1009 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
1011 return collate_char_ctor_name(this, "C", refs
);
1014 /* ??1?$collate@D@std@@UAE@XZ */
1015 /* ??1?$collate@D@std@@UEAA@XZ */
1016 /* ??1?$collate@D@std@@MAE@XZ */
1017 /* ??1?$collate@D@std@@MEAA@XZ */
1018 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
1019 void __thiscall
collate_char_dtor(collate
*this)
1021 TRACE("(%p)\n", this);
1024 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
1025 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
1027 TRACE("(%p %x)\n", this, flags
);
1029 /* we have an array, with the number of elements stored before the first object */
1030 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1032 for(i
=*ptr
-1; i
>=0; i
--)
1033 collate_char_dtor(this+i
);
1034 MSVCRT_operator_delete(ptr
);
1036 collate_char_dtor(this);
1038 MSVCRT_operator_delete(this);
1044 /* ??_F?$collate@D@std@@QAEXXZ */
1045 /* ??_F?$collate@D@std@@QEAAXXZ */
1046 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
1047 collate
* __thiscall
collate_char_ctor(collate
*this)
1049 return collate_char_ctor_name(this, "C", 0);
1052 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1053 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1054 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1056 TRACE("(%p %p)\n", facet
, loc
);
1058 if(facet
&& !*facet
) {
1059 *facet
= MSVCRT_operator_new(sizeof(collate
));
1061 ERR("Out of memory\n");
1062 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1065 collate_char_ctor_name((collate
*)*facet
,
1066 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1072 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
1073 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1074 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
1076 return collate_char__Getcat(facet
, locale_classic());
1079 static collate
* collate_char_use_facet(const locale
*loc
)
1081 static collate
*obj
= NULL
;
1084 const locale_facet
*fac
;
1086 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1087 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
1089 _Lockit_dtor(&lock
);
1090 return (collate
*)fac
;
1094 _Lockit_dtor(&lock
);
1098 collate_char__Getcat(&fac
, loc
);
1099 obj
= (collate
*)fac
;
1100 call_locale_facet__Incref(&obj
->facet
);
1101 locale_facet_register(&obj
->facet
);
1102 _Lockit_dtor(&lock
);
1108 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
1109 const char *last2
, const _Collvec
*coll
)
1113 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
1115 #if _MSVCP_VER < 110
1116 lcid
= (coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
]);
1118 lcid
= LocaleNameToLCID(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
], 0);
1120 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1123 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
1124 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
1125 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
1126 #if _MSVCP_VER <= 100
1127 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1128 (const collate*, const char*, const char*, const char*, const char*), \
1129 (this, first1, last1, first2, last2))
1131 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1132 (const collate*, const char*, const char*, const char*, const char*), \
1133 (this, first1, last1, first2, last2))
1135 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
1136 const char *last1
, const char *first2
, const char *last2
)
1138 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1139 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
1142 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
1143 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
1144 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
1145 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1146 const char *last1
, const char *first2
, const char *last2
)
1148 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1149 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1152 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1153 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1154 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1155 #if _MSVCP_VER <= 100
1156 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1157 (const collate*, const char*, const char*), (this, first, last))
1159 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1160 (const collate*, const char*, const char*), (this, first, last))
1162 LONG __thiscall
collate_char_do_hash(const collate
*this,
1163 const char *first
, const char *last
)
1167 TRACE("(%p %p %p)\n", this, first
, last
);
1169 for(; first
<last
; first
++)
1170 ret
= (ret
<<8 | ret
>>24) + *first
;
1174 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1175 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1176 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1177 LONG __thiscall
collate_char_hash(const collate
*this,
1178 const char *first
, const char *last
)
1180 TRACE("(%p %p %p)\n", this, first
, last
);
1181 return call_collate_char_do_hash(this, first
, last
);
1184 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1185 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1186 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1187 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1188 basic_string_char
*ret
, const char *first
, const char *last
)
1190 FIXME("(%p %p %p) stub\n", this, first
, last
);
1194 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1195 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1196 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1197 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1198 basic_string_char
*ret
, const char *first
, const char *last
)
1200 FIXME("(%p %p %p) stub\n", this, first
, last
);
1204 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1205 locale_id collate_wchar_id
= {0};
1206 /* ?id@?$collate@G@std@@2V0locale@2@A */
1207 locale_id collate_short_id
= {0};
1209 /* ??_7?$collate@_W@std@@6B@ */
1210 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1211 /* ??_7?$collate@G@std@@6B@ */
1212 extern const vtable_ptr MSVCP_collate_short_vtable
;
1214 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1215 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1216 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1217 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1218 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1219 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1221 TRACE("(%p %p)\n", this, locinfo
);
1222 _Locinfo__Getcoll(locinfo
, &this->coll
);
1225 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1226 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1227 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1228 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1232 TRACE("(%p %s %lu)\n", this, name
, refs
);
1234 locale_facet_ctor_refs(&this->facet
, refs
);
1235 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1237 _Locinfo_ctor_cstr(&locinfo
, name
);
1238 collate_wchar__Init(this, &locinfo
);
1239 _Locinfo_dtor(&locinfo
);
1243 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1244 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1245 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1246 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1248 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1249 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1253 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1254 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1255 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1256 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1258 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1260 locale_facet_ctor_refs(&this->facet
, refs
);
1261 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1262 collate_wchar__Init(this, locinfo
);
1266 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1267 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1268 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1269 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1271 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1272 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1276 /* ??0?$collate@_W@std@@QAE@I@Z */
1277 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1278 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1279 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1281 return collate_wchar_ctor_name(this, "C", refs
);
1284 /* ??0?$collate@G@std@@QAE@I@Z */
1285 /* ??0?$collate@G@std@@QEAA@_K@Z */
1286 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1287 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1289 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1290 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1294 /* ??1?$collate@G@std@@UAE@XZ */
1295 /* ??1?$collate@G@std@@UEAA@XZ */
1296 /* ??1?$collate@_W@std@@MAE@XZ */
1297 /* ??1?$collate@_W@std@@MEAA@XZ */
1298 /* ??1?$collate@G@std@@MAE@XZ */
1299 /* ??1?$collate@G@std@@MEAA@XZ */
1300 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1301 void __thiscall
collate_wchar_dtor(collate
*this)
1303 TRACE("(%p)\n", this);
1306 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1307 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1309 TRACE("(%p %x)\n", this, flags
);
1311 /* we have an array, with the number of elements stored before the first object */
1312 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1314 for(i
=*ptr
-1; i
>=0; i
--)
1315 collate_wchar_dtor(this+i
);
1316 MSVCRT_operator_delete(ptr
);
1318 collate_wchar_dtor(this);
1320 MSVCRT_operator_delete(this);
1326 /* ??_F?$collate@_W@std@@QAEXXZ */
1327 /* ??_F?$collate@_W@std@@QEAAXXZ */
1328 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1329 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1331 return collate_wchar_ctor_name(this, "C", 0);
1334 /* ??_F?$collate@G@std@@QAEXXZ */
1335 /* ??_F?$collate@G@std@@QEAAXXZ */
1336 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1337 collate
* __thiscall
collate_short_ctor(collate
*this)
1339 collate
*ret
= collate_wchar_ctor(this);
1340 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1344 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1345 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1346 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1348 TRACE("(%p %p)\n", facet
, loc
);
1350 if(facet
&& !*facet
) {
1351 *facet
= MSVCRT_operator_new(sizeof(collate
));
1353 ERR("Out of memory\n");
1354 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1357 collate_wchar_ctor_name((collate
*)*facet
,
1358 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1364 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1365 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1366 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1368 return collate_wchar__Getcat(facet
, locale_classic());
1371 static collate
* collate_wchar_use_facet(const locale
*loc
)
1373 static collate
*obj
= NULL
;
1376 const locale_facet
*fac
;
1378 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1379 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1381 _Lockit_dtor(&lock
);
1382 return (collate
*)fac
;
1386 _Lockit_dtor(&lock
);
1390 collate_wchar__Getcat(&fac
, loc
);
1391 obj
= (collate
*)fac
;
1392 call_locale_facet__Incref(&obj
->facet
);
1393 locale_facet_register(&obj
->facet
);
1394 _Lockit_dtor(&lock
);
1399 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1400 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1401 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1403 if(facet
&& !*facet
) {
1404 collate_wchar__Getcat(facet
, loc
);
1405 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1411 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1412 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1413 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1415 return collate_short__Getcat(facet
, locale_classic());
1418 static collate
* collate_short_use_facet(const locale
*loc
)
1420 static collate
*obj
= NULL
;
1423 const locale_facet
*fac
;
1425 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1426 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1428 _Lockit_dtor(&lock
);
1429 return (collate
*)fac
;
1433 _Lockit_dtor(&lock
);
1437 collate_short__Getcat(&fac
, loc
);
1438 obj
= (collate
*)fac
;
1439 call_locale_facet__Incref(&obj
->facet
);
1440 locale_facet_register(&obj
->facet
);
1441 _Lockit_dtor(&lock
);
1447 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1448 const wchar_t *last2
, const _Collvec
*coll
)
1450 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1452 #if _MSVCP_VER < 110
1453 return CompareStringW(coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
],
1454 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1456 return CompareStringEx(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
],
1457 0, first1
, last1
-first1
, first2
, last2
-first2
, NULL
, NULL
, 0)-CSTR_EQUAL
;
1461 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1462 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1463 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1464 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1465 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1466 #if _MSVCP_VER <= 100
1467 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1468 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1469 (this, first1, last1, first2, last2))
1471 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1472 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1473 (this, first1, last1, first2, last2))
1475 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1476 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1478 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1479 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1482 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1483 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1484 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1485 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1486 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1487 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1488 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1490 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1491 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1494 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1495 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1496 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1497 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1498 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1499 #if _MSVCP_VER <= 100
1500 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1501 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1503 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1504 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1506 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1507 const wchar_t *first
, const wchar_t *last
)
1511 TRACE("(%p %p %p)\n", this, first
, last
);
1513 for(; first
<last
; first
++)
1514 ret
= (ret
<<8 | ret
>>24) + *first
;
1518 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1519 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1520 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1521 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1522 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1523 LONG __thiscall
collate_wchar_hash(const collate
*this,
1524 const wchar_t *first
, const wchar_t *last
)
1526 TRACE("(%p %p %p)\n", this, first
, last
);
1527 return call_collate_wchar_do_hash(this, first
, last
);
1530 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1531 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1532 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1533 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1534 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1535 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1536 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1538 FIXME("(%p %p %p) stub\n", this, first
, last
);
1542 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1543 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1544 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1545 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1546 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1547 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1548 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1550 FIXME("(%p %p %p) stub\n", this, first
, last
);
1554 /* ??_7ctype_base@std@@6B@ */
1555 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1557 /* ??0ctype_base@std@@QAE@I@Z */
1558 /* ??0ctype_base@std@@QEAA@_K@Z */
1559 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1560 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1562 TRACE("(%p %lu)\n", this, refs
);
1563 locale_facet_ctor_refs(&this->facet
, refs
);
1564 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1568 /* ??_Fctype_base@std@@QAEXXZ */
1569 /* ??_Fctype_base@std@@QEAAXXZ */
1570 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1571 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1573 TRACE("(%p)\n", this);
1574 locale_facet_ctor_refs(&this->facet
, 0);
1575 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1579 /* ??1ctype_base@std@@UAE@XZ */
1580 /* ??1ctype_base@std@@UEAA@XZ */
1581 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1582 void __thiscall
ctype_base_dtor(ctype_base
*this)
1584 TRACE("(%p)\n", this);
1587 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1588 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1590 TRACE("(%p %x)\n", this, flags
);
1592 /* we have an array, with the number of elements stored before the first object */
1593 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1595 for(i
=*ptr
-1; i
>=0; i
--)
1596 ctype_base_dtor(this+i
);
1597 MSVCRT_operator_delete(ptr
);
1599 ctype_base_dtor(this);
1601 MSVCRT_operator_delete(this);
1607 /* ?_Xran@ctype_base@std@@KAXXZ */
1608 void __cdecl
ctype_base__Xran(void)
1610 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1613 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1614 locale_id ctype_char_id
= {0};
1615 /* ?table_size@?$ctype@D@std@@2IB */
1616 /* ?table_size@?$ctype@D@std@@2_KB */
1617 MSVCP_size_t ctype_char_table_size
= 256;
1619 /* ??_7?$ctype@D@std@@6B@ */
1620 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1622 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1623 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1624 locale_id
* __cdecl
ctype_char__Id_func(void)
1627 return &ctype_char_id
;
1630 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1631 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1632 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1633 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1635 TRACE("(%p %p)\n", this, locinfo
);
1636 _Locinfo__Getctype(locinfo
, &this->ctype
);
1639 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1640 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1641 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1642 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1644 TRACE("(%p)\n", this);
1646 if(this->ctype
.delfl
)
1647 free((short*)this->ctype
.table
);
1648 #if _MSVCP_VER >= 110
1649 free(this->ctype
.name
);
1653 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1654 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1655 const short* __cdecl
ctype_char_classic_table(void)
1660 ctype
= ctype_char_use_facet( locale_classic() );
1661 return ctype
->ctype
.table
;
1664 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1665 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1666 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1667 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1668 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1670 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1671 ctype_base_ctor_refs(&this->base
, refs
);
1672 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1673 ctype_char__Init(this, locinfo
);
1677 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1678 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1679 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1680 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1681 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1685 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1687 ctype_base_ctor_refs(&this->base
, refs
);
1688 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1690 _Locinfo_ctor(&locinfo
);
1691 ctype_char__Init(this, &locinfo
);
1692 _Locinfo_dtor(&locinfo
);
1695 ctype_char__Tidy(this);
1696 this->ctype
.table
= table
;
1697 this->ctype
.delfl
= delete;
1702 /* ??_F?$ctype@D@std@@QAEXXZ */
1703 /* ??_F?$ctype@D@std@@QEAAXXZ */
1704 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1705 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1707 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1710 /* ??1?$ctype@D@std@@UAE@XZ */
1711 /* ??1?$ctype@D@std@@UEAA@XZ */
1712 /* ??1?$ctype@D@std@@MAE@XZ */
1713 /* ??1?$ctype@D@std@@MEAA@XZ */
1714 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1715 void __thiscall
ctype_char_dtor(ctype_char
*this)
1717 TRACE("(%p)\n", this);
1718 ctype_char__Tidy(this);
1721 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1722 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1724 TRACE("(%p %x)\n", this, flags
);
1726 /* we have an array, with the number of elements stored before the first object */
1727 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1729 for(i
=*ptr
-1; i
>=0; i
--)
1730 ctype_char_dtor(this+i
);
1731 MSVCRT_operator_delete(ptr
);
1733 ctype_char_dtor(this);
1735 MSVCRT_operator_delete(this);
1741 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1742 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1743 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1744 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1745 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1746 char, (const ctype_char*, char, char), (this, ch, unused))
1747 #elif _MSVCP_VER <= 100
1748 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1749 char, (const ctype_char*, char, char), (this, ch, unused))
1751 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1752 char, (const ctype_char*, char, char), (this, ch, unused))
1754 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1756 TRACE("(%p %c %c)\n", this, ch
, unused
);
1760 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1761 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1762 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1763 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1764 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1765 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1766 (this, first, last, unused, dest))
1767 #elif _MSVCP_VER <= 100
1768 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1769 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1770 (this, first, last, unused, dest))
1772 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1773 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1774 (this, first, last, unused, dest))
1776 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1777 const char *first
, const char *last
, char unused
, char *dest
)
1779 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1780 memcpy(dest
, first
, last
-first
);
1784 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1785 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1786 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1787 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1788 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1789 (this, first, last, unused, dest, size))
1790 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1791 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1793 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1794 memcpy_s(dest
, size
, first
, last
-first
);
1798 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1799 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1800 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1801 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1803 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1804 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1807 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1808 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1809 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1810 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1811 const char *first
, const char *last
, char dflt
, char *dest
)
1813 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1814 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1817 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1818 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1819 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1820 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1821 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1823 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1824 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1827 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1828 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1829 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1830 #if _MSVCP_VER <= 100
1831 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1832 char, (const ctype_char*, char), (this, ch))
1834 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1835 char, (const ctype_char*, char), (this, ch))
1837 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1839 TRACE("(%p %c)\n", this, ch
);
1843 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1844 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1845 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1846 #if _MSVCP_VER <= 100
1847 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1848 const char*, (const ctype_char*, const char*, const char*, char*), \
1849 (this, first, last, dest))
1851 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1852 const char*, (const ctype_char*, const char*, const char*, char*), \
1853 (this, first, last, dest))
1855 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1856 const char *first
, const char *last
, char *dest
)
1858 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1859 memcpy(dest
, first
, last
-first
);
1863 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1864 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1865 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1866 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1867 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1868 (this, first, last, dest, size))
1869 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1870 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1872 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1873 memcpy_s(dest
, size
, first
, last
-first
);
1877 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1878 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1879 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1880 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1882 TRACE("(%p %c)\n", this, ch
);
1883 return call_ctype_char_do_widen_ch(this, ch
);
1886 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1887 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1888 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1889 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1890 const char *first
, const char *last
, char *dest
)
1892 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1893 return call_ctype_char_do_widen(this, first
, last
, dest
);
1896 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1897 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1898 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1899 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1900 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1902 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1903 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1906 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1907 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1908 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1910 TRACE("(%p %p)\n", facet
, loc
);
1912 if(facet
&& !*facet
) {
1915 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1917 ERR("Out of memory\n");
1918 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1922 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1923 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1924 _Locinfo_dtor(&locinfo
);
1930 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1931 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1932 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1934 return ctype_char__Getcat(facet
, locale_classic());
1937 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1939 static ctype_char
*obj
= NULL
;
1942 const locale_facet
*fac
;
1944 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1945 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1947 _Lockit_dtor(&lock
);
1948 return (ctype_char
*)fac
;
1952 _Lockit_dtor(&lock
);
1956 ctype_char__Getcat(&fac
, loc
);
1957 obj
= (ctype_char
*)fac
;
1958 call_locale_facet__Incref(&obj
->base
.facet
);
1959 locale_facet_register(&obj
->base
.facet
);
1960 _Lockit_dtor(&lock
);
1966 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1970 TRACE("%d %p\n", ch
, ctype
);
1975 cp
= ___lc_codepage_func();
1977 /* Don't convert to unicode in case of C locale */
1979 if(ch
>='A' && ch
<='Z')
1988 str
[0] = (ch
>>8) & 255;
1996 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1999 lower
= tolowerW(wide
);
2003 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
2005 return str
[0] + (str
[1]<<8);
2009 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
2010 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
2011 #if _MSVCP_VER <= 100
2012 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
2013 char, (const ctype_char*, char), (this, ch))
2015 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2016 char, (const ctype_char*, char), (this, ch))
2018 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
2019 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
2021 TRACE("(%p %c)\n", this, ch
);
2022 return _Tolower(ch
, &this->ctype
);
2025 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
2026 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2027 #if _MSVCP_VER <= 100
2028 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
2029 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2031 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
2032 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2034 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
2035 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
2037 TRACE("(%p %p %p)\n", this, first
, last
);
2038 for(; first
<last
; first
++)
2039 *first
= _Tolower(*first
, &this->ctype
);
2043 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
2044 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
2045 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
2046 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
2048 TRACE("(%p %c)\n", this, ch
);
2049 return call_ctype_char_do_tolower_ch(this, ch
);
2052 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
2053 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2054 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
2055 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
2057 TRACE("(%p %p %p)\n", this, first
, last
);
2058 return call_ctype_char_do_tolower(this, first
, last
);
2062 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
2066 TRACE("%d %p\n", ch
, ctype
);
2071 cp
= ___lc_codepage_func();
2073 /* Don't convert to unicode in case of C locale */
2075 if(ch
>='a' && ch
<='z')
2084 str
[0] = (ch
>>8) & 255;
2092 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
2095 upper
= toupperW(wide
);
2099 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
2101 return str
[0] + (str
[1]<<8);
2105 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
2106 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
2107 #if _MSVCP_VER <= 100
2108 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2109 char, (const ctype_char*, char), (this, ch))
2111 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2112 char, (const ctype_char*, char), (this, ch))
2114 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
2115 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
2117 TRACE("(%p %c)\n", this, ch
);
2118 return _Toupper(ch
, &this->ctype
);
2121 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
2122 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2123 #if _MSVCP_VER <= 100
2124 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
2125 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2127 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
2128 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2130 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
2131 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
2132 char *first
, const char *last
)
2134 TRACE("(%p %p %p)\n", this, first
, last
);
2135 for(; first
<last
; first
++)
2136 *first
= _Toupper(*first
, &this->ctype
);
2140 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
2141 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
2142 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
2143 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
2145 TRACE("(%p %c)\n", this, ch
);
2146 return call_ctype_char_do_toupper_ch(this, ch
);
2149 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2150 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2151 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2152 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2154 TRACE("(%p %p %p)\n", this, first
, last
);
2155 return call_ctype_char_do_toupper(this, first
, last
);
2158 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2159 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2160 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2161 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2163 TRACE("(%p %x %c)\n", this, mask
, ch
);
2164 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2167 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2168 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2169 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2170 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2172 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2173 for(; first
<last
; first
++)
2174 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2178 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2179 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2180 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2181 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2183 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2184 for(; first
<last
; first
++)
2185 if(!ctype_char_is_ch(this, mask
, *first
))
2190 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2191 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2192 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2193 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2195 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2196 for(; first
<last
; first
++)
2197 if(ctype_char_is_ch(this, mask
, *first
))
2202 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2203 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2204 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2205 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2207 TRACE("(%p)\n", this);
2208 return this->ctype
.table
;
2211 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2212 locale_id ctype_wchar_id
= {0};
2213 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2214 locale_id ctype_short_id
= {0};
2216 /* ??_7?$ctype@_W@std@@6B@ */
2217 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2218 /* ??_7?$ctype@G@std@@6B@ */
2219 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2221 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2222 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2223 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2226 return &ctype_wchar_id
;
2229 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2230 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2231 locale_id
* __cdecl
ctype_short__Id_func(void)
2234 return &ctype_short_id
;
2237 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2238 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2239 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2240 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2241 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2242 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2244 TRACE("(%p %p)\n", this, locinfo
);
2245 _Locinfo__Getctype(locinfo
, &this->ctype
);
2246 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2249 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2250 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2251 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2252 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2253 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2255 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2256 ctype_base_ctor_refs(&this->base
, refs
);
2257 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2258 ctype_wchar__Init(this, locinfo
);
2262 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2263 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2264 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2265 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2266 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2268 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2269 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2273 /* ??0?$ctype@_W@std@@QAE@I@Z */
2274 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2275 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2276 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2280 TRACE("(%p %lu)\n", this, refs
);
2282 ctype_base_ctor_refs(&this->base
, refs
);
2283 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2285 _Locinfo_ctor(&locinfo
);
2286 ctype_wchar__Init(this, &locinfo
);
2287 _Locinfo_dtor(&locinfo
);
2291 /* ??0?$ctype@G@std@@QAE@I@Z */
2292 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2293 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2294 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2296 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2297 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2301 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2302 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2303 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2304 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2305 const char *name
, MSVCP_size_t refs
)
2309 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2311 ctype_base_ctor_refs(&this->base
, refs
);
2312 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2314 _Locinfo_ctor_cstr(&locinfo
, name
);
2315 ctype_wchar__Init(this, &locinfo
);
2316 _Locinfo_dtor(&locinfo
);
2320 /* ??_F?$ctype@_W@std@@QAEXXZ */
2321 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2322 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2323 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2325 TRACE("(%p)\n", this);
2326 return ctype_short_ctor_refs(this, 0);
2329 /* ??_F?$ctype@G@std@@QAEXXZ */
2330 /* ??_F?$ctype@G@std@@QEAAXXZ */
2331 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2332 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2334 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2335 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2339 /* ??1?$ctype@G@std@@UAE@XZ */
2340 /* ??1?$ctype@G@std@@UEAA@XZ */
2341 /* ??1?$ctype@_W@std@@MAE@XZ */
2342 /* ??1?$ctype@_W@std@@MEAA@XZ */
2343 /* ??1?$ctype@G@std@@MAE@XZ */
2344 /* ??1?$ctype@G@std@@MEAA@XZ */
2345 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2346 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2348 TRACE("(%p)\n", this);
2349 if(this->ctype
.delfl
)
2350 free((void*)this->ctype
.table
);
2351 #if _MSVCP_VER >= 110
2352 free(this->ctype
.name
);
2356 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2357 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2359 TRACE("(%p %x)\n", this, flags
);
2361 /* we have an array, with the number of elements stored before the first object */
2362 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2364 for(i
=*ptr
-1; i
>=0; i
--)
2365 ctype_wchar_dtor(this+i
);
2366 MSVCRT_operator_delete(ptr
);
2368 ctype_wchar_dtor(this);
2370 MSVCRT_operator_delete(this);
2377 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, _Mbstatet
*state
, const _Cvtvec
*cvt
)
2382 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2387 cp
= ___lc_codepage_func();
2399 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2408 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2409 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2410 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2411 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2412 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2413 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2415 char buf
[MB_LEN_MAX
];
2417 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2419 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2422 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2423 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2424 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2425 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2426 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2427 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2428 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2429 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2430 #elif _MSVCP_VER <= 100
2431 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2432 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2434 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2435 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2437 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2439 return ctype_wchar__Donarrow(this, ch
, dflt
);
2442 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2443 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2444 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2445 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2446 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2447 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2448 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2449 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2450 (this, first, last, dflt, dest))
2451 #elif _MSVCP_VER <= 100
2452 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2453 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2454 (this, first, last, dflt, dest))
2456 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2457 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2458 (this, first, last, dflt, dest))
2460 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2461 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2463 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2464 for(; first
<last
; first
++)
2465 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2469 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2470 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2471 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2472 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2473 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2474 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2475 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2476 (this, first, last, dflt, dest, size))
2477 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2478 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2480 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2481 /* This function converts all multi-byte characters to dflt,
2482 * thanks to it result size is known before converting */
2483 if(last
-first
> size
)
2485 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2488 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2489 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2490 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2491 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2492 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2493 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2495 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2496 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2499 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2500 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2501 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2502 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2503 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2504 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2505 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2507 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2508 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2511 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2512 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2513 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2514 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2515 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2516 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2517 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2519 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2520 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2524 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, _Mbstatet
*state
, const _Cvtvec
*cvt
)
2530 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2538 cp
= ___lc_codepage_func();
2542 *out
= (unsigned char)*in
;
2544 memset(state
, 0, sizeof(*state
));
2548 if(MBSTATET_TO_INT(state
)) {
2549 ((char*)&MBSTATET_TO_INT(state
))[1] = *in
;
2551 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)&MBSTATET_TO_INT(state
), 2, out
, out
? 1 : 0)) {
2552 memset(state
, 0, sizeof(*state
));
2557 memset(state
, 0, sizeof(*state
));
2561 GetCPInfo(cp
, &cp_info
);
2563 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2564 if(!cp_info
.LeadByte
[i
+1])
2566 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2574 MBSTATET_TO_INT(state
) = (unsigned char)*in
;
2578 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2585 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2592 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2597 memset(&state
, 0, sizeof(state
));
2598 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2601 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2602 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2603 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2604 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2605 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2606 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2611 TRACE("(%p %d)\n", this, ch
);
2613 memset(&state
, 0, sizeof(state
));
2614 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2617 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2618 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2619 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2620 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2621 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2622 #if _MSVCP_VER <= 100
2623 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2624 wchar_t, (const ctype_wchar*, char), (this, ch))
2626 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2627 wchar_t, (const ctype_wchar*, char), (this, ch))
2629 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2631 return ctype_wchar__Dowiden(this, ch
);
2634 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2635 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2636 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2637 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2638 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2639 #if _MSVCP_VER <= 100
2640 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2641 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2642 (this, first, last, dest))
2644 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2645 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2646 (this, first, last, dest))
2648 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2649 const char *first
, const char *last
, wchar_t *dest
)
2651 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2652 for(; first
<last
; first
++)
2653 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2657 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2658 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2659 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2660 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2661 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2662 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2663 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2664 (this, first, last, dest, size))
2665 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2666 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2668 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2669 /* This function converts all multi-byte characters to WEOF,
2670 * thanks to it result size is known before converting */
2671 if(size
< last
-first
)
2673 return ctype_wchar_do_widen(this, first
, last
, dest
);
2676 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2677 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2678 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2679 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2680 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2681 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2683 TRACE("(%p %d)\n", this, ch
);
2684 return call_ctype_wchar_do_widen_ch(this, ch
);
2687 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2688 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2689 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2690 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2691 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2692 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2693 const char *first
, const char *last
, wchar_t *dest
)
2695 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2696 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2699 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2700 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2701 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2702 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2703 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2704 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2705 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2707 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2708 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2711 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2712 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2713 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2715 TRACE("(%p %p)\n", facet
, loc
);
2717 if(facet
&& !*facet
) {
2720 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2722 ERR("Out of memory\n");
2723 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2727 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2728 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2729 _Locinfo_dtor(&locinfo
);
2735 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2736 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2737 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2739 return ctype_wchar__Getcat(facet
, locale_classic());
2742 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2743 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2744 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2746 if(facet
&& !*facet
) {
2747 ctype_wchar__Getcat(facet
, loc
);
2748 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2754 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2755 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2756 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2758 return ctype_short__Getcat(facet
, locale_classic());
2762 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2764 TRACE("(%d %p)\n", ch
, ctype
);
2765 return tolowerW(ch
);
2768 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2770 static ctype_wchar
*obj
= NULL
;
2773 const locale_facet
*fac
;
2775 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2776 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2778 _Lockit_dtor(&lock
);
2779 return (ctype_wchar
*)fac
;
2783 _Lockit_dtor(&lock
);
2787 ctype_wchar__Getcat(&fac
, loc
);
2788 obj
= (ctype_wchar
*)fac
;
2789 call_locale_facet__Incref(&obj
->base
.facet
);
2790 locale_facet_register(&obj
->base
.facet
);
2791 _Lockit_dtor(&lock
);
2796 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2798 static ctype_wchar
*obj
= NULL
;
2801 const locale_facet
*fac
;
2803 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2804 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2806 _Lockit_dtor(&lock
);
2807 return (ctype_wchar
*)fac
;
2811 _Lockit_dtor(&lock
);
2815 ctype_short__Getcat(&fac
, loc
);
2816 obj
= (ctype_wchar
*)fac
;
2817 call_locale_facet__Incref(&obj
->base
.facet
);
2818 locale_facet_register(&obj
->base
.facet
);
2819 _Lockit_dtor(&lock
);
2824 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2825 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2826 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2827 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2828 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2829 #if _MSVCP_VER <= 100
2830 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2831 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2833 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2834 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2836 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2838 return _Towlower(ch
, &this->ctype
);
2841 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2842 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2843 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2844 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2845 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2846 #if _MSVCP_VER <= 100
2847 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2848 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2849 (this, first, last))
2851 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2852 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2853 (this, first, last))
2855 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2856 wchar_t *first
, const wchar_t *last
)
2858 TRACE("(%p %p %p)\n", this, first
, last
);
2859 for(; first
<last
; first
++)
2860 *first
= _Towlower(*first
, &this->ctype
);
2864 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2865 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2866 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2867 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2868 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2869 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2871 TRACE("(%p %d)\n", this, ch
);
2872 return call_ctype_wchar_do_tolower_ch(this, ch
);
2875 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2876 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2877 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2878 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2879 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2880 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2881 wchar_t *first
, const wchar_t *last
)
2883 TRACE("(%p %p %p)\n", this, first
, last
);
2884 return call_ctype_wchar_do_tolower(this, first
, last
);
2888 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2890 TRACE("(%d %p)\n", ch
, ctype
);
2891 return toupperW(ch
);
2894 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2895 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2896 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2897 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2898 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2899 #if _MSVCP_VER <= 100
2900 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2901 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2903 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2904 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2906 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2908 return _Towupper(ch
, &this->ctype
);
2911 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2912 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2913 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2914 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2915 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2916 #if _MSVCP_VER <= 100
2917 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2918 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2919 (this, first, last))
2921 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2922 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2923 (this, first, last))
2925 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2926 wchar_t *first
, const wchar_t *last
)
2928 TRACE("(%p %p %p)\n", this, first
, last
);
2929 for(; first
<last
; first
++)
2930 *first
= _Towupper(*first
, &this->ctype
);
2934 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2935 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2936 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2937 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2938 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2939 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2941 TRACE("(%p %d)\n", this, ch
);
2942 return call_ctype_wchar_do_toupper_ch(this, ch
);
2945 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2946 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2947 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2948 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2949 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2950 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2951 wchar_t *first
, const wchar_t *last
)
2953 TRACE("(%p %p %p)\n", this, first
, last
);
2954 return call_ctype_wchar_do_toupper(this, first
, last
);
2958 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2959 short *mask
, const _Ctypevec
*ctype
)
2961 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2962 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2967 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2970 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2974 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2975 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2976 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2977 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2978 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2979 #if _MSVCP_VER <= 100
2980 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2981 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2983 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2984 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2986 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2988 TRACE("(%p %x %d)\n", this, mask
, ch
);
2989 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2992 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2993 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2994 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2995 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2996 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2997 #if _MSVCP_VER <= 100
2998 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2999 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
3000 (this, first, last, dest))
3002 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
3003 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
3004 (this, first, last, dest))
3006 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
3007 const wchar_t *first
, const wchar_t *last
, short *dest
)
3009 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3010 return _Getwctypes(first
, last
, dest
, &this->ctype
);
3013 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
3014 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
3015 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
3016 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
3017 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
3018 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
3020 TRACE("(%p %x %d)\n", this, mask
, ch
);
3021 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
3024 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
3025 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
3026 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
3027 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
3028 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
3029 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
3030 const wchar_t *first
, const wchar_t *last
, short *dest
)
3032 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3033 return call_ctype_wchar_do_is(this, first
, last
, dest
);
3036 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3037 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3038 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
3039 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3040 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
3041 #if _MSVCP_VER <= 100
3042 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
3043 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3044 (this, mask, first, last))
3046 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
3047 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3048 (this, mask, first, last))
3050 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
3051 short mask
, const wchar_t *first
, const wchar_t *last
)
3053 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
3054 for(; first
<last
; first
++)
3055 if(!ctype_wchar_is_ch(this, mask
, *first
))
3060 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3061 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3062 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
3063 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3064 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
3065 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
3066 short mask
, const wchar_t *first
, const wchar_t *last
)
3068 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3069 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
3072 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3073 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3074 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
3075 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3076 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
3077 #if _MSVCP_VER <= 100
3078 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
3079 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3080 (this, mask, first, last))
3082 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
3083 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3084 (this, mask, first, last))
3086 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
3087 short mask
, const wchar_t *first
, const wchar_t *last
)
3089 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3090 for(; first
<last
; first
++)
3091 if(ctype_wchar_is_ch(this, mask
, *first
))
3096 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3097 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3098 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
3099 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3100 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
3101 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
3102 short mask
, const wchar_t *first
, const wchar_t *last
)
3104 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3105 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
3108 /* ??_7codecvt_base@std@@6B@ */
3109 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
3111 /* ??0codecvt_base@std@@QAE@I@Z */
3112 /* ??0codecvt_base@std@@QEAA@_K@Z */
3113 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
3114 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
3116 TRACE("(%p %lu)\n", this, refs
);
3117 locale_facet_ctor_refs(&this->facet
, refs
);
3118 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
3122 /* ??_Fcodecvt_base@std@@QAEXXZ */
3123 /* ??_Fcodecvt_base@std@@QEAAXXZ */
3124 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
3125 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
3127 return codecvt_base_ctor_refs(this, 0);
3130 /* ??1codecvt_base@std@@UAE@XZ */
3131 /* ??1codecvt_base@std@@UEAA@XZ */
3132 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
3133 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
3135 TRACE("(%p)\n", this);
3136 locale_facet_dtor(&this->facet
);
3139 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
3140 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
3142 TRACE("(%p %x)\n", this, flags
);
3144 /* we have an array, with the number of elements stored before the first object */
3145 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3147 for(i
=*ptr
-1; i
>=0; i
--)
3148 codecvt_base_dtor(this+i
);
3149 MSVCRT_operator_delete(ptr
);
3151 codecvt_base_dtor(this);
3153 MSVCRT_operator_delete(this);
3159 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3160 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3161 #if _MSVCP_VER <= 100
3162 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3163 MSVCP_bool, (const codecvt_base*), (this))
3165 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3166 MSVCP_bool, (const codecvt_base*), (this))
3168 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3169 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3171 TRACE("(%p)\n", this);
3172 return _MSVCP_VER
<= 100;
3175 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3176 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3177 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3178 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3180 TRACE("(%p)\n", this);
3181 return call_codecvt_base_do_always_noconv(this);
3184 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3185 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3186 #if _MSVCP_VER <= 100
3187 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3188 int, (const codecvt_base*), (this))
3190 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3191 int, (const codecvt_base*), (this))
3193 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3194 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3196 TRACE("(%p)\n", this);
3200 /* ?max_length@codecvt_base@std@@QBEHXZ */
3201 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3202 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3203 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3205 TRACE("(%p)\n", this);
3206 return call_codecvt_base_do_max_length(this);
3209 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3210 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3211 #if _MSVCP_VER <= 100
3212 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3213 int, (const codecvt_base*), (this))
3215 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3216 int, (const codecvt_base*), (this))
3218 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3219 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3221 TRACE("(%p)\n", this);
3225 /* ?encoding@codecvt_base@std@@QBEHXZ */
3226 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3227 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3228 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3230 TRACE("(%p)\n", this);
3231 return call_codecvt_base_do_encoding(this);
3234 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3235 locale_id codecvt_char_id
= {0};
3237 /* ??_7?$codecvt@DDH@std@@6B@ */
3238 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3240 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3241 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3242 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3243 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3245 TRACE("(%p %p)\n", this, locinfo
);
3248 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3249 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3250 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3251 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3253 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3254 codecvt_base_ctor_refs(&this->base
, refs
);
3255 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3259 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3260 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3261 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3262 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3264 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3267 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3268 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3269 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3270 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3272 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3275 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3276 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3277 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3278 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3279 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3280 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3282 TRACE("(%p)\n", this);
3283 codecvt_base_dtor(&this->base
);
3286 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3287 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3289 TRACE("(%p %x)\n", this, flags
);
3291 /* we have an array, with the number of elements stored before the first object */
3292 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3294 for(i
=*ptr
-1; i
>=0; i
--)
3295 codecvt_char_dtor(this+i
);
3296 MSVCRT_operator_delete(ptr
);
3298 codecvt_char_dtor(this);
3300 MSVCRT_operator_delete(this);
3306 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3307 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3308 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3310 TRACE("(%p %p)\n", facet
, loc
);
3312 if(facet
&& !*facet
) {
3313 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3315 ERR("Out of memory\n");
3316 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3319 codecvt_char_ctor((codecvt_char
*)*facet
);
3325 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3326 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3327 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3329 return codecvt_char__Getcat(facet
, locale_classic());
3332 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3334 static codecvt_char
*obj
= NULL
;
3337 const locale_facet
*fac
;
3339 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3340 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3342 _Lockit_dtor(&lock
);
3343 return (codecvt_char
*)fac
;
3347 _Lockit_dtor(&lock
);
3351 codecvt_char__Getcat(&fac
, loc
);
3352 obj
= (codecvt_char
*)fac
;
3353 call_locale_facet__Incref(&obj
->base
.facet
);
3354 locale_facet_register(&obj
->base
.facet
);
3355 _Lockit_dtor(&lock
);
3360 /* ?do_always_noconv@?$codecvt@DDH@std@@MBE_NXZ */
3361 /* ?do_always_noconv@?$codecvt@DDH@std@@MEBA_NXZ */
3362 DEFINE_THISCALL_WRAPPER(codecvt_char_do_always_noconv
, 4)
3363 MSVCP_bool __thiscall
codecvt_char_do_always_noconv(const codecvt_char
*this)
3365 TRACE("(%p)\n", this);
3369 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3370 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3371 #if _MSVCP_VER <= 100
3372 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3373 CALL_VTBL_FUNC(this, 16, int, \
3374 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3375 (this, state, from, from_end, from_next, to, to_end, to_next))
3377 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3378 CALL_VTBL_FUNC(this, 24, int, \
3379 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3380 (this, state, from, from_end, from_next, to, to_end, to_next))
3382 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3383 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, _Mbstatet
*state
,
3384 const char *from
, const char *from_end
, const char **from_next
,
3385 char *to
, char *to_end
, char **to_next
)
3387 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3388 from_next
, to
, to_end
, to_next
);
3391 return CODECVT_noconv
;
3394 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3395 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3396 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3397 int __thiscall
codecvt_char_in(const codecvt_char
*this, _Mbstatet
*state
,
3398 const char *from
, const char *from_end
, const char **from_next
,
3399 char *to
, char *to_end
, char **to_next
)
3401 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3402 from_next
, to
, to_end
, to_next
);
3403 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3404 to
, to_end
, to_next
);
3407 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3408 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3409 #if _MSVCP_VER <= 100
3410 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3411 CALL_VTBL_FUNC(this, 20, int, \
3412 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3413 (this, state, from, from_end, from_next, to, to_end, to_next))
3415 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3416 CALL_VTBL_FUNC(this, 28, int, \
3417 (const codecvt_char*, _Mbstatet*, const char*, const char*, const char**, char*, char*, char**), \
3418 (this, state, from, from_end, from_next, to, to_end, to_next))
3420 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3421 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, _Mbstatet
*state
,
3422 const char *from
, const char *from_end
, const char **from_next
,
3423 char *to
, char *to_end
, char **to_next
)
3425 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3426 from_end
, from_next
, to
, to_end
, to_next
);
3429 return CODECVT_noconv
;
3432 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3433 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3434 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3435 int __thiscall
codecvt_char_out(const codecvt_char
*this, _Mbstatet
*state
,
3436 const char *from
, const char *from_end
, const char **from_next
,
3437 char *to
, char *to_end
, char **to_next
)
3439 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3440 from_next
, to
, to_end
, to_next
);
3441 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3442 to
, to_end
, to_next
);
3445 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3446 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3447 #if _MSVCP_VER <= 100
3448 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3449 int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3451 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3452 int, (const codecvt_char*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3454 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3455 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3456 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3458 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3460 return CODECVT_noconv
;
3463 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3464 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3465 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3466 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3467 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3469 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3470 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3473 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3474 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3475 #if _MSVCP_VER <= 100
3476 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3477 int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
3478 (this, state, from, from_end, max))
3480 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3481 int, (const codecvt_char*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
3482 (this, state, from, from_end, max))
3484 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3485 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const _Mbstatet
*state
,
3486 const char *from
, const char *from_end
, MSVCP_size_t max
)
3488 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3489 return (from_end
-from
> max
? max
: from_end
-from
);
3492 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3493 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3494 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3495 int __thiscall
codecvt_char_length(const codecvt_char
*this, const _Mbstatet
*state
,
3496 const char *from
, const char *from_end
, MSVCP_size_t max
)
3498 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3499 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3502 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3503 locale_id codecvt_wchar_id
= {0};
3504 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3505 locale_id codecvt_short_id
= {0};
3507 /* ??_7?$codecvt@_WDH@std@@6B@ */
3508 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3509 /* ??_7?$codecvt@GDH@std@@6B@ */
3510 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3512 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3513 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3514 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3515 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3516 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3517 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3519 TRACE("(%p %p)\n", this, locinfo
);
3520 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3523 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3524 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3525 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3526 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3528 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3530 codecvt_base_ctor_refs(&this->base
, refs
);
3531 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3533 codecvt_wchar__Init(this, locinfo
);
3537 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3538 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3539 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3540 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3542 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3544 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3545 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3549 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3550 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3551 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3552 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3556 TRACE("(%p %ld)\n", this, refs
);
3558 _Locinfo_ctor(&locinfo
);
3559 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3560 _Locinfo_dtor(&locinfo
);
3564 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3565 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3566 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3567 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3571 TRACE("(%p %ld)\n", this, refs
);
3573 _Locinfo_ctor(&locinfo
);
3574 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3575 _Locinfo_dtor(&locinfo
);
3579 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3580 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3581 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3582 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3586 TRACE("(%p %s %ld)\n", this, name
, refs
);
3588 _Locinfo_ctor_cstr(&locinfo
, name
);
3589 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3590 _Locinfo_dtor(&locinfo
);
3594 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3595 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3596 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3597 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3599 return codecvt_wchar_ctor_refs(this, 0);
3602 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3603 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3604 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3605 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3607 return codecvt_short_ctor_refs(this, 0);
3610 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3611 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3612 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3613 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3614 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3615 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3616 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3617 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3619 TRACE("(%p)\n", this);
3620 codecvt_base_dtor(&this->base
);
3623 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3624 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3626 TRACE("(%p %x)\n", this, flags
);
3628 /* we have an array, with the number of elements stored before the first object */
3629 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3631 for(i
=*ptr
-1; i
>=0; i
--)
3632 codecvt_wchar_dtor(this+i
);
3633 MSVCRT_operator_delete(ptr
);
3635 codecvt_wchar_dtor(this);
3637 MSVCRT_operator_delete(this);
3643 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3644 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3645 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3647 TRACE("(%p %p)\n", facet
, loc
);
3649 if(facet
&& !*facet
) {
3652 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3654 ERR("Out of memory\n");
3655 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3659 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3660 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3661 _Locinfo_dtor(&locinfo
);
3667 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3668 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3669 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3671 return codecvt_wchar__Getcat(facet
, locale_classic());
3674 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3676 static codecvt_wchar
*obj
= NULL
;
3679 const locale_facet
*fac
;
3681 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3682 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3684 _Lockit_dtor(&lock
);
3685 return (codecvt_wchar
*)fac
;
3689 _Lockit_dtor(&lock
);
3693 codecvt_wchar__Getcat(&fac
, loc
);
3694 obj
= (codecvt_wchar
*)fac
;
3695 call_locale_facet__Incref(&obj
->base
.facet
);
3696 locale_facet_register(&obj
->base
.facet
);
3697 _Lockit_dtor(&lock
);
3702 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3703 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3704 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3706 TRACE("(%p %p)\n", facet
, loc
);
3708 if(facet
&& !*facet
) {
3711 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3713 ERR("Out of memory\n");
3714 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3718 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3719 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3720 _Locinfo_dtor(&locinfo
);
3726 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3727 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3728 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3730 return codecvt_short__Getcat(facet
, locale_classic());
3733 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3735 static codecvt_wchar
*obj
= NULL
;
3738 const locale_facet
*fac
;
3740 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3741 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3743 _Lockit_dtor(&lock
);
3744 return (codecvt_wchar
*)fac
;
3748 _Lockit_dtor(&lock
);
3752 codecvt_short__Getcat(&fac
, loc
);
3753 obj
= (codecvt_wchar
*)fac
;
3754 call_locale_facet__Incref(&obj
->base
.facet
);
3755 locale_facet_register(&obj
->base
.facet
);
3756 _Lockit_dtor(&lock
);
3761 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3762 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3763 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3766 return &codecvt_wchar_id
;
3769 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3770 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3771 locale_id
* __cdecl
codecvt_short__Id_func(void)
3774 return &codecvt_short_id
;
3777 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3778 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3779 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3780 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3781 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3782 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3784 TRACE("(%p)\n", this);
3788 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3789 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3790 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3791 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3792 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3793 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3795 TRACE("(%p)\n", this);
3799 /* ?do_encoding@?$codecvt@GDH@std@@MBEHXZ */
3800 /* ?do_encoding@?$codecvt@GDH@std@@MEBAHXZ */
3801 /* ?do_encoding@?$codecvt@_WDH@std@@MBEHXZ */
3802 /* ?do_encoding@?$codecvt@_WDH@std@@MEBAHXZ */
3803 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_encoding
, 4)
3804 int __thiscall
codecvt_wchar_do_encoding(const codecvt_wchar
*this)
3806 TRACE("(%p)\n", this);
3810 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3811 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3812 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3813 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3814 #if _MSVCP_VER <= 100
3815 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3816 CALL_VTBL_FUNC(this, 16, int, \
3817 (const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3818 (this, state, from, from_end, from_next, to, to_end, to_next))
3820 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3821 CALL_VTBL_FUNC(this, 24, int, \
3822 (const codecvt_wchar*, _Mbstatet*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3823 (this, state, from, from_end, from_next, to, to_end, to_next))
3825 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3826 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, _Mbstatet
*state
,
3827 const char *from
, const char *from_end
, const char **from_next
,
3828 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3830 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3831 from_end
, from_next
, to
, to_end
, to_next
);
3836 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3837 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3839 *from_next
= from_end
;
3840 return CODECVT_partial
;
3842 return CODECVT_error
;
3856 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3857 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3858 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3859 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3860 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3861 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, _Mbstatet
*state
,
3862 const char *from
, const char *from_end
, const char **from_next
,
3863 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3865 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3866 from_end
, from_next
, to
, to_end
, to_next
);
3867 return call_codecvt_wchar_do_in(this, state
, from
,
3868 from_end
, from_next
, to
, to_end
, to_next
);
3871 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3872 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3873 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3874 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3875 #if _MSVCP_VER <= 100
3876 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3877 CALL_VTBL_FUNC(this, 20, int, \
3878 (const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3879 (this, state, from, from_end, from_next, to, to_end, to_next))
3881 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3882 CALL_VTBL_FUNC(this, 28, int, \
3883 (const codecvt_wchar*, _Mbstatet*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3884 (this, state, from, from_end, from_next, to, to_end, to_next))
3886 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3887 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, _Mbstatet
*state
,
3888 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3889 char *to
, char *to_end
, char **to_next
)
3891 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3892 from_end
, from_next
, to
, to_end
, to_next
);
3897 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3898 _Mbstatet old_state
= *state
;
3900 char buf
[MB_LEN_MAX
];
3902 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3904 return CODECVT_error
;
3906 if(size
> from_end
-*from_next
) {
3908 return CODECVT_partial
;
3912 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3920 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3921 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3922 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3923 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3924 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3925 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, _Mbstatet
*state
,
3926 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3927 char *to
, char *to_end
, char **to_next
)
3929 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3930 from_end
, from_next
, to
, to_end
, to_next
);
3931 return call_codecvt_wchar_do_out(this, state
, from
,
3932 from_end
, from_next
, to
, to_end
, to_next
);
3935 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3936 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3937 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3938 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3939 #if _MSVCP_VER <= 100
3940 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3941 int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3943 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3944 int, (const codecvt_wchar*, _Mbstatet*, char*, char*, char**), (this, state, to, to_end, to_next))
3946 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3947 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3948 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3950 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3951 if(MBSTATET_TO_INT(state
))
3952 WARN("unexpected state: %x\n", MBSTATET_TO_INT(state
));
3958 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3959 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3960 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3961 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3962 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3963 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3964 _Mbstatet
*state
, char *to
, char *to_end
, char **to_next
)
3966 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3967 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3970 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3971 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3972 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3973 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3974 #if _MSVCP_VER <= 100
3975 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3976 int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
3977 (this, state, from, from_end, max))
3979 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3980 int, (const codecvt_wchar*, const _Mbstatet*, const char*, const char*, MSVCP_size_t), \
3981 (this, state, from, from_end, max))
3983 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3984 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const _Mbstatet
*state
,
3985 const char *from
, const char *from_end
, MSVCP_size_t max
)
3987 _Mbstatet tmp_state
= *state
;
3990 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3992 while(ret
<max
&& from
!=from_end
) {
3993 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
4010 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
4011 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
4012 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
4013 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
4014 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
4015 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const _Mbstatet
*state
,
4016 const char *from
, const char *from_end
, MSVCP_size_t max
)
4018 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
4019 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
4022 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
4023 locale_id numpunct_char_id
= {0};
4025 /* ??_7?$numpunct@D@std@@6B@ */
4026 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
4028 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
4029 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4030 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
4031 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4035 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4037 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
4038 this->false_name
= MSVCRT_operator_new(len
);
4039 if(this->false_name
)
4040 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
4042 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
4043 this->true_name
= MSVCRT_operator_new(len
);
4045 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
4048 this->grouping
= MSVCRT_operator_new(1);
4050 *(char*)this->grouping
= 0;
4055 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4057 len
= strlen(lc
->grouping
)+1;
4058 this->grouping
= MSVCRT_operator_new(len
);
4060 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4062 this->dp
= lc
->decimal_point
[0];
4063 this->sep
= lc
->thousands_sep
[0];
4066 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4067 MSVCRT_operator_delete((char*)this->grouping
);
4068 MSVCRT_operator_delete((char*)this->false_name
);
4069 MSVCRT_operator_delete((char*)this->true_name
);
4071 ERR("Out of memory\n");
4072 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4076 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
4077 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
4078 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
4079 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
4081 TRACE("(%p)\n", this);
4083 MSVCRT_operator_delete((char*)this->grouping
);
4084 MSVCRT_operator_delete((char*)this->false_name
);
4085 MSVCRT_operator_delete((char*)this->true_name
);
4088 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
4089 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4090 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
4091 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
4092 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4094 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4095 locale_facet_ctor_refs(&this->facet
, refs
);
4096 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4097 numpunct_char__Init(this, locinfo
, usedef
);
4101 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
4102 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
4103 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
4104 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
4105 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4109 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4110 locale_facet_ctor_refs(&this->facet
, refs
);
4111 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4113 _Locinfo_ctor_cstr(&locinfo
, name
);
4114 numpunct_char__Init(this, &locinfo
, usedef
);
4115 _Locinfo_dtor(&locinfo
);
4119 /* ??0?$numpunct@D@std@@QAE@I@Z */
4120 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
4121 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
4122 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
4124 TRACE("(%p %lu)\n", this, refs
);
4125 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
4128 /* ??_F?$numpunct@D@std@@QAEXXZ */
4129 /* ??_F?$numpunct@D@std@@QEAAXXZ */
4130 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
4131 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
4133 return numpunct_char_ctor_refs(this, 0);
4136 /* ??1?$numpunct@D@std@@UAE@XZ */
4137 /* ??1?$numpunct@D@std@@UEAA@XZ */
4138 /* ??1?$numpunct@D@std@@MAE@XZ */
4139 /* ??1?$numpunct@D@std@@MEAA@XZ */
4140 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
4141 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
4143 TRACE("(%p)\n", this);
4144 numpunct_char__Tidy(this);
4147 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
4148 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
4150 TRACE("(%p %x)\n", this, flags
);
4152 /* we have an array, with the number of elements stored before the first object */
4153 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4155 for(i
=*ptr
-1; i
>=0; i
--)
4156 numpunct_char_dtor(this+i
);
4157 MSVCRT_operator_delete(ptr
);
4159 numpunct_char_dtor(this);
4161 MSVCRT_operator_delete(this);
4167 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4168 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4169 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4171 TRACE("(%p %p)\n", facet
, loc
);
4173 if(facet
&& !*facet
) {
4174 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4176 ERR("Out of memory\n");
4177 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4180 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4181 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4187 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4188 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4189 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4191 return numpunct_char__Getcat(facet
, locale_classic());
4194 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4196 static numpunct_char
*obj
= NULL
;
4199 const locale_facet
*fac
;
4201 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4202 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4204 _Lockit_dtor(&lock
);
4205 return (numpunct_char
*)fac
;
4209 _Lockit_dtor(&lock
);
4213 numpunct_char__Getcat(&fac
, loc
);
4214 obj
= (numpunct_char
*)fac
;
4215 call_locale_facet__Incref(&obj
->facet
);
4216 locale_facet_register(&obj
->facet
);
4217 _Lockit_dtor(&lock
);
4222 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4223 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4224 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4225 #if _MSVCP_VER <= 100
4226 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4227 char, (const numpunct_char *this), (this))
4229 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4230 char, (const numpunct_char *this), (this))
4232 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4234 TRACE("(%p)\n", this);
4238 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4239 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4240 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4241 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4243 TRACE("(%p)\n", this);
4244 return call_numpunct_char_do_decimal_point(this);
4247 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4248 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4249 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4250 #if _MSVCP_VER <= 100
4251 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4252 char, (const numpunct_char*), (this))
4254 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4255 char, (const numpunct_char*), (this))
4257 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4259 TRACE("(%p)\n", this);
4263 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4264 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4265 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4266 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4268 TRACE("(%p)\n", this);
4269 return call_numpunct_char_do_thousands_sep(this);
4272 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4273 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4274 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4275 #if _MSVCP_VER <= 100
4276 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4277 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4279 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4280 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4282 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4283 const numpunct_char
*this, basic_string_char
*ret
)
4285 TRACE("(%p)\n", this);
4286 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4289 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4290 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4291 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4292 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4294 TRACE("(%p)\n", this);
4295 return call_numpunct_char_do_grouping(this, ret
);
4298 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4299 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4300 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4301 #if _MSVCP_VER <= 100
4302 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4303 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4305 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4306 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4308 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4309 const numpunct_char
*this, basic_string_char
*ret
)
4311 TRACE("(%p)\n", this);
4312 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4315 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4316 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4317 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4318 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4320 TRACE("(%p)\n", this);
4321 return call_numpunct_char_do_falsename(this, ret
);
4324 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4325 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4326 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4327 #if _MSVCP_VER <= 100
4328 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4329 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4331 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4332 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4334 basic_string_char
* __thiscall
numpunct_char_do_truename(
4335 const numpunct_char
*this, basic_string_char
*ret
)
4337 TRACE("(%p)\n", this);
4338 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4341 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4342 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4343 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4344 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4346 TRACE("(%p)\n", this);
4347 return call_numpunct_char_do_truename(this, ret
);
4350 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4351 locale_id numpunct_wchar_id
= {0};
4352 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4353 locale_id numpunct_short_id
= {0};
4355 /* ??_7?$numpunct@_W@std@@6B@ */
4356 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4357 /* ??_7?$numpunct@G@std@@6B@ */
4358 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4360 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4361 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4362 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4363 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4364 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4365 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4366 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4368 const char *to_convert
;
4372 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4374 _Locinfo__Getcvt(locinfo
, &cvt
);
4376 to_convert
= _Locinfo__Getfalse(locinfo
);
4377 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4378 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4379 if(this->false_name
)
4380 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4381 (wchar_t*)this->false_name
, len
);
4383 to_convert
= _Locinfo__Gettrue(locinfo
);
4384 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4385 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4387 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4388 (wchar_t*)this->true_name
, len
);
4391 this->grouping
= MSVCRT_operator_new(1);
4393 *(char*)this->grouping
= 0;
4398 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4400 len
= strlen(lc
->grouping
)+1;
4401 this->grouping
= MSVCRT_operator_new(len
);
4403 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4405 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4406 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4409 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4410 MSVCRT_operator_delete((char*)this->grouping
);
4411 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4412 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4414 ERR("Out of memory\n");
4415 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4419 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4420 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4421 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4422 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4423 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4424 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4426 TRACE("(%p)\n", this);
4428 MSVCRT_operator_delete((char*)this->grouping
);
4429 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4430 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4433 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4434 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4435 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4436 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4437 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4439 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4440 locale_facet_ctor_refs(&this->facet
, refs
);
4441 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4442 numpunct_wchar__Init(this, locinfo
, usedef
);
4446 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4447 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4448 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4449 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4450 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4452 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4453 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4457 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4458 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4459 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4460 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4461 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4465 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4466 locale_facet_ctor_refs(&this->facet
, refs
);
4467 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4469 _Locinfo_ctor_cstr(&locinfo
, name
);
4470 numpunct_wchar__Init(this, &locinfo
, usedef
);
4471 _Locinfo_dtor(&locinfo
);
4475 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4476 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4477 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4478 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4479 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4481 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4482 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4486 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4487 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4488 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4489 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4491 TRACE("(%p %lu)\n", this, refs
);
4492 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4495 /* ??0?$numpunct@G@std@@QAE@I@Z */
4496 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4497 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4498 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4500 numpunct_wchar_ctor_refs(this, refs
);
4501 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4505 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4506 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4507 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4508 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4510 return numpunct_wchar_ctor_refs(this, 0);
4513 /* ??_F?$numpunct@G@std@@QAEXXZ */
4514 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4515 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4516 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4518 return numpunct_short_ctor_refs(this, 0);
4521 /* ??1?$numpunct@G@std@@UAE@XZ */
4522 /* ??1?$numpunct@G@std@@UEAA@XZ */
4523 /* ??1?$numpunct@_W@std@@MAE@XZ */
4524 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4525 /* ??1?$numpunct@G@std@@MAE@XZ */
4526 /* ??1?$numpunct@G@std@@MEAA@XZ */
4527 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4528 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4530 TRACE("(%p)\n", this);
4531 numpunct_wchar__Tidy(this);
4534 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4535 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4537 TRACE("(%p %x)\n", this, flags
);
4539 /* we have an array, with the number of elements stored before the first object */
4540 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4542 for(i
=*ptr
-1; i
>=0; i
--)
4543 numpunct_wchar_dtor(this+i
);
4544 MSVCRT_operator_delete(ptr
);
4546 numpunct_wchar_dtor(this);
4548 MSVCRT_operator_delete(this);
4554 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4555 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4556 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4558 TRACE("(%p %p)\n", facet
, loc
);
4560 if(facet
&& !*facet
) {
4561 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4563 ERR("Out of memory\n");
4564 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4567 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4568 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4574 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4575 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4576 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4578 return numpunct_wchar__Getcat(facet
, locale_classic());
4581 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4583 static numpunct_wchar
*obj
= NULL
;
4586 const locale_facet
*fac
;
4588 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4589 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4591 _Lockit_dtor(&lock
);
4592 return (numpunct_wchar
*)fac
;
4596 _Lockit_dtor(&lock
);
4600 numpunct_wchar__Getcat(&fac
, loc
);
4601 obj
= (numpunct_wchar
*)fac
;
4602 call_locale_facet__Incref(&obj
->facet
);
4603 locale_facet_register(&obj
->facet
);
4604 _Lockit_dtor(&lock
);
4609 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4610 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4611 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4613 TRACE("(%p %p)\n", facet
, loc
);
4615 if(facet
&& !*facet
) {
4616 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4618 ERR("Out of memory\n");
4619 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4622 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4623 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4629 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4630 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4631 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4633 return numpunct_short__Getcat(facet
, locale_classic());
4636 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4638 static numpunct_wchar
*obj
= NULL
;
4641 const locale_facet
*fac
;
4643 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4644 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4646 _Lockit_dtor(&lock
);
4647 return (numpunct_wchar
*)fac
;
4651 _Lockit_dtor(&lock
);
4655 numpunct_short__Getcat(&fac
, loc
);
4656 obj
= (numpunct_wchar
*)fac
;
4657 call_locale_facet__Incref(&obj
->facet
);
4658 locale_facet_register(&obj
->facet
);
4659 _Lockit_dtor(&lock
);
4664 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4665 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4666 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4667 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4668 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4669 #if _MSVCP_VER <= 100
4670 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4671 wchar_t, (const numpunct_wchar *this), (this))
4673 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4674 wchar_t, (const numpunct_wchar *this), (this))
4676 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4678 TRACE("(%p)\n", this);
4682 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4683 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4684 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4685 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4686 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4687 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4689 TRACE("(%p)\n", this);
4690 return call_numpunct_wchar_do_decimal_point(this);
4693 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4694 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4695 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4696 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4697 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4698 #if _MSVCP_VER <= 100
4699 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4700 wchar_t, (const numpunct_wchar *this), (this))
4702 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4703 wchar_t, (const numpunct_wchar *this), (this))
4705 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4707 TRACE("(%p)\n", this);
4711 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4712 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4713 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4714 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4715 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4716 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4718 TRACE("(%p)\n", this);
4719 return call_numpunct_wchar_do_thousands_sep(this);
4722 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4723 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4724 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4725 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4726 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4727 #if _MSVCP_VER <= 100
4728 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4729 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4731 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4732 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4734 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4736 TRACE("(%p)\n", this);
4737 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4740 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4741 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4742 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4743 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4744 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4745 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4747 TRACE("(%p)\n", this);
4748 return call_numpunct_wchar_do_grouping(this, ret
);
4751 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4752 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4753 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4754 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4755 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4756 #if _MSVCP_VER <= 100
4757 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4758 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4760 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4761 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4763 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4765 TRACE("(%p)\n", this);
4766 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4769 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4770 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4771 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4772 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4773 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4774 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4776 TRACE("(%p)\n", this);
4777 return call_numpunct_wchar_do_falsename(this, ret
);
4780 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4781 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4782 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4783 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4784 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4785 #if _MSVCP_VER <= 100
4786 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4787 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4789 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4790 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4792 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4794 TRACE("(%p)\n", this);
4795 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4798 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4799 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4800 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4801 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4802 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4803 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4805 TRACE("(%p)\n", this);
4806 return call_numpunct_wchar_do_truename(this, ret
);
4809 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4811 double ret
= strtod(buf
, buf_end
);
4814 ret
*= pow(10, exp
);
4818 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4824 ret
= _Stod(buf
, buf_end
, exp
);
4834 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4836 return _Stod(buf
, buf_end
, exp
);
4839 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4841 return _Stodx(buf
, buf_end
, exp
, err
);
4844 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4846 return _strtoi64(buf
, buf_end
, base
);
4849 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4855 ret
= _strtoi64(buf
, buf_end
, base
);
4865 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4867 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4868 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4873 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4875 return _strtoui64(buf
, buf_end
, base
);
4878 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4880 unsigned __int64 ret
;
4884 ret
= _strtoui64(buf
, buf_end
, base
);
4894 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4897 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4898 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4900 return buf
[0]=='-' ? -i
: i
;
4903 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4905 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4906 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4908 return buf
[0]=='-' ? -i
: i
;
4911 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4912 locale_id num_get_wchar_id
= {0};
4913 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4914 locale_id num_get_short_id
= {0};
4916 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4917 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4918 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4919 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4921 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4922 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4923 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4924 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4925 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4926 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4928 TRACE("(%p %p)\n", this, locinfo
);
4929 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4932 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4933 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4934 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4935 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4936 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4938 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4940 locale_facet_ctor_refs(&this->facet
, refs
);
4941 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4943 num_get_wchar__Init(this, locinfo
);
4947 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4948 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4949 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4950 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4951 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4953 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4954 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4958 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4959 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4960 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4961 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4965 TRACE("(%p %lu)\n", this, refs
);
4967 _Locinfo_ctor(&locinfo
);
4968 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4969 _Locinfo_dtor(&locinfo
);
4973 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4974 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4975 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4976 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4978 num_get_wchar_ctor_refs(this, refs
);
4979 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4983 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4984 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4985 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4986 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4988 return num_get_wchar_ctor_refs(this, 0);
4991 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4992 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4993 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4994 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4996 return num_get_short_ctor_refs(this, 0);
4999 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
5000 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
5001 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
5002 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
5003 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
5004 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
5005 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
5006 void __thiscall
num_get_wchar_dtor(num_get
*this)
5008 TRACE("(%p)\n", this);
5009 locale_facet_dtor(&this->facet
);
5012 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
5013 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
5015 TRACE("(%p %x)\n", this, flags
);
5017 /* we have an array, with the number of elements stored before the first object */
5018 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
5020 for(i
=*ptr
-1; i
>=0; i
--)
5021 num_get_wchar_dtor(this+i
);
5022 MSVCRT_operator_delete(ptr
);
5024 num_get_wchar_dtor(this);
5026 MSVCRT_operator_delete(this);
5032 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5033 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5034 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
5036 TRACE("(%p %p)\n", facet
, loc
);
5038 if(facet
&& !*facet
) {
5041 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5043 ERR("Out of memory\n");
5044 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5048 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
5049 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5050 _Locinfo_dtor(&locinfo
);
5056 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5057 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5058 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
5060 return num_get_wchar__Getcat(facet
, locale_classic());
5063 num_get
* num_get_wchar_use_facet(const locale
*loc
)
5065 static num_get
*obj
= NULL
;
5068 const locale_facet
*fac
;
5070 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5071 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
5073 _Lockit_dtor(&lock
);
5074 return (num_get
*)fac
;
5078 _Lockit_dtor(&lock
);
5082 num_get_wchar__Getcat(&fac
, loc
);
5083 obj
= (num_get
*)fac
;
5084 call_locale_facet__Incref(&obj
->facet
);
5085 locale_facet_register(&obj
->facet
);
5086 _Lockit_dtor(&lock
);
5091 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5092 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5093 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
5095 if(facet
&& !*facet
) {
5096 num_get_wchar__Getcat(facet
, loc
);
5097 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
5103 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5104 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5105 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
5107 return num_get_short__Getcat(facet
, locale_classic());
5110 num_get
* num_get_short_use_facet(const locale
*loc
)
5112 static num_get
*obj
= NULL
;
5115 const locale_facet
*fac
;
5117 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5118 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
5120 _Lockit_dtor(&lock
);
5121 return (num_get
*)fac
;
5125 _Lockit_dtor(&lock
);
5129 num_get_short__Getcat(&fac
, loc
);
5130 obj
= (num_get
*)fac
;
5131 call_locale_facet__Incref(&obj
->facet
);
5132 locale_facet_register(&obj
->facet
);
5133 _Lockit_dtor(&lock
);
5138 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5139 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
5141 basic_string_char grouping_bstr
;
5142 basic_string_char groups_found
;
5143 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
5144 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
5145 wchar_t sep
= 0, digits
[11], *digits_pos
;
5146 const char *grouping
, *groups
;
5147 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5149 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5152 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5155 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5156 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5157 #if _MSVCP_VER >= 70
5158 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5162 MSVCP_basic_string_char_ctor(&groups_found
);
5164 istreambuf_iterator_wchar_val(first
);
5166 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5168 istreambuf_iterator_wchar_inc(first
);
5169 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5171 istreambuf_iterator_wchar_inc(first
);
5174 /* read possibly grouped numbers before decimal */
5175 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5176 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5177 if(sep
&& first
->val
==sep
) {
5178 if(!groups_no
) break; /* empty group - stop parsing */
5179 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5186 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5187 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5188 if(!got_nonzero
&& first
->val
== digits
[0])
5195 *dest
++ = '0'+digits_pos
-digits
;
5197 exp
++; /* too many digits, just multiply by 10 */
5198 if(sep
&& groups_no
<CHAR_MAX
)
5203 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5204 if(got_digit
&& !got_nonzero
)
5207 /* get decimal, if any */
5208 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5210 *dest
++ = *localeconv()->decimal_point
;
5211 istreambuf_iterator_wchar_inc(first
);
5214 /* read non-grouped after decimal */
5215 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5216 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5218 else if(dest
<num_end
) {
5220 *dest
++ = '0'+digits_pos
-digits
;
5224 /* read exponent, if any */
5225 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
5227 istreambuf_iterator_wchar_inc(first
);
5229 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5231 istreambuf_iterator_wchar_inc(first
);
5232 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5234 istreambuf_iterator_wchar_inc(first
);
5237 got_digit
= got_nonzero
= FALSE
;
5239 /* skip any leading zeroes */
5240 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5243 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5244 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5247 *dest
++ = '0'+digits_pos
-digits
;
5250 /* if just found zeroes for exponent, use that */
5251 if(got_digit
&& !got_nonzero
)
5259 if(sep
&& groups_no
)
5260 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5262 if(!cur_group
) /* no groups, skip loop */
5264 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5265 error
= TRUE
; /* trailing empty */
5267 for(; cur_group
>=0 && !error
; cur_group
--) {
5268 if(*grouping
== CHAR_MAX
) {
5272 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5273 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5276 }else if(grouping
[1]) {
5280 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5282 MSVCP_basic_string_char_dtor(&groups_found
);
5292 /* ?_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 */
5293 /* ?_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 */
5294 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5295 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5297 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5300 /* ?_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 */
5301 /* ?_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 */
5302 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5303 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5305 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5308 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AAVios_base@2@PAH@Z */
5309 /* ?_Getffldx@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@1AEAVios_base@2@PEAH@Z */
5310 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AAVios_base@2@PAH@Z */
5311 /* ?_Getffldx@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@1AEAVios_base@2@PEAH@Z */
5312 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5313 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5315 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5319 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5320 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5322 wchar_t digits
[23], *digits_pos
, sep
= 0;
5323 basic_string_char grouping_bstr
;
5324 basic_string_char groups_found
;
5325 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5326 char *dest_beg
= dest
, *dest_end
= dest
+24;
5327 const char *grouping
, *groups
;
5328 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5330 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5333 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5334 for(i
=0; i
<6; i
++) {
5335 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5336 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5339 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5340 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5341 #if _MSVCP_VER >= 70
5342 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5345 basefield
= fmtflags
& FMTFLAG_basefield
;
5346 if(basefield
== FMTFLAG_oct
)
5348 else if(basefield
== FMTFLAG_hex
)
5349 base
= 22; /* equal to the size of digits buffer */
5355 istreambuf_iterator_wchar_val(first
);
5356 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5358 istreambuf_iterator_wchar_inc(first
);
5359 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5361 istreambuf_iterator_wchar_inc(first
);
5364 if(first
->strbuf
&& first
->val
==digits
[0]) {
5366 istreambuf_iterator_wchar_inc(first
);
5367 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5368 if(!base
|| base
== 22) {
5370 istreambuf_iterator_wchar_inc(first
);
5380 if(!base
) base
= 10;
5385 MSVCP_basic_string_char_ctor(&groups_found
);
5386 if(found_zero
) ++groups_no
;
5389 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5390 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5391 if(sep
&& first
->val
==sep
) {
5392 if(!groups_no
) break; /* empty group - stop parsing */
5393 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5401 if(dest_empty
&& first
->val
== digits
[0]) {
5407 /* skip digits that can't be copied to dest buffer, other
5408 * functions are responsible for detecting overflows */
5410 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5411 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5412 'A'+digits_pos
-digits
-16));
5413 if(sep
&& groups_no
<CHAR_MAX
)
5418 if(sep
&& groups_no
)
5419 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5421 if(!cur_group
) { /* no groups, skip loop */
5423 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5424 error
= TRUE
; /* trailing empty */
5428 for(; cur_group
>=0 && !error
; cur_group
--) {
5429 if(*grouping
== CHAR_MAX
) {
5433 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5434 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5437 }else if(grouping
[1]) {
5442 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5444 MSVCP_basic_string_char_dtor(&groups_found
);
5451 }else if(dest_empty
)
5455 return (base
==22 ? 16 : base
);
5458 /* ?_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 */
5459 /* ?_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 */
5460 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5461 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5463 return num_get__Getifld(this, dest
, first
, last
,
5464 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5467 /* ?_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 */
5468 /* ?_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 */
5469 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5470 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5472 return num_get__Getifld(this, dest
, first
, last
,
5473 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5476 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5477 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5478 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5479 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5480 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5481 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5483 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5487 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5488 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5489 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5490 void **pval
, numpunct_wchar
*numpunct
)
5496 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5498 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5499 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5500 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5501 *state
|= IOSTATE_failbit
;
5502 else if(end
!=tmp
&& !err
)
5503 *pval
= (void*)((INT_PTR
)v
);
5505 *state
|= IOSTATE_failbit
;
5508 *state
|= IOSTATE_eofbit
;
5514 /* ?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 */
5515 /* ?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 */
5516 #if _MSVCP_VER <= 100
5517 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5518 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5519 (this, ret, first, last, base, state, pval))
5521 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5522 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5523 (this, ret, first, last, base, state, pval))
5525 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5526 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5527 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5529 return num_get_do_get_void(this, ret
, first
, last
, base
,
5530 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5533 /* ?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 */
5534 /* ?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 */
5535 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5536 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5537 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5539 return num_get_do_get_void(this, ret
, first
, last
, base
,
5540 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5543 /* ?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 */
5544 /* ?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 */
5545 /* ?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 */
5546 /* ?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 */
5547 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5548 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5549 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5551 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5552 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5555 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5556 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5557 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5558 double *pval
, numpunct_wchar
*numpunct
)
5564 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5566 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5567 if(end
!=tmp
&& !err
)
5570 *state
|= IOSTATE_failbit
;
5573 *state
|= IOSTATE_eofbit
;
5579 /* ?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 */
5580 /* ?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 */
5581 /* ?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 */
5582 /* ?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 */
5583 #if _MSVCP_VER <= 100
5584 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5585 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5586 (this, ret, first, last, base, state, pval))
5587 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5588 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5589 (this, ret, first, last, base, state, pval))
5591 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5592 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5593 (this, ret, first, last, base, state, pval))
5594 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5595 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5596 (this, ret, first, last, base, state, pval))
5598 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5599 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5600 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5602 return num_get_do_get_double(this, ret
, first
, last
, base
,
5603 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5606 /* ?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 */
5607 /* ?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 */
5608 /* ?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 */
5609 /* ?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 */
5610 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5611 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5612 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5614 return num_get_do_get_double(this, ret
, first
, last
, base
,
5615 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5618 /* ?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 */
5619 /* ?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 */
5620 /* ?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 */
5621 /* ?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 */
5622 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5623 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5624 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5626 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5627 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5630 /* ?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 */
5631 /* ?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 */
5632 /* ?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 */
5633 /* ?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 */
5634 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5635 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5636 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5638 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5639 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5642 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5643 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5644 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5645 float *pval
, numpunct_wchar
*numpunct
)
5651 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5653 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5654 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5655 if(end
!=tmp
&& !err
)
5658 *state
|= IOSTATE_failbit
;
5661 *state
|= IOSTATE_eofbit
;
5667 /* ?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 */
5668 /* ?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 */
5669 #if _MSVCP_VER <= 100
5670 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5671 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5672 (this, ret, first, last, base, state, pval))
5674 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5675 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5676 (this, ret, first, last, base, state, pval))
5678 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5679 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5680 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5682 return num_get_do_get_float(this, ret
, first
, last
, base
,
5683 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5686 /* ?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 */
5687 /* ?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 */
5688 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5689 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5690 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5692 return num_get_do_get_float(this, ret
, first
, last
, base
,
5693 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5696 /* ?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 */
5697 /* ?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 */
5698 /* ?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 */
5699 /* ?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 */
5700 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5701 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5702 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5704 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5705 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5708 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5709 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5710 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5711 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5717 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5719 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5720 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5721 if(end
!=tmp
&& !err
)
5724 *state
|= IOSTATE_failbit
;
5727 *state
|= IOSTATE_eofbit
;
5733 /* ?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 */
5734 /* ?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 */
5735 #if _MSVCP_VER <= 100
5736 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5737 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5738 (this, ret, first, last, base, state, pval))
5740 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5741 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5742 (this, ret, first, last, base, state, pval))
5744 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5745 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5746 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5748 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5749 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5752 /* ?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 */
5753 /* ?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 */
5754 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5755 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5756 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5758 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5759 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5762 /* ?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 */
5763 /* ?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 */
5764 /* ?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 */
5765 /* ?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 */
5766 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5767 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5768 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5770 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5771 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5774 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5775 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5776 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5777 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5783 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5785 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5786 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5787 if(end
!=tmp
&& !err
)
5790 *state
|= IOSTATE_failbit
;
5793 *state
|= IOSTATE_eofbit
;
5799 /* ?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 */
5800 /* ?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 */
5801 #if _MSVCP_VER <= 100
5802 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5803 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5804 (this, ret, first, last, base, state, pval))
5806 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5807 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5808 (this, ret, first, last, base, state, pval))
5810 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5811 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5812 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5814 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5815 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5818 /* ?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 */
5819 /* ?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 */
5820 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5821 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5822 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5824 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5825 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5828 /* ?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 */
5829 /* ?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 */
5830 /* ?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 */
5831 /* ?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 */
5832 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5833 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5834 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5836 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5837 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5840 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5841 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5842 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5843 ULONG
*pval
, numpunct_wchar
*numpunct
)
5849 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5851 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5852 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5853 if(end
!=tmp
&& !err
)
5856 *state
|= IOSTATE_failbit
;
5859 *state
|= IOSTATE_eofbit
;
5865 /* ?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 */
5866 /* ?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 */
5867 #if _MSVCP_VER <= 100
5868 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5869 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5870 (this, ret, first, last, base, state, pval))
5872 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5873 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5874 (this, ret, first, last, base, state, pval))
5876 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5877 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5878 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5880 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5881 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5884 /* ?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 */
5885 /* ?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 */
5886 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5887 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5888 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5890 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5891 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5894 /* ?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 */
5895 /* ?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 */
5896 /* ?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 */
5897 /* ?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 */
5898 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5899 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5900 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5902 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5903 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5906 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5907 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5908 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5909 LONG
*pval
, numpunct_wchar
*numpunct
)
5915 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5917 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5918 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5919 if(end
!=tmp
&& !err
)
5922 *state
|= IOSTATE_failbit
;
5925 *state
|= IOSTATE_eofbit
;
5931 /* ?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 */
5932 /* ?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 */
5933 #if _MSVCP_VER <= 100
5934 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5935 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5936 (this, ret, first, last, base, state, pval))
5938 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5939 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5940 (this, ret, first, last, base, state, pval))
5942 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5943 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5944 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5946 return num_get_do_get_long(this, ret
, first
, last
, base
,
5947 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5950 /* ?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 */
5951 /* ?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 */
5952 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5953 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5954 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5956 return num_get_do_get_long(this, ret
, first
, last
, base
,
5957 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5960 /* ?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 */
5961 /* ?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 */
5962 /* ?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 */
5963 /* ?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 */
5964 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5965 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5966 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5968 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5969 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5972 /* ?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 */
5973 /* ?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 */
5974 #if _MSVCP_VER <= 100
5975 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5976 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5977 (this, ret, first, last, base, state, pval))
5979 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5980 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5981 (this, ret, first, last, base, state, pval))
5983 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5984 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5985 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5987 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5988 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5991 /* ?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 */
5992 /* ?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 */
5993 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5994 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5995 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5997 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5998 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6001 /* ?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 */
6002 /* ?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 */
6003 /* ?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 */
6004 /* ?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 */
6005 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
6006 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6007 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
6009 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6010 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6013 /* ?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 */
6014 /* ?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 */
6015 #if _MSVCP_VER <= 100
6016 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
6017 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
6018 (this, ret, first, last, base, state, pval))
6020 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
6021 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
6022 (this, ret, first, last, base, state, pval))
6024 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
6025 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6026 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6029 char tmp
[25], *beg
, *end
;
6032 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6034 b
= num_get_wchar__Getifld(this, tmp
,
6035 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6036 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6037 v
= _Stoulx(beg
, &end
, b
, &err
);
6039 if(v
!= (ULONG
)((unsigned short)v
))
6040 *state
|= IOSTATE_failbit
;
6041 else if(end
!=beg
&& !err
)
6042 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6044 *state
|= IOSTATE_failbit
;
6047 *state
|= IOSTATE_eofbit
;
6053 /* ?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 */
6054 /* ?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 */
6055 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
6056 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6057 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6059 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
6063 /* ?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 */
6064 /* ?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 */
6065 /* ?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@ */
6066 /* ?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 */
6067 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
6068 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6069 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6071 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6072 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6075 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
6076 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
6077 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
6078 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
6080 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6082 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6083 basic_string_wchar false_bstr
, true_bstr
;
6084 const wchar_t *pfalse
, *ptrue
;
6086 numpunct_wchar_falsename(numpunct
, &false_bstr
);
6087 numpunct_wchar_truename(numpunct
, &true_bstr
);
6088 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
6089 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
6091 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
6092 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6094 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6097 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6099 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6108 istreambuf_iterator_wchar_inc(&first
);
6110 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6119 *state
|= IOSTATE_failbit
;
6121 MSVCP_basic_string_wchar_dtor(&false_bstr
);
6122 MSVCP_basic_string_wchar_dtor(&true_bstr
);
6126 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
6127 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
6129 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6132 *state
|= IOSTATE_failbit
;
6136 *state
|= IOSTATE_eofbit
;
6137 memcpy(ret
, &first
, sizeof(first
));
6141 /* ?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 */
6142 /* ?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 */
6143 #if _MSVCP_VER <= 100
6144 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
6145 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6146 (this, ret, first, last, base, state, pval))
6148 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
6149 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6150 (this, ret, first, last, base, state, pval))
6152 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
6153 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6154 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6156 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6157 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
6160 /* ?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 */
6161 /* ?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 */
6162 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
6163 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6164 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6166 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6167 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
6170 /* ?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 */
6171 /* ?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 */
6172 /* ?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 */
6173 /* ?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 */
6174 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6175 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6176 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6178 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6179 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6182 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6183 locale_id num_get_char_id
= {0};
6185 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6186 extern const vtable_ptr MSVCP_num_get_char_vtable
;
6188 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6189 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6190 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6191 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6193 TRACE("(%p %p)\n", this, locinfo
);
6194 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6197 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6198 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6199 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6200 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6201 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6203 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
6205 locale_facet_ctor_refs(&this->facet
, refs
);
6206 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
6208 num_get_char__Init(this, locinfo
);
6212 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6213 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6214 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6215 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
6219 TRACE("(%p %lu)\n", this, refs
);
6221 _Locinfo_ctor(&locinfo
);
6222 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6223 _Locinfo_dtor(&locinfo
);
6227 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6228 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6229 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6230 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6232 return num_get_char_ctor_refs(this, 0);
6235 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6236 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6237 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6238 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6239 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6240 void __thiscall
num_get_char_dtor(num_get
*this)
6242 TRACE("(%p)\n", this);
6243 locale_facet_dtor(&this->facet
);
6246 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6247 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6249 TRACE("(%p %x)\n", this, flags
);
6251 /* we have an array, with the number of elements stored before the first object */
6252 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6254 for(i
=*ptr
-1; i
>=0; i
--)
6255 num_get_char_dtor(this+i
);
6256 MSVCRT_operator_delete(ptr
);
6258 num_get_char_dtor(this);
6260 MSVCRT_operator_delete(this);
6266 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6267 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6268 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6270 TRACE("(%p %p)\n", facet
, loc
);
6272 if(facet
&& !*facet
) {
6275 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6277 ERR("Out of memory\n");
6278 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6282 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6283 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6284 _Locinfo_dtor(&locinfo
);
6290 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6291 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6292 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6294 return num_get_char__Getcat(facet
, locale_classic());
6297 num_get
* num_get_char_use_facet(const locale
*loc
)
6299 static num_get
*obj
= NULL
;
6302 const locale_facet
*fac
;
6304 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6305 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6307 _Lockit_dtor(&lock
);
6308 return (num_get
*)fac
;
6312 _Lockit_dtor(&lock
);
6316 num_get_char__Getcat(&fac
, loc
);
6317 obj
= (num_get
*)fac
;
6318 call_locale_facet__Incref(&obj
->facet
);
6319 locale_facet_register(&obj
->facet
);
6320 _Lockit_dtor(&lock
);
6325 /* ?_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 */
6326 /* ?_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 */
6327 /* Copies number to dest buffer, validates grouping and skips separators.
6328 * Updates first so it points past the number, all digits are skipped.
6329 * Returns how exponent needs to changed.
6330 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6331 * strlen(+0.e+) + 22(digits) + 4(exponent) + 1(nullbyte)
6333 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6334 istreambuf_iterator_char
*last
, const locale
*loc
)
6336 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6337 basic_string_char grouping_bstr
;
6338 basic_string_char groups_found
;
6339 int groups_no
= 0, cur_group
= 0, exp
= 0;
6340 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6341 const char *grouping
, *groups
;
6342 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6344 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6346 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6347 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6348 #if _MSVCP_VER >= 70
6349 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6353 MSVCP_basic_string_char_ctor(&groups_found
);
6355 istreambuf_iterator_char_val(first
);
6357 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6358 *dest
++ = first
->val
;
6359 istreambuf_iterator_char_inc(first
);
6362 /* read possibly grouped numbers before decimal */
6363 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6364 if(first
->val
<'0' || first
->val
>'9') {
6365 if(sep
&& first
->val
==sep
) {
6366 if(!groups_no
) break; /* empty group - stop parsing */
6367 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6374 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6375 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6376 if(!got_nonzero
&& first
->val
== '0')
6383 *dest
++ = first
->val
;
6385 exp
++; /* too many digits, just multiply by 10 */
6386 if(sep
&& groups_no
<CHAR_MAX
)
6391 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6392 if(got_digit
&& !got_nonzero
)
6395 /* get decimal, if any */
6396 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6398 *dest
++ = *localeconv()->decimal_point
;
6399 istreambuf_iterator_char_inc(first
);
6402 /* read non-grouped after decimal */
6403 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6404 if(first
->val
<'0' || first
->val
>'9')
6406 else if(dest
<num_end
) {
6408 *dest
++ = first
->val
;
6412 /* read exponent, if any */
6413 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6414 *dest
++ = first
->val
;
6415 istreambuf_iterator_char_inc(first
);
6417 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6418 *dest
++ = first
->val
;
6419 istreambuf_iterator_char_inc(first
);
6422 got_digit
= got_nonzero
= FALSE
;
6424 /* skip any leading zeroes */
6425 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6428 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6429 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6432 *dest
++ = first
->val
;
6435 /* if just found zeroes for exponent, use that */
6436 if(got_digit
&& !got_nonzero
)
6444 if(sep
&& groups_no
)
6445 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6447 if(!cur_group
) /* no groups, skip loop */
6449 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6450 error
= TRUE
; /* trailing empty */
6452 for(; cur_group
>=0 && !error
; cur_group
--) {
6453 if(*grouping
== CHAR_MAX
) {
6457 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6458 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6461 }else if(grouping
[1]) {
6465 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6467 MSVCP_basic_string_char_dtor(&groups_found
);
6477 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHPADAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AAVios_base@2@PAH@Z */
6478 /* ?_Getffldx@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHPEADAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@1AEAVios_base@2@PEAH@Z */
6479 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6480 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6482 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6486 /* ?_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 */
6487 /* ?_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 */
6488 /* Copies number to dest buffer, validates grouping and skips separators.
6489 * Updates first so it points past the number, all digits are skipped.
6490 * Returns number base (8, 10 or 16).
6491 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6492 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6494 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6495 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6497 static const char digits
[] = "0123456789abcdefABCDEF";
6499 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6500 basic_string_char grouping_bstr
;
6501 basic_string_char groups_found
;
6502 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6503 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6504 const char *grouping
, *groups
;
6505 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6507 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6509 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6510 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6511 #if _MSVCP_VER >= 70
6512 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6515 basefield
= fmtflags
& FMTFLAG_basefield
;
6516 if(basefield
== FMTFLAG_oct
)
6518 else if(basefield
== FMTFLAG_hex
)
6519 base
= 22; /* equal to the size of digits buffer */
6525 istreambuf_iterator_char_val(first
);
6526 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6527 *dest
++ = first
->val
;
6528 istreambuf_iterator_char_inc(first
);
6531 if(first
->strbuf
&& first
->val
=='0') {
6533 istreambuf_iterator_char_inc(first
);
6534 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6535 if(!base
|| base
== 22) {
6537 istreambuf_iterator_char_inc(first
);
6547 if (!base
) base
= 10;
6552 MSVCP_basic_string_char_ctor(&groups_found
);
6553 if(found_zero
) ++groups_no
;
6556 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6557 if(!memchr(digits
, first
->val
, base
)) {
6558 if(sep
&& first
->val
==sep
) {
6559 if(!groups_no
) break; /* empty group - stop parsing */
6560 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6568 if(dest_empty
&& first
->val
== '0')
6575 /* skip digits that can't be copied to dest buffer, other
6576 * functions are responsible for detecting overflows */
6578 *dest
++ = first
->val
;
6579 if(sep
&& groups_no
<CHAR_MAX
)
6584 if(sep
&& groups_no
)
6585 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6587 if(!cur_group
) { /* no groups, skip loop */
6589 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6590 error
= TRUE
; /* trailing empty */
6594 for(; cur_group
>=0 && !error
; cur_group
--) {
6595 if(*grouping
== CHAR_MAX
) {
6599 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6600 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6603 }else if(grouping
[1]) {
6608 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6610 MSVCP_basic_string_char_dtor(&groups_found
);
6617 }else if(dest_empty
)
6621 return (base
==22 ? 16 : base
);
6624 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6625 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6626 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6627 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6629 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6633 /* ?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 */
6634 /* ?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 */
6635 #if _MSVCP_VER <= 100
6636 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6637 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6638 (this, ret, first, last, base, state, pval))
6640 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6641 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6642 (this, ret, first, last, base, state, pval))
6644 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6645 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6646 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6652 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6654 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6655 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6656 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6657 *state
|= IOSTATE_failbit
;
6658 else if(end
!=tmp
&& !err
)
6659 *pval
= (void*)((INT_PTR
)v
);
6661 *state
|= IOSTATE_failbit
;
6664 *state
|= IOSTATE_eofbit
;
6670 /* ?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 */
6671 /* ?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 */
6672 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6673 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6674 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6676 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6677 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6680 /* ?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 */
6681 /* ?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 */
6682 /* ?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 */
6683 /* ?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 */
6684 #if _MSVCP_VER <= 100
6685 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6686 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6687 (this, ret, first, last, base, state, pval))
6688 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6689 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6690 (this, ret, first, last, base, state, pval))
6692 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6693 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6694 (this, ret, first, last, base, state, pval))
6695 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6696 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6697 (this, ret, first, last, base, state, pval))
6699 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6700 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6701 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6707 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6709 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6710 if(end
!=tmp
&& !err
)
6713 *state
|= IOSTATE_failbit
;
6716 *state
|= IOSTATE_eofbit
;
6722 /* ?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 */
6723 /* ?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 */
6724 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6725 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6726 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6728 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6729 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6732 /* ?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 */
6733 /* ?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 */
6734 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6735 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6736 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6738 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6739 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6742 /* ?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 */
6743 /* ?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 */
6744 #if _MSVCP_VER <= 100
6745 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6746 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6747 (this, ret, first, last, base, state, pval))
6749 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6750 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6751 (this, ret, first, last, base, state, pval))
6753 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6754 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6755 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6761 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6763 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6764 if(end
!=tmp
&& !err
)
6767 *state
|= IOSTATE_failbit
;
6770 *state
|= IOSTATE_eofbit
;
6776 /* ?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 */
6777 /* ?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 */
6778 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6779 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6780 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6782 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6783 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6786 /* ?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 */
6787 /* ?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 */
6788 #if _MSVCP_VER <= 100
6789 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6790 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6791 (this, ret, first, last, base, state, pval))
6793 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6794 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6795 (this, ret, first, last, base, state, pval))
6797 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6798 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6799 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6805 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6807 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6808 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6809 if(end
!=tmp
&& !err
)
6812 *state
|= IOSTATE_failbit
;
6815 *state
|= IOSTATE_eofbit
;
6821 /* ?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 */
6822 /* ?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 */
6823 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6824 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6825 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6827 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6828 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6831 /* ?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 */
6832 /* ?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 */
6833 #if _MSVCP_VER <= 100
6834 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6835 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6836 (this, ret, first, last, base, state, pval))
6838 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6839 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6840 (this, ret, first, last, base, state, pval))
6842 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6843 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6844 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6850 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6852 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6853 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6854 if(end
!=tmp
&& !err
)
6857 *state
|= IOSTATE_failbit
;
6860 *state
|= IOSTATE_eofbit
;
6866 /* ?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 */
6867 /* ?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 */
6868 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6869 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6870 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6872 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6873 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6876 /* ?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 */
6877 /* ?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 */
6878 #if _MSVCP_VER <= 100
6879 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6880 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6881 (this, ret, first, last, base, state, pval))
6883 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6884 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6885 (this, ret, first, last, base, state, pval))
6887 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6888 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6889 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6895 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6897 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6898 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6899 if(end
!=tmp
&& !err
)
6902 *state
|= IOSTATE_failbit
;
6905 *state
|= IOSTATE_eofbit
;
6911 /* ?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 */
6912 /* ?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 */
6913 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6914 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6915 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6917 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6918 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6921 /* ?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 */
6922 /* ?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 */
6923 #if _MSVCP_VER <= 100
6924 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6925 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6926 (this, ret, first, last, base, state, pval))
6928 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6929 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6930 (this, ret, first, last, base, state, pval))
6932 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6933 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6934 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6940 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6942 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6943 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6944 if(end
!=tmp
&& !err
)
6947 *state
|= IOSTATE_failbit
;
6950 *state
|= IOSTATE_eofbit
;
6956 /* ?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 */
6957 /* ?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 */
6958 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6959 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6960 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6962 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6963 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6966 /* ?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 */
6967 /* ?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 */
6968 #if _MSVCP_VER <= 100
6969 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6970 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6971 (this, ret, first, last, base, state, pval))
6973 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6974 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6975 (this, ret, first, last, base, state, pval))
6977 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6978 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6979 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6981 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6982 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6985 /* ?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 */
6986 /* ?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 */
6987 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6988 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6989 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6991 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6992 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6995 /* ?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 */
6996 /* ?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 */
6997 #if _MSVCP_VER <= 100
6998 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6999 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
7000 (this, ret, first, last, base, state, pval))
7002 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
7003 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
7004 (this, ret, first, last, base, state, pval))
7006 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
7007 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
7008 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
7011 char tmp
[25], *beg
, *end
;
7014 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7016 b
= num_get_char__Getifld(this, tmp
,
7017 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
7018 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
7019 v
= _Stoulx(beg
, &end
, b
, &err
);
7021 if(v
!= (ULONG
)((unsigned short)v
))
7022 *state
|= IOSTATE_failbit
;
7023 else if(end
!=beg
&& !err
)
7024 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
7026 *state
|= IOSTATE_failbit
;
7029 *state
|= IOSTATE_eofbit
;
7035 /* ?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 */
7036 /* ?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 */
7037 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
7038 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
7039 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
7041 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7042 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
7045 /* ?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 */
7046 /* ?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 */
7047 #if _MSVCP_VER <= 100
7048 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
7049 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
7050 (this, ret, first, last, base, state, pval))
7052 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
7053 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
7054 (this, ret, first, last, base, state, pval))
7056 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
7057 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7058 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7060 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7062 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7063 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7064 basic_string_char false_bstr
, true_bstr
;
7065 const char *pfalse
, *ptrue
;
7067 numpunct_char_falsename(numpunct
, &false_bstr
);
7068 numpunct_char_truename(numpunct
, &true_bstr
);
7069 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
7070 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
7072 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
7073 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
7075 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
7078 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
7080 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
7089 istreambuf_iterator_char_inc(&first
);
7091 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
7100 *state
|= IOSTATE_failbit
;
7102 MSVCP_basic_string_char_dtor(&false_bstr
);
7103 MSVCP_basic_string_char_dtor(&true_bstr
);
7107 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
7108 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
7110 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
7113 *state
|= IOSTATE_failbit
;
7117 *state
|= IOSTATE_eofbit
;
7118 memcpy(ret
, &first
, sizeof(first
));
7122 /* ?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 */
7123 /* ?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 */
7124 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
7125 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7126 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7128 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7129 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
7132 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
7133 locale_id num_put_char_id
= {0};
7135 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
7136 extern const vtable_ptr MSVCP_num_put_char_vtable
;
7138 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7139 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7140 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
7141 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
7143 TRACE("(%p %p)\n", this, locinfo
);
7144 #if _MSVCP_VER < 110
7145 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7149 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7150 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7151 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
7152 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7154 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7156 locale_facet_ctor_refs(&this->facet
, refs
);
7157 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
7159 num_put_char__Init(this, locinfo
);
7163 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
7164 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
7165 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
7166 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7170 TRACE("(%p %lu)\n", this, refs
);
7172 _Locinfo_ctor(&locinfo
);
7173 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7174 _Locinfo_dtor(&locinfo
);
7178 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7179 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7180 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7181 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7183 return num_put_char_ctor_refs(this, 0);
7186 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7187 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7188 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7189 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7190 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7191 void __thiscall
num_put_char_dtor(num_put
*this)
7193 TRACE("(%p)\n", this);
7194 locale_facet_dtor(&this->facet
);
7197 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7198 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7200 TRACE("(%p %x)\n", this, flags
);
7202 /* we have an array, with the number of elements stored before the first object */
7203 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7205 for(i
=*ptr
-1; i
>=0; i
--)
7206 num_put_char_dtor(this+i
);
7207 MSVCRT_operator_delete(ptr
);
7209 num_put_char_dtor(this);
7211 MSVCRT_operator_delete(this);
7217 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7218 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7219 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7221 TRACE("(%p %p)\n", facet
, loc
);
7223 if(facet
&& !*facet
) {
7226 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7228 ERR("Out of memory\n");
7229 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7233 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7234 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7235 _Locinfo_dtor(&locinfo
);
7241 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7242 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7243 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7245 return num_put_char__Getcat(facet
, locale_classic());
7248 num_put
* num_put_char_use_facet(const locale
*loc
)
7250 static num_put
*obj
= NULL
;
7253 const locale_facet
*fac
;
7255 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7256 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7258 _Lockit_dtor(&lock
);
7259 return (num_put
*)fac
;
7263 _Lockit_dtor(&lock
);
7267 num_put_char__Getcat(&fac
, loc
);
7268 obj
= (num_put
*)fac
;
7269 call_locale_facet__Incref(&obj
->facet
);
7270 locale_facet_register(&obj
->facet
);
7271 _Lockit_dtor(&lock
);
7276 /* ?_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 */
7277 /* ?_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 */
7278 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7279 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7281 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7283 for(; count
>0; count
--)
7284 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7290 /* ?_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 */
7291 /* ?_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 */
7292 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7293 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7295 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7297 for(; count
>0; count
--)
7298 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7304 /* ?_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 */
7305 /* ?_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 */
7306 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7307 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7309 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7313 /* ?_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 */
7314 /* ?_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 */
7315 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7316 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7318 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7320 for(; count
>0; count
--)
7321 ostreambuf_iterator_char_put(&dest
, c
);
7327 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7328 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7329 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7331 int type
= fmtfl
& FMTFLAG_floatfield
;
7334 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7337 if(fmtfl
& FMTFLAG_showpos
)
7339 if(fmtfl
& FMTFLAG_showpoint
)
7346 if(type
== FMTFLAG_fixed
)
7348 else if(type
== FMTFLAG_scientific
)
7349 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7350 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7351 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7353 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7359 /* ?_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 */
7360 /* ?_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 */
7361 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7362 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7363 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7365 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7366 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7370 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7371 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7372 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7374 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7375 basic_string_char grouping_bstr
;
7376 const char *grouping
;
7377 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7378 int cur_group
= 0, group_size
= 0;
7379 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7382 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7384 /* Change decimal point */
7385 for(p
=buf
; p
<buf
+count
; p
++) {
7386 if(*p
== dec_point
) {
7387 *p
= numpunct_char_decimal_point(numpunct
);
7393 /* Add separators to number */
7394 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7395 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7396 #if _MSVCP_VER >= 70
7397 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7400 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7402 if(group_size
== grouping
[cur_group
]) {
7404 if(grouping
[cur_group
+1])
7407 memmove(p
+1, p
, buf
+count
-p
);
7412 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7414 /* Display number with padding */
7415 if(count
>= base
->wide
)
7418 pad
= base
->wide
-count
;
7421 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7422 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7425 if(adjustfield
!= FMTFLAG_left
) {
7426 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7429 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7430 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7433 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7434 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7435 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7437 int base
= fmtfl
& FMTFLAG_basefield
;
7440 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7443 if(fmtfl
& FMTFLAG_showpos
)
7445 if(fmtfl
& FMTFLAG_showbase
)
7452 if(base
== FMTFLAG_oct
)
7454 else if(base
== FMTFLAG_hex
)
7455 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7463 /* ?_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 */
7464 /* ?_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 */
7465 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7466 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7468 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7469 basic_string_char grouping_bstr
;
7470 const char *grouping
;
7472 int cur_group
= 0, group_size
= 0;
7473 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7476 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7478 /* Add separators to number */
7479 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7480 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7481 #if _MSVCP_VER >= 70
7482 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7485 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7487 if(group_size
== grouping
[cur_group
]) {
7489 if(grouping
[cur_group
+1])
7492 memmove(p
+1, p
, buf
+count
-p
);
7497 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7499 /* Display number with padding */
7500 if(count
>= base
->wide
)
7503 pad
= base
->wide
-count
;
7506 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7507 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7509 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7510 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7513 if(adjustfield
!= FMTFLAG_left
) {
7514 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7517 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7518 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7521 /* ?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 */
7522 /* ?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 */
7523 #if _MSVCP_VER <= 100
7524 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7525 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7526 (this, ret, dest, base, fill, v))
7528 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7529 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7530 (this, ret, dest, base, fill, v))
7532 #if _MSVCP_VER != 80
7533 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7535 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7537 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7538 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7540 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7541 char fmt
[7]; /* strlen("%+#lld")+1 */
7543 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7545 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7546 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7549 /* ?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 */
7550 /* ?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 */
7551 #if _MSVCP_VER != 80
7552 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7554 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7556 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7557 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7559 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7560 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7563 /* ?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 */
7564 /* ?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 */
7565 #if _MSVCP_VER <= 100
7566 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7567 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7568 (this, ret, dest, base, fill, v))
7570 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7571 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7572 (this, ret, dest, base, fill, v))
7574 #if _MSVCP_VER != 80
7575 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7577 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7579 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7580 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7582 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7583 char fmt
[7]; /* strlen("%+#lld")+1 */
7585 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7587 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7588 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7591 /* ?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 */
7592 /* ?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 */
7593 #if _MSVCP_VER != 80
7594 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7596 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7598 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7599 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7601 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7602 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7605 static inline unsigned get_precision(const ios_base
*base
)
7607 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7613 /* ?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 */
7614 /* ?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 */
7615 /* ?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 */
7616 /* ?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 */
7617 #if _MSVCP_VER <= 100
7618 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7619 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7620 (this, ret, dest, base, fill, v))
7621 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7622 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7623 (this, ret, dest, base, fill, v))
7625 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7626 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7627 (this, ret, dest, base, fill, v))
7628 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7629 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7630 (this, ret, dest, base, fill, v))
7632 #if _MSVCP_VER != 80
7633 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7635 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7637 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7638 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7641 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7645 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7647 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7648 prec
= get_precision(base
);
7649 size
= _scprintf(fmt
, prec
, v
);
7651 /* TODO: don't use dynamic allocation */
7652 tmp
= MSVCRT_operator_new(size
*2);
7654 ERR("Out of memory\n");
7655 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7657 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7658 MSVCRT_operator_delete(tmp
);
7662 /* ?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 */
7663 /* ?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 */
7664 #if _MSVCP_VER != 80
7665 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7667 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7669 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7670 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7672 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7673 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7676 /* ?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 */
7677 /* ?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 */
7678 #if _MSVCP_VER != 80
7679 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7681 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7683 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7684 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7686 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7687 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7690 /* ?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 */
7691 /* ?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 */
7692 #if _MSVCP_VER <= 100
7693 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7694 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7695 (this, ret, dest, base, fill, v))
7697 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7698 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7699 (this, ret, dest, base, fill, v))
7701 #if _MSVCP_VER != 80
7702 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7704 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7706 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7707 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7709 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7711 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7713 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7716 /* ?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 */
7717 /* ?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 */
7718 #if _MSVCP_VER != 80
7719 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7721 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7723 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7724 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7726 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7727 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7730 /* ?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 */
7731 /* ?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 */
7732 #if _MSVCP_VER <= 100
7733 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7734 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7735 (this, ret, dest, base, fill, v))
7737 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7738 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7739 (this, ret, dest, base, fill, v))
7741 #if _MSVCP_VER != 80
7742 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7744 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7746 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7747 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7749 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7750 char fmt
[7]; /* strlen("%+#lld")+1 */
7752 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7754 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7755 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7758 /* ?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 */
7759 /* ?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 */
7760 #if _MSVCP_VER != 80
7761 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7763 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7765 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7766 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7768 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7769 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7772 /* ?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 */
7773 /* ?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 */
7774 #if _MSVCP_VER <= 100
7775 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7776 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7777 (this, ret, dest, base, fill, v))
7779 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7780 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7781 (this, ret, dest, base, fill, v))
7783 #if _MSVCP_VER != 80
7784 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7786 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7788 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7789 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7791 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7792 char fmt
[7]; /* strlen("%+#lld")+1 */
7794 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7796 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7797 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7800 /* ?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 */
7801 /* ?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 */
7802 #if _MSVCP_VER != 80
7803 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7805 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7807 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7808 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7810 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7811 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7814 /* ?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 */
7815 /* ?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 */
7816 #if _MSVCP_VER <= 100
7817 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7818 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7819 (this, ret, dest, base, fill, v))
7821 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7822 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7823 (this, ret, dest, base, fill, v))
7825 #if _MSVCP_VER != 80
7826 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7828 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7830 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7831 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7833 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7835 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7836 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7837 basic_string_char str
;
7838 MSVCP_size_t pad
, len
;
7841 numpunct_char_truename(numpunct
, &str
);
7843 numpunct_char_falsename(numpunct
, &str
);
7845 len
= MSVCP_basic_string_char_length(&str
);
7846 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7849 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7850 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7853 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7854 MSVCP_basic_string_char_dtor(&str
);
7855 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7858 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7861 /* ?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 */
7862 /* ?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 */
7863 #if _MSVCP_VER != 80
7864 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7866 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7868 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7869 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7871 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7872 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7875 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7876 locale_id num_put_wchar_id
= {0};
7877 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7878 locale_id num_put_short_id
= {0};
7880 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7881 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7882 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7883 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7885 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7886 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7887 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7888 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7890 TRACE("(%p %p)\n", this, locinfo
);
7891 #if _MSVCP_VER < 110
7892 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7896 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7897 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7898 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7899 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7901 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7903 locale_facet_ctor_refs(&this->facet
, refs
);
7904 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7906 num_put_wchar__Init(this, locinfo
);
7910 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7911 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7912 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7913 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7915 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7916 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7920 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7921 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7922 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7923 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7927 TRACE("(%p %lu)\n", this, refs
);
7929 _Locinfo_ctor(&locinfo
);
7930 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7931 _Locinfo_dtor(&locinfo
);
7935 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7936 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7937 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7938 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7940 num_put_wchar_ctor_refs(this, refs
);
7941 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7945 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7946 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7947 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7948 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7950 return num_put_wchar_ctor_refs(this, 0);
7953 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7954 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7955 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7956 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7958 return num_put_short_ctor_refs(this, 0);
7961 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7962 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7963 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7964 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7965 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7966 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7967 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7968 void __thiscall
num_put_wchar_dtor(num_put
*this)
7970 TRACE("(%p)\n", this);
7971 locale_facet_dtor(&this->facet
);
7974 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7975 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7977 TRACE("(%p %x)\n", this, flags
);
7979 /* we have an array, with the number of elements stored before the first object */
7980 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7982 for(i
=*ptr
-1; i
>=0; i
--)
7983 num_put_wchar_dtor(this+i
);
7984 MSVCRT_operator_delete(ptr
);
7986 num_put_wchar_dtor(this);
7988 MSVCRT_operator_delete(this);
7994 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7995 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7996 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7998 TRACE("(%p %p)\n", facet
, loc
);
8000 if(facet
&& !*facet
) {
8003 *facet
= MSVCRT_operator_new(sizeof(num_put
));
8005 ERR("Out of memory\n");
8006 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8010 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8011 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
8012 _Locinfo_dtor(&locinfo
);
8018 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8019 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8020 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
8022 return num_put_wchar__Getcat(facet
, locale_classic());
8025 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8026 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8027 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
8029 TRACE("(%p %p)\n", facet
, loc
);
8031 if(facet
&& !*facet
) {
8034 *facet
= MSVCRT_operator_new(sizeof(num_put
));
8036 ERR("Out of memory\n");
8037 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8041 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8042 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
8043 _Locinfo_dtor(&locinfo
);
8049 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8050 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8051 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
8053 return num_put_short__Getcat(facet
, locale_classic());
8056 num_put
* num_put_wchar_use_facet(const locale
*loc
)
8058 static num_put
*obj
= NULL
;
8061 const locale_facet
*fac
;
8063 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8064 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
8066 _Lockit_dtor(&lock
);
8067 return (num_put
*)fac
;
8071 _Lockit_dtor(&lock
);
8075 num_put_wchar__Getcat(&fac
, loc
);
8076 obj
= (num_put
*)fac
;
8077 call_locale_facet__Incref(&obj
->facet
);
8078 locale_facet_register(&obj
->facet
);
8079 _Lockit_dtor(&lock
);
8084 num_put
* num_put_short_use_facet(const locale
*loc
)
8086 static num_put
*obj
= NULL
;
8089 const locale_facet
*fac
;
8091 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8092 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
8094 _Lockit_dtor(&lock
);
8095 return (num_put
*)fac
;
8099 _Lockit_dtor(&lock
);
8103 num_put_short__Getcat(&fac
, loc
);
8104 obj
= (num_put
*)fac
;
8105 call_locale_facet__Incref(&obj
->facet
);
8106 locale_facet_register(&obj
->facet
);
8107 _Lockit_dtor(&lock
);
8112 /* ?_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 */
8113 /* ?_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 */
8114 /* ?_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 */
8115 /* ?_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 */
8116 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8117 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
8119 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
8121 for(; count
>0; count
--)
8122 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
8128 #if _MSVCP_VER < 110
8129 /* ?_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 */
8130 /* ?_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 */
8131 /* ?_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 */
8132 /* ?_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 */
8133 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8134 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
8139 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
8141 memset(&state
, 0, sizeof(state
));
8142 for(; count
>0; count
--) {
8143 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
8144 ostreambuf_iterator_wchar_put(&dest
, ch
);
8152 /* ?_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 */
8153 /* ?_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 */
8154 /* ?_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 */
8155 /* ?_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 */
8156 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8157 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
8159 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
8163 /* ?_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 */
8164 /* ?_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 */
8165 /* ?_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 */
8166 /* ?_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 */
8167 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8168 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
8170 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
8172 for(; count
>0; count
--)
8173 ostreambuf_iterator_wchar_put(&dest
, c
);
8179 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8180 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8181 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8182 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8183 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8185 int type
= fmtfl
& FMTFLAG_floatfield
;
8188 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8191 if(fmtfl
& FMTFLAG_showpos
)
8193 if(fmtfl
& FMTFLAG_showbase
)
8200 if(type
== FMTFLAG_fixed
)
8202 else if(type
== FMTFLAG_scientific
)
8203 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8204 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8205 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8207 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8213 /* ?_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 */
8214 /* ?_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 */
8215 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8216 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8217 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8219 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8220 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8224 /* ?_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 */
8225 /* ?_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 */
8226 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8227 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8228 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8230 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8231 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8235 #if _MSVCP_VER < 110
8236 static void num_put_wchar_wide_put(const num_put
*this,
8237 ostreambuf_iterator_wchar
*dest
, ios_base
*base
,
8238 const char *buf
, MSVCP_size_t count
)
8240 num_put_wchar__Putc(this, dest
, *dest
, buf
, count
);
8243 static void num_put_wchar_wide_put(const num_put
*this,
8244 ostreambuf_iterator_wchar
*dest
, ios_base
*base
,
8245 const char *buf
, MSVCP_size_t count
)
8250 ctype
= ctype_wchar_use_facet(IOS_LOCALE(base
));
8251 for(i
=0; i
<count
; i
++)
8252 ostreambuf_iterator_wchar_put(dest
, ctype_wchar_widen_ch(ctype
, buf
[i
]));
8256 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8257 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8258 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8259 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8261 basic_string_char grouping_bstr
;
8262 const char *grouping
;
8263 char *p
, dec_point
= *localeconv()->decimal_point
;
8265 int cur_group
= 0, group_size
= 0;
8266 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8267 MSVCP_size_t i
, pad
;
8269 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8271 for(p
=buf
; p
<buf
+count
; p
++) {
8277 /* Add separators to number */
8278 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8279 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8280 #if _MSVCP_VER >= 70
8281 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8284 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8286 if(group_size
== grouping
[cur_group
]) {
8288 if(grouping
[cur_group
+1])
8291 memmove(p
+1, p
, buf
+count
-p
);
8292 *p
= '\0'; /* mark thousands separator positions */
8296 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8298 /* Display number with padding */
8299 if(count
>= base
->wide
)
8302 pad
= base
->wide
-count
;
8305 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8306 num_put_wchar_wide_put(this, &dest
, base
, buf
, 1);
8309 if(adjustfield
!= FMTFLAG_left
) {
8310 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8314 for(i
=0; i
<count
; i
++) {
8315 if(buf
[i
] == dec_point
)
8316 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8318 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8320 num_put_wchar_wide_put(this, &dest
, base
, buf
+i
, 1);
8323 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8326 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8327 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8328 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8329 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8330 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8332 int base
= fmtfl
& FMTFLAG_basefield
;
8335 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8338 if(fmtfl
& FMTFLAG_showpos
)
8340 if(fmtfl
& FMTFLAG_showbase
)
8347 if(base
== FMTFLAG_oct
)
8349 else if(base
== FMTFLAG_hex
)
8350 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8358 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8359 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8360 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8362 basic_string_char grouping_bstr
;
8363 const char *grouping
;
8366 int cur_group
= 0, group_size
= 0;
8367 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8368 MSVCP_size_t i
, pad
;
8370 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8372 /* Add separators to number */
8373 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8374 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8375 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8377 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8379 if(group_size
== grouping
[cur_group
]) {
8381 if(grouping
[cur_group
+1])
8384 memmove(p
+1, p
, buf
+count
-p
);
8385 *p
= '\0'; /* mark thousands separator positions */
8389 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8391 /* Display number with padding */
8392 if(count
>= base
->wide
)
8395 pad
= base
->wide
-count
;
8398 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8399 num_put_wchar_wide_put(this, &dest
, base
, buf
, 1);
8401 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8402 num_put_wchar_wide_put(this, &dest
, base
, buf
, 2);
8405 if(adjustfield
!= FMTFLAG_left
) {
8406 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8410 for(i
=0; i
<count
; i
++) {
8412 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8414 num_put_wchar_wide_put(this, &dest
, base
, buf
+i
, 1);
8417 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8420 /* ?_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 */
8421 /* ?_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 */
8422 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8423 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8425 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8428 /* ?_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 */
8429 /* ?_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 */
8430 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8431 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8433 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8436 /* ?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 */
8437 /* ?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 */
8438 #if _MSVCP_VER <= 100
8439 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8440 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8441 (this, ret, dest, base, fill, v))
8443 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8444 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8445 (this, ret, dest, base, fill, v))
8447 #if _MSVCP_VER != 80
8448 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8450 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8452 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8453 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8455 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8456 char fmt
[7]; /* strlen("%+#lld")+1 */
8458 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8460 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8461 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8464 /* ?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 */
8465 /* ?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 */
8466 #if _MSVCP_VER != 80
8467 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8469 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8471 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8472 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8474 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8475 char fmt
[7]; /* strlen("%+#lld")+1 */
8477 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8479 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8480 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8483 /* ?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 */
8484 /* ?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 */
8485 /* ?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 */
8486 /* ?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 */
8487 #if _MSVCP_VER != 80
8488 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8490 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8492 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8493 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8495 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8496 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8499 /* ?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 */
8500 /* ?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 */
8501 #if _MSVCP_VER <= 100
8502 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8503 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8504 (this, ret, dest, base, fill, v))
8506 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8507 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8508 (this, ret, dest, base, fill, v))
8510 #if _MSVCP_VER != 80
8511 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8513 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8515 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8516 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8518 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8519 char fmt
[7]; /* strlen("%+#lld")+1 */
8521 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8523 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8524 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8527 /* ?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 */
8528 /* ?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 */
8529 #if _MSVCP_VER != 80
8530 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8532 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8534 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8535 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8537 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8538 char fmt
[7]; /* strlen("%+#lld")+1 */
8540 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8542 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8543 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8546 /* ?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 */
8547 /* ?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 */
8548 /* ?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 */
8549 /* ?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 */
8550 #if _MSVCP_VER != 80
8551 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8553 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8555 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8556 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8558 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8559 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8562 /* ?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 */
8563 /* ?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 */
8564 /* ?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 */
8565 /* ?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 */
8566 #if _MSVCP_VER <= 100
8567 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8568 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8569 (this, ret, dest, base, fill, v))
8570 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8571 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8572 (this, ret, dest, base, fill, v))
8574 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8575 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8576 (this, ret, dest, base, fill, v))
8577 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8578 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8579 (this, ret, dest, base, fill, v))
8581 #if _MSVCP_VER != 80
8582 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8584 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8586 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8587 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8590 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8594 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8596 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8597 prec
= get_precision(base
);
8598 size
= _scprintf(fmt
, prec
, v
);
8600 /* TODO: don't use dynamic allocation */
8601 tmp
= MSVCRT_operator_new(size
*2);
8603 ERR("Out of memory\n");
8604 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8606 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8607 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8608 MSVCRT_operator_delete(tmp
);
8612 /* ?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 */
8613 /* ?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 */
8614 /* ?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 */
8615 /* ?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 */
8616 #if _MSVCP_VER != 80
8617 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8619 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8621 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8622 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8625 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8629 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8631 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8632 prec
= get_precision(base
);
8633 size
= _scprintf(fmt
, prec
, v
);
8635 /* TODO: don't use dynamic allocation */
8636 tmp
= MSVCRT_operator_new(size
*2);
8638 ERR("Out of memory\n");
8639 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8641 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8642 numpunct_short_use_facet(IOS_LOCALE(base
)));
8643 MSVCRT_operator_delete(tmp
);
8647 /* ?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 */
8648 /* ?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 */
8649 /* ?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 */
8650 /* ?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 */
8651 #if _MSVCP_VER != 80
8652 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8654 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8656 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8657 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8659 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8660 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8663 /* ?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 */
8664 /* ?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 */
8665 /* ?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 */
8666 /* ?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 */
8667 #if _MSVCP_VER != 80
8668 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8670 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8672 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8673 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8675 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8676 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8679 /* ?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 */
8680 /* ?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 */
8681 #if _MSVCP_VER <= 100
8682 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8683 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8684 (this, ret, dest, base, fill, v))
8686 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8687 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8688 (this, ret, dest, base, fill, v))
8690 #if _MSVCP_VER != 80
8691 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8693 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8695 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8696 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8698 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8700 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8702 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8705 /* ?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 */
8706 /* ?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 */
8707 #if _MSVCP_VER != 80
8708 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8710 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8712 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8713 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8715 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8717 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8719 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8722 /* ?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 */
8723 /* ?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 */
8724 /* ?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 */
8725 /* ?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 */
8726 #if _MSVCP_VER != 80
8727 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8729 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8731 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8732 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8734 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8735 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8738 /* ?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 */
8739 /* ?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 */
8740 #if _MSVCP_VER <= 100
8741 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8742 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8743 (this, ret, dest, base, fill, v))
8745 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8746 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8747 (this, ret, dest, base, fill, v))
8749 #if _MSVCP_VER != 80
8750 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8752 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8754 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8755 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8757 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8758 char fmt
[7]; /* strlen("%+#lld")+1 */
8760 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8762 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8763 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8766 /* ?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 */
8767 /* ?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 */
8768 #if _MSVCP_VER != 80
8769 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8771 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8773 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8774 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8776 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8777 char fmt
[7]; /* strlen("%+#lld")+1 */
8779 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8781 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8782 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8785 /* ?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 */
8786 /* ?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 */
8787 /* ?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 */
8788 /* ?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 */
8789 #if _MSVCP_VER != 80
8790 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8792 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8794 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8795 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8797 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8798 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8801 /* ?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 */
8802 /* ?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 */
8803 #if _MSVCP_VER <= 100
8804 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8805 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8806 (this, ret, dest, base, fill, v))
8808 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8809 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8810 (this, ret, dest, base, fill, v))
8812 #if _MSVCP_VER != 80
8813 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8815 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8817 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8818 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8820 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8821 char fmt
[7]; /* strlen("%+#lld")+1 */
8823 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8825 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8826 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8829 /* ?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 */
8830 /* ?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 */
8831 #if _MSVCP_VER != 80
8832 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8834 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8836 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8837 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8839 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8840 char fmt
[7]; /* strlen("%+#lld")+1 */
8842 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8844 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8845 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8848 /* ?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 */
8849 /* ?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 */
8850 /* ?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 */
8851 /* ?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 */
8852 #if _MSVCP_VER != 80
8853 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8855 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8857 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8858 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8860 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8861 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8864 /* ?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 */
8865 /* ?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 */
8866 #if _MSVCP_VER <= 100
8867 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8868 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8869 (this, ret, dest, base, fill, v))
8871 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8872 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8873 (this, ret, dest, base, fill, v))
8875 #if _MSVCP_VER != 80
8876 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8878 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8880 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8881 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8883 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8885 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8886 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8887 basic_string_wchar str
;
8888 MSVCP_size_t pad
, len
;
8891 numpunct_wchar_truename(numpunct
, &str
);
8893 numpunct_wchar_falsename(numpunct
, &str
);
8895 len
= MSVCP_basic_string_wchar_length(&str
);
8896 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8899 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8900 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8903 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8904 MSVCP_basic_string_wchar_dtor(&str
);
8905 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8908 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8911 /* ?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 */
8912 /* ?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 */
8913 #if _MSVCP_VER != 80
8914 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8916 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8918 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8919 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8921 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8923 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8924 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8925 basic_string_wchar str
;
8926 MSVCP_size_t pad
, len
;
8929 numpunct_wchar_truename(numpunct
, &str
);
8931 numpunct_wchar_falsename(numpunct
, &str
);
8933 len
= MSVCP_basic_string_wchar_length(&str
);
8934 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8937 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8938 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8941 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8942 MSVCP_basic_string_wchar_dtor(&str
);
8943 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8946 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8949 /* ?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 */
8950 /* ?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 */
8951 /* ?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 */
8952 /* ?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 */
8953 #if _MSVCP_VER != 80
8954 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8956 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8958 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8959 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8961 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8962 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8965 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8966 locale_id time_put_char_id
= {0};
8968 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8969 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8971 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8972 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8973 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8974 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8976 TRACE("(%p %p)\n", this, locinfo
);
8977 _Locinfo__Gettnames(locinfo
, &this->time
);
8978 #if _MSVCP_VER <= 100
8979 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8983 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8984 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8985 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8986 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8988 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8989 locale_facet_ctor_refs(&this->facet
, refs
);
8990 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8991 time_put_char__Init(this, locinfo
);
8995 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8996 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8997 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8998 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9002 TRACE("(%p %lu)\n", this, refs
);
9004 _Locinfo_ctor(&locinfo
);
9005 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
9006 _Locinfo_dtor(&locinfo
);
9010 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9011 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9012 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
9013 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
9015 return time_put_char_ctor_refs(this, 0);
9018 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9019 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9020 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
9021 void __thiscall
time_put_char_dtor(time_put
*this)
9023 TRACE("(%p)\n", this);
9024 _Timevec_dtor(&this->time
);
9027 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
9028 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
9030 TRACE("(%p %x)\n", this, flags
);
9032 /* we have an array, with the number of elements stored before the first object */
9033 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9035 for(i
=*ptr
-1; i
>=0; i
--)
9036 time_put_char_dtor(this+i
);
9037 MSVCRT_operator_delete(ptr
);
9039 time_put_char_dtor(this);
9041 MSVCRT_operator_delete(this);
9047 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9048 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9049 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9051 TRACE("(%p %p)\n", facet
, loc
);
9053 if(facet
&& !*facet
) {
9056 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9058 ERR("Out of memory\n");
9059 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9063 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9064 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
9065 _Locinfo_dtor(&locinfo
);
9071 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9072 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9073 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
9075 return time_put_char__Getcat(facet
, locale_classic());
9078 static time_put
* time_put_char_use_facet(const locale
*loc
)
9080 static time_put
*obj
= NULL
;
9083 const locale_facet
*fac
;
9085 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9086 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
9088 _Lockit_dtor(&lock
);
9089 return (time_put
*)fac
;
9093 _Lockit_dtor(&lock
);
9097 time_put_char__Getcat(&fac
, loc
);
9098 obj
= (time_put
*)fac
;
9099 call_locale_facet__Incref(&obj
->facet
);
9100 locale_facet_register(&obj
->facet
);
9101 _Lockit_dtor(&lock
);
9106 #if _MSVCP_VER >= 70
9108 /* ?do_put@?$time_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@DPBUtm@@DD@Z */
9109 /* ?do_put@?$time_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@DPEBUtm@@DD@Z */
9110 #if _MSVCP_VER != 80
9111 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
9113 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
9115 #if _MSVCP_VER <= 100
9116 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9117 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9118 (this, ret, dest, base, fill, t, spec, mod))
9120 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
9121 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9122 (this, ret, dest, base, fill, t, spec, mod))
9124 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9125 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9127 char buf
[64], fmt
[4], *p
= fmt
;
9128 MSVCP_size_t i
, len
;
9130 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9138 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9139 for(i
=0; i
<len
; i
++)
9140 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9146 /* ?put@?$time_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@DPBUtm@@DD@Z */
9147 /* ?put@?$time_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@DPEBUtm@@DD@Z */
9148 #if _MSVCP_VER != 80
9149 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
9151 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
9153 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9154 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9156 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9157 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9160 /* ?put@?$time_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@DPBUtm@@PBD3@Z */
9161 /* ?put@?$time_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@DPEBUtm@@PEBD3@Z */
9162 #if _MSVCP_VER != 80
9163 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
9165 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
9167 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9168 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9170 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
9172 while(pat
< pat_end
) {
9174 ostreambuf_iterator_char_put(&dest
, *pat
++);
9175 }else if(++pat
== pat_end
) {
9176 ostreambuf_iterator_char_put(&dest
, '%');
9177 }else if(*pat
=='#' && pat
+1==pat_end
) {
9178 ostreambuf_iterator_char_put(&dest
, '%');
9179 ostreambuf_iterator_char_put(&dest
, *pat
++);
9190 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
9198 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9200 /* ?do_put@?$time_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@PBUtm@@DD@Z */
9201 /* ?do_put@?$time_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@PEBUtm@@DD@Z */
9202 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9203 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9204 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9205 (this, ret, dest, base, t, spec, mod))
9206 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9207 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9209 char buf
[64], fmt
[4], *p
= fmt
;
9210 MSVCP_size_t i
, len
;
9212 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9220 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9221 for(i
=0; i
<len
; i
++)
9222 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9228 /* ?put@?$time_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@PBUtm@@DD@Z */
9229 /* ?put@?$time_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@PEBUtm@@DD@Z */
9230 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9231 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9232 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9234 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9235 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9238 /* ?put@?$time_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@PBUtm@@PBD3@Z */
9239 /* ?put@?$time_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@PEBUtm@@PEBD3@Z */
9240 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9241 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9242 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9244 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9246 while(pat
< pat_end
) {
9248 ostreambuf_iterator_char_put(&dest
, *pat
++);
9249 }else if(++pat
== pat_end
) {
9250 ostreambuf_iterator_char_put(&dest
, '%');
9251 }else if(*pat
=='#' && pat
+1==pat_end
) {
9252 ostreambuf_iterator_char_put(&dest
, '%');
9253 ostreambuf_iterator_char_put(&dest
, *pat
++);
9264 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9272 #endif /* MSVCP_VER >= 70 */
9274 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9275 locale_id time_put_wchar_id
= {0};
9276 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9277 locale_id time_put_short_id
= {0};
9279 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9280 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
9281 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9282 extern const vtable_ptr MSVCP_time_put_short_vtable
;
9284 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9285 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9286 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9287 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9288 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9289 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9291 TRACE("(%p %p)\n", this, locinfo
);
9292 _Locinfo__Gettnames(locinfo
, &this->time
);
9293 #if _MSVCP_VER <= 100
9294 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9298 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9299 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9300 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9301 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9303 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9304 locale_facet_ctor_refs(&this->facet
, refs
);
9305 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
9306 time_put_wchar__Init(this, locinfo
);
9310 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9311 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9312 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9313 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9315 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9316 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9320 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9321 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9322 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9323 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9327 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
9329 _Locinfo_ctor_cstr(&locinfo
, name
);
9330 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9331 _Locinfo_dtor(&locinfo
);
9335 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9336 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9337 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9338 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9340 time_put_wchar_ctor_name(this, name
, refs
);
9341 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9345 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9346 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9347 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9348 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9352 TRACE("(%p %lu)\n", this, refs
);
9354 _Locinfo_ctor(&locinfo
);
9355 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9356 _Locinfo_dtor(&locinfo
);
9360 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9361 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9362 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9363 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9365 time_put_wchar_ctor_refs(this, refs
);
9366 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9370 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9371 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9372 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9373 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9375 return time_put_wchar_ctor_refs(this, 0);
9378 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9379 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9380 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9381 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9383 time_put_wchar_ctor(this);
9384 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9388 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9389 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9390 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9391 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9392 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9393 void __thiscall
time_put_wchar_dtor(time_put
*this)
9395 TRACE("(%p)\n", this);
9396 _Timevec_dtor(&this->time
);
9399 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9400 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9402 TRACE("(%p %x)\n", this, flags
);
9404 /* we have an array, with the number of elements stored before the first object */
9405 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9407 for(i
=*ptr
-1; i
>=0; i
--)
9408 time_put_wchar_dtor(this+i
);
9409 MSVCRT_operator_delete(ptr
);
9411 time_put_wchar_dtor(this);
9413 MSVCRT_operator_delete(this);
9419 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9420 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9421 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9423 TRACE("(%p %p)\n", facet
, loc
);
9425 if(facet
&& !*facet
) {
9426 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9428 ERR("Out of memory\n");
9429 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9432 time_put_wchar_ctor_name((time_put
*)*facet
,
9433 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9439 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9440 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9441 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9443 return time_put_wchar__Getcat(facet
, locale_classic());
9446 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9448 static time_put
*obj
= NULL
;
9451 const locale_facet
*fac
;
9453 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9454 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9456 _Lockit_dtor(&lock
);
9457 return (time_put
*)fac
;
9461 _Lockit_dtor(&lock
);
9465 time_put_wchar__Getcat(&fac
, loc
);
9466 obj
= (time_put
*)fac
;
9467 call_locale_facet__Incref(&obj
->facet
);
9468 locale_facet_register(&obj
->facet
);
9469 _Lockit_dtor(&lock
);
9474 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9475 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9476 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9478 TRACE("(%p %p)\n", facet
, loc
);
9480 if(facet
&& !*facet
) {
9481 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9483 ERR("Out of memory\n");
9484 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9487 time_put_short_ctor_name((time_put
*)*facet
,
9488 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9494 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9495 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9496 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9498 return time_put_short__Getcat(facet
, locale_classic());
9501 static time_put
* time_put_short_use_facet(const locale
*loc
)
9503 static time_put
*obj
= NULL
;
9506 const locale_facet
*fac
;
9508 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9509 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9511 _Lockit_dtor(&lock
);
9512 return (time_put
*)fac
;
9516 _Lockit_dtor(&lock
);
9520 time_put_short__Getcat(&fac
, loc
);
9521 obj
= (time_put
*)fac
;
9522 call_locale_facet__Incref(&obj
->facet
);
9523 locale_facet_register(&obj
->facet
);
9524 _Lockit_dtor(&lock
);
9529 #if _MSVCP_VER >= 70
9531 /* ?do_put@?$time_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@GPBUtm@@DD@Z */
9532 /* ?do_put@?$time_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@GPEBUtm@@DD@Z */
9533 /* ?do_put@?$time_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@_WPBUtm@@DD@Z */
9534 /* ?do_put@?$time_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@_WPEBUtm@@DD@Z */
9535 #if _MSVCP_VER != 80
9536 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9538 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9540 #if _MSVCP_VER <= 100
9541 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9542 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9543 (this, ret, dest, base, fill, t, spec, mod))
9545 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9546 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9547 (this, ret, dest, base, fill, t, spec, mod))
9549 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9550 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9551 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9553 char buf
[64], fmt
[4], *p
= fmt
;
9554 MSVCP_size_t i
, len
;
9558 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9566 #if _MSVCP_VER <= 100
9569 cvt
= &ctype_wchar_use_facet(base
->loc
)->cvt
;
9572 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9573 for(i
=0; i
<len
; i
++) {
9574 c
= mb_to_wc(buf
[i
], cvt
);
9575 ostreambuf_iterator_wchar_put(&dest
, c
);
9582 /* ?put@?$time_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@GPBUtm@@DD@Z */
9583 /* ?put@?$time_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@GPEBUtm@@DD@Z */
9584 /* ?put@?$time_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@_WPBUtm@@DD@Z */
9585 /* ?put@?$time_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@_WPEBUtm@@DD@Z */
9586 #if _MSVCP_VER != 80
9587 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9589 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9591 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9592 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9593 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9595 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9596 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9599 /* ?put@?$time_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@GPBUtm@@PBG3@Z */
9600 /* ?put@?$time_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@GPEBUtm@@PEBG3@Z */
9601 /* ?put@?$time_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@_WPBUtm@@PB_W4@Z */
9602 /* ?put@?$time_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@_WPEBUtm@@PEB_W4@Z */
9603 #if _MSVCP_VER != 80
9604 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9606 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9608 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9609 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9610 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9616 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9618 #if _MSVCP_VER <= 100
9621 cvt
= &ctype_wchar_use_facet(base
->loc
)->cvt
;
9624 percent
= mb_to_wc('%', cvt
);
9625 while(pat
< pat_end
) {
9626 if(*pat
!= percent
) {
9627 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9628 }else if(++pat
== pat_end
) {
9629 ostreambuf_iterator_wchar_put(&dest
, percent
);
9630 }else if(_Wcrtomb(c
, *pat
, NULL
, cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9631 ostreambuf_iterator_wchar_put(&dest
, percent
);
9632 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9636 if(_Wcrtomb(c
, *pat
++, NULL
, cvt
) != 1) {
9637 ostreambuf_iterator_wchar_put(&dest
, percent
);
9638 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9639 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9641 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9644 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9653 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9655 /* ?do_put@?$time_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@PBUtm@@DD@Z */
9656 /* ?do_put@?$time_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@PEBUtm@@DD@Z */
9657 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9658 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9659 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9660 (this, ret, dest, base, t, spec, mod))
9661 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9662 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9663 const struct tm
*t
, char spec
, char mod
)
9665 char buf
[64], fmt
[4], *p
= fmt
;
9666 MSVCP_size_t i
, len
;
9669 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9677 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9678 for(i
=0; i
<len
; i
++) {
9679 c
= mb_to_wc(buf
[i
], &this->cvt
);
9680 ostreambuf_iterator_wchar_put(&dest
, c
);
9687 /* ?put@?$time_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@PBUtm@@DD@Z */
9688 /* ?put@?$time_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@PEBUtm@@DD@Z */
9689 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9690 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9691 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9692 const struct tm
*t
, char spec
, char mod
)
9694 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9695 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9698 /* ?put@?$time_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@PBUtm@@PBG3@Z */
9699 /* ?put@?$time_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@PEBUtm@@PEBG3@Z */
9700 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9701 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9702 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9703 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9705 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9708 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9710 while(pat
< pat_end
) {
9711 if(*pat
!= percent
) {
9712 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9713 }else if(++pat
== pat_end
) {
9714 ostreambuf_iterator_wchar_put(&dest
, percent
);
9715 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9716 ostreambuf_iterator_wchar_put(&dest
, percent
);
9717 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9721 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9722 ostreambuf_iterator_wchar_put(&dest
, percent
);
9723 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9724 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9726 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9729 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9738 #endif /* _MSVCP_VER >= 70 */
9740 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9741 locale_id time_get_char_id
= {0};
9743 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9744 extern const vtable_ptr MSVCP_time_get_char_vtable
;
9746 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9747 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9748 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9749 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9755 TRACE("(%p %p)\n", this, locinfo
);
9757 days
= _Locinfo__Getdays(locinfo
);
9758 len
= strlen(days
)+1;
9759 this->days
= MSVCRT_operator_new(len
);
9762 ERR("Out of memory\n");
9763 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9765 memcpy((char*)this->days
, days
, len
);
9767 months
= _Locinfo__Getmonths(locinfo
);
9768 len
= strlen(months
)+1;
9769 this->months
= MSVCRT_operator_new(len
);
9772 MSVCRT_operator_delete((char*)this->days
);
9774 ERR("Out of memory\n");
9775 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9777 memcpy((char*)this->months
, months
, len
);
9779 this->dateorder
= _Locinfo__Getdateorder(locinfo
);
9780 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9783 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9784 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9785 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9786 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9787 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9789 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9790 locale_facet_ctor_refs(&this->facet
, refs
);
9791 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9792 time_get_char__Init(this, locinfo
);
9796 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9797 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9798 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9799 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, MSVCP_size_t refs
)
9803 TRACE("(%p %s %lu)\n", this, name
, refs
);
9805 _Locinfo_ctor_cstr(&locinfo
, name
);
9806 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9807 _Locinfo_dtor(&locinfo
);
9811 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9812 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9813 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9814 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, MSVCP_size_t refs
)
9818 TRACE("(%p %lu)\n", this, refs
);
9820 _Locinfo_ctor(&locinfo
);
9821 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9822 _Locinfo_dtor(&locinfo
);
9826 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9827 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9828 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9829 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9831 return time_get_char_ctor_refs(this, 0);
9834 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9835 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9836 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9837 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9839 TRACE("(%p)\n", this);
9841 MSVCRT_operator_delete((char*)this->days
);
9842 MSVCRT_operator_delete((char*)this->months
);
9845 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9846 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9847 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9848 void __thiscall
time_get_char_dtor(time_get_char
*this)
9850 TRACE("(%p)\n", this);
9852 time_get_char__Tidy(this);
9855 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9856 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9858 TRACE("(%p %x)\n", this, flags
);
9860 /* we have an array, with the number of elements stored before the first object */
9861 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9863 for(i
=*ptr
-1; i
>=0; i
--)
9864 time_get_char_dtor(this+i
);
9865 MSVCRT_operator_delete(ptr
);
9867 time_get_char_dtor(this);
9869 MSVCRT_operator_delete(this);
9875 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9876 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9877 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9879 TRACE("(%p %p)\n", facet
, loc
);
9881 if(facet
&& !*facet
) {
9884 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9886 ERR("Out of memory\n");
9887 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9891 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9892 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9893 _Locinfo_dtor(&locinfo
);
9899 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9901 static time_get_char
*obj
= NULL
;
9904 const locale_facet
*fac
;
9906 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9907 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9909 _Lockit_dtor(&lock
);
9910 return (time_get_char
*)fac
;
9914 _Lockit_dtor(&lock
);
9918 time_get_char__Getcat(&fac
, loc
);
9919 obj
= (time_get_char
*)fac
;
9920 call_locale_facet__Incref(&obj
->facet
);
9921 locale_facet_register(&obj
->facet
);
9922 _Lockit_dtor(&lock
);
9927 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9928 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9929 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9930 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9931 int unk1
, int unk2
, int *val
)
9933 FIXME("(%p %p %p %d %d %p) stub\n", this, b
, e
, unk1
, unk2
, val
);
9937 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
9938 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
9939 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
9940 #if _MSVCP_VER <= 100
9941 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
9943 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
9945 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
9947 TRACE("(%p)\n", this);
9948 return this->dateorder
;
9951 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
9952 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
9953 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
9954 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
9956 return call_time_get_char_do_date_order(this);
9959 /* ?do_get_date@?$time_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@AAHPAUtm@@@Z */
9960 /* ?do_get_date@?$time_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@AEAHPEAUtm@@@Z */
9961 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
9962 #if _MSVCP_VER <= 100
9963 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
9964 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9965 (this, ret, s, e, base, err, t))
9967 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9968 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9969 (this, ret, s, e, base, err, t))
9971 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
9972 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9973 ios_base
*base
, int *err
, struct tm
*t
)
9975 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9979 /* ?get_date@?$time_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@AAHPAUtm@@@Z */
9980 /* ?get_date@?$time_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@AEAHPEAUtm@@@Z */
9981 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
9982 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
9983 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9984 ios_base
*base
, int *err
, struct tm
*t
)
9986 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
9989 /* ?do_get_monthname@?$time_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@AAHPAUtm@@@Z */
9990 /* ?do_get_monthname@?$time_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@AEAHPEAUtm@@@Z */
9991 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
9992 #if _MSVCP_VER <= 100
9993 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9994 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9995 (this, ret, s, e, base, err, t))
9997 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
9998 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9999 (this, ret, s, e, base, err, t))
10001 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
10002 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10003 ios_base
*base
, int *err
, struct tm
*t
)
10005 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
10009 /* ?get_monthname@?$time_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@AAHPAUtm@@@Z */
10010 /* ?get_monthname@?$time_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@AEAHPEAUtm@@@Z */
10011 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
10012 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
10013 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10014 ios_base
*base
, int *err
, struct tm
*t
)
10016 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
10019 /* ?do_get_time@?$time_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@AAHPAUtm@@@Z */
10020 /* ?do_get_time@?$time_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@AEAHPEAUtm@@@Z */
10021 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
10022 #if _MSVCP_VER <= 100
10023 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
10024 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10025 (this, ret, s, e, base, err, t))
10027 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
10028 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10029 (this, ret, s, e, base, err, t))
10031 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
10032 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10033 ios_base
*base
, int *err
, struct tm
*t
)
10035 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
10039 /* ?get_time@?$time_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@AAHPAUtm@@@Z */
10040 /* ?get_time@?$time_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@AEAHPEAUtm@@@Z */
10041 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
10042 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
10043 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10044 ios_base
*base
, int *err
, struct tm
*t
)
10046 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
10049 /* ?do_get_weekday@?$time_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@AAHPAUtm@@@Z */
10050 /* ?do_get_weekday@?$time_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@AEAHPEAUtm@@@Z */
10051 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
10052 #if _MSVCP_VER <= 100
10053 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
10054 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10055 (this, ret, s, e, base, err, t))
10057 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
10058 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10059 (this, ret, s, e, base, err, t))
10061 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
10062 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10063 ios_base
*base
, int *err
, struct tm
*t
)
10065 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
10069 /* ?get_weekday@?$time_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@AAHPAUtm@@@Z */
10070 /* ?get_weekday@?$time_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@AEAHPEAUtm@@@Z */
10071 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
10072 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
10073 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10074 ios_base
*base
, int *err
, struct tm
*t
)
10076 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
10079 /* ?do_get_year@?$time_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@AAHPAUtm@@@Z */
10080 /* ?do_get_year@?$time_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@AEAHPEAUtm@@@Z */
10081 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
10082 #if _MSVCP_VER <= 100
10083 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
10084 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10085 (this, ret, s, e, base, err, t))
10087 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
10088 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10089 (this, ret, s, e, base, err, t))
10091 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
10092 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10093 ios_base
*base
, int *err
, struct tm
*t
)
10095 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
10099 /* ?get_year@?$time_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@AAHPAUtm@@@Z */
10100 /* ?get_year@?$time_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@AEAHPEAUtm@@@Z */
10101 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
10102 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
10103 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10104 ios_base
*base
, int *err
, struct tm
*t
)
10106 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
10109 /* ??_7_Locimp@locale@std@@6B@ */
10110 extern const vtable_ptr MSVCP_locale__Locimp_vtable
;
10112 /* ??0_Locimp@locale@std@@AAE@_N@Z */
10113 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
10114 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
10115 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
10117 TRACE("(%p %d)\n", this, transparent
);
10119 memset(this, 0, sizeof(locale__Locimp
));
10120 locale_facet_ctor_refs(&this->facet
, 1);
10121 this->facet
.vtable
= &MSVCP_locale__Locimp_vtable
;
10122 this->transparent
= transparent
;
10123 locale_string_char_ctor_cstr(&this->name
, "*");
10127 /* ??_F_Locimp@locale@std@@QAEXXZ */
10128 /* ??_F_Locimp@locale@std@@QEAAXXZ */
10129 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
10130 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
10132 return locale__Locimp_ctor_transparent(this, FALSE
);
10135 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
10136 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
10137 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
10138 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
10143 TRACE("(%p %p)\n", this, copy
);
10145 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10146 memcpy(this, copy
, sizeof(locale__Locimp
));
10147 locale_facet_ctor_refs(&this->facet
, 1);
10148 this->facet
.vtable
= &MSVCP_locale__Locimp_vtable
;
10149 if(copy
->facetvec
) {
10150 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
10151 if(!this->facetvec
) {
10152 _Lockit_dtor(&lock
);
10153 ERR("Out of memory\n");
10154 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10157 for(i
=0; i
<this->facet_cnt
; i
++)
10159 this->facetvec
[i
] = copy
->facetvec
[i
];
10160 if(this->facetvec
[i
])
10161 call_locale_facet__Incref(this->facetvec
[i
]);
10164 locale_string_char_copy_ctor(&this->name
, ©
->name
);
10165 _Lockit_dtor(&lock
);
10169 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
10170 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
10171 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
10173 return locale__Locimp_copy_ctor(this, copy
);
10176 /* ??1_Locimp@locale@std@@MAE@XZ */
10177 /* ??1_Locimp@locale@std@@MEAA@XZ */
10178 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
10179 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
10183 TRACE("(%p)\n", this);
10185 locale_facet_dtor(&this->facet
);
10186 for(i
=0; i
<this->facet_cnt
; i
++)
10187 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
10188 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
10190 MSVCRT_operator_delete(this->facetvec
);
10191 locale_string_char_dtor(&this->name
);
10194 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
10195 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
10196 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
10198 locale__Locimp_dtor(this);
10201 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
10202 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
10204 TRACE("(%p %x)\n", this, flags
);
10206 /* we have an array, with the number of elements stored before the first object */
10207 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10209 for(i
=*ptr
-1; i
>=0; i
--)
10210 locale__Locimp_dtor(this+i
);
10211 MSVCRT_operator_delete(ptr
);
10213 locale__Locimp_dtor(this);
10215 MSVCRT_operator_delete(this);
10221 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
10222 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
10223 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
10225 locale__Locimp
*ret
;
10227 TRACE("(%p)\n", copy
);
10229 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10231 ERR("Out of memory\n");
10232 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10235 return locale__Locimp_copy_ctor(ret
, copy
);
10238 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
10239 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
10240 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
10242 locale__Locimp
*ret
;
10244 TRACE("(%x)\n", transparent
);
10246 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10248 ERR("Out of memory\n");
10249 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10252 return locale__Locimp_ctor_transparent(ret
, transparent
);
10255 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
10256 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
10257 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
10261 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
10263 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10264 if(id
>= locimp
->facet_cnt
) {
10265 MSVCP_size_t new_size
= id
+1;
10266 locale_facet
**new_facetvec
;
10271 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
10272 if(!new_facetvec
) {
10273 _Lockit_dtor(&lock
);
10274 ERR("Out of memory\n");
10275 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10279 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
10280 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
10281 MSVCRT_operator_delete(locimp
->facetvec
);
10282 locimp
->facetvec
= new_facetvec
;
10283 locimp
->facet_cnt
= new_size
;
10286 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
10287 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
10289 locimp
->facetvec
[id
] = facet
;
10291 call_locale_facet__Incref(facet
);
10292 _Lockit_dtor(&lock
);
10295 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
10296 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
10297 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
10298 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
10300 locale__Locimp__Locimp_Addfac(this, facet
, id
);
10303 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
10304 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
10305 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
10311 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10312 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10313 /* List of missing facets:
10314 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10316 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10318 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10320 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
10321 ctype_wchar
*ctype
;
10324 ctype
= ctype_short_use_facet(loc
);
10326 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10328 ERR("Out of memory\n");
10329 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10331 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
10333 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
10336 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
10340 numget
= num_get_short_use_facet(loc
);
10342 numget
= MSVCRT_operator_new(sizeof(num_get
));
10344 ERR("Out of memory\n");
10345 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10347 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
10349 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
10352 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
10356 numput
= num_put_short_use_facet(loc
);
10358 numput
= MSVCRT_operator_new(sizeof(num_put
));
10360 ERR("Out of memory\n");
10361 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10363 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
10365 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
10368 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
10369 numpunct_wchar
*numpunct
;
10372 numpunct
= numpunct_short_use_facet(loc
);
10374 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10376 ERR("Out of memory\n");
10377 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10379 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10381 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
10384 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
10388 c
= collate_short_use_facet(loc
);
10390 c
= MSVCRT_operator_new(sizeof(collate
));
10392 ERR("Out of memory\n");
10393 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10395 collate_short_ctor_locinfo(c
, locinfo
, 0);
10397 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
10400 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
10404 t
= time_put_short_use_facet(loc
);
10406 t
= MSVCRT_operator_new(sizeof(time_put
));
10408 ERR("Out of memory\n");
10409 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10411 time_put_short_ctor_locinfo(t
, locinfo
, 0);
10413 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
10416 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
10417 codecvt_wchar
*codecvt
;
10420 codecvt
= codecvt_short_use_facet(loc
);
10422 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10424 ERR("Out of memory\n");
10425 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10427 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
10429 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
10433 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10434 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10435 /* List of missing facets:
10436 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10438 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10440 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10442 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
10443 ctype_wchar
*ctype
;
10446 ctype
= ctype_wchar_use_facet(loc
);
10448 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10450 ERR("Out of memory\n");
10451 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10453 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
10455 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
10458 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
10462 numget
= num_get_wchar_use_facet(loc
);
10464 numget
= MSVCRT_operator_new(sizeof(num_get
));
10466 ERR("Out of memory\n");
10467 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10469 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
10471 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
10474 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
10478 numput
= num_put_wchar_use_facet(loc
);
10480 numput
= MSVCRT_operator_new(sizeof(num_put
));
10482 ERR("Out of memory\n");
10483 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10485 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
10487 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
10490 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
10491 numpunct_wchar
*numpunct
;
10494 numpunct
= numpunct_wchar_use_facet(loc
);
10496 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10498 ERR("Out of memory\n");
10499 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10501 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10503 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
10506 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
10510 c
= collate_wchar_use_facet(loc
);
10512 c
= MSVCRT_operator_new(sizeof(collate
));
10514 ERR("Out of memory\n");
10515 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10517 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
10519 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
10522 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
10526 t
= time_put_wchar_use_facet(loc
);
10528 t
= MSVCRT_operator_new(sizeof(time_put
));
10530 ERR("Out of memory\n");
10531 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10533 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
10535 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
10538 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
10539 codecvt_wchar
*codecvt
;
10542 codecvt
= codecvt_wchar_use_facet(loc
);
10544 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10546 ERR("Out of memory\n");
10547 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10549 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
10551 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
10555 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10556 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10557 /* List of missing facets:
10558 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10560 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10562 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10564 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
10568 ctype
= ctype_char_use_facet(loc
);
10570 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
10572 ERR("Out of memory\n");
10573 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10575 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
10577 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
10580 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
10584 numget
= num_get_char_use_facet(loc
);
10586 numget
= MSVCRT_operator_new(sizeof(num_get
));
10588 ERR("Out of memory\n");
10589 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10591 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
10593 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
10596 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
10600 numput
= num_put_char_use_facet(loc
);
10602 numput
= MSVCRT_operator_new(sizeof(num_put
));
10604 ERR("Out of memory\n");
10605 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10607 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
10609 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
10612 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
10613 numpunct_char
*numpunct
;
10616 numpunct
= numpunct_char_use_facet(loc
);
10618 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
10620 ERR("Out of memory\n");
10621 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10623 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10625 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
10628 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
10632 c
= collate_char_use_facet(loc
);
10634 c
= MSVCRT_operator_new(sizeof(collate
));
10636 ERR("Out of memory\n");
10637 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10639 collate_char_ctor_locinfo(c
, locinfo
, 0);
10641 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
10644 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
10648 t
= time_get_char_use_facet(loc
);
10650 t
= MSVCRT_operator_new(sizeof(time_get_char
));
10652 ERR("Out of memory\n");
10653 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10655 time_get_char_ctor_locinfo(t
, locinfo
, 0);
10657 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
10660 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
10664 t
= time_put_char_use_facet(loc
);
10666 t
= MSVCRT_operator_new(sizeof(time_put
));
10668 ERR("Out of memory\n");
10669 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10671 time_put_char_ctor_locinfo(t
, locinfo
, 0);
10673 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
10676 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
10677 codecvt_char
*codecvt
;
10680 codecvt
= codecvt_char_use_facet(loc
);
10682 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
10684 ERR("Out of memory\n");
10685 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10687 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
10689 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
10693 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
10694 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10695 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10697 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
10699 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
10700 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
10701 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
10703 locimp
->catmask
|= cat
;
10704 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
10708 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
10709 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
10710 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
10711 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
10713 TRACE("(%p %p)\n", this, locimp
);
10714 /* Don't change locimp reference counter */
10715 this->ptr
= locimp
;
10719 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
10720 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
10721 locale__Locimp
* __cdecl
locale__Init(void)
10727 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10728 if(global_locale
) {
10729 _Lockit_dtor(&lock
);
10730 return global_locale
;
10733 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10734 if(!global_locale
) {
10735 _Lockit_dtor(&lock
);
10736 ERR("Out of memory\n");
10737 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10741 locale__Locimp_ctor(global_locale
);
10742 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
10743 locale_string_char_dtor(&global_locale
->name
);
10744 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
10746 locale__Locimp__Clocptr
= global_locale
;
10747 global_locale
->facet
.refs
++;
10748 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
10749 _Lockit_dtor(&lock
);
10751 return global_locale
;
10754 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
10755 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
10756 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
10758 locale__Locimp
*ret
;
10761 TRACE("(%x)\n", inc_ref
);
10763 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10764 if(inc_ref
&& global_locale
) {
10765 call_locale_facet__Incref(&global_locale
->facet
);
10766 _Lockit_dtor(&lock
);
10767 return global_locale
;
10770 ret
= locale__Init();
10771 _Lockit_dtor(&lock
);
10775 /* ?_Iscloc@locale@std@@QBE_NXZ */
10776 /* ?_Iscloc@locale@std@@QEBA_NXZ */
10777 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
10778 MSVCP_bool __thiscall
locale__Iscloc(const locale
*this)
10780 TRACE("(%p)\n", this);
10781 return this->ptr
== locale__Locimp__Clocptr
;
10784 /* ??0locale@std@@QAE@ABV01@0H@Z */
10785 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
10786 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
10787 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
10791 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
10793 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10795 ERR("Out of memory\n");
10796 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10798 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10800 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
10801 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
10802 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
10803 _Locinfo_dtor(&locinfo
);
10808 /* ??0locale@std@@QAE@ABV01@@Z */
10809 /* ??0locale@std@@QEAA@AEBV01@@Z */
10810 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
10811 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
10813 TRACE("(%p %p)\n", this, copy
);
10814 this->ptr
= copy
->ptr
;
10815 call_locale_facet__Incref(&this->ptr
->facet
);
10819 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
10820 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
10821 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
10822 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
10826 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
10828 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10829 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10830 _Locinfo_dtor(&locinfo
);
10831 MSVCRT_operator_delete(this->ptr
);
10832 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10835 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10837 ERR("Out of memory\n");
10838 _Locinfo_dtor(&locinfo
);
10839 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10841 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10843 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10844 _Locinfo_dtor(&locinfo
);
10848 /* ??0locale@std@@QAE@PBDH@Z */
10849 /* ??0locale@std@@QEAA@PEBDH@Z */
10850 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
10851 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
10855 TRACE("(%p %s %d)\n", this, locname
, cat
);
10857 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10859 ERR("Out of memory\n");
10860 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10862 locale__Locimp_ctor(this->ptr
);
10866 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10867 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10868 _Locinfo_dtor(&locinfo
);
10869 MSVCRT_operator_delete(this->ptr
);
10870 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10873 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10874 _Locinfo_dtor(&locinfo
);
10879 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10880 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10881 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10882 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10884 TRACE("(%p)\n", this);
10889 /* ??0locale@std@@QAE@XZ */
10890 /* ??0locale@std@@QEAA@XZ */
10891 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10892 locale
* __thiscall
locale_ctor(locale
*this)
10894 TRACE("(%p)\n", this);
10895 this->ptr
= locale__Init();
10896 call_locale_facet__Incref(&this->ptr
->facet
);
10900 /* ??1locale@std@@QAE@XZ */
10901 /* ??1locale@std@@QEAA@XZ */
10902 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10903 void __thiscall
locale_dtor(locale
*this)
10905 TRACE("(%p)\n", this);
10906 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10908 locale__Locimp_dtor(this->ptr
);
10909 MSVCRT_operator_delete(this->ptr
);
10913 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10914 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10915 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10916 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10918 FIXME("(%p %p) stub\n", this, loc
);
10922 /* ??8locale@std@@QBE_NABV01@@Z */
10923 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10924 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10925 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10927 FIXME("(%p %p) stub\n", this, loc
);
10931 /* ??9locale@std@@QBE_NABV01@@Z */
10932 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10933 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10934 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10936 FIXME("(%p %p) stub\n", this, loc
);
10940 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10941 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10942 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10943 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10945 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10947 if(this->ptr
->facet
.refs
> 1) {
10948 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10950 ERR("Out of memory\n");
10951 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10954 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10955 call_locale_facet__Decref(&this->ptr
->facet
);
10956 this->ptr
= new_ptr
;
10959 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10962 locale_string_char_dtor(&this->ptr
->name
);
10963 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10968 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
10969 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
10970 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
10971 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
10972 MSVCP_size_t id
, MSVCP_bool allow_transparent
)
10976 TRACE("(%p %lu)\n", this, id
);
10978 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10979 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
10982 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10985 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10986 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10987 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10988 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10990 return locale__Getfacet_bool( this, id
, TRUE
);
10993 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10994 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10995 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10998 return global_locale
;
11001 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
11002 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
11003 void __cdecl
locale__Setgloballocale(void *locimp
)
11005 TRACE("(%p)\n", locimp
);
11006 global_locale
= locimp
;
11009 /* ?classic@locale@std@@SAABV12@XZ */
11010 /* ?classic@locale@std@@SAAEBV12@XZ */
11011 const locale
* __cdecl
locale_classic(void)
11015 return &classic_locale
;
11018 /* ?empty@locale@std@@SA?AV12@XZ */
11019 locale
* __cdecl
locale_empty(locale
*ret
)
11025 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
11027 ERR("Out of memory\n");
11028 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
11030 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
11034 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
11035 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
11036 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
11041 TRACE("(%p %p)\n", loc
, ret
);
11043 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
11046 if(loc
->ptr
!= global_locale
) {
11047 call_locale_facet__Decref(&global_locale
->facet
);
11048 global_locale
= loc
->ptr
;
11049 call_locale_facet__Incref(&global_locale
->facet
);
11051 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
11052 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
11054 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
11057 _Lockit_dtor(&lock
);
11061 #if _MSVCP_VER < 100
11063 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11064 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11065 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
11066 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
11068 TRACE("(%p)\n", this);
11070 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
11074 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11075 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
11076 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
11077 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
11079 TRACE( "(%p)\n", this);
11080 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
11086 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
11087 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
11088 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
11089 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
11091 return locale_string_char_c_str( &this->newlocname
);
11094 #endif /* _MSVCP_VER < 100 */
11097 wctrans_t __cdecl
wctrans(const char *property
)
11099 static const char str_tolower
[] = "tolower";
11100 static const char str_toupper
[] = "toupper";
11102 if(!strcmp(property
, str_tolower
))
11104 if(!strcmp(property
, str_toupper
))
11110 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
11113 return towupper(c
);
11114 return towlower(c
);
11117 #if _MSVCP_VER <= 71
11119 wint_t __cdecl
btowc(int c
)
11125 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
11130 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
11132 static int local_state
;
11134 if (!state
) state
= &local_state
;
11135 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
11139 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
11141 static int local_state
;
11143 if (!state
) state
= &local_state
;
11144 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
11148 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
11150 static int local_state
;
11156 if (!state
) state
= &local_state
;
11158 while (!dst
|| n
> ret
)
11160 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
11161 if (len
< 0) return -1;
11163 if (dst
) dst
[ret
] = wc
;
11172 int __cdecl
wctob(wint_t wc
)
11174 char ret
[MB_LEN_MAX
];
11176 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
11181 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
11183 return _Wcrtomb( dst
, wc
, state
, NULL
);
11187 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
11189 const wchar_t *src
;
11190 char buffer
[MB_LEN_MAX
];
11195 while (!dst
|| n
> ret
)
11197 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
11198 if (len
<= 0) return -1;
11199 if (n
< ret
+ len
) break;
11200 memcpy( dst
+ ret
, buffer
, len
);
11202 if (!buffer
[0]) break;
11210 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
11211 DEFINE_RTTI_DATA1(locale__Locimp
, 0, &locale_facet_rtti_base_descriptor
, ".?AV_Locimp@locale@std@@")
11212 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
11213 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
11214 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
11215 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
11216 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
11217 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
11218 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
11219 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
11220 #if _MSVCP_VER >= 140
11221 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDU_Mbstatet@@@std@@")
11222 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDU_Mbstatet@@@std@@")
11223 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDU_Mbstatet@@@std@@")
11225 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
11226 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
11227 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
11229 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
11230 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
11231 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
11232 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@@")
11233 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@@")
11234 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@@")
11235 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@@")
11236 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@@")
11237 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@@")
11238 DEFINE_RTTI_DATA1(time_put_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@")
11239 DEFINE_RTTI_DATA1(time_put_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@")
11240 DEFINE_RTTI_DATA1(time_put_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@")
11241 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
11242 DEFINE_RTTI_DATA2(time_get_char
, 0, &time_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@")
11245 void __asm_dummy_vtables(void) {
11247 __ASM_VTABLE(locale_facet
,
11248 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
11249 #if _MSVCP_VER >= 110
11250 VTABLE_ADD_FUNC(locale_facet__Incref
)
11251 VTABLE_ADD_FUNC(locale_facet__Decref
)
11254 __ASM_VTABLE(locale__Locimp
,
11255 VTABLE_ADD_FUNC(locale__Locimp_vector_dtor
)
11256 #if _MSVCP_VER >= 110
11257 VTABLE_ADD_FUNC(locale_facet__Incref
)
11258 VTABLE_ADD_FUNC(locale_facet__Decref
)
11261 __ASM_VTABLE(collate_char
,
11262 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
11263 #if _MSVCP_VER >= 110
11264 VTABLE_ADD_FUNC(locale_facet__Incref
)
11265 VTABLE_ADD_FUNC(locale_facet__Decref
)
11267 VTABLE_ADD_FUNC(collate_char_do_compare
)
11268 VTABLE_ADD_FUNC(collate_char_do_transform
)
11269 VTABLE_ADD_FUNC(collate_char_do_hash
));
11270 __ASM_VTABLE(collate_wchar
,
11271 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11272 #if _MSVCP_VER >= 110
11273 VTABLE_ADD_FUNC(locale_facet__Incref
)
11274 VTABLE_ADD_FUNC(locale_facet__Decref
)
11276 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11277 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11278 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11279 __ASM_VTABLE(collate_short
,
11280 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11281 #if _MSVCP_VER >= 110
11282 VTABLE_ADD_FUNC(locale_facet__Incref
)
11283 VTABLE_ADD_FUNC(locale_facet__Decref
)
11285 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11286 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11287 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11288 __ASM_VTABLE(ctype_base
,
11289 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
11290 #if _MSVCP_VER >= 110
11291 VTABLE_ADD_FUNC(locale_facet__Incref
)
11292 VTABLE_ADD_FUNC(locale_facet__Decref
)
11295 __ASM_VTABLE(ctype_char
,
11296 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
11297 #if _MSVCP_VER >= 110
11298 VTABLE_ADD_FUNC(locale_facet__Incref
)
11299 VTABLE_ADD_FUNC(locale_facet__Decref
)
11301 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
11302 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
11303 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
11304 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
11305 VTABLE_ADD_FUNC(ctype_char_do_widen
)
11306 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
11307 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11308 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
11309 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11310 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11311 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
11313 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11314 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11317 __ASM_VTABLE(ctype_wchar
,
11318 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11319 #if _MSVCP_VER >= 110
11320 VTABLE_ADD_FUNC(locale_facet__Incref
)
11321 VTABLE_ADD_FUNC(locale_facet__Decref
)
11323 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11324 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11325 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11326 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11327 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11328 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11329 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11330 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11331 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11332 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11333 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11334 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11335 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11336 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11337 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11339 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11340 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11343 __ASM_VTABLE(ctype_short
,
11344 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11345 #if _MSVCP_VER >= 110
11346 VTABLE_ADD_FUNC(locale_facet__Incref
)
11347 VTABLE_ADD_FUNC(locale_facet__Decref
)
11349 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11350 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11351 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11352 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11353 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11354 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11355 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11356 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11357 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11358 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11359 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11360 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11361 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11362 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11363 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11365 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11366 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11369 __ASM_VTABLE(codecvt_base
,
11370 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
11371 #if _MSVCP_VER >= 110
11372 VTABLE_ADD_FUNC(locale_facet__Incref
)
11373 VTABLE_ADD_FUNC(locale_facet__Decref
)
11375 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11376 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11377 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
11378 __ASM_VTABLE(codecvt_char
,
11379 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
11380 #if _MSVCP_VER >= 110
11381 VTABLE_ADD_FUNC(locale_facet__Incref
)
11382 VTABLE_ADD_FUNC(locale_facet__Decref
)
11383 VTABLE_ADD_FUNC(codecvt_char_do_always_noconv
)
11385 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11387 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11388 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11389 VTABLE_ADD_FUNC(codecvt_char_do_in
)
11390 VTABLE_ADD_FUNC(codecvt_char_do_out
)
11391 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
11392 VTABLE_ADD_FUNC(codecvt_char_do_length
));
11393 __ASM_VTABLE(codecvt_wchar
,
11394 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11395 #if _MSVCP_VER >= 110
11396 VTABLE_ADD_FUNC(locale_facet__Incref
)
11397 VTABLE_ADD_FUNC(locale_facet__Decref
)
11399 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11400 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11401 #if _MSVCP_VER >= 90 && _MSVCP_VER <= 100
11402 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11404 VTABLE_ADD_FUNC(codecvt_wchar_do_encoding
)
11406 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11407 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11408 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11409 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11410 __ASM_VTABLE(codecvt_short
,
11411 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11412 #if _MSVCP_VER >= 110
11413 VTABLE_ADD_FUNC(locale_facet__Incref
)
11414 VTABLE_ADD_FUNC(locale_facet__Decref
)
11416 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11417 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11418 #if _MSVCP_VER >= 90 && _MSVCP_VER <= 100
11419 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11421 VTABLE_ADD_FUNC(codecvt_wchar_do_encoding
)
11423 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11424 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11425 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11426 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11427 __ASM_VTABLE(numpunct_char
,
11428 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
11429 #if _MSVCP_VER >= 110
11430 VTABLE_ADD_FUNC(locale_facet__Incref
)
11431 VTABLE_ADD_FUNC(locale_facet__Decref
)
11433 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
11434 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
11435 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
11436 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
11437 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
11438 __ASM_VTABLE(numpunct_wchar
,
11439 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11440 #if _MSVCP_VER >= 110
11441 VTABLE_ADD_FUNC(locale_facet__Incref
)
11442 VTABLE_ADD_FUNC(locale_facet__Decref
)
11444 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11445 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11446 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11447 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11448 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11449 __ASM_VTABLE(numpunct_short
,
11450 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11451 #if _MSVCP_VER >= 110
11452 VTABLE_ADD_FUNC(locale_facet__Incref
)
11453 VTABLE_ADD_FUNC(locale_facet__Decref
)
11455 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11456 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11457 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11458 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11459 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11460 __ASM_VTABLE(num_get_char
,
11461 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
11462 #if _MSVCP_VER >= 110
11463 VTABLE_ADD_FUNC(locale_facet__Incref
)
11464 VTABLE_ADD_FUNC(locale_facet__Decref
)
11466 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
11467 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11468 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11469 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
11470 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
11471 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
11472 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
11473 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
11474 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
11475 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
11476 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
11477 __ASM_VTABLE(num_get_short
,
11478 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11479 #if _MSVCP_VER >= 110
11480 VTABLE_ADD_FUNC(locale_facet__Incref
)
11481 VTABLE_ADD_FUNC(locale_facet__Decref
)
11483 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
11484 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11485 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11486 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
11487 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
11488 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
11489 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
11490 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
11491 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
11492 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
11493 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
11494 __ASM_VTABLE(num_get_wchar
,
11495 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11496 #if _MSVCP_VER >= 110
11497 VTABLE_ADD_FUNC(locale_facet__Incref
)
11498 VTABLE_ADD_FUNC(locale_facet__Decref
)
11500 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
11501 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11502 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11503 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
11504 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
11505 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
11506 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
11507 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
11508 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
11509 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
11510 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
11511 __ASM_VTABLE(num_put_char
,
11512 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
11513 #if _MSVCP_VER >= 110
11514 VTABLE_ADD_FUNC(locale_facet__Incref
)
11515 VTABLE_ADD_FUNC(locale_facet__Decref
)
11517 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
11518 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11519 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11520 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
11521 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
11522 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
11523 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
11524 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
11525 __ASM_VTABLE(num_put_wchar
,
11526 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11527 #if _MSVCP_VER >= 110
11528 VTABLE_ADD_FUNC(locale_facet__Incref
)
11529 VTABLE_ADD_FUNC(locale_facet__Decref
)
11531 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
11532 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11533 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11534 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
11535 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
11536 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
11537 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
11538 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
11539 __ASM_VTABLE(num_put_short
,
11540 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11541 #if _MSVCP_VER >= 110
11542 VTABLE_ADD_FUNC(locale_facet__Incref
)
11543 VTABLE_ADD_FUNC(locale_facet__Decref
)
11545 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
11546 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11547 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11548 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
11549 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
11550 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
11551 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
11552 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
11553 __ASM_VTABLE(time_put_char
,
11554 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
11555 #if _MSVCP_VER >= 110
11556 VTABLE_ADD_FUNC(locale_facet__Incref
)
11557 VTABLE_ADD_FUNC(locale_facet__Decref
)
11559 VTABLE_ADD_FUNC(time_put_char_do_put
));
11560 __ASM_VTABLE(time_put_wchar
,
11561 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11562 #if _MSVCP_VER >= 110
11563 VTABLE_ADD_FUNC(locale_facet__Incref
)
11564 VTABLE_ADD_FUNC(locale_facet__Decref
)
11566 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11567 __ASM_VTABLE(time_put_short
,
11568 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11569 #if _MSVCP_VER >= 110
11570 VTABLE_ADD_FUNC(locale_facet__Incref
)
11571 VTABLE_ADD_FUNC(locale_facet__Decref
)
11573 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11574 __ASM_VTABLE(time_get_char
,
11575 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
11576 #if _MSVCP_VER >= 110
11577 VTABLE_ADD_FUNC(locale_facet__Incref
)
11578 VTABLE_ADD_FUNC(locale_facet__Decref
)
11580 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
11581 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
11582 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
11583 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
11584 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
11585 VTABLE_ADD_FUNC(time_get_char_do_get_year
));
11590 void init_locale(void *base
)
11593 init_locale_facet_rtti(base
);
11594 init_locale__Locimp_rtti(base
);
11595 init_collate_char_rtti(base
);
11596 init_collate_wchar_rtti(base
);
11597 init_collate_short_rtti(base
);
11598 init_ctype_base_rtti(base
);
11599 init_ctype_char_rtti(base
);
11600 init_ctype_wchar_rtti(base
);
11601 init_ctype_short_rtti(base
);
11602 init_codecvt_base_rtti(base
);
11603 init_codecvt_char_rtti(base
);
11604 init_codecvt_wchar_rtti(base
);
11605 init_codecvt_short_rtti(base
);
11606 init_numpunct_char_rtti(base
);
11607 init_numpunct_wchar_rtti(base
);
11608 init_numpunct_short_rtti(base
);
11609 init_num_get_char_rtti(base
);
11610 init_num_get_wchar_rtti(base
);
11611 init_num_get_short_rtti(base
);
11612 init_num_put_char_rtti(base
);
11613 init_num_put_wchar_rtti(base
);
11614 init_num_put_short_rtti(base
);
11615 init_time_put_char_rtti(base
);
11616 init_time_put_wchar_rtti(base
);
11617 init_time_put_short_rtti(base
);
11618 init_time_base_rtti(base
);
11619 init_time_get_char_rtti(base
);
11623 void free_locale(void)
11625 facets_elem
*iter
, *safe
;
11627 if(global_locale
) {
11628 locale_dtor(&classic_locale
);
11629 locale__Locimp_dtor(global_locale
);
11630 MSVCRT_operator_delete(global_locale
);
11633 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
11634 list_remove(&iter
->entry
);
11635 if(call_locale_facet__Decref(iter
->fac
))
11636 call_locale_facet_vector_dtor(iter
->fac
, 1);
11637 MSVCRT_operator_delete(iter
);