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
36 #include "wine/unicode.h"
37 #include "wine/list.h"
38 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(msvcp
);
50 char* __cdecl
_Getdays(void);
51 char* __cdecl
_Getmonths(void);
52 void* __cdecl
_Gettnames(void);
53 unsigned int __cdecl
___lc_codepage_func(void);
54 int __cdecl
___lc_collate_cp_func(void);
55 const unsigned short* __cdecl
__pctype_func(void);
56 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
57 MSVCP_size_t __cdecl
_Strftime(char*, MSVCP_size_t
, const char*,
58 const struct tm
*, struct __lc_time_data
*);
59 const locale
* __cdecl
locale_classic(void);
62 static LCID
* ___lc_handle_func(void)
66 _locale_t loc
= _get_current_locale();
67 ret
= loc
->locinfo
->lc_handle
;
72 LCID
* __cdecl
___lc_handle_func(void);
76 #define locale_string basic_string_char
77 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
78 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
79 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
80 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
81 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
83 #define locale_string _Yarn_char
84 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
85 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
86 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
87 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
88 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
97 typedef struct _locale__Locimp
{
99 locale_facet
**facetvec
;
100 MSVCP_size_t facet_cnt
;
102 MSVCP_bool transparent
;
113 locale_string months
;
114 locale_string oldlocname
;
115 locale_string newlocname
;
130 const char *grouping
;
133 const char *false_name
;
134 const char *true_name
;
139 const char *grouping
;
142 const wchar_t *false_name
;
143 const wchar_t *true_name
;
160 /* ?_Id_cnt@id@locale@std@@0HA */
161 int locale_id__Id_cnt
= 0;
163 static locale classic_locale
;
165 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
166 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
167 locale__Locimp
*global_locale
= NULL
;
169 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
170 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
171 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
173 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
175 if(this->strbuf
&& !this->got
) {
176 int c
= basic_streambuf_char_sgetc(this->strbuf
);
187 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
189 if(this->strbuf
&& !this->got
) {
190 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
201 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
203 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
208 istreambuf_iterator_char_val(this);
212 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
214 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
219 istreambuf_iterator_wchar_val(this);
223 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
225 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
229 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
231 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
235 /* ??1facet@locale@std@@UAE@XZ */
236 /* ??1facet@locale@std@@UEAA@XZ */
237 /* ??1facet@locale@std@@MAA@XZ */
238 /* ??1facet@locale@std@@MAE@XZ */
239 /* ??1facet@locale@std@@MEAA@XZ */
240 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
241 void __thiscall
locale_facet_dtor(locale_facet
*this)
243 TRACE("(%p)\n", this);
246 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
247 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
248 locale_facet*, (locale_facet*, unsigned int), (this, flags))
249 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
251 TRACE("(%p %x)\n", this, flags
);
253 /* we have an array, with the number of elements stored before the first object */
254 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
256 for(i
=*ptr
-1; i
>=0; i
--)
257 locale_facet_dtor(this+i
);
258 MSVCRT_operator_delete(ptr
);
260 locale_facet_dtor(this);
262 MSVCRT_operator_delete(this);
273 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
275 /* Not exported from msvcp90 */
276 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
277 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
278 void __cdecl
locale_facet_register(locale_facet
*add
)
280 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
282 ERR("Out of memory\n");
283 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
287 list_add_head(&lazy_facets
, &head
->entry
);
290 /* Not exported from msvcp90 */
291 /* ?_Register@facet@locale@std@@QAEXXZ */
292 /* ?_Register@facet@locale@std@@QEAAXXZ */
293 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
294 void __thiscall
locale_facet__Register(locale_facet
*this)
296 TRACE("(%p)\n", this);
297 locale_facet_register(this);
300 /* Not exported from msvcp90 */
301 /* ??_7facet@locale@std@@6B@ */
302 extern const vtable_ptr MSVCP_locale_facet_vtable
;
304 /* ??0id@locale@std@@QAE@I@Z */
305 /* ??0id@locale@std@@QEAA@_K@Z */
306 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
307 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
309 TRACE("(%p %lu)\n", this, id
);
315 /* ??_Fid@locale@std@@QAEXXZ */
316 /* ??_Fid@locale@std@@QEAAXXZ */
317 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
318 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
320 TRACE("(%p)\n", this);
326 /* ??Bid@locale@std@@QAEIXZ */
327 /* ??Bid@locale@std@@QEAA_KXZ */
328 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
329 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
333 TRACE("(%p)\n", this);
336 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
337 this->id
= ++locale_id__Id_cnt
;
344 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
345 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
346 int* __cdecl
locale_id__Id_cnt_func(void)
349 return &locale_id__Id_cnt
;
352 /* ??_Ffacet@locale@std@@QAEXXZ */
353 /* ??_Ffacet@locale@std@@QEAAXXZ */
354 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
355 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
357 TRACE("(%p)\n", this);
358 this->vtable
= &MSVCP_locale_facet_vtable
;
363 /* ??0facet@locale@std@@IAE@I@Z */
364 /* ??0facet@locale@std@@IEAA@_K@Z */
365 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
366 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
368 TRACE("(%p %lu)\n", this, refs
);
369 this->vtable
= &MSVCP_locale_facet_vtable
;
374 /* ?_Incref@facet@locale@std@@QAEXXZ */
375 /* ?_Incref@facet@locale@std@@QEAAXXZ */
376 /* ?_Incref@facet@locale@std@@UAEXXZ */
377 /* ?_Incref@facet@locale@std@@UEAAXXZ */
378 #if _MSVCP_VER >= 110
379 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
381 #define call_locale_facet__Incref locale_facet__Incref
383 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
384 void __thiscall
locale_facet__Incref(locale_facet
*this)
388 TRACE("(%p)\n", this);
390 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
395 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
396 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
397 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
398 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
399 #if _MSVCP_VER >= 110
400 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
401 locale_facet*, (locale_facet*), (this))
403 #define call_locale_facet__Decref locale_facet__Decref
405 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
406 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
411 TRACE("(%p)\n", this);
413 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
417 ret
= this->refs
? NULL
: this;
423 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
424 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
425 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
427 TRACE("(%p %p)\n", facet
, loc
);
431 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
432 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
433 MSVCP_size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
435 TRACE("(%p)\n", facet
);
439 /* ??0_Timevec@std@@QAE@ABV01@@Z */
440 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
441 /* This copy constructor modifies copied object */
442 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
443 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
445 TRACE("(%p %p)\n", this, copy
);
446 this->timeptr
= copy
->timeptr
;
447 copy
->timeptr
= NULL
;
451 /* ??0_Timevec@std@@QAE@PAX@Z */
452 /* ??0_Timevec@std@@QEAA@PEAX@Z */
453 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
454 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
456 TRACE("(%p %p)\n", this, timeptr
);
457 this->timeptr
= timeptr
;
461 /* ??_F_Timevec@std@@QAEXXZ */
462 /* ??_F_Timevec@std@@QEAAXXZ */
463 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
464 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
466 TRACE("(%p)\n", this);
467 this->timeptr
= NULL
;
471 /* ??1_Timevec@std@@QAE@XZ */
472 /* ??1_Timevec@std@@QEAA@XZ */
473 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
474 void __thiscall
_Timevec_dtor(_Timevec
*this)
476 TRACE("(%p)\n", this);
480 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
481 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
482 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
483 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
485 TRACE("(%p %p)\n", this, right
);
486 this->timeptr
= right
->timeptr
;
487 right
->timeptr
= NULL
;
491 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
492 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
493 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
494 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
496 TRACE("(%p)\n", this);
497 return this->timeptr
;
500 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
501 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
502 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
504 const char *locale
= NULL
;
506 /* This function is probably modifying more global objects */
507 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
510 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
512 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
513 locale_string_char_ctor_cstr(&locinfo
->days
, "");
514 locale_string_char_ctor_cstr(&locinfo
->months
, "");
515 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
518 locale
= setlocale(LC_ALL
, locstr
);
520 locale
= setlocale(LC_ALL
, NULL
);
523 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
525 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
530 /* ??0_Locinfo@std@@QAE@HPBD@Z */
531 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
532 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
533 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
535 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
538 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
539 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
540 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
542 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
545 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
546 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
547 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
548 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
550 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
553 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
554 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
555 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
557 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
560 /* ??0_Locinfo@std@@QAE@PBD@Z */
561 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
562 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
563 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
565 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
568 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
569 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
570 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
572 TRACE("(%p)\n", locinfo
);
574 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
575 locale_string_char_dtor(&locinfo
->days
);
576 locale_string_char_dtor(&locinfo
->months
);
577 locale_string_char_dtor(&locinfo
->oldlocname
);
578 locale_string_char_dtor(&locinfo
->newlocname
);
579 _Lockit_dtor(&locinfo
->lock
);
582 /* ??_F_Locinfo@std@@QAEXXZ */
583 /* ??_F_Locinfo@std@@QEAAXXZ */
584 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
585 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
587 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
590 /* ??1_Locinfo@std@@QAE@XZ */
591 /* ??1_Locinfo@std@@QEAA@XZ */
592 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
593 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
595 _Locinfo__Locinfo_dtor(this);
598 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
599 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
600 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
602 const char *locale
= NULL
;
604 /* This function is probably modifying more global objects */
605 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
607 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
609 locale_string_char_dtor(&locinfo
->newlocname
);
612 locale
= setlocale(LC_ALL
, locstr
);
614 locale
= setlocale(LC_ALL
, NULL
);
617 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
619 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
624 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
625 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
626 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
627 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
629 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
633 ULONGLONG __cdecl
_Getcoll(void)
642 ret
.collvec
.page
= ___lc_collate_cp_func();
643 ret
.collvec
.handle
= ___lc_handle_func()[LC_COLLATE
];
647 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
648 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
649 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
650 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
652 ULONGLONG ull
= _Getcoll();
653 memcpy(ret
, &ull
, sizeof(ull
));
658 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
664 ret
->page
= ___lc_codepage_func();
666 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
668 /* FIXME: use ___lc_locale_name_func() */
672 table
= malloc(sizeof(short[256]));
673 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
674 memcpy(table
, __pctype_func(), sizeof(short[256]));
679 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
680 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
681 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
682 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
684 return _Getctype(ret
);
689 ULONGLONG __cdecl
_Getcvt(void)
698 ret
.cvtvec
.page
= ___lc_codepage_func();
699 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
703 _Cvtvec
* __cdecl
_Getcvt(_Cvtvec
*ret
)
709 memset(ret
, 0, sizeof(*ret
));
710 ret
->page
= ___lc_codepage_func();
711 ret
->mb_max
= ___mb_cur_max_func();
713 if(ret
->mb_max
> 1) {
715 if(_ismbblead(i
)) ret
->isleadbyte
[i
/8] |= 1 << (i
&7);
721 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
722 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
723 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
724 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
727 ULONGLONG ull
= _Getcvt();
728 memcpy(ret
, &ull
, sizeof(ull
));
732 memcpy(ret
, &cvtvec
, sizeof(cvtvec
));
737 int __cdecl
_Getdateorder(void)
741 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
742 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
743 return DATEORDER_no_order
;
745 if(*date_fmt
== '0') return DATEORDER_mdy
;
746 if(*date_fmt
== '1') return DATEORDER_dmy
;
747 if(*date_fmt
== '2') return DATEORDER_ymd
;
748 return DATEORDER_no_order
;
751 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
752 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
753 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
754 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
756 TRACE("(%p)\n", this);
757 return _Getdateorder();
760 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
761 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
762 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
763 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
765 char *days
= _Getdays();
768 TRACE("(%p)\n", this);
771 locale_string_char_dtor(&this->days
);
772 locale_string_char_ctor_cstr(&this->days
, days
);
776 ret
= locale_string_char_c_str(&this->days
);
777 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
781 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
782 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
783 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
784 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
786 char *months
= _Getmonths();
789 TRACE("(%p)\n", this);
792 locale_string_char_dtor(&this->months
);
793 locale_string_char_ctor_cstr(&this->months
, months
);
797 ret
= locale_string_char_c_str(&this->months
);
798 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
799 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
803 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
804 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
805 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
806 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
808 TRACE("(%p)\n", this);
812 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
813 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
814 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
815 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
817 TRACE("(%p)\n", this);
821 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
822 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
823 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
824 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
826 TRACE("(%p)\n", this);
830 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
831 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
832 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
833 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
835 TRACE("(%p)\n", this);
837 _Timevec_ctor_timeptr(ret
, _Gettnames());
841 /* ?id@?$collate@D@std@@2V0locale@2@A */
842 locale_id collate_char_id
= {0};
844 /* ??_7?$collate@D@std@@6B@ */
845 extern const vtable_ptr MSVCP_collate_char_vtable
;
847 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
848 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
849 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
850 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
852 TRACE("(%p %p)\n", this, locinfo
);
853 _Locinfo__Getcoll(locinfo
, &this->coll
);
856 /* ??0?$collate@D@std@@IAE@PBDI@Z */
857 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
858 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
859 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
863 TRACE("(%p %s %lu)\n", this, name
, refs
);
865 locale_facet_ctor_refs(&this->facet
, refs
);
866 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
868 _Locinfo_ctor_cstr(&locinfo
, name
);
869 collate_char__Init(this, &locinfo
);
870 _Locinfo_dtor(&locinfo
);
874 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
875 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
876 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
877 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
879 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
881 locale_facet_ctor_refs(&this->facet
, refs
);
882 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
883 collate_char__Init(this, locinfo
);
887 /* ??0?$collate@D@std@@QAE@I@Z */
888 /* ??0?$collate@D@std@@QEAA@_K@Z */
889 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
890 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
892 return collate_char_ctor_name(this, "C", refs
);
895 /* ??1?$collate@D@std@@UAE@XZ */
896 /* ??1?$collate@D@std@@UEAA@XZ */
897 /* ??1?$collate@D@std@@MAE@XZ */
898 /* ??1?$collate@D@std@@MEAA@XZ */
899 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
900 void __thiscall
collate_char_dtor(collate
*this)
902 TRACE("(%p)\n", this);
905 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
906 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
908 TRACE("(%p %x)\n", this, flags
);
910 /* we have an array, with the number of elements stored before the first object */
911 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
913 for(i
=*ptr
-1; i
>=0; i
--)
914 collate_char_dtor(this+i
);
915 MSVCRT_operator_delete(ptr
);
917 collate_char_dtor(this);
919 MSVCRT_operator_delete(this);
925 /* ??_F?$collate@D@std@@QAEXXZ */
926 /* ??_F?$collate@D@std@@QEAAXXZ */
927 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
928 collate
* __thiscall
collate_char_ctor(collate
*this)
930 return collate_char_ctor_name(this, "C", 0);
933 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
934 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
935 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
937 TRACE("(%p %p)\n", facet
, loc
);
939 if(facet
&& !*facet
) {
940 *facet
= MSVCRT_operator_new(sizeof(collate
));
942 ERR("Out of memory\n");
943 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
946 collate_char_ctor_name((collate
*)*facet
,
947 locale_string_char_c_str(&loc
->ptr
->name
), 0);
953 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
954 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
955 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
957 return collate_char__Getcat(facet
, locale_classic());
960 static collate
* collate_char_use_facet(const locale
*loc
)
962 static collate
*obj
= NULL
;
965 const locale_facet
*fac
;
967 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
968 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
971 return (collate
*)fac
;
979 collate_char__Getcat(&fac
, loc
);
981 call_locale_facet__Incref(&obj
->facet
);
982 locale_facet_register(&obj
->facet
);
989 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
990 const char *last2
, const _Collvec
*coll
)
994 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
999 lcid
= ___lc_handle_func()[LC_COLLATE
];
1000 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1003 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
1004 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
1005 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
1006 #if _MSVCP_VER <= 100
1007 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1008 (const collate*, const char*, const char*, const char*, const char*), \
1009 (this, first1, last1, first2, last2))
1011 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1012 (const collate*, const char*, const char*, const char*, const char*), \
1013 (this, first1, last1, first2, last2))
1015 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
1016 const char *last1
, const char *first2
, const char *last2
)
1018 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1019 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
1022 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
1023 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
1024 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
1025 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1026 const char *last1
, const char *first2
, const char *last2
)
1028 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1029 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1032 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1033 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1034 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1035 #if _MSVCP_VER <= 100
1036 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1037 (const collate*, const char*, const char*), (this, first, last))
1039 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1040 (const collate*, const char*, const char*), (this, first, last))
1042 LONG __thiscall
collate_char_do_hash(const collate
*this,
1043 const char *first
, const char *last
)
1047 TRACE("(%p %p %p)\n", this, first
, last
);
1049 for(; first
<last
; first
++)
1050 ret
= (ret
<<8 | ret
>>24) + *first
;
1054 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1055 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1056 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1057 LONG __thiscall
collate_char_hash(const collate
*this,
1058 const char *first
, const char *last
)
1060 TRACE("(%p %p %p)\n", this, first
, last
);
1061 return call_collate_char_do_hash(this, first
, last
);
1064 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1065 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1066 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1067 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1068 basic_string_char
*ret
, const char *first
, const char *last
)
1070 FIXME("(%p %p %p) stub\n", this, first
, last
);
1074 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1075 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1076 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1077 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1078 basic_string_char
*ret
, const char *first
, const char *last
)
1080 FIXME("(%p %p %p) stub\n", this, first
, last
);
1084 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1085 locale_id collate_wchar_id
= {0};
1086 /* ?id@?$collate@G@std@@2V0locale@2@A */
1087 locale_id collate_short_id
= {0};
1089 /* ??_7?$collate@_W@std@@6B@ */
1090 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1091 /* ??_7?$collate@G@std@@6B@ */
1092 extern const vtable_ptr MSVCP_collate_short_vtable
;
1094 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1095 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1096 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1097 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1098 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1099 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1101 TRACE("(%p %p)\n", this, locinfo
);
1102 _Locinfo__Getcoll(locinfo
, &this->coll
);
1105 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1106 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1107 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1108 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1112 TRACE("(%p %s %lu)\n", this, name
, refs
);
1114 locale_facet_ctor_refs(&this->facet
, refs
);
1115 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1117 _Locinfo_ctor_cstr(&locinfo
, name
);
1118 collate_wchar__Init(this, &locinfo
);
1119 _Locinfo_dtor(&locinfo
);
1123 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1124 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1125 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1126 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1128 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1129 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1133 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1134 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1135 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1136 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1138 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1140 locale_facet_ctor_refs(&this->facet
, refs
);
1141 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1142 collate_wchar__Init(this, locinfo
);
1146 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1147 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1148 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1149 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1151 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1152 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1156 /* ??0?$collate@_W@std@@QAE@I@Z */
1157 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1158 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1159 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1161 return collate_wchar_ctor_name(this, "C", refs
);
1164 /* ??0?$collate@G@std@@QAE@I@Z */
1165 /* ??0?$collate@G@std@@QEAA@_K@Z */
1166 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1167 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1169 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1170 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1174 /* ??1?$collate@G@std@@UAE@XZ */
1175 /* ??1?$collate@G@std@@UEAA@XZ */
1176 /* ??1?$collate@_W@std@@MAE@XZ */
1177 /* ??1?$collate@_W@std@@MEAA@XZ */
1178 /* ??1?$collate@G@std@@MAE@XZ */
1179 /* ??1?$collate@G@std@@MEAA@XZ */
1180 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1181 void __thiscall
collate_wchar_dtor(collate
*this)
1183 TRACE("(%p)\n", this);
1186 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1187 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1189 TRACE("(%p %x)\n", this, flags
);
1191 /* we have an array, with the number of elements stored before the first object */
1192 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1194 for(i
=*ptr
-1; i
>=0; i
--)
1195 collate_wchar_dtor(this+i
);
1196 MSVCRT_operator_delete(ptr
);
1198 collate_wchar_dtor(this);
1200 MSVCRT_operator_delete(this);
1206 /* ??_F?$collate@_W@std@@QAEXXZ */
1207 /* ??_F?$collate@_W@std@@QEAAXXZ */
1208 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1209 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1211 return collate_wchar_ctor_name(this, "C", 0);
1214 /* ??_F?$collate@G@std@@QAEXXZ */
1215 /* ??_F?$collate@G@std@@QEAAXXZ */
1216 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1217 collate
* __thiscall
collate_short_ctor(collate
*this)
1219 collate
*ret
= collate_wchar_ctor(this);
1220 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1224 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1225 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1226 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1228 TRACE("(%p %p)\n", facet
, loc
);
1230 if(facet
&& !*facet
) {
1231 *facet
= MSVCRT_operator_new(sizeof(collate
));
1233 ERR("Out of memory\n");
1234 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1237 collate_wchar_ctor_name((collate
*)*facet
,
1238 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1244 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1245 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1246 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1248 return collate_wchar__Getcat(facet
, locale_classic());
1251 static collate
* collate_wchar_use_facet(const locale
*loc
)
1253 static collate
*obj
= NULL
;
1256 const locale_facet
*fac
;
1258 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1259 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1261 _Lockit_dtor(&lock
);
1262 return (collate
*)fac
;
1266 _Lockit_dtor(&lock
);
1270 collate_wchar__Getcat(&fac
, loc
);
1271 obj
= (collate
*)fac
;
1272 call_locale_facet__Incref(&obj
->facet
);
1273 locale_facet_register(&obj
->facet
);
1274 _Lockit_dtor(&lock
);
1279 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1280 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1281 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1283 if(facet
&& !*facet
) {
1284 collate_wchar__Getcat(facet
, loc
);
1285 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1291 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1292 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1293 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1295 return collate_short__Getcat(facet
, locale_classic());
1298 static collate
* collate_short_use_facet(const locale
*loc
)
1300 static collate
*obj
= NULL
;
1303 const locale_facet
*fac
;
1305 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1306 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1308 _Lockit_dtor(&lock
);
1309 return (collate
*)fac
;
1313 _Lockit_dtor(&lock
);
1317 collate_short__Getcat(&fac
, loc
);
1318 obj
= (collate
*)fac
;
1319 call_locale_facet__Incref(&obj
->facet
);
1320 locale_facet_register(&obj
->facet
);
1321 _Lockit_dtor(&lock
);
1327 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1328 const wchar_t *last2
, const _Collvec
*coll
)
1332 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1335 lcid
= coll
->handle
;
1337 lcid
= ___lc_handle_func()[LC_COLLATE
];
1338 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1341 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1342 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1343 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1344 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1345 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1346 #if _MSVCP_VER <= 100
1347 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1348 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1349 (this, first1, last1, first2, last2))
1351 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1352 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1353 (this, first1, last1, first2, last2))
1355 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1356 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1358 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1359 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1362 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1363 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1364 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1365 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1366 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1367 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1368 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1370 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1371 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1374 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1375 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1376 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1377 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1378 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1379 #if _MSVCP_VER <= 100
1380 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1381 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1383 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1384 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1386 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1387 const wchar_t *first
, const wchar_t *last
)
1391 TRACE("(%p %p %p)\n", this, first
, last
);
1393 for(; first
<last
; first
++)
1394 ret
= (ret
<<8 | ret
>>24) + *first
;
1398 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1399 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1400 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1401 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1402 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1403 LONG __thiscall
collate_wchar_hash(const collate
*this,
1404 const wchar_t *first
, const wchar_t *last
)
1406 TRACE("(%p %p %p)\n", this, first
, last
);
1407 return call_collate_wchar_do_hash(this, first
, last
);
1410 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1411 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1412 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1413 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1414 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1415 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1416 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1418 FIXME("(%p %p %p) stub\n", this, first
, last
);
1422 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1423 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1424 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1425 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1426 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1427 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1428 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1430 FIXME("(%p %p %p) stub\n", this, first
, last
);
1434 /* ??_7ctype_base@std@@6B@ */
1435 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1437 /* ??0ctype_base@std@@QAE@I@Z */
1438 /* ??0ctype_base@std@@QEAA@_K@Z */
1439 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1440 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1442 TRACE("(%p %lu)\n", this, refs
);
1443 locale_facet_ctor_refs(&this->facet
, refs
);
1444 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1448 /* ??_Fctype_base@std@@QAEXXZ */
1449 /* ??_Fctype_base@std@@QEAAXXZ */
1450 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1451 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1453 TRACE("(%p)\n", this);
1454 locale_facet_ctor_refs(&this->facet
, 0);
1455 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1459 /* ??1ctype_base@std@@UAE@XZ */
1460 /* ??1ctype_base@std@@UEAA@XZ */
1461 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1462 void __thiscall
ctype_base_dtor(ctype_base
*this)
1464 TRACE("(%p)\n", this);
1467 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1468 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1470 TRACE("(%p %x)\n", this, flags
);
1472 /* we have an array, with the number of elements stored before the first object */
1473 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1475 for(i
=*ptr
-1; i
>=0; i
--)
1476 ctype_base_dtor(this+i
);
1477 MSVCRT_operator_delete(ptr
);
1479 ctype_base_dtor(this);
1481 MSVCRT_operator_delete(this);
1487 /* ?_Xran@ctype_base@std@@KAXXZ */
1488 void __cdecl
ctype_base__Xran(void)
1490 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1493 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1494 locale_id ctype_char_id
= {0};
1495 /* ?table_size@?$ctype@D@std@@2IB */
1496 /* ?table_size@?$ctype@D@std@@2_KB */
1497 MSVCP_size_t ctype_char_table_size
= 256;
1499 /* ??_7?$ctype@D@std@@6B@ */
1500 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1502 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1503 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1504 locale_id
* __cdecl
ctype_char__Id_func(void)
1507 return &ctype_char_id
;
1510 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1511 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1512 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1513 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1515 TRACE("(%p %p)\n", this, locinfo
);
1516 _Locinfo__Getctype(locinfo
, &this->ctype
);
1519 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1520 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1521 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1522 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1524 TRACE("(%p)\n", this);
1526 if(this->ctype
.delfl
)
1527 free((short*)this->ctype
.table
);
1528 #if _MSVCP_VER >= 110
1529 free(this->ctype
.name
);
1533 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1534 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1535 const short* __cdecl
ctype_char_classic_table(void)
1540 ctype
= ctype_char_use_facet( locale_classic() );
1541 return ctype
->ctype
.table
;
1544 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1545 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1546 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1547 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1548 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1550 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1551 ctype_base_ctor_refs(&this->base
, refs
);
1552 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1553 ctype_char__Init(this, locinfo
);
1557 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1558 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1559 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1560 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1561 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1565 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1567 ctype_base_ctor_refs(&this->base
, refs
);
1568 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1570 _Locinfo_ctor(&locinfo
);
1571 ctype_char__Init(this, &locinfo
);
1572 _Locinfo_dtor(&locinfo
);
1575 ctype_char__Tidy(this);
1576 this->ctype
.table
= table
;
1577 this->ctype
.delfl
= delete;
1582 /* ??_F?$ctype@D@std@@QAEXXZ */
1583 /* ??_F?$ctype@D@std@@QEAAXXZ */
1584 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1585 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1587 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1590 /* ??1?$ctype@D@std@@UAE@XZ */
1591 /* ??1?$ctype@D@std@@UEAA@XZ */
1592 /* ??1?$ctype@D@std@@MAE@XZ */
1593 /* ??1?$ctype@D@std@@MEAA@XZ */
1594 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1595 void __thiscall
ctype_char_dtor(ctype_char
*this)
1597 TRACE("(%p)\n", this);
1598 ctype_char__Tidy(this);
1601 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1602 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1604 TRACE("(%p %x)\n", this, flags
);
1606 /* we have an array, with the number of elements stored before the first object */
1607 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1609 for(i
=*ptr
-1; i
>=0; i
--)
1610 ctype_char_dtor(this+i
);
1611 MSVCRT_operator_delete(ptr
);
1613 ctype_char_dtor(this);
1615 MSVCRT_operator_delete(this);
1621 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1622 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1623 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1624 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1625 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1626 char, (const ctype_char*, char, char), (this, ch, unused))
1627 #elif _MSVCP_VER <= 100
1628 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1629 char, (const ctype_char*, char, char), (this, ch, unused))
1631 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1632 char, (const ctype_char*, char, char), (this, ch, unused))
1634 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1636 TRACE("(%p %c %c)\n", this, ch
, unused
);
1640 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1641 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1642 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1643 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1644 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1645 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1646 (this, first, last, unused, dest))
1647 #elif _MSVCP_VER <= 100
1648 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1649 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1650 (this, first, last, unused, dest))
1652 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1653 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1654 (this, first, last, unused, dest))
1656 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1657 const char *first
, const char *last
, char unused
, char *dest
)
1659 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1660 memcpy(dest
, first
, last
-first
);
1664 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1665 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1666 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1667 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1668 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1669 (this, first, last, unused, dest, size))
1670 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1671 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1673 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1674 memcpy_s(dest
, size
, first
, last
-first
);
1678 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1679 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1680 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1681 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1683 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1684 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1687 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1688 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1689 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1690 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1691 const char *first
, const char *last
, char dflt
, char *dest
)
1693 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1694 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1697 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1698 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1699 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1700 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1701 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1703 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1704 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1707 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1708 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1709 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1710 #if _MSVCP_VER <= 100
1711 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1712 char, (const ctype_char*, char), (this, ch))
1714 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1715 char, (const ctype_char*, char), (this, ch))
1717 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1719 TRACE("(%p %c)\n", this, ch
);
1723 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1724 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1725 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1726 #if _MSVCP_VER <= 100
1727 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1728 const char*, (const ctype_char*, const char*, const char*, char*), \
1729 (this, first, last, dest))
1731 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1732 const char*, (const ctype_char*, const char*, const char*, char*), \
1733 (this, first, last, dest))
1735 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1736 const char *first
, const char *last
, char *dest
)
1738 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1739 memcpy(dest
, first
, last
-first
);
1743 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1744 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1745 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1746 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1747 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1748 (this, first, last, dest, size))
1749 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1750 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1752 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1753 memcpy_s(dest
, size
, first
, last
-first
);
1757 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1758 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1759 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1760 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1762 TRACE("(%p %c)\n", this, ch
);
1763 return call_ctype_char_do_widen_ch(this, ch
);
1766 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1767 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1768 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1769 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1770 const char *first
, const char *last
, char *dest
)
1772 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1773 return call_ctype_char_do_widen(this, first
, last
, dest
);
1776 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1777 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1778 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1779 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1780 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1782 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1783 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1786 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1787 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1788 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1790 TRACE("(%p %p)\n", facet
, loc
);
1792 if(facet
&& !*facet
) {
1795 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1797 ERR("Out of memory\n");
1798 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1802 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1803 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1804 _Locinfo_dtor(&locinfo
);
1810 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1811 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1812 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1814 return ctype_char__Getcat(facet
, locale_classic());
1817 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1819 static ctype_char
*obj
= NULL
;
1822 const locale_facet
*fac
;
1824 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1825 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1827 _Lockit_dtor(&lock
);
1828 return (ctype_char
*)fac
;
1832 _Lockit_dtor(&lock
);
1836 ctype_char__Getcat(&fac
, loc
);
1837 obj
= (ctype_char
*)fac
;
1838 call_locale_facet__Incref(&obj
->base
.facet
);
1839 locale_facet_register(&obj
->base
.facet
);
1840 _Lockit_dtor(&lock
);
1846 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1850 TRACE("%d %p\n", ch
, ctype
);
1855 cp
= ___lc_codepage_func();
1857 /* Don't convert to unicode in case of C locale */
1859 if(ch
>='A' && ch
<='Z')
1868 str
[0] = (ch
>>8) & 255;
1876 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1879 lower
= tolowerW(wide
);
1883 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1885 return str
[0] + (str
[1]<<8);
1889 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1890 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1891 #if _MSVCP_VER <= 100
1892 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1893 char, (const ctype_char*, char), (this, ch))
1895 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1896 char, (const ctype_char*, char), (this, ch))
1898 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1899 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1901 TRACE("(%p %c)\n", this, ch
);
1902 return _Tolower(ch
, &this->ctype
);
1905 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1906 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1907 #if _MSVCP_VER <= 100
1908 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
1909 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1911 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
1912 const char*, (const ctype_char*, char*, const char*), (this, first, last))
1914 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
1915 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
1917 TRACE("(%p %p %p)\n", this, first
, last
);
1918 for(; first
<last
; first
++)
1919 *first
= _Tolower(*first
, &this->ctype
);
1923 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
1924 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
1925 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
1926 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
1928 TRACE("(%p %c)\n", this, ch
);
1929 return call_ctype_char_do_tolower_ch(this, ch
);
1932 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
1933 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
1934 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
1935 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
1937 TRACE("(%p %p %p)\n", this, first
, last
);
1938 return call_ctype_char_do_tolower(this, first
, last
);
1942 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
1946 TRACE("%d %p\n", ch
, ctype
);
1951 cp
= ___lc_codepage_func();
1953 /* Don't convert to unicode in case of C locale */
1955 if(ch
>='a' && ch
<='z')
1964 str
[0] = (ch
>>8) & 255;
1972 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1975 upper
= toupperW(wide
);
1979 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
1981 return str
[0] + (str
[1]<<8);
1985 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
1986 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
1987 #if _MSVCP_VER <= 100
1988 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1989 char, (const ctype_char*, char), (this, ch))
1991 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1992 char, (const ctype_char*, char), (this, ch))
1994 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
1995 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
1997 TRACE("(%p %c)\n", this, ch
);
1998 return _Toupper(ch
, &this->ctype
);
2001 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
2002 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2003 #if _MSVCP_VER <= 100
2004 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
2005 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2007 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
2008 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2010 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
2011 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
2012 char *first
, const char *last
)
2014 TRACE("(%p %p %p)\n", this, first
, last
);
2015 for(; first
<last
; first
++)
2016 *first
= _Toupper(*first
, &this->ctype
);
2020 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
2021 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
2022 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
2023 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
2025 TRACE("(%p %c)\n", this, ch
);
2026 return call_ctype_char_do_toupper_ch(this, ch
);
2029 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2030 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2031 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2032 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2034 TRACE("(%p %p %p)\n", this, first
, last
);
2035 return call_ctype_char_do_toupper(this, first
, last
);
2038 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2039 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2040 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2041 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2043 TRACE("(%p %x %c)\n", this, mask
, ch
);
2044 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2047 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2048 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2049 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2050 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2052 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2053 for(; first
<last
; first
++)
2054 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2058 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2059 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2060 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2061 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2063 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2064 for(; first
<last
; first
++)
2065 if(!ctype_char_is_ch(this, mask
, *first
))
2070 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2071 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2072 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2073 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2075 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2076 for(; first
<last
; first
++)
2077 if(ctype_char_is_ch(this, mask
, *first
))
2082 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2083 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2084 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2085 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2087 TRACE("(%p)\n", this);
2088 return this->ctype
.table
;
2091 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2092 locale_id ctype_wchar_id
= {0};
2093 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2094 locale_id ctype_short_id
= {0};
2096 /* ??_7?$ctype@_W@std@@6B@ */
2097 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2098 /* ??_7?$ctype@G@std@@6B@ */
2099 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2101 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2102 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2103 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2106 return &ctype_wchar_id
;
2109 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2110 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2111 locale_id
* __cdecl
ctype_short__Id_func(void)
2114 return &ctype_short_id
;
2117 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2118 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2119 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2120 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2121 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2122 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2124 TRACE("(%p %p)\n", this, locinfo
);
2125 _Locinfo__Getctype(locinfo
, &this->ctype
);
2126 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2129 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2130 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2131 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2132 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2133 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2135 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2136 ctype_base_ctor_refs(&this->base
, refs
);
2137 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2138 ctype_wchar__Init(this, locinfo
);
2142 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2143 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2144 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2145 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2146 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2148 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2149 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2153 /* ??0?$ctype@_W@std@@QAE@I@Z */
2154 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2155 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2156 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2160 TRACE("(%p %lu)\n", this, refs
);
2162 ctype_base_ctor_refs(&this->base
, refs
);
2163 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2165 _Locinfo_ctor(&locinfo
);
2166 ctype_wchar__Init(this, &locinfo
);
2167 _Locinfo_dtor(&locinfo
);
2171 /* ??0?$ctype@G@std@@QAE@I@Z */
2172 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2173 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2174 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2176 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2177 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2181 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2182 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2183 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2184 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2185 const char *name
, MSVCP_size_t refs
)
2189 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2191 ctype_base_ctor_refs(&this->base
, refs
);
2192 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2194 _Locinfo_ctor_cstr(&locinfo
, name
);
2195 ctype_wchar__Init(this, &locinfo
);
2196 _Locinfo_dtor(&locinfo
);
2200 /* ??_F?$ctype@_W@std@@QAEXXZ */
2201 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2202 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2203 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2205 TRACE("(%p)\n", this);
2206 return ctype_short_ctor_refs(this, 0);
2209 /* ??_F?$ctype@G@std@@QAEXXZ */
2210 /* ??_F?$ctype@G@std@@QEAAXXZ */
2211 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2212 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2214 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2215 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2219 /* ??1?$ctype@G@std@@UAE@XZ */
2220 /* ??1?$ctype@G@std@@UEAA@XZ */
2221 /* ??1?$ctype@_W@std@@MAE@XZ */
2222 /* ??1?$ctype@_W@std@@MEAA@XZ */
2223 /* ??1?$ctype@G@std@@MAE@XZ */
2224 /* ??1?$ctype@G@std@@MEAA@XZ */
2225 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2226 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2228 TRACE("(%p)\n", this);
2229 if(this->ctype
.delfl
)
2230 free((void*)this->ctype
.table
);
2231 #if _MSVCP_VER >= 110
2232 free(this->ctype
.name
);
2236 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2237 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2239 TRACE("(%p %x)\n", this, flags
);
2241 /* we have an array, with the number of elements stored before the first object */
2242 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2244 for(i
=*ptr
-1; i
>=0; i
--)
2245 ctype_wchar_dtor(this+i
);
2246 MSVCRT_operator_delete(ptr
);
2248 ctype_wchar_dtor(this);
2250 MSVCRT_operator_delete(this);
2257 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
2262 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2267 cp
= ___lc_codepage_func();
2279 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2288 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2289 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2290 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2291 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2292 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2293 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2295 char buf
[MB_LEN_MAX
];
2297 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2299 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2302 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2303 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2304 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2305 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2306 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2307 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2308 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2309 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2310 #elif _MSVCP_VER <= 100
2311 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2312 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2314 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2315 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2317 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2319 return ctype_wchar__Donarrow(this, ch
, dflt
);
2322 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2323 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2324 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2325 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2326 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2327 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2328 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2329 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2330 (this, first, last, dflt, dest))
2331 #elif _MSVCP_VER <= 100
2332 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2333 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2334 (this, first, last, dflt, dest))
2336 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2337 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2338 (this, first, last, dflt, dest))
2340 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2341 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2343 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2344 for(; first
<last
; first
++)
2345 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2349 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2350 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2351 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2352 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2353 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2354 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2355 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2356 (this, first, last, dflt, dest, size))
2357 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2358 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2360 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2361 /* This function converts all multi-byte characters to dflt,
2362 * thanks to it result size is known before converting */
2363 if(last
-first
> size
)
2365 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2368 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2369 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2370 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2371 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2372 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2373 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2375 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2376 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2379 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2380 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2381 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2382 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2383 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2384 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2385 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2387 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2388 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2391 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2392 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2393 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2394 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2395 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2396 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2397 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2399 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2400 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2404 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2410 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2418 cp
= ___lc_codepage_func();
2422 *out
= (unsigned char)*in
;
2429 ((char*)state
)[1] = *in
;
2431 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2441 GetCPInfo(cp
, &cp_info
);
2443 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2444 if(!cp_info
.LeadByte
[i
+1])
2446 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2454 *state
= (unsigned char)*in
;
2458 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2465 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2472 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2477 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2480 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2481 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2482 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2483 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2484 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2485 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2489 TRACE("(%p %d)\n", this, ch
);
2490 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2493 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2494 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2495 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2496 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2497 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2498 #if _MSVCP_VER <= 100
2499 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2500 wchar_t, (const ctype_wchar*, char), (this, ch))
2502 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2503 wchar_t, (const ctype_wchar*, char), (this, ch))
2505 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2507 return ctype_wchar__Dowiden(this, ch
);
2510 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2511 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2512 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2513 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2514 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2515 #if _MSVCP_VER <= 100
2516 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2517 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2518 (this, first, last, dest))
2520 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2521 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2522 (this, first, last, dest))
2524 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2525 const char *first
, const char *last
, wchar_t *dest
)
2527 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2528 for(; first
<last
; first
++)
2529 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2533 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2534 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2535 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2536 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2537 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2538 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2539 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2540 (this, first, last, dest, size))
2541 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2542 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2544 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2545 /* This function converts all multi-byte characters to WEOF,
2546 * thanks to it result size is known before converting */
2547 if(size
< last
-first
)
2549 return ctype_wchar_do_widen(this, first
, last
, dest
);
2552 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2553 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2554 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2555 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2556 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2557 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2559 TRACE("(%p %d)\n", this, ch
);
2560 return call_ctype_wchar_do_widen_ch(this, ch
);
2563 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2564 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2565 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2566 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2567 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2568 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2569 const char *first
, const char *last
, wchar_t *dest
)
2571 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2572 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2575 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2576 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2577 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2578 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2579 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2580 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2581 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2583 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2584 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2587 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2588 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2589 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2591 TRACE("(%p %p)\n", facet
, loc
);
2593 if(facet
&& !*facet
) {
2596 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2598 ERR("Out of memory\n");
2599 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2603 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2604 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2605 _Locinfo_dtor(&locinfo
);
2611 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2612 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2613 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2615 return ctype_wchar__Getcat(facet
, locale_classic());
2618 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2619 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2620 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2622 if(facet
&& !*facet
) {
2623 ctype_wchar__Getcat(facet
, loc
);
2624 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2630 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2631 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2632 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2634 return ctype_short__Getcat(facet
, locale_classic());
2638 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2640 TRACE("(%d %p)\n", ch
, ctype
);
2641 return tolowerW(ch
);
2644 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2646 static ctype_wchar
*obj
= NULL
;
2649 const locale_facet
*fac
;
2651 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2652 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2654 _Lockit_dtor(&lock
);
2655 return (ctype_wchar
*)fac
;
2659 _Lockit_dtor(&lock
);
2663 ctype_wchar__Getcat(&fac
, loc
);
2664 obj
= (ctype_wchar
*)fac
;
2665 call_locale_facet__Incref(&obj
->base
.facet
);
2666 locale_facet_register(&obj
->base
.facet
);
2667 _Lockit_dtor(&lock
);
2672 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2674 static ctype_wchar
*obj
= NULL
;
2677 const locale_facet
*fac
;
2679 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2680 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2682 _Lockit_dtor(&lock
);
2683 return (ctype_wchar
*)fac
;
2687 _Lockit_dtor(&lock
);
2691 ctype_short__Getcat(&fac
, loc
);
2692 obj
= (ctype_wchar
*)fac
;
2693 call_locale_facet__Incref(&obj
->base
.facet
);
2694 locale_facet_register(&obj
->base
.facet
);
2695 _Lockit_dtor(&lock
);
2700 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2701 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2702 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2703 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2704 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2705 #if _MSVCP_VER <= 100
2706 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2707 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2709 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2710 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2712 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2714 return _Towlower(ch
, &this->ctype
);
2717 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2718 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2719 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2720 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2721 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2722 #if _MSVCP_VER <= 100
2723 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2724 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2725 (this, first, last))
2727 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2728 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2729 (this, first, last))
2731 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2732 wchar_t *first
, const wchar_t *last
)
2734 TRACE("(%p %p %p)\n", this, first
, last
);
2735 for(; first
<last
; first
++)
2736 *first
= _Towlower(*first
, &this->ctype
);
2740 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2741 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2742 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2743 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2744 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2745 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2747 TRACE("(%p %d)\n", this, ch
);
2748 return call_ctype_wchar_do_tolower_ch(this, ch
);
2751 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2752 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2753 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2754 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2755 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2756 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2757 wchar_t *first
, const wchar_t *last
)
2759 TRACE("(%p %p %p)\n", this, first
, last
);
2760 return call_ctype_wchar_do_tolower(this, first
, last
);
2764 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2766 TRACE("(%d %p)\n", ch
, ctype
);
2767 return toupperW(ch
);
2770 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2771 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2772 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2773 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2774 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2775 #if _MSVCP_VER <= 100
2776 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2777 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2779 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2780 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2782 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2784 return _Towupper(ch
, &this->ctype
);
2787 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2788 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2789 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2790 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2791 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2792 #if _MSVCP_VER <= 100
2793 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2794 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2795 (this, first, last))
2797 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2798 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2799 (this, first, last))
2801 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2802 wchar_t *first
, const wchar_t *last
)
2804 TRACE("(%p %p %p)\n", this, first
, last
);
2805 for(; first
<last
; first
++)
2806 *first
= _Towupper(*first
, &this->ctype
);
2810 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2811 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2812 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2813 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2814 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2815 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2817 TRACE("(%p %d)\n", this, ch
);
2818 return call_ctype_wchar_do_toupper_ch(this, ch
);
2821 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2822 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2823 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2824 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2825 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2826 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2827 wchar_t *first
, const wchar_t *last
)
2829 TRACE("(%p %p %p)\n", this, first
, last
);
2830 return call_ctype_wchar_do_toupper(this, first
, last
);
2834 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2835 short *mask
, const _Ctypevec
*ctype
)
2837 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2838 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2843 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2846 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2850 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2851 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2852 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2853 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2854 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2855 #if _MSVCP_VER <= 100
2856 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2857 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2859 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2860 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2862 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2864 TRACE("(%p %x %d)\n", this, mask
, ch
);
2865 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2868 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2869 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2870 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2871 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2872 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2873 #if _MSVCP_VER <= 100
2874 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2875 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2876 (this, first, last, dest))
2878 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
2879 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2880 (this, first, last, dest))
2882 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2883 const wchar_t *first
, const wchar_t *last
, short *dest
)
2885 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2886 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2889 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2890 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2891 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2892 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2893 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2894 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2896 TRACE("(%p %x %d)\n", this, mask
, ch
);
2897 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2900 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2901 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2902 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2903 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2904 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2905 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2906 const wchar_t *first
, const wchar_t *last
, short *dest
)
2908 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2909 return call_ctype_wchar_do_is(this, first
, last
, dest
);
2912 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2913 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2914 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
2915 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2916 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
2917 #if _MSVCP_VER <= 100
2918 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
2919 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2920 (this, mask, first, last))
2922 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
2923 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2924 (this, mask, first, last))
2926 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
2927 short mask
, const wchar_t *first
, const wchar_t *last
)
2929 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
2930 for(; first
<last
; first
++)
2931 if(!ctype_wchar_is_ch(this, mask
, *first
))
2936 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2937 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2938 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
2939 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2940 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
2941 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
2942 short mask
, const wchar_t *first
, const wchar_t *last
)
2944 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2945 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
2948 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
2949 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
2950 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
2951 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
2952 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
2953 #if _MSVCP_VER <= 100
2954 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
2955 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2956 (this, mask, first, last))
2958 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
2959 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
2960 (this, mask, first, last))
2962 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
2963 short mask
, const wchar_t *first
, const wchar_t *last
)
2965 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2966 for(; first
<last
; first
++)
2967 if(ctype_wchar_is_ch(this, mask
, *first
))
2972 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
2973 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
2974 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
2975 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
2976 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
2977 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
2978 short mask
, const wchar_t *first
, const wchar_t *last
)
2980 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2981 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
2984 /* ??_7codecvt_base@std@@6B@ */
2985 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
2987 /* ??0codecvt_base@std@@QAE@I@Z */
2988 /* ??0codecvt_base@std@@QEAA@_K@Z */
2989 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
2990 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
2992 TRACE("(%p %lu)\n", this, refs
);
2993 locale_facet_ctor_refs(&this->facet
, refs
);
2994 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
2998 /* ??_Fcodecvt_base@std@@QAEXXZ */
2999 /* ??_Fcodecvt_base@std@@QEAAXXZ */
3000 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
3001 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
3003 return codecvt_base_ctor_refs(this, 0);
3006 /* ??1codecvt_base@std@@UAE@XZ */
3007 /* ??1codecvt_base@std@@UEAA@XZ */
3008 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
3009 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
3011 TRACE("(%p)\n", this);
3012 locale_facet_dtor(&this->facet
);
3015 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
3016 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
3018 TRACE("(%p %x)\n", this, flags
);
3020 /* we have an array, with the number of elements stored before the first object */
3021 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3023 for(i
=*ptr
-1; i
>=0; i
--)
3024 codecvt_base_dtor(this+i
);
3025 MSVCRT_operator_delete(ptr
);
3027 codecvt_base_dtor(this);
3029 MSVCRT_operator_delete(this);
3035 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3036 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3037 #if _MSVCP_VER <= 100
3038 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3039 MSVCP_bool, (const codecvt_base*), (this))
3041 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3042 MSVCP_bool, (const codecvt_base*), (this))
3044 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3045 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3047 TRACE("(%p)\n", this);
3051 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3052 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3053 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3054 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3056 TRACE("(%p)\n", this);
3057 return call_codecvt_base_do_always_noconv(this);
3060 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3061 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3062 #if _MSVCP_VER <= 100
3063 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3064 int, (const codecvt_base*), (this))
3066 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3067 int, (const codecvt_base*), (this))
3069 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3070 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3072 TRACE("(%p)\n", this);
3076 /* ?max_length@codecvt_base@std@@QBEHXZ */
3077 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3078 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3079 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3081 TRACE("(%p)\n", this);
3082 return call_codecvt_base_do_max_length(this);
3085 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3086 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3087 #if _MSVCP_VER <= 100
3088 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3089 int, (const codecvt_base*), (this))
3091 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3092 int, (const codecvt_base*), (this))
3094 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3095 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3097 TRACE("(%p)\n", this);
3101 /* ?encoding@codecvt_base@std@@QBEHXZ */
3102 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3103 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3104 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3106 TRACE("(%p)\n", this);
3107 return call_codecvt_base_do_encoding(this);
3110 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3111 locale_id codecvt_char_id
= {0};
3113 /* ??_7?$codecvt@DDH@std@@6B@ */
3114 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3116 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3117 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3118 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3119 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3121 TRACE("(%p %p)\n", this, locinfo
);
3124 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3125 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3126 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3127 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3129 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3130 codecvt_base_ctor_refs(&this->base
, refs
);
3131 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3135 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3136 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3137 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3138 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3140 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3143 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3144 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3145 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3146 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3148 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3151 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3152 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3153 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3154 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3155 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3156 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3158 TRACE("(%p)\n", this);
3159 codecvt_base_dtor(&this->base
);
3162 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3163 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3165 TRACE("(%p %x)\n", this, flags
);
3167 /* we have an array, with the number of elements stored before the first object */
3168 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3170 for(i
=*ptr
-1; i
>=0; i
--)
3171 codecvt_char_dtor(this+i
);
3172 MSVCRT_operator_delete(ptr
);
3174 codecvt_char_dtor(this);
3176 MSVCRT_operator_delete(this);
3182 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3183 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3184 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3186 TRACE("(%p %p)\n", facet
, loc
);
3188 if(facet
&& !*facet
) {
3189 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3191 ERR("Out of memory\n");
3192 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3195 codecvt_char_ctor((codecvt_char
*)*facet
);
3201 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3202 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3203 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3205 return codecvt_char__Getcat(facet
, locale_classic());
3208 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3210 static codecvt_char
*obj
= NULL
;
3213 const locale_facet
*fac
;
3215 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3216 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3218 _Lockit_dtor(&lock
);
3219 return (codecvt_char
*)fac
;
3223 _Lockit_dtor(&lock
);
3227 codecvt_char__Getcat(&fac
, loc
);
3228 obj
= (codecvt_char
*)fac
;
3229 call_locale_facet__Incref(&obj
->base
.facet
);
3230 locale_facet_register(&obj
->base
.facet
);
3231 _Lockit_dtor(&lock
);
3236 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3237 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3238 #if _MSVCP_VER <= 100
3239 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3240 CALL_VTBL_FUNC(this, 16, int, \
3241 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3242 (this, state, from, from_end, from_next, to, to_end, to_next))
3244 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3245 CALL_VTBL_FUNC(this, 24, int, \
3246 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3247 (this, state, from, from_end, from_next, to, to_end, to_next))
3249 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3250 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
3251 const char *from
, const char *from_end
, const char **from_next
,
3252 char *to
, char *to_end
, char **to_next
)
3254 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3255 from_next
, to
, to_end
, to_next
);
3258 return CODECVT_noconv
;
3261 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3262 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3263 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3264 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
3265 const char *from
, const char *from_end
, const char **from_next
,
3266 char *to
, char *to_end
, char **to_next
)
3268 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3269 from_next
, to
, to_end
, to_next
);
3270 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3271 to
, to_end
, to_next
);
3274 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3275 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3276 #if _MSVCP_VER <= 100
3277 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3278 CALL_VTBL_FUNC(this, 20, int, \
3279 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3280 (this, state, from, from_end, from_next, to, to_end, to_next))
3282 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3283 CALL_VTBL_FUNC(this, 28, int, \
3284 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3285 (this, state, from, from_end, from_next, to, to_end, to_next))
3287 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3288 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
3289 const char *from
, const char *from_end
, const char **from_next
,
3290 char *to
, char *to_end
, char **to_next
)
3292 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3293 from_end
, from_next
, to
, to_end
, to_next
);
3296 return CODECVT_noconv
;
3299 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3300 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3301 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3302 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
3303 const char *from
, const char *from_end
, const char **from_next
,
3304 char *to
, char *to_end
, char **to_next
)
3306 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3307 from_next
, to
, to_end
, to_next
);
3308 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3309 to
, to_end
, to_next
);
3312 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3313 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3314 #if _MSVCP_VER <= 100
3315 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3316 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3318 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3319 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3321 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3322 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3323 int *state
, char *to
, char *to_end
, char **to_next
)
3325 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3327 return CODECVT_noconv
;
3330 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3331 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3332 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3333 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3334 int *state
, char *to
, char *to_end
, char **to_next
)
3336 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3337 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3340 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3341 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3342 #if _MSVCP_VER <= 100
3343 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3344 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3345 (this, state, from, from_end, max))
3347 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3348 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3349 (this, state, from, from_end, max))
3351 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3352 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
3353 const char *from
, const char *from_end
, MSVCP_size_t max
)
3355 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3356 return (from_end
-from
> max
? max
: from_end
-from
);
3359 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3360 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3361 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3362 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
3363 const char *from
, const char *from_end
, MSVCP_size_t max
)
3365 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3366 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3369 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3370 locale_id codecvt_wchar_id
= {0};
3371 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3372 locale_id codecvt_short_id
= {0};
3374 /* ??_7?$codecvt@_WDH@std@@6B@ */
3375 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3376 /* ??_7?$codecvt@GDH@std@@6B@ */
3377 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3379 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3380 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3381 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3382 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3383 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3384 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3386 TRACE("(%p %p)\n", this, locinfo
);
3387 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3390 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3391 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3392 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3393 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3395 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3397 codecvt_base_ctor_refs(&this->base
, refs
);
3398 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3400 codecvt_wchar__Init(this, locinfo
);
3404 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3405 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3406 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3407 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3409 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3411 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3412 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3416 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3417 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3418 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3419 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3423 TRACE("(%p %ld)\n", this, refs
);
3425 _Locinfo_ctor(&locinfo
);
3426 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3427 _Locinfo_dtor(&locinfo
);
3431 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3432 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3433 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3434 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3438 TRACE("(%p %ld)\n", this, refs
);
3440 _Locinfo_ctor(&locinfo
);
3441 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3442 _Locinfo_dtor(&locinfo
);
3446 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3447 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3448 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3449 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3453 TRACE("(%p %s %ld)\n", this, name
, refs
);
3455 _Locinfo_ctor_cstr(&locinfo
, name
);
3456 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3457 _Locinfo_dtor(&locinfo
);
3461 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3462 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3463 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3464 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3466 return codecvt_wchar_ctor_refs(this, 0);
3469 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3470 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3471 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3472 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3474 return codecvt_short_ctor_refs(this, 0);
3477 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3478 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3479 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3480 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3481 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3482 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3483 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3484 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3486 TRACE("(%p)\n", this);
3487 codecvt_base_dtor(&this->base
);
3490 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3491 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3493 TRACE("(%p %x)\n", this, flags
);
3495 /* we have an array, with the number of elements stored before the first object */
3496 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3498 for(i
=*ptr
-1; i
>=0; i
--)
3499 codecvt_wchar_dtor(this+i
);
3500 MSVCRT_operator_delete(ptr
);
3502 codecvt_wchar_dtor(this);
3504 MSVCRT_operator_delete(this);
3510 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3511 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3512 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3514 TRACE("(%p %p)\n", facet
, loc
);
3516 if(facet
&& !*facet
) {
3519 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3521 ERR("Out of memory\n");
3522 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3526 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3527 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3528 _Locinfo_dtor(&locinfo
);
3534 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3535 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3536 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3538 return codecvt_wchar__Getcat(facet
, locale_classic());
3541 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3543 static codecvt_wchar
*obj
= NULL
;
3546 const locale_facet
*fac
;
3548 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3549 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3551 _Lockit_dtor(&lock
);
3552 return (codecvt_wchar
*)fac
;
3556 _Lockit_dtor(&lock
);
3560 codecvt_wchar__Getcat(&fac
, loc
);
3561 obj
= (codecvt_wchar
*)fac
;
3562 call_locale_facet__Incref(&obj
->base
.facet
);
3563 locale_facet_register(&obj
->base
.facet
);
3564 _Lockit_dtor(&lock
);
3569 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3570 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3571 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3573 TRACE("(%p %p)\n", facet
, loc
);
3575 if(facet
&& !*facet
) {
3578 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3580 ERR("Out of memory\n");
3581 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3585 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3586 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3587 _Locinfo_dtor(&locinfo
);
3593 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3594 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3595 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3597 return codecvt_short__Getcat(facet
, locale_classic());
3600 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3602 static codecvt_wchar
*obj
= NULL
;
3605 const locale_facet
*fac
;
3607 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3608 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3610 _Lockit_dtor(&lock
);
3611 return (codecvt_wchar
*)fac
;
3615 _Lockit_dtor(&lock
);
3619 codecvt_short__Getcat(&fac
, loc
);
3620 obj
= (codecvt_wchar
*)fac
;
3621 call_locale_facet__Incref(&obj
->base
.facet
);
3622 locale_facet_register(&obj
->base
.facet
);
3623 _Lockit_dtor(&lock
);
3628 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3629 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3630 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3633 return &codecvt_wchar_id
;
3636 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3637 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3638 locale_id
* __cdecl
codecvt_short__Id_func(void)
3641 return &codecvt_short_id
;
3644 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3645 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3646 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3647 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3648 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3649 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3651 TRACE("(%p)\n", this);
3655 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3656 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3657 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3658 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3659 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3660 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3662 TRACE("(%p)\n", this);
3666 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3667 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3668 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3669 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3670 #if _MSVCP_VER <= 100
3671 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3672 CALL_VTBL_FUNC(this, 16, int, \
3673 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3674 (this, state, from, from_end, from_next, to, to_end, to_next))
3676 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3677 CALL_VTBL_FUNC(this, 24, int, \
3678 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3679 (this, state, from, from_end, from_next, to, to_end, to_next))
3681 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3682 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3683 const char *from
, const char *from_end
, const char **from_next
,
3684 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3686 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3687 from_end
, from_next
, to
, to_end
, to_next
);
3692 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3693 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3695 *from_next
= from_end
;
3696 return CODECVT_partial
;
3698 return CODECVT_error
;
3712 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3713 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3714 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3715 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3716 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3717 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3718 const char *from
, const char *from_end
, const char **from_next
,
3719 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3721 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3722 from_end
, from_next
, to
, to_end
, to_next
);
3723 return call_codecvt_wchar_do_in(this, state
, from
,
3724 from_end
, from_next
, to
, to_end
, to_next
);
3727 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3728 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3729 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3730 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3731 #if _MSVCP_VER <= 100
3732 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3733 CALL_VTBL_FUNC(this, 20, int, \
3734 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3735 (this, state, from, from_end, from_next, to, to_end, to_next))
3737 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3738 CALL_VTBL_FUNC(this, 28, int, \
3739 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3740 (this, state, from, from_end, from_next, to, to_end, to_next))
3742 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3743 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3744 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3745 char *to
, char *to_end
, char **to_next
)
3747 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3748 from_end
, from_next
, to
, to_end
, to_next
);
3753 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3754 int old_state
= *state
, size
;
3755 char buf
[MB_LEN_MAX
];
3757 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3759 return CODECVT_error
;
3761 if(size
> from_end
-*from_next
) {
3763 return CODECVT_partial
;
3767 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3775 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3776 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3777 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3778 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3779 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3780 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3781 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3782 char *to
, char *to_end
, char **to_next
)
3784 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3785 from_end
, from_next
, to
, to_end
, to_next
);
3786 return call_codecvt_wchar_do_out(this, state
, from
,
3787 from_end
, from_next
, to
, to_end
, to_next
);
3790 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3791 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3792 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3793 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3794 #if _MSVCP_VER <= 100
3795 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3796 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3798 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3799 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3801 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3802 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3803 int *state
, char *to
, char *to_end
, char **to_next
)
3805 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3807 WARN("unexpected state: %x\n", *state
);
3813 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3814 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3815 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3816 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3817 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3818 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3819 int *state
, char *to
, char *to_end
, char **to_next
)
3821 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3822 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3825 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3826 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3827 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3828 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3829 #if _MSVCP_VER <= 100
3830 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3831 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3832 (this, state, from, from_end, max))
3834 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3835 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3836 (this, state, from, from_end, max))
3838 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3839 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3840 const char *from
, const char *from_end
, MSVCP_size_t max
)
3842 int tmp_state
= *state
, ret
=0;
3844 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3846 while(ret
<max
&& from
!=from_end
) {
3847 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3864 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3865 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3866 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3867 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3868 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3869 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3870 const char *from
, const char *from_end
, MSVCP_size_t max
)
3872 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3873 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3876 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3877 locale_id numpunct_char_id
= {0};
3879 /* ??_7?$numpunct@D@std@@6B@ */
3880 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3882 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3883 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3884 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3885 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3889 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3891 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3892 this->false_name
= MSVCRT_operator_new(len
);
3893 if(this->false_name
)
3894 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3896 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3897 this->true_name
= MSVCRT_operator_new(len
);
3899 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3902 this->grouping
= MSVCRT_operator_new(1);
3904 *(char*)this->grouping
= 0;
3909 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
3911 len
= strlen(lc
->grouping
)+1;
3912 this->grouping
= MSVCRT_operator_new(len
);
3914 memcpy((char*)this->grouping
, lc
->grouping
, len
);
3916 this->dp
= lc
->decimal_point
[0];
3917 this->sep
= lc
->thousands_sep
[0];
3920 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
3921 MSVCRT_operator_delete((char*)this->grouping
);
3922 MSVCRT_operator_delete((char*)this->false_name
);
3923 MSVCRT_operator_delete((char*)this->true_name
);
3925 ERR("Out of memory\n");
3926 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3930 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
3931 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
3932 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
3933 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
3935 TRACE("(%p)\n", this);
3937 MSVCRT_operator_delete((char*)this->grouping
);
3938 MSVCRT_operator_delete((char*)this->false_name
);
3939 MSVCRT_operator_delete((char*)this->true_name
);
3942 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
3943 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
3944 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
3945 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
3946 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3948 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
3949 locale_facet_ctor_refs(&this->facet
, refs
);
3950 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3951 numpunct_char__Init(this, locinfo
, usedef
);
3955 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
3956 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
3957 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
3958 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
3959 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
3963 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
3964 locale_facet_ctor_refs(&this->facet
, refs
);
3965 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
3967 _Locinfo_ctor_cstr(&locinfo
, name
);
3968 numpunct_char__Init(this, &locinfo
, usedef
);
3969 _Locinfo_dtor(&locinfo
);
3973 /* ??0?$numpunct@D@std@@QAE@I@Z */
3974 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
3975 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
3976 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
3978 TRACE("(%p %lu)\n", this, refs
);
3979 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
3982 /* ??_F?$numpunct@D@std@@QAEXXZ */
3983 /* ??_F?$numpunct@D@std@@QEAAXXZ */
3984 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
3985 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
3987 return numpunct_char_ctor_refs(this, 0);
3990 /* ??1?$numpunct@D@std@@UAE@XZ */
3991 /* ??1?$numpunct@D@std@@UEAA@XZ */
3992 /* ??1?$numpunct@D@std@@MAE@XZ */
3993 /* ??1?$numpunct@D@std@@MEAA@XZ */
3994 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
3995 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
3997 TRACE("(%p)\n", this);
3998 numpunct_char__Tidy(this);
4001 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
4002 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
4004 TRACE("(%p %x)\n", this, flags
);
4006 /* we have an array, with the number of elements stored before the first object */
4007 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4009 for(i
=*ptr
-1; i
>=0; i
--)
4010 numpunct_char_dtor(this+i
);
4011 MSVCRT_operator_delete(ptr
);
4013 numpunct_char_dtor(this);
4015 MSVCRT_operator_delete(this);
4021 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4022 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4023 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4025 TRACE("(%p %p)\n", facet
, loc
);
4027 if(facet
&& !*facet
) {
4028 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4030 ERR("Out of memory\n");
4031 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4034 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4035 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4041 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4042 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4043 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4045 return numpunct_char__Getcat(facet
, locale_classic());
4048 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4050 static numpunct_char
*obj
= NULL
;
4053 const locale_facet
*fac
;
4055 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4056 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4058 _Lockit_dtor(&lock
);
4059 return (numpunct_char
*)fac
;
4063 _Lockit_dtor(&lock
);
4067 numpunct_char__Getcat(&fac
, loc
);
4068 obj
= (numpunct_char
*)fac
;
4069 call_locale_facet__Incref(&obj
->facet
);
4070 locale_facet_register(&obj
->facet
);
4071 _Lockit_dtor(&lock
);
4076 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4077 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4078 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4079 #if _MSVCP_VER <= 100
4080 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4081 char, (const numpunct_char *this), (this))
4083 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4084 char, (const numpunct_char *this), (this))
4086 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4088 TRACE("(%p)\n", this);
4092 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4093 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4094 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4095 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4097 TRACE("(%p)\n", this);
4098 return call_numpunct_char_do_decimal_point(this);
4101 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4102 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4103 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4104 #if _MSVCP_VER <= 100
4105 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4106 char, (const numpunct_char*), (this))
4108 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4109 char, (const numpunct_char*), (this))
4111 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4113 TRACE("(%p)\n", this);
4117 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4118 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4119 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4120 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4122 TRACE("(%p)\n", this);
4123 return call_numpunct_char_do_thousands_sep(this);
4126 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4127 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4128 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4129 #if _MSVCP_VER <= 100
4130 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4131 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4133 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4134 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4136 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4137 const numpunct_char
*this, basic_string_char
*ret
)
4139 TRACE("(%p)\n", this);
4140 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4143 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4144 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4145 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4146 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4148 TRACE("(%p)\n", this);
4149 return call_numpunct_char_do_grouping(this, ret
);
4152 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4153 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4154 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4155 #if _MSVCP_VER <= 100
4156 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4157 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4159 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4160 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4162 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4163 const numpunct_char
*this, basic_string_char
*ret
)
4165 TRACE("(%p)\n", this);
4166 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4169 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4170 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4171 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4172 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4174 TRACE("(%p)\n", this);
4175 return call_numpunct_char_do_falsename(this, ret
);
4178 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4179 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4180 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4181 #if _MSVCP_VER <= 100
4182 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4183 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4185 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4186 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4188 basic_string_char
* __thiscall
numpunct_char_do_truename(
4189 const numpunct_char
*this, basic_string_char
*ret
)
4191 TRACE("(%p)\n", this);
4192 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4195 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4196 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4197 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4198 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4200 TRACE("(%p)\n", this);
4201 return call_numpunct_char_do_truename(this, ret
);
4204 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4205 locale_id numpunct_wchar_id
= {0};
4206 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4207 locale_id numpunct_short_id
= {0};
4209 /* ??_7?$numpunct@_W@std@@6B@ */
4210 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4211 /* ??_7?$numpunct@G@std@@6B@ */
4212 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4214 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4215 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4216 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4217 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4218 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4219 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4220 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4222 const char *to_convert
;
4226 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4228 _Locinfo__Getcvt(locinfo
, &cvt
);
4230 to_convert
= _Locinfo__Getfalse(locinfo
);
4231 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4232 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4233 if(this->false_name
)
4234 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4235 (wchar_t*)this->false_name
, len
);
4237 to_convert
= _Locinfo__Gettrue(locinfo
);
4238 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4239 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4241 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4242 (wchar_t*)this->true_name
, len
);
4245 this->grouping
= MSVCRT_operator_new(1);
4247 *(char*)this->grouping
= 0;
4252 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4254 len
= strlen(lc
->grouping
)+1;
4255 this->grouping
= MSVCRT_operator_new(len
);
4257 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4259 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4260 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4263 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4264 MSVCRT_operator_delete((char*)this->grouping
);
4265 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4266 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4268 ERR("Out of memory\n");
4269 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4273 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4274 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4275 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4276 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4277 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4278 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4280 TRACE("(%p)\n", this);
4282 MSVCRT_operator_delete((char*)this->grouping
);
4283 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4284 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4287 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4288 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4289 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4290 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4291 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4293 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4294 locale_facet_ctor_refs(&this->facet
, refs
);
4295 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4296 numpunct_wchar__Init(this, locinfo
, usedef
);
4300 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4301 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4302 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4303 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4304 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4306 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4307 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4311 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4312 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4313 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4314 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4315 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4319 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4320 locale_facet_ctor_refs(&this->facet
, refs
);
4321 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4323 _Locinfo_ctor_cstr(&locinfo
, name
);
4324 numpunct_wchar__Init(this, &locinfo
, usedef
);
4325 _Locinfo_dtor(&locinfo
);
4329 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4330 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4331 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4332 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4333 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4335 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4336 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4340 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4341 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4342 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4343 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4345 TRACE("(%p %lu)\n", this, refs
);
4346 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4349 /* ??0?$numpunct@G@std@@QAE@I@Z */
4350 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4351 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4352 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4354 numpunct_wchar_ctor_refs(this, refs
);
4355 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4359 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4360 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4361 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4362 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4364 return numpunct_wchar_ctor_refs(this, 0);
4367 /* ??_F?$numpunct@G@std@@QAEXXZ */
4368 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4369 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4370 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4372 return numpunct_short_ctor_refs(this, 0);
4375 /* ??1?$numpunct@G@std@@UAE@XZ */
4376 /* ??1?$numpunct@G@std@@UEAA@XZ */
4377 /* ??1?$numpunct@_W@std@@MAE@XZ */
4378 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4379 /* ??1?$numpunct@G@std@@MAE@XZ */
4380 /* ??1?$numpunct@G@std@@MEAA@XZ */
4381 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4382 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4384 TRACE("(%p)\n", this);
4385 numpunct_wchar__Tidy(this);
4388 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4389 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4391 TRACE("(%p %x)\n", this, flags
);
4393 /* we have an array, with the number of elements stored before the first object */
4394 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4396 for(i
=*ptr
-1; i
>=0; i
--)
4397 numpunct_wchar_dtor(this+i
);
4398 MSVCRT_operator_delete(ptr
);
4400 numpunct_wchar_dtor(this);
4402 MSVCRT_operator_delete(this);
4408 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4409 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4410 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4412 TRACE("(%p %p)\n", facet
, loc
);
4414 if(facet
&& !*facet
) {
4415 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4417 ERR("Out of memory\n");
4418 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4421 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4422 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4428 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4429 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4430 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4432 return numpunct_wchar__Getcat(facet
, locale_classic());
4435 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4437 static numpunct_wchar
*obj
= NULL
;
4440 const locale_facet
*fac
;
4442 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4443 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4445 _Lockit_dtor(&lock
);
4446 return (numpunct_wchar
*)fac
;
4450 _Lockit_dtor(&lock
);
4454 numpunct_wchar__Getcat(&fac
, loc
);
4455 obj
= (numpunct_wchar
*)fac
;
4456 call_locale_facet__Incref(&obj
->facet
);
4457 locale_facet_register(&obj
->facet
);
4458 _Lockit_dtor(&lock
);
4463 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4464 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4465 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4467 TRACE("(%p %p)\n", facet
, loc
);
4469 if(facet
&& !*facet
) {
4470 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4472 ERR("Out of memory\n");
4473 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4476 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4477 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4483 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4484 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4485 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4487 return numpunct_short__Getcat(facet
, locale_classic());
4490 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4492 static numpunct_wchar
*obj
= NULL
;
4495 const locale_facet
*fac
;
4497 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4498 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4500 _Lockit_dtor(&lock
);
4501 return (numpunct_wchar
*)fac
;
4505 _Lockit_dtor(&lock
);
4509 numpunct_short__Getcat(&fac
, loc
);
4510 obj
= (numpunct_wchar
*)fac
;
4511 call_locale_facet__Incref(&obj
->facet
);
4512 locale_facet_register(&obj
->facet
);
4513 _Lockit_dtor(&lock
);
4518 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4519 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4520 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4521 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4522 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4523 #if _MSVCP_VER <= 100
4524 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4525 wchar_t, (const numpunct_wchar *this), (this))
4527 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4528 wchar_t, (const numpunct_wchar *this), (this))
4530 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4532 TRACE("(%p)\n", this);
4536 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4537 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4538 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4539 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4540 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4541 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4543 TRACE("(%p)\n", this);
4544 return call_numpunct_wchar_do_decimal_point(this);
4547 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4548 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4549 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4550 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4551 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4552 #if _MSVCP_VER <= 100
4553 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4554 wchar_t, (const numpunct_wchar *this), (this))
4556 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4557 wchar_t, (const numpunct_wchar *this), (this))
4559 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4561 TRACE("(%p)\n", this);
4565 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4566 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4567 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4568 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4569 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4570 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4572 TRACE("(%p)\n", this);
4573 return call_numpunct_wchar_do_thousands_sep(this);
4576 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4577 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4578 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4579 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4580 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4581 #if _MSVCP_VER <= 100
4582 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4583 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4585 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4586 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4588 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4590 TRACE("(%p)\n", this);
4591 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4594 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4595 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4596 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4597 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4598 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4599 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4601 TRACE("(%p)\n", this);
4602 return call_numpunct_wchar_do_grouping(this, ret
);
4605 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4606 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4607 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4608 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4609 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4610 #if _MSVCP_VER <= 100
4611 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4612 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4614 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4615 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4617 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4619 TRACE("(%p)\n", this);
4620 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4623 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4624 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4625 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4626 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4627 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4628 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4630 TRACE("(%p)\n", this);
4631 return call_numpunct_wchar_do_falsename(this, ret
);
4634 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4635 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4636 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4637 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4638 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4639 #if _MSVCP_VER <= 100
4640 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4641 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4643 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4644 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4646 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4648 TRACE("(%p)\n", this);
4649 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4652 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4653 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4654 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4655 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4656 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4657 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4659 TRACE("(%p)\n", this);
4660 return call_numpunct_wchar_do_truename(this, ret
);
4663 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4665 double ret
= strtod(buf
, buf_end
);
4668 ret
*= pow(10, exp
);
4672 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4678 ret
= _Stod(buf
, buf_end
, exp
);
4688 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4690 return _Stod(buf
, buf_end
, exp
);
4693 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4695 return _Stodx(buf
, buf_end
, exp
, err
);
4698 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4700 return _strtoi64(buf
, buf_end
, base
);
4703 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4709 ret
= _strtoi64(buf
, buf_end
, base
);
4719 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4721 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4722 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4727 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4729 return _strtoui64(buf
, buf_end
, base
);
4732 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4734 unsigned __int64 ret
;
4738 ret
= _strtoui64(buf
, buf_end
, base
);
4748 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4751 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4752 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4754 return buf
[0]=='-' ? -i
: i
;
4757 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4759 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4760 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4762 return buf
[0]=='-' ? -i
: i
;
4765 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4766 locale_id num_get_wchar_id
= {0};
4767 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4768 locale_id num_get_short_id
= {0};
4770 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4771 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4772 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4773 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4775 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4776 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4777 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4778 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4779 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4780 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4782 TRACE("(%p %p)\n", this, locinfo
);
4783 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4786 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4787 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4788 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4789 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4790 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4792 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4794 locale_facet_ctor_refs(&this->facet
, refs
);
4795 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4797 num_get_wchar__Init(this, locinfo
);
4801 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4802 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4803 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4804 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4805 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4807 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4808 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4812 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4813 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4814 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4815 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4819 TRACE("(%p %lu)\n", this, refs
);
4821 _Locinfo_ctor(&locinfo
);
4822 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4823 _Locinfo_dtor(&locinfo
);
4827 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4828 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4829 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4830 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4832 num_get_wchar_ctor_refs(this, refs
);
4833 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4837 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4838 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4839 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4840 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4842 return num_get_wchar_ctor_refs(this, 0);
4845 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4846 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4847 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4848 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4850 return num_get_short_ctor_refs(this, 0);
4853 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
4854 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
4855 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4856 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4857 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4858 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4859 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4860 void __thiscall
num_get_wchar_dtor(num_get
*this)
4862 TRACE("(%p)\n", this);
4863 locale_facet_dtor(&this->facet
);
4866 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4867 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4869 TRACE("(%p %x)\n", this, flags
);
4871 /* we have an array, with the number of elements stored before the first object */
4872 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4874 for(i
=*ptr
-1; i
>=0; i
--)
4875 num_get_wchar_dtor(this+i
);
4876 MSVCRT_operator_delete(ptr
);
4878 num_get_wchar_dtor(this);
4880 MSVCRT_operator_delete(this);
4886 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4887 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4888 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4890 TRACE("(%p %p)\n", facet
, loc
);
4892 if(facet
&& !*facet
) {
4895 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4897 ERR("Out of memory\n");
4898 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4902 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
4903 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4904 _Locinfo_dtor(&locinfo
);
4910 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4911 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4912 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
4914 return num_get_wchar__Getcat(facet
, locale_classic());
4917 num_get
* num_get_wchar_use_facet(const locale
*loc
)
4919 static num_get
*obj
= NULL
;
4922 const locale_facet
*fac
;
4924 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4925 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
4927 _Lockit_dtor(&lock
);
4928 return (num_get
*)fac
;
4932 _Lockit_dtor(&lock
);
4936 num_get_wchar__Getcat(&fac
, loc
);
4937 obj
= (num_get
*)fac
;
4938 call_locale_facet__Incref(&obj
->facet
);
4939 locale_facet_register(&obj
->facet
);
4940 _Lockit_dtor(&lock
);
4945 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4946 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4947 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4949 if(facet
&& !*facet
) {
4950 num_get_wchar__Getcat(facet
, loc
);
4951 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
4957 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
4958 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4959 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
4961 return num_get_short__Getcat(facet
, locale_classic());
4964 num_get
* num_get_short_use_facet(const locale
*loc
)
4966 static num_get
*obj
= NULL
;
4969 const locale_facet
*fac
;
4971 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4972 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
4974 _Lockit_dtor(&lock
);
4975 return (num_get
*)fac
;
4979 _Lockit_dtor(&lock
);
4983 num_get_short__Getcat(&fac
, loc
);
4984 obj
= (num_get
*)fac
;
4985 call_locale_facet__Incref(&obj
->facet
);
4986 locale_facet_register(&obj
->facet
);
4987 _Lockit_dtor(&lock
);
4992 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
4993 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
4995 basic_string_char grouping_bstr
;
4996 basic_string_char groups_found
;
4997 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
4998 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
4999 wchar_t sep
= 0, digits
[11], *digits_pos
;
5000 const char *grouping
, *groups
;
5001 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5003 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5006 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5009 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5010 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5011 #if _MSVCP_VER >= 70
5012 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5016 MSVCP_basic_string_char_ctor(&groups_found
);
5018 istreambuf_iterator_wchar_val(first
);
5020 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5022 istreambuf_iterator_wchar_inc(first
);
5023 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5025 istreambuf_iterator_wchar_inc(first
);
5028 /* read possibly grouped numbers before decimal */
5029 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5030 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5031 if(sep
&& first
->val
==sep
) {
5032 if(!groups_no
) break; /* empty group - stop parsing */
5033 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5040 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5041 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5042 if(!got_nonzero
&& first
->val
== digits
[0])
5049 *dest
++ = '0'+digits_pos
-digits
;
5051 exp
++; /* too many digits, just multiply by 10 */
5052 if(sep
&& groups_no
<CHAR_MAX
)
5057 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5058 if(got_digit
&& !got_nonzero
)
5061 /* get decimal, if any */
5062 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5064 *dest
++ = *localeconv()->decimal_point
;
5065 istreambuf_iterator_wchar_inc(first
);
5068 /* read non-grouped after decimal */
5069 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5070 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5072 else if(dest
<num_end
) {
5074 *dest
++ = '0'+digits_pos
-digits
;
5078 /* read exponent, if any */
5079 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
5081 istreambuf_iterator_wchar_inc(first
);
5083 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5085 istreambuf_iterator_wchar_inc(first
);
5086 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5088 istreambuf_iterator_wchar_inc(first
);
5091 got_digit
= got_nonzero
= FALSE
;
5093 /* skip any leading zeroes */
5094 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5097 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5098 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5101 *dest
++ = '0'+digits_pos
-digits
;
5104 /* if just found zeroes for exponent, use that */
5105 if(got_digit
&& !got_nonzero
)
5113 if(sep
&& groups_no
)
5114 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5116 if(!cur_group
) /* no groups, skip loop */
5118 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5119 error
= TRUE
; /* trailing empty */
5121 for(; cur_group
>=0 && !error
; cur_group
--) {
5122 if(*grouping
== CHAR_MAX
) {
5126 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5127 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5130 }else if(grouping
[1]) {
5134 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5136 MSVCP_basic_string_char_dtor(&groups_found
);
5146 /* ?_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 */
5147 /* ?_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 */
5148 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5149 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5151 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5154 /* ?_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 */
5155 /* ?_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 */
5156 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5157 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5159 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5162 /* ?_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 */
5163 /* ?_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 */
5164 /* ?_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 */
5165 /* ?_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 */
5166 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5167 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5169 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5173 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5174 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5176 wchar_t digits
[23], *digits_pos
, sep
= 0;
5177 basic_string_char grouping_bstr
;
5178 basic_string_char groups_found
;
5179 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5180 char *dest_beg
= dest
, *dest_end
= dest
+24;
5181 const char *grouping
, *groups
;
5182 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5184 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5187 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5188 for(i
=0; i
<6; i
++) {
5189 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5190 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5193 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5194 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5195 #if _MSVCP_VER >= 70
5196 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5199 basefield
= fmtflags
& FMTFLAG_basefield
;
5200 if(basefield
== FMTFLAG_oct
)
5202 else if(basefield
== FMTFLAG_hex
)
5203 base
= 22; /* equal to the size of digits buffer */
5209 istreambuf_iterator_wchar_val(first
);
5210 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5212 istreambuf_iterator_wchar_inc(first
);
5213 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5215 istreambuf_iterator_wchar_inc(first
);
5218 if(first
->strbuf
&& first
->val
==digits
[0]) {
5220 istreambuf_iterator_wchar_inc(first
);
5221 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5222 if(!base
|| base
== 22) {
5224 istreambuf_iterator_wchar_inc(first
);
5234 if(!base
) base
= 10;
5239 MSVCP_basic_string_char_ctor(&groups_found
);
5240 if(found_zero
) ++groups_no
;
5243 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5244 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5245 if(sep
&& first
->val
==sep
) {
5246 if(!groups_no
) break; /* empty group - stop parsing */
5247 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5255 if(dest_empty
&& first
->val
== digits
[0]) {
5261 /* skip digits that can't be copied to dest buffer, other
5262 * functions are responsible for detecting overflows */
5264 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5265 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5266 'A'+digits_pos
-digits
-16));
5267 if(sep
&& groups_no
<CHAR_MAX
)
5272 if(sep
&& groups_no
)
5273 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5275 if(!cur_group
) { /* no groups, skip loop */
5277 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5278 error
= TRUE
; /* trailing empty */
5282 for(; cur_group
>=0 && !error
; cur_group
--) {
5283 if(*grouping
== CHAR_MAX
) {
5287 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5288 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5291 }else if(grouping
[1]) {
5296 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5298 MSVCP_basic_string_char_dtor(&groups_found
);
5305 }else if(dest_empty
)
5309 return (base
==22 ? 16 : base
);
5312 /* ?_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 */
5313 /* ?_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 */
5314 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5315 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5317 return num_get__Getifld(this, dest
, first
, last
,
5318 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5321 /* ?_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 */
5322 /* ?_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 */
5323 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5324 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5326 return num_get__Getifld(this, dest
, first
, last
,
5327 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5330 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5331 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5332 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5333 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5334 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5335 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5337 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5341 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5342 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5343 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5344 void **pval
, numpunct_wchar
*numpunct
)
5350 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5352 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5353 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5354 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5355 *state
|= IOSTATE_failbit
;
5356 else if(end
!=tmp
&& !err
)
5357 *pval
= (void*)((INT_PTR
)v
);
5359 *state
|= IOSTATE_failbit
;
5362 *state
|= IOSTATE_eofbit
;
5368 /* ?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 */
5369 /* ?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 */
5370 #if _MSVCP_VER <= 100
5371 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5372 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5373 (this, ret, first, last, base, state, pval))
5375 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5376 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5377 (this, ret, first, last, base, state, pval))
5379 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5380 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5381 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5383 return num_get_do_get_void(this, ret
, first
, last
, base
,
5384 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5387 /* ?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 */
5388 /* ?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 */
5389 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5390 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5391 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5393 return num_get_do_get_void(this, ret
, first
, last
, base
,
5394 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5397 /* ?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 */
5398 /* ?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 */
5399 /* ?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 */
5400 /* ?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 */
5401 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5402 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5403 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5405 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5406 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5409 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5410 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5411 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5412 double *pval
, numpunct_wchar
*numpunct
)
5418 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5420 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5421 if(end
!=tmp
&& !err
)
5424 *state
|= IOSTATE_failbit
;
5427 *state
|= IOSTATE_eofbit
;
5433 /* ?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 */
5434 /* ?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 */
5435 /* ?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 */
5436 /* ?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 */
5437 #if _MSVCP_VER <= 100
5438 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5439 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5440 (this, ret, first, last, base, state, pval))
5441 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5442 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5443 (this, ret, first, last, base, state, pval))
5445 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5446 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5447 (this, ret, first, last, base, state, pval))
5448 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5449 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5450 (this, ret, first, last, base, state, pval))
5452 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5453 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5454 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5456 return num_get_do_get_double(this, ret
, first
, last
, base
,
5457 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5460 /* ?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 */
5461 /* ?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 */
5462 /* ?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 */
5463 /* ?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 */
5464 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5465 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5466 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5468 return num_get_do_get_double(this, ret
, first
, last
, base
,
5469 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5472 /* ?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 */
5473 /* ?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 */
5474 /* ?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 */
5475 /* ?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 */
5476 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5477 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5478 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5480 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5481 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5484 /* ?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 */
5485 /* ?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 */
5486 /* ?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 */
5487 /* ?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 */
5488 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5489 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5490 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5492 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5493 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5496 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5497 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5498 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5499 float *pval
, numpunct_wchar
*numpunct
)
5505 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5507 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5508 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5509 if(end
!=tmp
&& !err
)
5512 *state
|= IOSTATE_failbit
;
5515 *state
|= IOSTATE_eofbit
;
5521 /* ?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 */
5522 /* ?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 */
5523 #if _MSVCP_VER <= 100
5524 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5525 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5526 (this, ret, first, last, base, state, pval))
5528 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5529 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5530 (this, ret, first, last, base, state, pval))
5532 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5533 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5534 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5536 return num_get_do_get_float(this, ret
, first
, last
, base
,
5537 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5540 /* ?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 */
5541 /* ?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 */
5542 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5543 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5544 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5546 return num_get_do_get_float(this, ret
, first
, last
, base
,
5547 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5550 /* ?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 */
5551 /* ?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 */
5552 /* ?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 */
5553 /* ?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 */
5554 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5555 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5556 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5558 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5559 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5562 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5563 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5564 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5565 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5571 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5573 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5574 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5575 if(end
!=tmp
&& !err
)
5578 *state
|= IOSTATE_failbit
;
5581 *state
|= IOSTATE_eofbit
;
5587 /* ?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 */
5588 /* ?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 */
5589 #if _MSVCP_VER <= 100
5590 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5591 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5592 (this, ret, first, last, base, state, pval))
5594 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5595 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5596 (this, ret, first, last, base, state, pval))
5598 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5599 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5600 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5602 return num_get_do_get_uint64(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@AAHAA_K@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@AEAHAEA_K@Z */
5608 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5609 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5610 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5612 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5613 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5616 /* ?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 */
5617 /* ?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 */
5618 /* ?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 */
5619 /* ?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 */
5620 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5621 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5622 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5624 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5625 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5628 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5629 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5630 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5631 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5637 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5639 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5640 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5641 if(end
!=tmp
&& !err
)
5644 *state
|= IOSTATE_failbit
;
5647 *state
|= IOSTATE_eofbit
;
5653 /* ?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 */
5654 /* ?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 */
5655 #if _MSVCP_VER <= 100
5656 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5657 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5658 (this, ret, first, last, base, state, pval))
5660 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5661 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5662 (this, ret, first, last, base, state, pval))
5664 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5665 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5666 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5668 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5669 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5672 /* ?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 */
5673 /* ?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 */
5674 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5675 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5676 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5678 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5679 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5682 /* ?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 */
5683 /* ?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 */
5684 /* ?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 */
5685 /* ?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 */
5686 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5687 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5688 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5690 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5691 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5694 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5695 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5696 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5697 ULONG
*pval
, numpunct_wchar
*numpunct
)
5703 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5705 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5706 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5707 if(end
!=tmp
&& !err
)
5710 *state
|= IOSTATE_failbit
;
5713 *state
|= IOSTATE_eofbit
;
5719 /* ?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 */
5720 /* ?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 */
5721 #if _MSVCP_VER <= 100
5722 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5723 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5724 (this, ret, first, last, base, state, pval))
5726 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5727 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5728 (this, ret, first, last, base, state, pval))
5730 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5731 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5732 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5734 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5735 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5738 /* ?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 */
5739 /* ?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 */
5740 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5741 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5742 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5744 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5745 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5748 /* ?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 */
5749 /* ?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 */
5750 /* ?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 */
5751 /* ?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 */
5752 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5753 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5754 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5756 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5757 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5760 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5761 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5762 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5763 LONG
*pval
, numpunct_wchar
*numpunct
)
5769 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5771 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5772 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5773 if(end
!=tmp
&& !err
)
5776 *state
|= IOSTATE_failbit
;
5779 *state
|= IOSTATE_eofbit
;
5785 /* ?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 */
5786 /* ?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 */
5787 #if _MSVCP_VER <= 100
5788 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5789 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5790 (this, ret, first, last, base, state, pval))
5792 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5793 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5794 (this, ret, first, last, base, state, pval))
5796 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5797 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5798 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5800 return num_get_do_get_long(this, ret
, first
, last
, base
,
5801 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5804 /* ?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 */
5805 /* ?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 */
5806 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5807 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5808 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5810 return num_get_do_get_long(this, ret
, first
, last
, base
,
5811 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5814 /* ?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 */
5815 /* ?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 */
5816 /* ?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 */
5817 /* ?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 */
5818 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5819 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5820 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5822 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5823 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5826 /* ?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 */
5827 /* ?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 */
5828 #if _MSVCP_VER <= 100
5829 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5830 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5831 (this, ret, first, last, base, state, pval))
5833 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5834 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5835 (this, ret, first, last, base, state, pval))
5837 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5838 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5839 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5841 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5842 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5845 /* ?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 */
5846 /* ?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 */
5847 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5848 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5849 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5851 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5852 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5855 /* ?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 */
5856 /* ?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 */
5857 /* ?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 */
5858 /* ?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 */
5859 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5860 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5861 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5863 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5864 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5867 /* ?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 */
5868 /* ?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 */
5869 #if _MSVCP_VER <= 100
5870 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5871 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5872 (this, ret, first, last, base, state, pval))
5874 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
5875 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5876 (this, ret, first, last, base, state, pval))
5878 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5879 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5880 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5883 char tmp
[25], *beg
, *end
;
5886 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5888 b
= num_get_wchar__Getifld(this, tmp
,
5889 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
5890 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5891 v
= _Stoulx(beg
, &end
, b
, &err
);
5893 if(v
!= (ULONG
)((unsigned short)v
))
5894 *state
|= IOSTATE_failbit
;
5895 else if(end
!=beg
&& !err
)
5896 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5898 *state
|= IOSTATE_failbit
;
5901 *state
|= IOSTATE_eofbit
;
5907 /* ?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 */
5908 /* ?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 */
5909 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
5910 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5911 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5913 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
5917 /* ?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 */
5918 /* ?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 */
5919 /* ?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@ */
5920 /* ?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 */
5921 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
5922 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5923 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5925 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5926 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
5929 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
5930 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5931 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5932 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
5934 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5936 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
5937 basic_string_wchar false_bstr
, true_bstr
;
5938 const wchar_t *pfalse
, *ptrue
;
5940 numpunct_wchar_falsename(numpunct
, &false_bstr
);
5941 numpunct_wchar_truename(numpunct
, &true_bstr
);
5942 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
5943 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
5945 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
5946 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
5948 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
5951 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
5953 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
5962 istreambuf_iterator_wchar_inc(&first
);
5964 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
5973 *state
|= IOSTATE_failbit
;
5975 MSVCP_basic_string_wchar_dtor(&false_bstr
);
5976 MSVCP_basic_string_wchar_dtor(&true_bstr
);
5980 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5981 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5983 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
5986 *state
|= IOSTATE_failbit
;
5990 *state
|= IOSTATE_eofbit
;
5991 memcpy(ret
, &first
, sizeof(first
));
5995 /* ?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 */
5996 /* ?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 */
5997 #if _MSVCP_VER <= 100
5998 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5999 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6000 (this, ret, first, last, base, state, pval))
6002 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
6003 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6004 (this, ret, first, last, base, state, pval))
6006 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
6007 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6008 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6010 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6011 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
6014 /* ?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 */
6015 /* ?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 */
6016 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
6017 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6018 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6020 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6021 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
6024 /* ?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 */
6025 /* ?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 */
6026 /* ?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 */
6027 /* ?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 */
6028 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6029 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6030 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6032 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6033 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6036 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6037 locale_id num_get_char_id
= {0};
6039 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6040 extern const vtable_ptr MSVCP_num_get_char_vtable
;
6042 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6043 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6044 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6045 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6047 TRACE("(%p %p)\n", this, locinfo
);
6048 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6051 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6052 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6053 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6054 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6055 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6057 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
6059 locale_facet_ctor_refs(&this->facet
, refs
);
6060 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
6062 num_get_char__Init(this, locinfo
);
6066 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6067 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6068 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6069 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
6073 TRACE("(%p %lu)\n", this, refs
);
6075 _Locinfo_ctor(&locinfo
);
6076 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6077 _Locinfo_dtor(&locinfo
);
6081 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6082 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6083 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6084 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6086 return num_get_char_ctor_refs(this, 0);
6089 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6090 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6091 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6092 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6093 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6094 void __thiscall
num_get_char_dtor(num_get
*this)
6096 TRACE("(%p)\n", this);
6097 locale_facet_dtor(&this->facet
);
6100 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6101 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6103 TRACE("(%p %x)\n", this, flags
);
6105 /* we have an array, with the number of elements stored before the first object */
6106 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6108 for(i
=*ptr
-1; i
>=0; i
--)
6109 num_get_char_dtor(this+i
);
6110 MSVCRT_operator_delete(ptr
);
6112 num_get_char_dtor(this);
6114 MSVCRT_operator_delete(this);
6120 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6121 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6122 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6124 TRACE("(%p %p)\n", facet
, loc
);
6126 if(facet
&& !*facet
) {
6129 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6131 ERR("Out of memory\n");
6132 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6136 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6137 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6138 _Locinfo_dtor(&locinfo
);
6144 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6145 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6146 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6148 return num_get_char__Getcat(facet
, locale_classic());
6151 num_get
* num_get_char_use_facet(const locale
*loc
)
6153 static num_get
*obj
= NULL
;
6156 const locale_facet
*fac
;
6158 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6159 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6161 _Lockit_dtor(&lock
);
6162 return (num_get
*)fac
;
6166 _Lockit_dtor(&lock
);
6170 num_get_char__Getcat(&fac
, loc
);
6171 obj
= (num_get
*)fac
;
6172 call_locale_facet__Incref(&obj
->facet
);
6173 locale_facet_register(&obj
->facet
);
6174 _Lockit_dtor(&lock
);
6179 /* ?_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 */
6180 /* ?_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 */
6181 /* Copies number to dest buffer, validates grouping and skips separators.
6182 * Updates first so it points past the number, all digits are skipped.
6183 * Returns how exponent needs to changed.
6184 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6185 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
6187 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6188 istreambuf_iterator_char
*last
, const locale
*loc
)
6190 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6191 basic_string_char grouping_bstr
;
6192 basic_string_char groups_found
;
6193 int groups_no
= 0, cur_group
= 0, exp
= 0;
6194 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6195 const char *grouping
, *groups
;
6196 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6198 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6200 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6201 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6202 #if _MSVCP_VER >= 70
6203 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6207 MSVCP_basic_string_char_ctor(&groups_found
);
6209 istreambuf_iterator_char_val(first
);
6211 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6212 *dest
++ = first
->val
;
6213 istreambuf_iterator_char_inc(first
);
6216 /* read possibly grouped numbers before decimal */
6217 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6218 if(first
->val
<'0' || first
->val
>'9') {
6219 if(sep
&& first
->val
==sep
) {
6220 if(!groups_no
) break; /* empty group - stop parsing */
6221 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6228 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6229 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6230 if(!got_nonzero
&& first
->val
== '0')
6237 *dest
++ = first
->val
;
6239 exp
++; /* too many digits, just multiply by 10 */
6240 if(sep
&& groups_no
<CHAR_MAX
)
6245 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6246 if(got_digit
&& !got_nonzero
)
6249 /* get decimal, if any */
6250 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6252 *dest
++ = *localeconv()->decimal_point
;
6253 istreambuf_iterator_char_inc(first
);
6256 /* read non-grouped after decimal */
6257 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6258 if(first
->val
<'0' || first
->val
>'9')
6260 else if(dest
<num_end
) {
6262 *dest
++ = first
->val
;
6266 /* read exponent, if any */
6267 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6268 *dest
++ = first
->val
;
6269 istreambuf_iterator_char_inc(first
);
6271 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6272 *dest
++ = first
->val
;
6273 istreambuf_iterator_char_inc(first
);
6276 got_digit
= got_nonzero
= FALSE
;
6278 /* skip any leading zeroes */
6279 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6282 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6283 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6286 *dest
++ = first
->val
;
6289 /* if just found zeroes for exponent, use that */
6290 if(got_digit
&& !got_nonzero
)
6298 if(sep
&& groups_no
)
6299 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6301 if(!cur_group
) /* no groups, skip loop */
6303 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6304 error
= TRUE
; /* trailing empty */
6306 for(; cur_group
>=0 && !error
; cur_group
--) {
6307 if(*grouping
== CHAR_MAX
) {
6311 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6312 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6315 }else if(grouping
[1]) {
6319 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6321 MSVCP_basic_string_char_dtor(&groups_found
);
6331 /* ?_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 */
6332 /* ?_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 */
6333 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6334 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6336 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6340 /* ?_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 */
6341 /* ?_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 */
6342 /* Copies number to dest buffer, validates grouping and skips separators.
6343 * Updates first so it points past the number, all digits are skipped.
6344 * Returns number base (8, 10 or 16).
6345 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6346 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6348 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6349 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6351 static const char digits
[] = "0123456789abcdefABCDEF";
6353 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6354 basic_string_char grouping_bstr
;
6355 basic_string_char groups_found
;
6356 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6357 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6358 const char *grouping
, *groups
;
6359 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6361 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6363 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6364 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6365 #if _MSVCP_VER >= 70
6366 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6369 basefield
= fmtflags
& FMTFLAG_basefield
;
6370 if(basefield
== FMTFLAG_oct
)
6372 else if(basefield
== FMTFLAG_hex
)
6373 base
= 22; /* equal to the size of digits buffer */
6379 istreambuf_iterator_char_val(first
);
6380 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6381 *dest
++ = first
->val
;
6382 istreambuf_iterator_char_inc(first
);
6385 if(first
->strbuf
&& first
->val
=='0') {
6387 istreambuf_iterator_char_inc(first
);
6388 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6389 if(!base
|| base
== 22) {
6391 istreambuf_iterator_char_inc(first
);
6401 if (!base
) base
= 10;
6406 MSVCP_basic_string_char_ctor(&groups_found
);
6407 if(found_zero
) ++groups_no
;
6410 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6411 if(!memchr(digits
, first
->val
, base
)) {
6412 if(sep
&& first
->val
==sep
) {
6413 if(!groups_no
) break; /* empty group - stop parsing */
6414 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6422 if(dest_empty
&& first
->val
== '0')
6429 /* skip digits that can't be copied to dest buffer, other
6430 * functions are responsible for detecting overflows */
6432 *dest
++ = first
->val
;
6433 if(sep
&& groups_no
<CHAR_MAX
)
6438 if(sep
&& groups_no
)
6439 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6441 if(!cur_group
) { /* no groups, skip loop */
6443 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6444 error
= TRUE
; /* trailing empty */
6448 for(; cur_group
>=0 && !error
; cur_group
--) {
6449 if(*grouping
== CHAR_MAX
) {
6453 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6454 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6457 }else if(grouping
[1]) {
6462 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6464 MSVCP_basic_string_char_dtor(&groups_found
);
6471 }else if(dest_empty
)
6475 return (base
==22 ? 16 : base
);
6478 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6479 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6480 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6481 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6483 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6487 /* ?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 */
6488 /* ?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 */
6489 #if _MSVCP_VER <= 100
6490 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6491 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6492 (this, ret, first, last, base, state, pval))
6494 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6495 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6496 (this, ret, first, last, base, state, pval))
6498 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6499 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6500 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6506 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6508 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6509 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6510 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6511 *state
|= IOSTATE_failbit
;
6512 else if(end
!=tmp
&& !err
)
6513 *pval
= (void*)((INT_PTR
)v
);
6515 *state
|= IOSTATE_failbit
;
6518 *state
|= IOSTATE_eofbit
;
6524 /* ?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 */
6525 /* ?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 */
6526 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6527 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6528 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6530 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6531 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6534 /* ?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 */
6535 /* ?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 */
6536 /* ?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 */
6537 /* ?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 */
6538 #if _MSVCP_VER <= 100
6539 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6540 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6541 (this, ret, first, last, base, state, pval))
6542 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6543 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6544 (this, ret, first, last, base, state, pval))
6546 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6547 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6548 (this, ret, first, last, base, state, pval))
6549 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6550 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6551 (this, ret, first, last, base, state, pval))
6553 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6554 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6555 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6561 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6563 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6564 if(end
!=tmp
&& !err
)
6567 *state
|= IOSTATE_failbit
;
6570 *state
|= IOSTATE_eofbit
;
6576 /* ?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 */
6577 /* ?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 */
6578 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6579 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6580 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6582 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6583 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6586 /* ?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 */
6587 /* ?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 */
6588 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6589 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6590 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6592 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6593 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6596 /* ?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 */
6597 /* ?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 */
6598 #if _MSVCP_VER <= 100
6599 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6600 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6601 (this, ret, first, last, base, state, pval))
6603 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6604 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6605 (this, ret, first, last, base, state, pval))
6607 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6608 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6609 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6615 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6617 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6618 if(end
!=tmp
&& !err
)
6621 *state
|= IOSTATE_failbit
;
6624 *state
|= IOSTATE_eofbit
;
6630 /* ?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 */
6631 /* ?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 */
6632 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6633 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6634 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6636 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6637 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6640 /* ?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 */
6641 /* ?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 */
6642 #if _MSVCP_VER <= 100
6643 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6644 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6645 (this, ret, first, last, base, state, pval))
6647 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6648 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6649 (this, ret, first, last, base, state, pval))
6651 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6652 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6653 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6659 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6661 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6662 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6663 if(end
!=tmp
&& !err
)
6666 *state
|= IOSTATE_failbit
;
6669 *state
|= IOSTATE_eofbit
;
6675 /* ?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 */
6676 /* ?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 */
6677 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6678 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6679 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6681 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6682 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6685 /* ?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 */
6686 /* ?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 */
6687 #if _MSVCP_VER <= 100
6688 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6689 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6690 (this, ret, first, last, base, state, pval))
6692 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6693 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6694 (this, ret, first, last, base, state, pval))
6696 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6697 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6698 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6704 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6706 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6707 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6708 if(end
!=tmp
&& !err
)
6711 *state
|= IOSTATE_failbit
;
6714 *state
|= IOSTATE_eofbit
;
6720 /* ?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 */
6721 /* ?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 */
6722 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6723 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6724 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6726 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6727 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6730 /* ?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 */
6731 /* ?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 */
6732 #if _MSVCP_VER <= 100
6733 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6734 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6735 (this, ret, first, last, base, state, pval))
6737 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6738 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6739 (this, ret, first, last, base, state, pval))
6741 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6742 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6743 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6749 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6751 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6752 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6753 if(end
!=tmp
&& !err
)
6756 *state
|= IOSTATE_failbit
;
6759 *state
|= IOSTATE_eofbit
;
6765 /* ?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 */
6766 /* ?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 */
6767 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6768 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6769 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6771 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6772 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6775 /* ?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 */
6776 /* ?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 */
6777 #if _MSVCP_VER <= 100
6778 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6779 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6780 (this, ret, first, last, base, state, pval))
6782 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6783 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6784 (this, ret, first, last, base, state, pval))
6786 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6787 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6788 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6794 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6796 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6797 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6798 if(end
!=tmp
&& !err
)
6801 *state
|= IOSTATE_failbit
;
6804 *state
|= IOSTATE_eofbit
;
6810 /* ?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 */
6811 /* ?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 */
6812 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6813 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6814 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6816 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6817 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6820 /* ?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 */
6821 /* ?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 */
6822 #if _MSVCP_VER <= 100
6823 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6824 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6825 (this, ret, first, last, base, state, pval))
6827 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6828 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6829 (this, ret, first, last, base, state, pval))
6831 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6832 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6833 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6835 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6836 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6839 /* ?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 */
6840 /* ?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 */
6841 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6842 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6843 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6845 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6846 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6849 /* ?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 */
6850 /* ?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 */
6851 #if _MSVCP_VER <= 100
6852 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6853 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6854 (this, ret, first, last, base, state, pval))
6856 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
6857 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6858 (this, ret, first, last, base, state, pval))
6860 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6861 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6862 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6865 char tmp
[25], *beg
, *end
;
6868 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6870 b
= num_get_char__Getifld(this, tmp
,
6871 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6872 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6873 v
= _Stoulx(beg
, &end
, b
, &err
);
6875 if(v
!= (ULONG
)((unsigned short)v
))
6876 *state
|= IOSTATE_failbit
;
6877 else if(end
!=beg
&& !err
)
6878 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6880 *state
|= IOSTATE_failbit
;
6883 *state
|= IOSTATE_eofbit
;
6889 /* ?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 */
6890 /* ?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 */
6891 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6892 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6893 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6895 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6896 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6899 /* ?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 */
6900 /* ?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 */
6901 #if _MSVCP_VER <= 100
6902 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6903 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6904 (this, ret, first, last, base, state, pval))
6906 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
6907 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6908 (this, ret, first, last, base, state, pval))
6910 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
6911 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6912 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6914 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6916 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6917 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
6918 basic_string_char false_bstr
, true_bstr
;
6919 const char *pfalse
, *ptrue
;
6921 numpunct_char_falsename(numpunct
, &false_bstr
);
6922 numpunct_char_truename(numpunct
, &true_bstr
);
6923 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
6924 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
6926 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
6927 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6929 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6932 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6934 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6943 istreambuf_iterator_char_inc(&first
);
6945 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6954 *state
|= IOSTATE_failbit
;
6956 MSVCP_basic_string_char_dtor(&false_bstr
);
6957 MSVCP_basic_string_char_dtor(&true_bstr
);
6961 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6962 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6964 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6967 *state
|= IOSTATE_failbit
;
6971 *state
|= IOSTATE_eofbit
;
6972 memcpy(ret
, &first
, sizeof(first
));
6976 /* ?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 */
6977 /* ?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 */
6978 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
6979 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
6980 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6982 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6983 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6986 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6987 locale_id num_put_char_id
= {0};
6989 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6990 extern const vtable_ptr MSVCP_num_put_char_vtable
;
6992 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6993 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6994 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
6995 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
6997 TRACE("(%p %p)\n", this, locinfo
);
6998 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7001 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7002 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7003 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
7004 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7006 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7008 locale_facet_ctor_refs(&this->facet
, refs
);
7009 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
7011 num_put_char__Init(this, locinfo
);
7015 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
7016 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
7017 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
7018 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7022 TRACE("(%p %lu)\n", this, refs
);
7024 _Locinfo_ctor(&locinfo
);
7025 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7026 _Locinfo_dtor(&locinfo
);
7030 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7031 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7032 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7033 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7035 return num_put_char_ctor_refs(this, 0);
7038 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7039 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7040 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7041 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7042 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7043 void __thiscall
num_put_char_dtor(num_put
*this)
7045 TRACE("(%p)\n", this);
7046 locale_facet_dtor(&this->facet
);
7049 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7050 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7052 TRACE("(%p %x)\n", this, flags
);
7054 /* we have an array, with the number of elements stored before the first object */
7055 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7057 for(i
=*ptr
-1; i
>=0; i
--)
7058 num_put_char_dtor(this+i
);
7059 MSVCRT_operator_delete(ptr
);
7061 num_put_char_dtor(this);
7063 MSVCRT_operator_delete(this);
7069 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7070 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7071 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7073 TRACE("(%p %p)\n", facet
, loc
);
7075 if(facet
&& !*facet
) {
7078 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7080 ERR("Out of memory\n");
7081 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7085 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7086 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7087 _Locinfo_dtor(&locinfo
);
7093 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7094 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7095 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7097 return num_put_char__Getcat(facet
, locale_classic());
7100 num_put
* num_put_char_use_facet(const locale
*loc
)
7102 static num_put
*obj
= NULL
;
7105 const locale_facet
*fac
;
7107 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7108 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7110 _Lockit_dtor(&lock
);
7111 return (num_put
*)fac
;
7115 _Lockit_dtor(&lock
);
7119 num_put_char__Getcat(&fac
, loc
);
7120 obj
= (num_put
*)fac
;
7121 call_locale_facet__Incref(&obj
->facet
);
7122 locale_facet_register(&obj
->facet
);
7123 _Lockit_dtor(&lock
);
7128 /* ?_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 */
7129 /* ?_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 */
7130 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7131 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7133 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7135 for(; count
>0; count
--)
7136 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7142 /* ?_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 */
7143 /* ?_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 */
7144 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7145 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7147 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7149 for(; count
>0; count
--)
7150 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7156 /* ?_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 */
7157 /* ?_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 */
7158 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7159 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7161 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7165 /* ?_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 */
7166 /* ?_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 */
7167 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7168 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7170 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7172 for(; count
>0; count
--)
7173 ostreambuf_iterator_char_put(&dest
, c
);
7179 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7180 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7181 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7183 int type
= fmtfl
& FMTFLAG_floatfield
;
7186 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7189 if(fmtfl
& FMTFLAG_showpos
)
7191 if(fmtfl
& FMTFLAG_showpoint
)
7198 if(type
== FMTFLAG_fixed
)
7200 else if(type
== FMTFLAG_scientific
)
7201 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7202 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7203 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7205 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7211 /* ?_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 */
7212 /* ?_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 */
7213 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7214 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7215 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7217 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7218 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7222 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7223 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7224 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7226 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7227 basic_string_char grouping_bstr
;
7228 const char *grouping
;
7229 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7230 int cur_group
= 0, group_size
= 0;
7231 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7234 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7236 /* Change decimal point */
7237 for(p
=buf
; p
<buf
+count
; p
++) {
7238 if(*p
== dec_point
) {
7239 *p
= numpunct_char_decimal_point(numpunct
);
7245 /* Add separators to number */
7246 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7247 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7248 #if _MSVCP_VER >= 70
7249 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7252 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7254 if(group_size
== grouping
[cur_group
]) {
7256 if(grouping
[cur_group
+1])
7259 memmove(p
+1, p
, buf
+count
-p
);
7264 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7266 /* Display number with padding */
7267 if(count
>= base
->wide
)
7270 pad
= base
->wide
-count
;
7273 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7274 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7277 if(adjustfield
!= FMTFLAG_left
) {
7278 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7281 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7282 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7285 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7286 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7287 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7289 int base
= fmtfl
& FMTFLAG_basefield
;
7292 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7295 if(fmtfl
& FMTFLAG_showpos
)
7297 if(fmtfl
& FMTFLAG_showbase
)
7304 if(base
== FMTFLAG_oct
)
7306 else if(base
== FMTFLAG_hex
)
7307 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7315 /* ?_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 */
7316 /* ?_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 */
7317 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7318 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7320 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7321 basic_string_char grouping_bstr
;
7322 const char *grouping
;
7324 int cur_group
= 0, group_size
= 0;
7325 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7328 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7330 /* Add separators to number */
7331 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7332 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7333 #if _MSVCP_VER >= 70
7334 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7337 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7339 if(group_size
== grouping
[cur_group
]) {
7341 if(grouping
[cur_group
+1])
7344 memmove(p
+1, p
, buf
+count
-p
);
7349 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7351 /* Display number with padding */
7352 if(count
>= base
->wide
)
7355 pad
= base
->wide
-count
;
7358 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7359 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7361 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7362 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7365 if(adjustfield
!= FMTFLAG_left
) {
7366 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7369 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7370 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7373 /* ?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 */
7374 /* ?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 */
7375 #if _MSVCP_VER <= 100
7376 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7377 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7378 (this, ret, dest, base, fill, v))
7380 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7381 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7382 (this, ret, dest, base, fill, v))
7384 #if _MSVCP_VER != 80
7385 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7387 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7389 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7390 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7392 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7393 char fmt
[7]; /* strlen("%+#lld")+1 */
7395 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7397 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7398 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7401 /* ?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 */
7402 /* ?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 */
7403 #if _MSVCP_VER != 80
7404 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7406 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7408 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7409 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7411 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7412 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7415 /* ?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 */
7416 /* ?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 */
7417 #if _MSVCP_VER <= 100
7418 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7419 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7420 (this, ret, dest, base, fill, v))
7422 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7423 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7424 (this, ret, dest, base, fill, v))
7426 #if _MSVCP_VER != 80
7427 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7429 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7431 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7432 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7434 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7435 char fmt
[7]; /* strlen("%+#lld")+1 */
7437 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7439 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7440 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7443 /* ?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 */
7444 /* ?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 */
7445 #if _MSVCP_VER != 80
7446 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7448 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7450 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7451 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7453 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7454 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7457 static inline unsigned get_precision(const ios_base
*base
)
7459 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7465 /* ?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 */
7466 /* ?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 */
7467 /* ?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 */
7468 /* ?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 */
7469 #if _MSVCP_VER <= 100
7470 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7471 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7472 (this, ret, dest, base, fill, v))
7473 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7474 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7475 (this, ret, dest, base, fill, v))
7477 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7478 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7479 (this, ret, dest, base, fill, v))
7480 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7481 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7482 (this, ret, dest, base, fill, v))
7484 #if _MSVCP_VER != 80
7485 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7487 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7489 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7490 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7493 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7497 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7499 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7500 prec
= get_precision(base
);
7501 size
= _scprintf(fmt
, prec
, v
);
7503 /* TODO: don't use dynamic allocation */
7504 tmp
= MSVCRT_operator_new(size
*2);
7506 ERR("Out of memory\n");
7507 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7509 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7510 MSVCRT_operator_delete(tmp
);
7514 /* ?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 */
7515 /* ?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 */
7516 #if _MSVCP_VER != 80
7517 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7519 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7521 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7522 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7524 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7525 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7528 /* ?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 */
7529 /* ?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 */
7530 #if _MSVCP_VER != 80
7531 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7533 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7535 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7536 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7538 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7539 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7542 /* ?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 */
7543 /* ?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 */
7544 #if _MSVCP_VER <= 100
7545 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7546 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7547 (this, ret, dest, base, fill, v))
7549 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7550 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7551 (this, ret, dest, base, fill, v))
7553 #if _MSVCP_VER != 80
7554 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7556 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7558 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7559 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7561 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7563 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7565 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7568 /* ?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 */
7569 /* ?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 */
7570 #if _MSVCP_VER != 80
7571 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7573 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7575 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7576 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7578 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7579 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7582 /* ?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 */
7583 /* ?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 */
7584 #if _MSVCP_VER <= 100
7585 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7586 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7587 (this, ret, dest, base, fill, v))
7589 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7590 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7591 (this, ret, dest, base, fill, v))
7593 #if _MSVCP_VER != 80
7594 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7596 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7598 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7599 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7601 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7602 char fmt
[7]; /* strlen("%+#lld")+1 */
7604 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7606 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7607 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7610 /* ?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 */
7611 /* ?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 */
7612 #if _MSVCP_VER != 80
7613 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7615 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7617 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7618 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7620 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7621 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7624 /* ?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 */
7625 /* ?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 */
7626 #if _MSVCP_VER <= 100
7627 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7628 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7629 (this, ret, dest, base, fill, v))
7631 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7632 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7633 (this, ret, dest, base, fill, v))
7635 #if _MSVCP_VER != 80
7636 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7638 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7640 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7641 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7643 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7644 char fmt
[7]; /* strlen("%+#lld")+1 */
7646 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7648 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7649 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7652 /* ?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 */
7653 /* ?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 */
7654 #if _MSVCP_VER != 80
7655 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7657 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7659 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7660 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7662 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7663 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7666 /* ?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 */
7667 /* ?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 */
7668 #if _MSVCP_VER <= 100
7669 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7670 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7671 (this, ret, dest, base, fill, v))
7673 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7674 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7675 (this, ret, dest, base, fill, v))
7677 #if _MSVCP_VER != 80
7678 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7680 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7682 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7683 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7685 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7687 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7688 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7689 basic_string_char str
;
7690 MSVCP_size_t pad
, len
;
7693 numpunct_char_truename(numpunct
, &str
);
7695 numpunct_char_falsename(numpunct
, &str
);
7697 len
= MSVCP_basic_string_char_length(&str
);
7698 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7701 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7702 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7705 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7706 MSVCP_basic_string_char_dtor(&str
);
7707 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7710 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7713 /* ?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 */
7714 /* ?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 */
7715 #if _MSVCP_VER != 80
7716 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7718 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7720 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7721 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7723 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7724 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7727 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7728 locale_id num_put_wchar_id
= {0};
7729 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7730 locale_id num_put_short_id
= {0};
7732 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7733 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7734 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7735 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7737 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7738 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7739 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7740 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7742 TRACE("(%p %p)\n", this, locinfo
);
7743 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7746 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7747 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7748 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7749 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7751 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7753 locale_facet_ctor_refs(&this->facet
, refs
);
7754 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7756 num_put_wchar__Init(this, locinfo
);
7760 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7761 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7762 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7763 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7765 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7766 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7770 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7771 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7772 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7773 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7777 TRACE("(%p %lu)\n", this, refs
);
7779 _Locinfo_ctor(&locinfo
);
7780 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7781 _Locinfo_dtor(&locinfo
);
7785 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7786 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7787 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7788 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7790 num_put_wchar_ctor_refs(this, refs
);
7791 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7795 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7796 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7797 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7798 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7800 return num_put_wchar_ctor_refs(this, 0);
7803 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7804 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7805 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7806 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7808 return num_put_short_ctor_refs(this, 0);
7811 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7812 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7813 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7814 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7815 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7816 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7817 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7818 void __thiscall
num_put_wchar_dtor(num_put
*this)
7820 TRACE("(%p)\n", this);
7821 locale_facet_dtor(&this->facet
);
7824 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7825 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7827 TRACE("(%p %x)\n", this, flags
);
7829 /* we have an array, with the number of elements stored before the first object */
7830 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7832 for(i
=*ptr
-1; i
>=0; i
--)
7833 num_put_wchar_dtor(this+i
);
7834 MSVCRT_operator_delete(ptr
);
7836 num_put_wchar_dtor(this);
7838 MSVCRT_operator_delete(this);
7844 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7845 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7846 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7848 TRACE("(%p %p)\n", facet
, loc
);
7850 if(facet
&& !*facet
) {
7853 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7855 ERR("Out of memory\n");
7856 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7860 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7861 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7862 _Locinfo_dtor(&locinfo
);
7868 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7869 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7870 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
7872 return num_put_wchar__Getcat(facet
, locale_classic());
7875 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7876 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7877 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
7879 TRACE("(%p %p)\n", facet
, loc
);
7881 if(facet
&& !*facet
) {
7884 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7886 ERR("Out of memory\n");
7887 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7891 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7892 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7893 _Locinfo_dtor(&locinfo
);
7899 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7900 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7901 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
7903 return num_put_short__Getcat(facet
, locale_classic());
7906 num_put
* num_put_wchar_use_facet(const locale
*loc
)
7908 static num_put
*obj
= NULL
;
7911 const locale_facet
*fac
;
7913 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7914 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
7916 _Lockit_dtor(&lock
);
7917 return (num_put
*)fac
;
7921 _Lockit_dtor(&lock
);
7925 num_put_wchar__Getcat(&fac
, loc
);
7926 obj
= (num_put
*)fac
;
7927 call_locale_facet__Incref(&obj
->facet
);
7928 locale_facet_register(&obj
->facet
);
7929 _Lockit_dtor(&lock
);
7934 num_put
* num_put_short_use_facet(const locale
*loc
)
7936 static num_put
*obj
= NULL
;
7939 const locale_facet
*fac
;
7941 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7942 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
7944 _Lockit_dtor(&lock
);
7945 return (num_put
*)fac
;
7949 _Lockit_dtor(&lock
);
7953 num_put_short__Getcat(&fac
, loc
);
7954 obj
= (num_put
*)fac
;
7955 call_locale_facet__Incref(&obj
->facet
);
7956 locale_facet_register(&obj
->facet
);
7957 _Lockit_dtor(&lock
);
7962 /* ?_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 */
7963 /* ?_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 */
7964 /* ?_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 */
7965 /* ?_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 */
7966 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7967 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
7969 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
7971 for(; count
>0; count
--)
7972 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
7978 /* ?_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 */
7979 /* ?_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 */
7980 /* ?_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 */
7981 /* ?_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 */
7982 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
7983 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
7988 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
7990 for(; count
>0; count
--) {
7991 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
7992 ostreambuf_iterator_wchar_put(&dest
, ch
);
7999 /* ?_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 */
8000 /* ?_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 */
8001 /* ?_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 */
8002 /* ?_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 */
8003 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8004 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
8006 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
8010 /* ?_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 */
8011 /* ?_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 */
8012 /* ?_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 */
8013 /* ?_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 */
8014 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8015 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
8017 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
8019 for(; count
>0; count
--)
8020 ostreambuf_iterator_wchar_put(&dest
, c
);
8026 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8027 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8028 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8029 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8030 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8032 int type
= fmtfl
& FMTFLAG_floatfield
;
8035 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8038 if(fmtfl
& FMTFLAG_showpos
)
8040 if(fmtfl
& FMTFLAG_showbase
)
8047 if(type
== FMTFLAG_fixed
)
8049 else if(type
== FMTFLAG_scientific
)
8050 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8051 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8052 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8054 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8060 /* ?_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 */
8061 /* ?_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 */
8062 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8063 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8064 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8066 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8067 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8071 /* ?_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 */
8072 /* ?_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 */
8073 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8074 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8075 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8077 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8078 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8082 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8083 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8084 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8085 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8087 basic_string_char grouping_bstr
;
8088 const char *grouping
;
8089 char *p
, dec_point
= *localeconv()->decimal_point
;
8091 int cur_group
= 0, group_size
= 0;
8092 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8093 MSVCP_size_t i
, pad
;
8095 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8097 for(p
=buf
; p
<buf
+count
; p
++) {
8103 /* Add separators to number */
8104 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8105 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8106 #if _MSVCP_VER >= 70
8107 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8110 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8112 if(group_size
== grouping
[cur_group
]) {
8114 if(grouping
[cur_group
+1])
8117 memmove(p
+1, p
, buf
+count
-p
);
8118 *p
= '\0'; /* mark thousands separator positions */
8122 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8124 /* Display number with padding */
8125 if(count
>= base
->wide
)
8128 pad
= base
->wide
-count
;
8131 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8132 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8135 if(adjustfield
!= FMTFLAG_left
) {
8136 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8140 for(i
=0; i
<count
; i
++) {
8141 if(buf
[i
] == dec_point
)
8142 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8144 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8146 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8149 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8152 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8153 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8154 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8155 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8156 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8158 int base
= fmtfl
& FMTFLAG_basefield
;
8161 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8164 if(fmtfl
& FMTFLAG_showpos
)
8166 if(fmtfl
& FMTFLAG_showbase
)
8173 if(base
== FMTFLAG_oct
)
8175 else if(base
== FMTFLAG_hex
)
8176 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8184 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8185 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8186 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8188 basic_string_char grouping_bstr
;
8189 const char *grouping
;
8192 int cur_group
= 0, group_size
= 0;
8193 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8194 MSVCP_size_t i
, pad
;
8196 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8198 /* Add separators to number */
8199 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8200 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8201 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8203 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8205 if(group_size
== grouping
[cur_group
]) {
8207 if(grouping
[cur_group
+1])
8210 memmove(p
+1, p
, buf
+count
-p
);
8211 *p
= '\0'; /* mark thousands separator positions */
8215 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8217 /* Display number with padding */
8218 if(count
>= base
->wide
)
8221 pad
= base
->wide
-count
;
8224 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8225 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8227 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8228 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
8231 if(adjustfield
!= FMTFLAG_left
) {
8232 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8236 for(i
=0; i
<count
; i
++) {
8238 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8240 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8243 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8246 /* ?_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 */
8247 /* ?_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 */
8248 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8249 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8251 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8254 /* ?_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 */
8255 /* ?_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 */
8256 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8257 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8259 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8262 /* ?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 */
8263 /* ?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 */
8264 #if _MSVCP_VER <= 100
8265 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8266 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8267 (this, ret, dest, base, fill, v))
8269 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8270 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8271 (this, ret, dest, base, fill, v))
8273 #if _MSVCP_VER != 80
8274 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8276 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8278 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8279 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8281 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8282 char fmt
[7]; /* strlen("%+#lld")+1 */
8284 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8286 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8287 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8290 /* ?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 */
8291 /* ?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 */
8292 #if _MSVCP_VER != 80
8293 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8295 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8297 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8298 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8300 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8301 char fmt
[7]; /* strlen("%+#lld")+1 */
8303 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8305 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8306 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8309 /* ?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 */
8310 /* ?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 */
8311 /* ?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 */
8312 /* ?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 */
8313 #if _MSVCP_VER != 80
8314 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8316 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8318 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8319 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8321 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8322 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8325 /* ?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 */
8326 /* ?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 */
8327 #if _MSVCP_VER <= 100
8328 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8329 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8330 (this, ret, dest, base, fill, v))
8332 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8333 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8334 (this, ret, dest, base, fill, v))
8336 #if _MSVCP_VER != 80
8337 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8339 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8341 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8342 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8344 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8345 char fmt
[7]; /* strlen("%+#lld")+1 */
8347 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8349 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8350 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8353 /* ?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 */
8354 /* ?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 */
8355 #if _MSVCP_VER != 80
8356 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8358 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8360 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8361 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8363 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8364 char fmt
[7]; /* strlen("%+#lld")+1 */
8366 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8368 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8369 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8372 /* ?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 */
8373 /* ?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 */
8374 /* ?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 */
8375 /* ?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 */
8376 #if _MSVCP_VER != 80
8377 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8379 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8381 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8382 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8384 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8385 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8388 /* ?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 */
8389 /* ?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 */
8390 /* ?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 */
8391 /* ?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 */
8392 #if _MSVCP_VER <= 100
8393 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8394 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8395 (this, ret, dest, base, fill, v))
8396 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8397 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8398 (this, ret, dest, base, fill, v))
8400 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8401 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8402 (this, ret, dest, base, fill, v))
8403 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8404 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8405 (this, ret, dest, base, fill, v))
8407 #if _MSVCP_VER != 80
8408 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8410 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8412 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8413 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8416 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8420 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8422 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8423 prec
= get_precision(base
);
8424 size
= _scprintf(fmt
, prec
, v
);
8426 /* TODO: don't use dynamic allocation */
8427 tmp
= MSVCRT_operator_new(size
*2);
8429 ERR("Out of memory\n");
8430 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8432 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8433 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8434 MSVCRT_operator_delete(tmp
);
8438 /* ?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 */
8439 /* ?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 */
8440 /* ?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 */
8441 /* ?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 */
8442 #if _MSVCP_VER != 80
8443 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8445 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8447 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8448 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8451 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8455 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8457 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8458 prec
= get_precision(base
);
8459 size
= _scprintf(fmt
, prec
, v
);
8461 /* TODO: don't use dynamic allocation */
8462 tmp
= MSVCRT_operator_new(size
*2);
8464 ERR("Out of memory\n");
8465 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8467 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8468 numpunct_short_use_facet(IOS_LOCALE(base
)));
8469 MSVCRT_operator_delete(tmp
);
8473 /* ?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 */
8474 /* ?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 */
8475 /* ?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 */
8476 /* ?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 */
8477 #if _MSVCP_VER != 80
8478 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8480 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8482 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8483 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8485 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8486 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8489 /* ?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 */
8490 /* ?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 */
8491 /* ?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 */
8492 /* ?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 */
8493 #if _MSVCP_VER != 80
8494 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8496 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8498 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8499 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8501 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8502 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8505 /* ?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 */
8506 /* ?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 */
8507 #if _MSVCP_VER <= 100
8508 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8509 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8510 (this, ret, dest, base, fill, v))
8512 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8513 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8514 (this, ret, dest, base, fill, v))
8516 #if _MSVCP_VER != 80
8517 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8519 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8521 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8522 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8524 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8526 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8528 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8531 /* ?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 */
8532 /* ?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 */
8533 #if _MSVCP_VER != 80
8534 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8536 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8538 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8539 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8541 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8543 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8545 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8548 /* ?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 */
8549 /* ?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 */
8550 /* ?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 */
8551 /* ?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 */
8552 #if _MSVCP_VER != 80
8553 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8555 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8557 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8558 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8560 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8561 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
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@_W_J@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@_W_J@Z */
8566 #if _MSVCP_VER <= 100
8567 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8568 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8569 (this, ret, dest, base, fill, v))
8571 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8572 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8573 (this, ret, dest, base, fill, v))
8575 #if _MSVCP_VER != 80
8576 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8578 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8580 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8581 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8583 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8584 char fmt
[7]; /* strlen("%+#lld")+1 */
8586 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8588 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8589 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8592 /* ?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 */
8593 /* ?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 */
8594 #if _MSVCP_VER != 80
8595 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8597 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8599 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8600 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8602 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8603 char fmt
[7]; /* strlen("%+#lld")+1 */
8605 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8607 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8608 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8611 /* ?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 */
8612 /* ?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 */
8613 /* ?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 */
8614 /* ?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 */
8615 #if _MSVCP_VER != 80
8616 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8618 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8620 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8621 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8623 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8624 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8627 /* ?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 */
8628 /* ?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 */
8629 #if _MSVCP_VER <= 100
8630 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8631 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8632 (this, ret, dest, base, fill, v))
8634 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8635 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8636 (this, ret, dest, base, fill, v))
8638 #if _MSVCP_VER != 80
8639 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8641 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8643 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8644 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8646 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8647 char fmt
[7]; /* strlen("%+#lld")+1 */
8649 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8651 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8652 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8655 /* ?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 */
8656 /* ?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 */
8657 #if _MSVCP_VER != 80
8658 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8660 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8662 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8663 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8665 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8666 char fmt
[7]; /* strlen("%+#lld")+1 */
8668 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8670 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8671 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8674 /* ?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 */
8675 /* ?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 */
8676 /* ?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 */
8677 /* ?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 */
8678 #if _MSVCP_VER != 80
8679 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8681 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8683 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8684 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8686 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8687 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8690 /* ?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 */
8691 /* ?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 */
8692 #if _MSVCP_VER <= 100
8693 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8694 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8695 (this, ret, dest, base, fill, v))
8697 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8698 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8699 (this, ret, dest, base, fill, v))
8701 #if _MSVCP_VER != 80
8702 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8704 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8706 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8707 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8709 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8711 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8712 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8713 basic_string_wchar str
;
8714 MSVCP_size_t pad
, len
;
8717 numpunct_wchar_truename(numpunct
, &str
);
8719 numpunct_wchar_falsename(numpunct
, &str
);
8721 len
= MSVCP_basic_string_wchar_length(&str
);
8722 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8725 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8726 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8729 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8730 MSVCP_basic_string_wchar_dtor(&str
);
8731 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8734 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8737 /* ?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 */
8738 /* ?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 */
8739 #if _MSVCP_VER != 80
8740 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8742 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8744 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8745 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8747 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8749 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8750 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8751 basic_string_wchar str
;
8752 MSVCP_size_t pad
, len
;
8755 numpunct_wchar_truename(numpunct
, &str
);
8757 numpunct_wchar_falsename(numpunct
, &str
);
8759 len
= MSVCP_basic_string_wchar_length(&str
);
8760 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8763 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8764 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8767 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8768 MSVCP_basic_string_wchar_dtor(&str
);
8769 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8772 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8775 /* ?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 */
8776 /* ?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 */
8777 /* ?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 */
8778 /* ?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 */
8779 #if _MSVCP_VER != 80
8780 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8782 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8784 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8785 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8787 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8788 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8791 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8792 locale_id time_put_char_id
= {0};
8794 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8795 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8797 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8798 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8799 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8800 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8802 TRACE("(%p %p)\n", this, locinfo
);
8803 _Locinfo__Gettnames(locinfo
, &this->time
);
8804 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8807 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8808 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8809 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8810 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8812 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8813 locale_facet_ctor_refs(&this->facet
, refs
);
8814 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8815 time_put_char__Init(this, locinfo
);
8819 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8820 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8821 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8822 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8826 TRACE("(%p %lu)\n", this, refs
);
8828 _Locinfo_ctor(&locinfo
);
8829 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
8830 _Locinfo_dtor(&locinfo
);
8834 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
8835 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
8836 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
8837 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
8839 return time_put_char_ctor_refs(this, 0);
8842 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
8843 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
8844 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
8845 void __thiscall
time_put_char_dtor(time_put
*this)
8847 TRACE("(%p)\n", this);
8848 _Timevec_dtor(&this->time
);
8851 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
8852 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
8854 TRACE("(%p %x)\n", this, flags
);
8856 /* we have an array, with the number of elements stored before the first object */
8857 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8859 for(i
=*ptr
-1; i
>=0; i
--)
8860 time_put_char_dtor(this+i
);
8861 MSVCRT_operator_delete(ptr
);
8863 time_put_char_dtor(this);
8865 MSVCRT_operator_delete(this);
8871 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8872 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8873 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
8875 TRACE("(%p %p)\n", facet
, loc
);
8877 if(facet
&& !*facet
) {
8880 *facet
= MSVCRT_operator_new(sizeof(time_put
));
8882 ERR("Out of memory\n");
8883 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8887 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8888 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
8889 _Locinfo_dtor(&locinfo
);
8895 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8896 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8897 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
8899 return time_put_char__Getcat(facet
, locale_classic());
8902 static time_put
* time_put_char_use_facet(const locale
*loc
)
8904 static time_put
*obj
= NULL
;
8907 const locale_facet
*fac
;
8909 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8910 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
8912 _Lockit_dtor(&lock
);
8913 return (time_put
*)fac
;
8917 _Lockit_dtor(&lock
);
8921 time_put_char__Getcat(&fac
, loc
);
8922 obj
= (time_put
*)fac
;
8923 call_locale_facet__Incref(&obj
->facet
);
8924 locale_facet_register(&obj
->facet
);
8925 _Lockit_dtor(&lock
);
8930 #if _MSVCP_VER >= 70
8932 /* ?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 */
8933 /* ?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 */
8934 #if _MSVCP_VER != 80
8935 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
8937 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
8939 #if _MSVCP_VER <= 100
8940 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
8941 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8942 (this, ret, dest, base, fill, t, spec, mod))
8944 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
8945 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
8946 (this, ret, dest, base, fill, t, spec, mod))
8948 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8949 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8951 char buf
[64], fmt
[4], *p
= fmt
;
8952 MSVCP_size_t i
, len
;
8954 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8962 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
8963 for(i
=0; i
<len
; i
++)
8964 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
8970 /* ?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 */
8971 /* ?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 */
8972 #if _MSVCP_VER != 80
8973 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
8975 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
8977 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
8978 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
8980 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
8981 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
8984 /* ?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 */
8985 /* ?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 */
8986 #if _MSVCP_VER != 80
8987 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
8989 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
8991 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
8992 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
8994 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
8996 while(pat
< pat_end
) {
8998 ostreambuf_iterator_char_put(&dest
, *pat
++);
8999 }else if(++pat
== pat_end
) {
9000 ostreambuf_iterator_char_put(&dest
, '%');
9001 }else if(*pat
=='#' && pat
+1==pat_end
) {
9002 ostreambuf_iterator_char_put(&dest
, '%');
9003 ostreambuf_iterator_char_put(&dest
, *pat
++);
9014 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
9022 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9024 /* ?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 */
9025 /* ?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 */
9026 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9027 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9028 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9029 (this, ret, dest, base, t, spec, mod))
9030 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9031 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9033 char buf
[64], fmt
[4], *p
= fmt
;
9034 MSVCP_size_t i
, len
;
9036 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9044 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9045 for(i
=0; i
<len
; i
++)
9046 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9052 /* ?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 */
9053 /* ?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 */
9054 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9055 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9056 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9058 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9059 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9062 /* ?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 */
9063 /* ?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 */
9064 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9065 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9066 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9068 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9070 while(pat
< pat_end
) {
9072 ostreambuf_iterator_char_put(&dest
, *pat
++);
9073 }else if(++pat
== pat_end
) {
9074 ostreambuf_iterator_char_put(&dest
, '%');
9075 }else if(*pat
=='#' && pat
+1==pat_end
) {
9076 ostreambuf_iterator_char_put(&dest
, '%');
9077 ostreambuf_iterator_char_put(&dest
, *pat
++);
9088 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9096 #endif /* MSVCP_VER >= 70 */
9098 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9099 locale_id time_put_wchar_id
= {0};
9100 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9101 locale_id time_put_short_id
= {0};
9103 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9104 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
9105 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9106 extern const vtable_ptr MSVCP_time_put_short_vtable
;
9108 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9109 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9110 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9111 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9112 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9113 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9115 TRACE("(%p %p)\n", this, locinfo
);
9116 _Locinfo__Gettnames(locinfo
, &this->time
);
9117 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9120 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9121 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9122 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9123 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9125 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9126 locale_facet_ctor_refs(&this->facet
, refs
);
9127 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
9128 time_put_wchar__Init(this, locinfo
);
9132 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9133 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9134 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9135 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9137 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9138 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9142 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9143 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9144 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9145 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9149 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
9151 _Locinfo_ctor_cstr(&locinfo
, name
);
9152 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9153 _Locinfo_dtor(&locinfo
);
9157 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9158 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9159 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9160 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9162 time_put_wchar_ctor_name(this, name
, refs
);
9163 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9167 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9168 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9169 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9170 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9174 TRACE("(%p %lu)\n", this, refs
);
9176 _Locinfo_ctor(&locinfo
);
9177 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9178 _Locinfo_dtor(&locinfo
);
9182 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9183 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9184 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9185 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9187 time_put_wchar_ctor_refs(this, refs
);
9188 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9192 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9193 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9194 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9195 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9197 return time_put_wchar_ctor_refs(this, 0);
9200 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9201 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9202 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9203 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9205 time_put_wchar_ctor(this);
9206 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9210 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9211 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9212 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9213 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9214 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9215 void __thiscall
time_put_wchar_dtor(time_put
*this)
9217 TRACE("(%p)\n", this);
9218 _Timevec_dtor(&this->time
);
9221 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9222 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9224 TRACE("(%p %x)\n", this, flags
);
9226 /* we have an array, with the number of elements stored before the first object */
9227 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9229 for(i
=*ptr
-1; i
>=0; i
--)
9230 time_put_wchar_dtor(this+i
);
9231 MSVCRT_operator_delete(ptr
);
9233 time_put_wchar_dtor(this);
9235 MSVCRT_operator_delete(this);
9241 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9242 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9243 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9245 TRACE("(%p %p)\n", facet
, loc
);
9247 if(facet
&& !*facet
) {
9248 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9250 ERR("Out of memory\n");
9251 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9254 time_put_wchar_ctor_name((time_put
*)*facet
,
9255 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9261 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9262 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9263 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9265 return time_put_wchar__Getcat(facet
, locale_classic());
9268 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9270 static time_put
*obj
= NULL
;
9273 const locale_facet
*fac
;
9275 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9276 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9278 _Lockit_dtor(&lock
);
9279 return (time_put
*)fac
;
9283 _Lockit_dtor(&lock
);
9287 time_put_wchar__Getcat(&fac
, loc
);
9288 obj
= (time_put
*)fac
;
9289 call_locale_facet__Incref(&obj
->facet
);
9290 locale_facet_register(&obj
->facet
);
9291 _Lockit_dtor(&lock
);
9296 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9297 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9298 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9300 TRACE("(%p %p)\n", facet
, loc
);
9302 if(facet
&& !*facet
) {
9303 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9305 ERR("Out of memory\n");
9306 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9309 time_put_short_ctor_name((time_put
*)*facet
,
9310 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9316 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9317 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9318 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9320 return time_put_short__Getcat(facet
, locale_classic());
9323 static time_put
* time_put_short_use_facet(const locale
*loc
)
9325 static time_put
*obj
= NULL
;
9328 const locale_facet
*fac
;
9330 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9331 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9333 _Lockit_dtor(&lock
);
9334 return (time_put
*)fac
;
9338 _Lockit_dtor(&lock
);
9342 time_put_short__Getcat(&fac
, loc
);
9343 obj
= (time_put
*)fac
;
9344 call_locale_facet__Incref(&obj
->facet
);
9345 locale_facet_register(&obj
->facet
);
9346 _Lockit_dtor(&lock
);
9351 #if _MSVCP_VER >= 70
9353 /* ?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 */
9354 /* ?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 */
9355 /* ?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 */
9356 /* ?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 */
9357 #if _MSVCP_VER != 80
9358 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9360 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9362 #if _MSVCP_VER <= 100
9363 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9364 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9365 (this, ret, dest, base, fill, t, spec, mod))
9367 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9368 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9369 (this, ret, dest, base, fill, t, spec, mod))
9371 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9372 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9373 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9375 char buf
[64], fmt
[4], *p
= fmt
;
9376 MSVCP_size_t i
, len
;
9379 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9387 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9388 for(i
=0; i
<len
; i
++) {
9389 c
= mb_to_wc(buf
[i
], &this->cvt
);
9390 ostreambuf_iterator_wchar_put(&dest
, c
);
9397 /* ?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 */
9398 /* ?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 */
9399 /* ?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 */
9400 /* ?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 */
9401 #if _MSVCP_VER != 80
9402 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9404 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9406 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9407 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9408 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9410 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9411 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9414 /* ?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 */
9415 /* ?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 */
9416 /* ?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 */
9417 /* ?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 */
9418 #if _MSVCP_VER != 80
9419 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9421 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9423 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9424 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9425 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9427 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9430 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9432 while(pat
< pat_end
) {
9433 if(*pat
!= percent
) {
9434 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9435 }else if(++pat
== pat_end
) {
9436 ostreambuf_iterator_wchar_put(&dest
, percent
);
9437 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9438 ostreambuf_iterator_wchar_put(&dest
, percent
);
9439 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9443 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9444 ostreambuf_iterator_wchar_put(&dest
, percent
);
9445 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9446 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9448 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9451 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9460 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9462 /* ?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 */
9463 /* ?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 */
9464 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9465 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9466 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9467 (this, ret, dest, base, t, spec, mod))
9468 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9469 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9470 const struct tm
*t
, char spec
, char mod
)
9472 char buf
[64], fmt
[4], *p
= fmt
;
9473 MSVCP_size_t i
, len
;
9476 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9484 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9485 for(i
=0; i
<len
; i
++) {
9486 c
= mb_to_wc(buf
[i
], &this->cvt
);
9487 ostreambuf_iterator_wchar_put(&dest
, c
);
9494 /* ?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 */
9495 /* ?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 */
9496 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9497 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9498 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9499 const struct tm
*t
, char spec
, char mod
)
9501 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9502 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9505 /* ?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 */
9506 /* ?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 */
9507 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9508 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9509 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9510 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9512 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9515 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9517 while(pat
< pat_end
) {
9518 if(*pat
!= percent
) {
9519 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9520 }else if(++pat
== pat_end
) {
9521 ostreambuf_iterator_wchar_put(&dest
, percent
);
9522 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9523 ostreambuf_iterator_wchar_put(&dest
, percent
);
9524 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9528 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9529 ostreambuf_iterator_wchar_put(&dest
, percent
);
9530 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9531 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9533 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9536 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9545 #endif /* _MSVCP_VER >= 70 */
9547 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9548 locale_id time_get_char_id
= {0};
9550 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9551 extern const vtable_ptr MSVCP_time_get_char_vtable
;
9553 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9554 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9555 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9556 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9558 FIXME("(%p %p) stub\n", this, locinfo
);
9561 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9562 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9563 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9564 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, unsigned int refs
)
9566 FIXME("(%p %p %d) stub\n", this, name
, refs
);
9567 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9571 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9572 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9573 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9574 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9575 const _Locinfo
*locinfo
, unsigned int refs
)
9577 FIXME("(%p %p %d) stub\n", this, locinfo
, refs
);
9578 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9582 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9583 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9584 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9585 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, unsigned int refs
)
9587 FIXME("(%p %d) stub\n", this, refs
);
9588 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9592 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9593 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9594 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9595 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9597 return time_get_char_ctor_refs(this, 0);
9600 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9601 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9602 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9603 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9605 FIXME("(%p) stub\n", this);
9608 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9609 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9610 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9611 void __thiscall
time_get_char_dtor(time_get_char
*this)
9613 FIXME("(%p) stub\n", this);
9616 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9617 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9619 TRACE("(%p %x)\n", this, flags
);
9621 /* we have an array, with the number of elements stored before the first object */
9622 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9624 for(i
=*ptr
-1; i
>=0; i
--)
9625 time_get_char_dtor(this+i
);
9626 MSVCRT_operator_delete(ptr
);
9628 time_get_char_dtor(this);
9630 MSVCRT_operator_delete(this);
9636 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9637 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9638 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9640 TRACE("(%p %p)\n", facet
, loc
);
9642 if(facet
&& !*facet
) {
9645 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9647 ERR("Out of memory\n");
9648 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9652 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9653 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9654 _Locinfo_dtor(&locinfo
);
9660 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9662 static time_get_char
*obj
= NULL
;
9665 const locale_facet
*fac
;
9667 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9668 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9670 _Lockit_dtor(&lock
);
9671 return (time_get_char
*)fac
;
9675 _Lockit_dtor(&lock
);
9679 time_get_char__Getcat(&fac
, loc
);
9680 obj
= (time_get_char
*)fac
;
9681 call_locale_facet__Incref(&obj
->facet
);
9682 locale_facet_register(&obj
->facet
);
9683 _Lockit_dtor(&lock
);
9688 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9689 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9690 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9691 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9692 int unk1
, int unk2
, int *val
)
9694 FIXME("(%p %p %p %d %d %p) stub\n", this, b
, e
, unk1
, unk2
, val
);
9698 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
9699 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
9700 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
9701 #if _MSVCP_VER <= 100
9702 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
9704 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
9706 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
9708 TRACE("(%p)\n", this);
9709 return this->dateorder
;
9712 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
9713 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
9714 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
9715 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
9717 return call_time_get_char_do_date_order(this);
9720 /* ?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 */
9721 /* ?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 */
9722 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
9723 #if _MSVCP_VER <= 100
9724 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
9725 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9726 (this, ret, s, e, base, err, t))
9728 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9729 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9730 (this, ret, s, e, base, err, t))
9732 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
9733 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9734 ios_base
*base
, int *err
, struct tm
*t
)
9736 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9740 /* ?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 */
9741 /* ?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 */
9742 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
9743 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
9744 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9745 ios_base
*base
, int *err
, struct tm
*t
)
9747 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
9750 /* ?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 */
9751 /* ?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 */
9752 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
9753 #if _MSVCP_VER <= 100
9754 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9755 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9756 (this, ret, s, e, base, err, t))
9758 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
9759 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9760 (this, ret, s, e, base, err, t))
9762 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
9763 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9764 ios_base
*base
, int *err
, struct tm
*t
)
9766 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9770 /* ?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 */
9771 /* ?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 */
9772 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
9773 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
9774 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9775 ios_base
*base
, int *err
, struct tm
*t
)
9777 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
9780 /* ?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 */
9781 /* ?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 */
9782 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
9783 #if _MSVCP_VER <= 100
9784 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
9785 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9786 (this, ret, s, e, base, err, t))
9788 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9789 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9790 (this, ret, s, e, base, err, t))
9792 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
9793 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9794 ios_base
*base
, int *err
, struct tm
*t
)
9796 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9800 /* ?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 */
9801 /* ?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 */
9802 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
9803 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
9804 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9805 ios_base
*base
, int *err
, struct tm
*t
)
9807 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
9810 /* ?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 */
9811 /* ?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 */
9812 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
9813 #if _MSVCP_VER <= 100
9814 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9815 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9816 (this, ret, s, e, base, err, t))
9818 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9819 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9820 (this, ret, s, e, base, err, t))
9822 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
9823 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9824 ios_base
*base
, int *err
, struct tm
*t
)
9826 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9830 /* ?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 */
9831 /* ?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 */
9832 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
9833 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
9834 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9835 ios_base
*base
, int *err
, struct tm
*t
)
9837 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
9840 /* ?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 */
9841 /* ?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 */
9842 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
9843 #if _MSVCP_VER <= 100
9844 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9845 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9846 (this, ret, s, e, base, err, t))
9848 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
9849 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9850 (this, ret, s, e, base, err, t))
9852 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
9853 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9854 ios_base
*base
, int *err
, struct tm
*t
)
9856 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9860 /* ?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 */
9861 /* ?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 */
9862 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
9863 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
9864 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9865 ios_base
*base
, int *err
, struct tm
*t
)
9867 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
9870 /* ??0_Locimp@locale@std@@AAE@_N@Z */
9871 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
9872 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
9873 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
9875 TRACE("(%p %d)\n", this, transparent
);
9877 memset(this, 0, sizeof(locale__Locimp
));
9878 locale_facet_ctor_refs(&this->facet
, 1);
9879 this->transparent
= transparent
;
9880 locale_string_char_ctor_cstr(&this->name
, "*");
9884 /* ??_F_Locimp@locale@std@@QAEXXZ */
9885 /* ??_F_Locimp@locale@std@@QEAAXXZ */
9886 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
9887 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
9889 return locale__Locimp_ctor_transparent(this, FALSE
);
9892 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
9893 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
9894 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
9895 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9900 TRACE("(%p %p)\n", this, copy
);
9902 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9903 memcpy(this, copy
, sizeof(locale__Locimp
));
9904 locale_facet_ctor_refs(&this->facet
, 1);
9905 if(copy
->facetvec
) {
9906 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
9907 if(!this->facetvec
) {
9908 _Lockit_dtor(&lock
);
9909 ERR("Out of memory\n");
9910 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9913 for(i
=0; i
<this->facet_cnt
; i
++)
9915 this->facetvec
[i
] = copy
->facetvec
[i
];
9916 if(this->facetvec
[i
])
9917 call_locale_facet__Incref(this->facetvec
[i
]);
9920 locale_string_char_copy_ctor(&this->name
, ©
->name
);
9921 _Lockit_dtor(&lock
);
9925 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
9926 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
9927 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9929 return locale__Locimp_copy_ctor(this, copy
);
9932 /* ??1_Locimp@locale@std@@MAE@XZ */
9933 /* ??1_Locimp@locale@std@@MEAA@XZ */
9934 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
9935 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
9939 TRACE("(%p)\n", this);
9941 locale_facet_dtor(&this->facet
);
9942 for(i
=0; i
<this->facet_cnt
; i
++)
9943 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
9944 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
9946 MSVCRT_operator_delete(this->facetvec
);
9947 locale_string_char_dtor(&this->name
);
9950 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
9951 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
9952 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
9954 locale__Locimp_dtor(this);
9957 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
9958 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
9960 TRACE("(%p %x)\n", this, flags
);
9962 /* we have an array, with the number of elements stored before the first object */
9963 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9965 for(i
=*ptr
-1; i
>=0; i
--)
9966 locale__Locimp_dtor(this+i
);
9967 MSVCRT_operator_delete(ptr
);
9969 locale__Locimp_dtor(this);
9971 MSVCRT_operator_delete(this);
9977 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
9978 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
9979 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
9981 locale__Locimp
*ret
;
9983 TRACE("(%p)\n", copy
);
9985 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
9987 ERR("Out of memory\n");
9988 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9991 return locale__Locimp_copy_ctor(ret
, copy
);
9994 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
9995 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
9996 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
9998 locale__Locimp
*ret
;
10000 TRACE("(%x)\n", transparent
);
10002 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10004 ERR("Out of memory\n");
10005 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10008 return locale__Locimp_ctor_transparent(ret
, transparent
);
10011 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
10012 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
10013 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
10017 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
10019 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10020 if(id
>= locimp
->facet_cnt
) {
10021 MSVCP_size_t new_size
= id
+1;
10022 locale_facet
**new_facetvec
;
10024 if(new_size
< locale_id__Id_cnt
+1)
10025 new_size
= locale_id__Id_cnt
+1;
10027 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
10028 if(!new_facetvec
) {
10029 _Lockit_dtor(&lock
);
10030 ERR("Out of memory\n");
10031 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10035 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
10036 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
10037 MSVCRT_operator_delete(locimp
->facetvec
);
10038 locimp
->facetvec
= new_facetvec
;
10039 locimp
->facet_cnt
= new_size
;
10042 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
10043 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
10045 locimp
->facetvec
[id
] = facet
;
10047 call_locale_facet__Incref(facet
);
10048 _Lockit_dtor(&lock
);
10051 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
10052 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
10053 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
10054 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
10056 locale__Locimp__Locimp_Addfac(this, facet
, id
);
10059 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
10060 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
10061 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
10067 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10068 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10069 /* List of missing facets:
10070 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10072 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10074 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10076 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
10077 ctype_wchar
*ctype
;
10080 ctype
= ctype_short_use_facet(loc
);
10082 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10084 ERR("Out of memory\n");
10085 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10087 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
10089 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
10092 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
10096 numget
= num_get_short_use_facet(loc
);
10098 numget
= MSVCRT_operator_new(sizeof(num_get
));
10100 ERR("Out of memory\n");
10101 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10103 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
10105 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
10108 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
10112 numput
= num_put_short_use_facet(loc
);
10114 numput
= MSVCRT_operator_new(sizeof(num_put
));
10116 ERR("Out of memory\n");
10117 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10119 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
10121 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
10124 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
10125 numpunct_wchar
*numpunct
;
10128 numpunct
= numpunct_short_use_facet(loc
);
10130 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10132 ERR("Out of memory\n");
10133 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10135 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10137 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
10140 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
10144 c
= collate_short_use_facet(loc
);
10146 c
= MSVCRT_operator_new(sizeof(collate
));
10148 ERR("Out of memory\n");
10149 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10151 collate_short_ctor_locinfo(c
, locinfo
, 0);
10153 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
10156 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
10160 t
= time_put_short_use_facet(loc
);
10162 t
= MSVCRT_operator_new(sizeof(time_put
));
10164 ERR("Out of memory\n");
10165 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10167 time_put_short_ctor_locinfo(t
, locinfo
, 0);
10169 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
10172 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
10173 codecvt_wchar
*codecvt
;
10176 codecvt
= codecvt_short_use_facet(loc
);
10178 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10180 ERR("Out of memory\n");
10181 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10183 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
10185 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
10189 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10190 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10191 /* List of missing facets:
10192 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10194 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10196 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10198 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
10199 ctype_wchar
*ctype
;
10202 ctype
= ctype_wchar_use_facet(loc
);
10204 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10206 ERR("Out of memory\n");
10207 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10209 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
10211 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
10214 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
10218 numget
= num_get_wchar_use_facet(loc
);
10220 numget
= MSVCRT_operator_new(sizeof(num_get
));
10222 ERR("Out of memory\n");
10223 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10225 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
10227 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
10230 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
10234 numput
= num_put_wchar_use_facet(loc
);
10236 numput
= MSVCRT_operator_new(sizeof(num_put
));
10238 ERR("Out of memory\n");
10239 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10241 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
10243 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
10246 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
10247 numpunct_wchar
*numpunct
;
10250 numpunct
= numpunct_wchar_use_facet(loc
);
10252 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10254 ERR("Out of memory\n");
10255 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10257 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10259 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
10262 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
10266 c
= collate_wchar_use_facet(loc
);
10268 c
= MSVCRT_operator_new(sizeof(collate
));
10270 ERR("Out of memory\n");
10271 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10273 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
10275 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
10278 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
10282 t
= time_put_wchar_use_facet(loc
);
10284 t
= MSVCRT_operator_new(sizeof(time_put
));
10286 ERR("Out of memory\n");
10287 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10289 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
10291 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
10294 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
10295 codecvt_wchar
*codecvt
;
10298 codecvt
= codecvt_wchar_use_facet(loc
);
10300 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10302 ERR("Out of memory\n");
10303 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10305 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
10307 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
10311 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10312 /* ?_Makexloc@_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__Makexloc(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_char__Getcat(NULL
, NULL
)-1))) {
10324 ctype
= ctype_char_use_facet(loc
);
10326 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
10328 ERR("Out of memory\n");
10329 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10331 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
10333 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
10336 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
10340 numget
= num_get_char_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_char_ctor_locinfo(numget
, locinfo
, 0);
10349 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
10352 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
10356 numput
= num_put_char_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_char_ctor_locinfo(numput
, locinfo
, 0);
10365 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
10368 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
10369 numpunct_char
*numpunct
;
10372 numpunct
= numpunct_char_use_facet(loc
);
10374 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
10376 ERR("Out of memory\n");
10377 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10379 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10381 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
10384 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
10388 c
= collate_char_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_char_ctor_locinfo(c
, locinfo
, 0);
10397 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
10400 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
10404 t
= time_get_char_use_facet(loc
);
10406 t
= MSVCRT_operator_new(sizeof(time_get_char
));
10408 ERR("Out of memory\n");
10409 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10411 time_get_char_ctor_locinfo(t
, locinfo
, 0);
10413 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
10416 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
10420 t
= time_put_char_use_facet(loc
);
10422 t
= MSVCRT_operator_new(sizeof(time_put
));
10424 ERR("Out of memory\n");
10425 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10427 time_put_char_ctor_locinfo(t
, locinfo
, 0);
10429 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
10432 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
10433 codecvt_char
*codecvt
;
10436 codecvt
= codecvt_char_use_facet(loc
);
10438 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
10440 ERR("Out of memory\n");
10441 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10443 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
10445 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
10449 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
10450 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10451 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10453 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
10455 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
10456 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
10457 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
10459 locimp
->catmask
|= cat
;
10460 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
10464 /* ??_7_Locimp@locale@std@@6B@ */
10465 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
10466 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
10469 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
10470 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
10471 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
10472 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
10474 TRACE("(%p %p)\n", this, locimp
);
10475 /* Don't change locimp reference counter */
10476 this->ptr
= locimp
;
10480 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
10481 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
10482 locale__Locimp
* __cdecl
locale__Init(void)
10488 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10489 if(global_locale
) {
10490 _Lockit_dtor(&lock
);
10491 return global_locale
;
10494 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10495 if(!global_locale
) {
10496 _Lockit_dtor(&lock
);
10497 ERR("Out of memory\n");
10498 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10502 locale__Locimp_ctor(global_locale
);
10503 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
10504 locale_string_char_dtor(&global_locale
->name
);
10505 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
10507 locale__Locimp__Clocptr
= global_locale
;
10508 global_locale
->facet
.refs
++;
10509 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
10510 _Lockit_dtor(&lock
);
10512 return global_locale
;
10515 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
10516 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
10517 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
10519 locale__Locimp
*ret
;
10522 TRACE("(%x)\n", inc_ref
);
10524 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10525 if(inc_ref
&& global_locale
) {
10526 call_locale_facet__Incref(&global_locale
->facet
);
10527 _Lockit_dtor(&lock
);
10528 return global_locale
;
10531 ret
= locale__Init();
10532 _Lockit_dtor(&lock
);
10536 /* ?_Iscloc@locale@std@@QBE_NXZ */
10537 /* ?_Iscloc@locale@std@@QEBA_NXZ */
10538 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
10539 MSVCP_bool __thiscall
locale__Iscloc(const locale
*this)
10541 TRACE("(%p)\n", this);
10542 return this->ptr
== locale__Locimp__Clocptr
;
10545 /* ??0locale@std@@QAE@ABV01@0H@Z */
10546 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
10547 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
10548 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
10552 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
10554 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10556 ERR("Out of memory\n");
10557 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10559 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10561 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
10562 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
10563 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
10564 _Locinfo_dtor(&locinfo
);
10569 /* ??0locale@std@@QAE@ABV01@@Z */
10570 /* ??0locale@std@@QEAA@AEBV01@@Z */
10571 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
10572 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
10574 TRACE("(%p %p)\n", this, copy
);
10575 this->ptr
= copy
->ptr
;
10576 call_locale_facet__Incref(&this->ptr
->facet
);
10580 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
10581 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
10582 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
10583 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
10587 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
10589 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10590 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10591 _Locinfo_dtor(&locinfo
);
10592 MSVCRT_operator_delete(this->ptr
);
10593 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10596 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10598 ERR("Out of memory\n");
10599 _Locinfo_dtor(&locinfo
);
10600 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10602 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10604 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10605 _Locinfo_dtor(&locinfo
);
10609 /* ??0locale@std@@QAE@PBDH@Z */
10610 /* ??0locale@std@@QEAA@PEBDH@Z */
10611 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
10612 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
10616 TRACE("(%p %s %d)\n", this, locname
, cat
);
10618 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10620 ERR("Out of memory\n");
10621 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10623 locale__Locimp_ctor(this->ptr
);
10627 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10628 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10629 _Locinfo_dtor(&locinfo
);
10630 MSVCRT_operator_delete(this->ptr
);
10631 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10634 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10635 _Locinfo_dtor(&locinfo
);
10640 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10641 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10642 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10643 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10645 TRACE("(%p)\n", this);
10650 /* ??0locale@std@@QAE@XZ */
10651 /* ??0locale@std@@QEAA@XZ */
10652 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10653 locale
* __thiscall
locale_ctor(locale
*this)
10655 TRACE("(%p)\n", this);
10656 this->ptr
= locale__Init();
10657 call_locale_facet__Incref(&this->ptr
->facet
);
10661 /* ??1locale@std@@QAE@XZ */
10662 /* ??1locale@std@@QEAA@XZ */
10663 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10664 void __thiscall
locale_dtor(locale
*this)
10666 TRACE("(%p)\n", this);
10667 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10669 locale__Locimp_dtor(this->ptr
);
10670 MSVCRT_operator_delete(this->ptr
);
10674 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10675 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10676 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10677 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10679 FIXME("(%p %p) stub\n", this, loc
);
10683 /* ??8locale@std@@QBE_NABV01@@Z */
10684 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10685 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10686 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10688 FIXME("(%p %p) stub\n", this, loc
);
10692 /* ??9locale@std@@QBE_NABV01@@Z */
10693 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10694 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10695 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10697 FIXME("(%p %p) stub\n", this, loc
);
10701 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10702 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10703 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10704 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10706 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10708 if(this->ptr
->facet
.refs
> 1) {
10709 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10711 ERR("Out of memory\n");
10712 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10715 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10716 call_locale_facet__Decref(&this->ptr
->facet
);
10717 this->ptr
= new_ptr
;
10720 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10723 locale_string_char_dtor(&this->ptr
->name
);
10724 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10729 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
10730 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
10731 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
10732 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
10733 MSVCP_size_t id
, MSVCP_bool allow_transparent
)
10737 TRACE("(%p %lu)\n", this, id
);
10739 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10740 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
10743 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10746 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10747 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10748 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10749 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10751 return locale__Getfacet_bool( this, id
, TRUE
);
10754 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10755 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10756 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10759 return global_locale
;
10762 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
10763 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
10764 void __cdecl
locale__Setgloballocale(void *locimp
)
10766 TRACE("(%p)\n", locimp
);
10767 global_locale
= locimp
;
10770 /* ?classic@locale@std@@SAABV12@XZ */
10771 /* ?classic@locale@std@@SAAEBV12@XZ */
10772 const locale
* __cdecl
locale_classic(void)
10776 return &classic_locale
;
10779 /* ?empty@locale@std@@SA?AV12@XZ */
10780 locale
* __cdecl
locale_empty(locale
*ret
)
10786 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10788 ERR("Out of memory\n");
10789 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10791 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
10795 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
10796 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
10797 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
10802 TRACE("(%p %p)\n", loc
, ret
);
10804 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10807 if(loc
->ptr
!= global_locale
) {
10808 call_locale_facet__Decref(&global_locale
->facet
);
10809 global_locale
= loc
->ptr
;
10810 call_locale_facet__Incref(&global_locale
->facet
);
10812 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
10813 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
10815 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
10818 _Lockit_dtor(&lock
);
10822 #if _MSVCP_VER < 100
10824 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10825 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10826 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
10827 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
10829 TRACE("(%p)\n", this);
10831 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
10835 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10836 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10837 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
10838 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
10840 TRACE( "(%p)\n", this);
10841 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
10847 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
10848 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
10849 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
10850 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
10852 return locale_string_char_c_str( &this->newlocname
);
10855 #endif /* _MSVCP_VER < 100 */
10858 wctrans_t __cdecl
wctrans(const char *property
)
10860 static const char str_tolower
[] = "tolower";
10861 static const char str_toupper
[] = "toupper";
10863 if(!strcmp(property
, str_tolower
))
10865 if(!strcmp(property
, str_toupper
))
10871 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
10874 return towupper(c
);
10875 return towlower(c
);
10879 wint_t __cdecl
btowc(int c
)
10885 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
10890 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
10892 static int local_state
;
10894 if (!state
) state
= &local_state
;
10895 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
10899 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
10901 static int local_state
;
10903 if (!state
) state
= &local_state
;
10904 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
10908 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
10910 static int local_state
;
10916 if (!state
) state
= &local_state
;
10918 while (!dst
|| n
> ret
)
10920 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
10921 if (len
< 0) return -1;
10923 if (dst
) dst
[ret
] = wc
;
10932 int __cdecl
wctob(wint_t wc
)
10934 char ret
[MB_LEN_MAX
];
10936 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
10941 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
10943 return _Wcrtomb( dst
, wc
, state
, NULL
);
10947 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
10949 const wchar_t *src
;
10950 char buffer
[MB_LEN_MAX
];
10955 while (!dst
|| n
> ret
)
10957 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
10958 if (len
<= 0) return -1;
10959 if (n
< ret
+ len
) break;
10960 memcpy( dst
+ ret
, buffer
, len
);
10962 if (!buffer
[0]) break;
10969 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
10970 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
10971 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
10972 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
10973 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
10974 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
10975 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
10976 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
10977 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
10978 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
10979 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
10980 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
10981 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
10982 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
10983 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
10984 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@@")
10985 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@@")
10986 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@@")
10987 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@@")
10988 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@@")
10989 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@@")
10990 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@@")
10991 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@@")
10992 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@@")
10993 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
10994 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@@")
10997 void __asm_dummy_vtables(void) {
10999 __ASM_VTABLE(locale_facet
,
11000 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
11001 #if _MSVCP_VER >= 110
11002 VTABLE_ADD_FUNC(locale_facet__Incref
)
11003 VTABLE_ADD_FUNC(locale_facet__Decref
)
11006 __ASM_VTABLE(collate_char
,
11007 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
11008 #if _MSVCP_VER >= 110
11009 VTABLE_ADD_FUNC(locale_facet__Incref
)
11010 VTABLE_ADD_FUNC(locale_facet__Decref
)
11012 VTABLE_ADD_FUNC(collate_char_do_compare
)
11013 VTABLE_ADD_FUNC(collate_char_do_transform
)
11014 VTABLE_ADD_FUNC(collate_char_do_hash
));
11015 __ASM_VTABLE(collate_wchar
,
11016 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11017 #if _MSVCP_VER >= 110
11018 VTABLE_ADD_FUNC(locale_facet__Incref
)
11019 VTABLE_ADD_FUNC(locale_facet__Decref
)
11021 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11022 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11023 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11024 __ASM_VTABLE(collate_short
,
11025 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11026 #if _MSVCP_VER >= 110
11027 VTABLE_ADD_FUNC(locale_facet__Incref
)
11028 VTABLE_ADD_FUNC(locale_facet__Decref
)
11030 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11031 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11032 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11033 __ASM_VTABLE(ctype_base
,
11034 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
11035 #if _MSVCP_VER >= 110
11036 VTABLE_ADD_FUNC(locale_facet__Incref
)
11037 VTABLE_ADD_FUNC(locale_facet__Decref
)
11040 __ASM_VTABLE(ctype_char
,
11041 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
11042 #if _MSVCP_VER >= 110
11043 VTABLE_ADD_FUNC(locale_facet__Incref
)
11044 VTABLE_ADD_FUNC(locale_facet__Decref
)
11046 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
11047 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
11048 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
11049 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
11050 VTABLE_ADD_FUNC(ctype_char_do_widen
)
11051 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
11052 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11053 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
11054 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11055 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11056 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
11058 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11059 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11062 __ASM_VTABLE(ctype_wchar
,
11063 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11064 #if _MSVCP_VER >= 110
11065 VTABLE_ADD_FUNC(locale_facet__Incref
)
11066 VTABLE_ADD_FUNC(locale_facet__Decref
)
11068 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11069 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11070 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11071 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11072 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11073 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11074 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11075 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11076 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11077 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11078 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11079 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11080 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11081 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11082 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11084 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11085 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11088 __ASM_VTABLE(ctype_short
,
11089 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11090 #if _MSVCP_VER >= 110
11091 VTABLE_ADD_FUNC(locale_facet__Incref
)
11092 VTABLE_ADD_FUNC(locale_facet__Decref
)
11094 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11095 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11096 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11097 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11098 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11099 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11100 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11101 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11102 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11103 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11104 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11105 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11106 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11107 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11108 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11110 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11111 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11114 __ASM_VTABLE(codecvt_base
,
11115 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
11116 #if _MSVCP_VER >= 110
11117 VTABLE_ADD_FUNC(locale_facet__Incref
)
11118 VTABLE_ADD_FUNC(locale_facet__Decref
)
11120 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11121 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11122 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
11123 __ASM_VTABLE(codecvt_char
,
11124 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
11125 #if _MSVCP_VER >= 110
11126 VTABLE_ADD_FUNC(locale_facet__Incref
)
11127 VTABLE_ADD_FUNC(locale_facet__Decref
)
11129 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11130 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11131 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11132 VTABLE_ADD_FUNC(codecvt_char_do_in
)
11133 VTABLE_ADD_FUNC(codecvt_char_do_out
)
11134 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
11135 VTABLE_ADD_FUNC(codecvt_char_do_length
));
11136 __ASM_VTABLE(codecvt_wchar
,
11137 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11138 #if _MSVCP_VER >= 110
11139 VTABLE_ADD_FUNC(locale_facet__Incref
)
11140 VTABLE_ADD_FUNC(locale_facet__Decref
)
11142 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11143 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11144 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11145 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11146 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11147 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11148 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11149 __ASM_VTABLE(codecvt_short
,
11150 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11151 #if _MSVCP_VER >= 110
11152 VTABLE_ADD_FUNC(locale_facet__Incref
)
11153 VTABLE_ADD_FUNC(locale_facet__Decref
)
11155 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11156 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11157 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11158 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11159 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11160 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11161 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11162 __ASM_VTABLE(numpunct_char
,
11163 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
11164 #if _MSVCP_VER >= 110
11165 VTABLE_ADD_FUNC(locale_facet__Incref
)
11166 VTABLE_ADD_FUNC(locale_facet__Decref
)
11168 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
11169 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
11170 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
11171 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
11172 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
11173 __ASM_VTABLE(numpunct_wchar
,
11174 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11175 #if _MSVCP_VER >= 110
11176 VTABLE_ADD_FUNC(locale_facet__Incref
)
11177 VTABLE_ADD_FUNC(locale_facet__Decref
)
11179 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11180 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11181 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11182 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11183 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11184 __ASM_VTABLE(numpunct_short
,
11185 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11186 #if _MSVCP_VER >= 110
11187 VTABLE_ADD_FUNC(locale_facet__Incref
)
11188 VTABLE_ADD_FUNC(locale_facet__Decref
)
11190 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11191 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11192 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11193 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11194 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11195 __ASM_VTABLE(num_get_char
,
11196 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
11197 #if _MSVCP_VER >= 110
11198 VTABLE_ADD_FUNC(locale_facet__Incref
)
11199 VTABLE_ADD_FUNC(locale_facet__Decref
)
11201 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
11202 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11203 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11204 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
11205 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
11206 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
11207 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
11208 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
11209 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
11210 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
11211 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
11212 __ASM_VTABLE(num_get_short
,
11213 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11214 #if _MSVCP_VER >= 110
11215 VTABLE_ADD_FUNC(locale_facet__Incref
)
11216 VTABLE_ADD_FUNC(locale_facet__Decref
)
11218 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
11219 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11220 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11221 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
11222 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
11223 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
11224 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
11225 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
11226 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
11227 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
11228 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
11229 __ASM_VTABLE(num_get_wchar
,
11230 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11231 #if _MSVCP_VER >= 110
11232 VTABLE_ADD_FUNC(locale_facet__Incref
)
11233 VTABLE_ADD_FUNC(locale_facet__Decref
)
11235 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
11236 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11237 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11238 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
11239 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
11240 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
11241 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
11242 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
11243 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
11244 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
11245 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
11246 __ASM_VTABLE(num_put_char
,
11247 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
11248 #if _MSVCP_VER >= 110
11249 VTABLE_ADD_FUNC(locale_facet__Incref
)
11250 VTABLE_ADD_FUNC(locale_facet__Decref
)
11252 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
11253 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11254 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11255 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
11256 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
11257 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
11258 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
11259 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
11260 __ASM_VTABLE(num_put_wchar
,
11261 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11262 #if _MSVCP_VER >= 110
11263 VTABLE_ADD_FUNC(locale_facet__Incref
)
11264 VTABLE_ADD_FUNC(locale_facet__Decref
)
11266 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
11267 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11268 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11269 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
11270 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
11271 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
11272 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
11273 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
11274 __ASM_VTABLE(num_put_short
,
11275 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11276 #if _MSVCP_VER >= 110
11277 VTABLE_ADD_FUNC(locale_facet__Incref
)
11278 VTABLE_ADD_FUNC(locale_facet__Decref
)
11280 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
11281 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11282 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11283 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
11284 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
11285 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
11286 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
11287 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
11288 __ASM_VTABLE(time_put_char
,
11289 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
11290 #if _MSVCP_VER >= 110
11291 VTABLE_ADD_FUNC(locale_facet__Incref
)
11292 VTABLE_ADD_FUNC(locale_facet__Decref
)
11294 VTABLE_ADD_FUNC(time_put_char_do_put
));
11295 __ASM_VTABLE(time_put_wchar
,
11296 VTABLE_ADD_FUNC(time_put_wchar_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(time_put_wchar_do_put
));
11302 __ASM_VTABLE(time_put_short
,
11303 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11304 #if _MSVCP_VER >= 110
11305 VTABLE_ADD_FUNC(locale_facet__Incref
)
11306 VTABLE_ADD_FUNC(locale_facet__Decref
)
11308 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11309 __ASM_VTABLE(time_get_char
,
11310 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
11311 #if _MSVCP_VER >= 110
11312 VTABLE_ADD_FUNC(locale_facet__Incref
)
11313 VTABLE_ADD_FUNC(locale_facet__Decref
)
11315 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
11316 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
11317 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
11318 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
11319 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
11320 VTABLE_ADD_FUNC(time_get_char_do_get_year
));
11325 void init_locale(void *base
)
11328 init_locale_facet_rtti(base
);
11329 init_collate_char_rtti(base
);
11330 init_collate_wchar_rtti(base
);
11331 init_collate_short_rtti(base
);
11332 init_ctype_base_rtti(base
);
11333 init_ctype_char_rtti(base
);
11334 init_ctype_wchar_rtti(base
);
11335 init_ctype_short_rtti(base
);
11336 init_codecvt_base_rtti(base
);
11337 init_codecvt_char_rtti(base
);
11338 init_codecvt_wchar_rtti(base
);
11339 init_codecvt_short_rtti(base
);
11340 init_numpunct_char_rtti(base
);
11341 init_numpunct_wchar_rtti(base
);
11342 init_numpunct_short_rtti(base
);
11343 init_num_get_char_rtti(base
);
11344 init_num_get_wchar_rtti(base
);
11345 init_num_get_short_rtti(base
);
11346 init_num_put_char_rtti(base
);
11347 init_num_put_wchar_rtti(base
);
11348 init_num_put_short_rtti(base
);
11349 init_time_put_char_rtti(base
);
11350 init_time_put_wchar_rtti(base
);
11351 init_time_put_short_rtti(base
);
11352 init_time_base_rtti(base
);
11353 init_time_get_char_rtti(base
);
11357 void free_locale(void)
11359 facets_elem
*iter
, *safe
;
11361 if(global_locale
) {
11362 locale_dtor(&classic_locale
);
11363 locale__Locimp_dtor(global_locale
);
11364 MSVCRT_operator_delete(global_locale
);
11367 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
11368 list_remove(&iter
->entry
);
11369 if(call_locale_facet__Decref(iter
->fac
))
11370 call_locale_facet_vector_dtor(iter
->fac
, 1);
11371 MSVCRT_operator_delete(iter
);