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 wchar_t* __cdecl
_W_Getdays(void);
52 char* __cdecl
_Getmonths(void);
53 wchar_t* __cdecl
_W_Getmonths(void);
54 void* __cdecl
_Gettnames(void);
55 unsigned int __cdecl
___lc_codepage_func(void);
56 int __cdecl
___lc_collate_cp_func(void);
57 const unsigned short* __cdecl
__pctype_func(void);
58 const locale_facet
* __thiscall
locale__Getfacet(const locale
*, MSVCP_size_t
);
59 MSVCP_size_t __cdecl
_Strftime(char*, MSVCP_size_t
, const char*,
60 const struct tm
*, struct __lc_time_data
*);
61 const locale
* __cdecl
locale_classic(void);
64 wchar_t ** __cdecl
___lc_locale_name_func(void);
66 LCID
* __cdecl
___lc_handle_func(void);
70 #define locale_string basic_string_char
71 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
72 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
73 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
74 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
75 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
77 #define locale_string _Yarn_char
78 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
79 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
80 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
81 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
82 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
84 #define locale_string_wchar _Yarn_wchar
85 #define locale_string_wchar_ctor(this) _Yarn_wchar_ctor(this)
86 #define locale_string_wchar_ctor_cstr(this,str) _Yarn_wchar_ctor(this); _Yarn_wchar_op_assign_cstr(this,str)
87 #define locale_string_wchar_dtor(this) _Yarn_wchar_dtor(this)
88 #define locale_string_wchar_c_str(this) _Yarn_wchar__C_str(this)
97 typedef struct _locale__Locimp
{
99 locale_facet
**facetvec
;
100 MSVCP_size_t facet_cnt
;
102 MSVCP_bool transparent
;
113 locale_string months
;
114 #if _MSVCP_VER >= 110
115 locale_string_wchar wdays
;
116 locale_string_wchar wmonths
;
118 locale_string oldlocname
;
119 locale_string newlocname
;
127 #if _MSVCP_VER >= 110
139 const char *grouping
;
142 const char *false_name
;
143 const char *true_name
;
148 const char *grouping
;
151 const wchar_t *false_name
;
152 const wchar_t *true_name
;
169 /* ?_Id_cnt@id@locale@std@@0HA */
170 int locale_id__Id_cnt
= 0;
172 static locale classic_locale
;
174 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
175 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
176 locale__Locimp
*global_locale
= NULL
;
178 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
179 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
180 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
182 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
184 if(this->strbuf
&& !this->got
) {
185 int c
= basic_streambuf_char_sgetc(this->strbuf
);
196 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
198 if(this->strbuf
&& !this->got
) {
199 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
210 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
212 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
217 istreambuf_iterator_char_val(this);
221 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
223 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
228 istreambuf_iterator_wchar_val(this);
232 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
234 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
238 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
240 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
244 /* ??1facet@locale@std@@UAE@XZ */
245 /* ??1facet@locale@std@@UEAA@XZ */
246 /* ??1facet@locale@std@@MAA@XZ */
247 /* ??1facet@locale@std@@MAE@XZ */
248 /* ??1facet@locale@std@@MEAA@XZ */
249 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
250 void __thiscall
locale_facet_dtor(locale_facet
*this)
252 TRACE("(%p)\n", this);
255 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
256 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
257 locale_facet*, (locale_facet*, unsigned int), (this, flags))
258 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
260 TRACE("(%p %x)\n", this, flags
);
262 /* we have an array, with the number of elements stored before the first object */
263 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
265 for(i
=*ptr
-1; i
>=0; i
--)
266 locale_facet_dtor(this+i
);
267 MSVCRT_operator_delete(ptr
);
269 locale_facet_dtor(this);
271 MSVCRT_operator_delete(this);
282 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
284 /* Not exported from msvcp90 */
285 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
286 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
287 void __cdecl
locale_facet_register(locale_facet
*add
)
289 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
291 ERR("Out of memory\n");
292 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
296 list_add_head(&lazy_facets
, &head
->entry
);
299 /* Not exported from msvcp90 */
300 /* ?_Register@facet@locale@std@@QAEXXZ */
301 /* ?_Register@facet@locale@std@@QEAAXXZ */
302 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
303 void __thiscall
locale_facet__Register(locale_facet
*this)
305 TRACE("(%p)\n", this);
306 locale_facet_register(this);
309 /* Not exported from msvcp90 */
310 /* ??_7facet@locale@std@@6B@ */
311 extern const vtable_ptr MSVCP_locale_facet_vtable
;
313 /* ??0id@locale@std@@QAE@I@Z */
314 /* ??0id@locale@std@@QEAA@_K@Z */
315 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
316 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
318 TRACE("(%p %lu)\n", this, id
);
324 /* ??_Fid@locale@std@@QAEXXZ */
325 /* ??_Fid@locale@std@@QEAAXXZ */
326 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
327 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
329 TRACE("(%p)\n", this);
335 /* ??Bid@locale@std@@QAEIXZ */
336 /* ??Bid@locale@std@@QEAA_KXZ */
337 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
338 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
342 TRACE("(%p)\n", this);
345 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
346 this->id
= ++locale_id__Id_cnt
;
353 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
354 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
355 int* __cdecl
locale_id__Id_cnt_func(void)
358 return &locale_id__Id_cnt
;
361 /* ??_Ffacet@locale@std@@QAEXXZ */
362 /* ??_Ffacet@locale@std@@QEAAXXZ */
363 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
364 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
366 TRACE("(%p)\n", this);
367 this->vtable
= &MSVCP_locale_facet_vtable
;
372 /* ??0facet@locale@std@@IAE@I@Z */
373 /* ??0facet@locale@std@@IEAA@_K@Z */
374 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
375 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
377 TRACE("(%p %lu)\n", this, refs
);
378 this->vtable
= &MSVCP_locale_facet_vtable
;
383 /* ?_Incref@facet@locale@std@@QAEXXZ */
384 /* ?_Incref@facet@locale@std@@QEAAXXZ */
385 /* ?_Incref@facet@locale@std@@UAEXXZ */
386 /* ?_Incref@facet@locale@std@@UEAAXXZ */
387 #if _MSVCP_VER >= 110
388 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
390 #define call_locale_facet__Incref locale_facet__Incref
392 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
393 void __thiscall
locale_facet__Incref(locale_facet
*this)
397 TRACE("(%p)\n", this);
399 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
404 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
405 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
406 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
407 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
408 #if _MSVCP_VER >= 110
409 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
410 locale_facet*, (locale_facet*), (this))
412 #define call_locale_facet__Decref locale_facet__Decref
414 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
415 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
420 TRACE("(%p)\n", this);
422 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
426 ret
= this->refs
? NULL
: this;
432 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
433 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
434 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
436 TRACE("(%p %p)\n", facet
, loc
);
440 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
441 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
442 MSVCP_size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
444 TRACE("(%p)\n", facet
);
448 /* ??0_Timevec@std@@QAE@ABV01@@Z */
449 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
450 /* This copy constructor modifies copied object */
451 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
452 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
454 TRACE("(%p %p)\n", this, copy
);
455 this->timeptr
= copy
->timeptr
;
456 copy
->timeptr
= NULL
;
460 /* ??0_Timevec@std@@QAE@PAX@Z */
461 /* ??0_Timevec@std@@QEAA@PEAX@Z */
462 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
463 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
465 TRACE("(%p %p)\n", this, timeptr
);
466 this->timeptr
= timeptr
;
470 /* ??_F_Timevec@std@@QAEXXZ */
471 /* ??_F_Timevec@std@@QEAAXXZ */
472 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
473 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
475 TRACE("(%p)\n", this);
476 this->timeptr
= NULL
;
480 /* ??1_Timevec@std@@QAE@XZ */
481 /* ??1_Timevec@std@@QEAA@XZ */
482 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
483 void __thiscall
_Timevec_dtor(_Timevec
*this)
485 TRACE("(%p)\n", this);
489 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
490 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
491 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
492 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
494 TRACE("(%p %p)\n", this, right
);
495 this->timeptr
= right
->timeptr
;
496 right
->timeptr
= NULL
;
500 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
501 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
502 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
503 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
505 TRACE("(%p)\n", this);
506 return this->timeptr
;
509 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
510 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
511 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
513 const char *locale
= NULL
;
514 #if _MSVCP_VER >= 110
515 static const wchar_t empty
[] = { '\0' };
518 /* This function is probably modifying more global objects */
519 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
522 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
524 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
525 locale_string_char_ctor_cstr(&locinfo
->days
, "");
526 locale_string_char_ctor_cstr(&locinfo
->months
, "");
527 #if _MSVCP_VER >= 110
528 locale_string_wchar_ctor_cstr(&locinfo
->wdays
, empty
);
529 locale_string_wchar_ctor_cstr(&locinfo
->wmonths
, empty
);
531 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
534 locale
= setlocale(LC_ALL
, locstr
);
536 locale
= setlocale(LC_ALL
, NULL
);
539 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
541 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
546 /* ??0_Locinfo@std@@QAE@HPBD@Z */
547 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
548 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
549 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
551 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
554 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
555 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
556 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
558 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
561 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
562 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
563 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
564 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
566 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
569 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
570 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
571 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
573 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
576 /* ??0_Locinfo@std@@QAE@PBD@Z */
577 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
578 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
579 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
581 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
584 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
585 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
586 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
588 TRACE("(%p)\n", locinfo
);
590 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
591 locale_string_char_dtor(&locinfo
->days
);
592 locale_string_char_dtor(&locinfo
->months
);
593 #if _MSVCP_VER >= 110
594 locale_string_wchar_dtor(&locinfo
->wdays
);
595 locale_string_wchar_dtor(&locinfo
->wmonths
);
597 locale_string_char_dtor(&locinfo
->oldlocname
);
598 locale_string_char_dtor(&locinfo
->newlocname
);
599 _Lockit_dtor(&locinfo
->lock
);
602 /* ??_F_Locinfo@std@@QAEXXZ */
603 /* ??_F_Locinfo@std@@QEAAXXZ */
604 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
605 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
607 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
610 /* ??1_Locinfo@std@@QAE@XZ */
611 /* ??1_Locinfo@std@@QEAA@XZ */
612 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
613 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
615 _Locinfo__Locinfo_dtor(this);
618 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
619 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
620 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
622 const char *locale
= NULL
;
624 /* This function is probably modifying more global objects */
625 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
627 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
629 locale_string_char_dtor(&locinfo
->newlocname
);
632 locale
= setlocale(LC_ALL
, locstr
);
634 locale
= setlocale(LC_ALL
, NULL
);
637 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
639 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
644 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
645 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
646 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
647 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
649 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
653 ULONGLONG __cdecl
_Getcoll(void)
662 ret
.collvec
.page
= ___lc_collate_cp_func();
664 ret
.collvec
.handle
= ___lc_handle_func()[LC_COLLATE
];
666 ret
.collvec
.lc_name
= ___lc_locale_name_func()[LC_COLLATE
];
671 /* ?_Getcoll@_Locinfo@std@@QBE?AU_Collvec@@XZ */
672 /* ?_Getcoll@_Locinfo@std@@QEBA?AU_Collvec@@XZ */
673 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcoll
, 8)
674 _Collvec
* __thiscall
_Locinfo__Getcoll(const _Locinfo
*this, _Collvec
*ret
)
676 ULONGLONG ull
= _Getcoll();
677 memcpy(ret
, &ull
, sizeof(ull
));
682 _Ctypevec
* __cdecl
_Getctype(_Ctypevec
*ret
)
685 #if _MSVCP_VER >= 110
692 ret
->page
= ___lc_codepage_func();
694 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
696 if((name
= ___lc_locale_name_func()[LC_COLLATE
])) {
697 size
= wcslen(name
)+1;
698 ret
->name
= malloc(size
*sizeof(*name
));
699 if(!ret
->name
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
700 memcpy(ret
->name
, name
, size
*sizeof(*name
));
706 table
= malloc(sizeof(short[256]));
707 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
708 memcpy(table
, __pctype_func(), sizeof(short[256]));
713 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
714 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
715 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
716 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
718 return _Getctype(ret
);
723 ULONGLONG __cdecl
_Getcvt(void)
732 ret
.cvtvec
.page
= ___lc_codepage_func();
733 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
737 _Cvtvec
* __cdecl
_Getcvt(_Cvtvec
*ret
)
743 memset(ret
, 0, sizeof(*ret
));
744 ret
->page
= ___lc_codepage_func();
745 ret
->mb_max
= ___mb_cur_max_func();
747 if(ret
->mb_max
> 1) {
749 if(_ismbblead(i
)) ret
->isleadbyte
[i
/8] |= 1 << (i
&7);
755 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
756 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
757 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
758 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
761 ULONGLONG ull
= _Getcvt();
762 memcpy(ret
, &ull
, sizeof(ull
));
766 memcpy(ret
, &cvtvec
, sizeof(cvtvec
));
771 int __cdecl
_Getdateorder(void)
776 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
777 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
778 return DATEORDER_no_order
;
780 if(!GetLocaleInfoEx(___lc_locale_name_func()[LC_TIME
], LOCALE_ILDATE
,
781 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
782 return DATEORDER_no_order
;
785 if(*date_fmt
== '0') return DATEORDER_mdy
;
786 if(*date_fmt
== '1') return DATEORDER_dmy
;
787 if(*date_fmt
== '2') return DATEORDER_ymd
;
788 return DATEORDER_no_order
;
791 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
792 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
793 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
794 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
796 TRACE("(%p)\n", this);
797 return _Getdateorder();
800 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
801 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
802 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
803 const char* __thiscall
_Locinfo__Getdays(const _Locinfo
*this)
805 char *days
= _Getdays();
808 TRACE("(%p)\n", this);
811 locale_string_char_dtor((locale_string
*)&this->days
);
812 locale_string_char_ctor_cstr((locale_string
*)&this->days
, days
);
816 ret
= locale_string_char_c_str(&this->days
);
817 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
821 #if _MSVCP_VER >= 110
822 /* ?_W_Getdays@_Locinfo@std@@QBEPBGXZ */
823 /* ?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ */
824 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getdays
, 4)
825 const wchar_t* __thiscall
_Locinfo__W_Getdays(const _Locinfo
*this)
827 static const wchar_t defdays
[] =
829 ':','S','u','n',':','S','u','n','d','a','y',
830 ':','M','o','n',':','M','o','n','d','a','y',
831 ':','T','u','e',':','T','u','e','s','d','a','y',
832 ':','W','e','d',':','W','e','d','n','e','s','d','a','y',
833 ':','T','h','u',':','T','h','u','r','s','d','a','y',
834 ':','F','r','i',':','F','r','i','d','a','y',
835 ':','S','a','t',':','S','a','t','u','r','d','a','y'
837 wchar_t *wdays
= _W_Getdays();
840 TRACE("(%p)\n", this);
843 locale_string_wchar_dtor((locale_string_wchar
*)&this->wdays
);
844 locale_string_wchar_ctor_cstr((locale_string_wchar
*)&this->wdays
, wdays
);
848 ret
= locale_string_wchar_c_str(&this->wdays
);
849 if (!ret
[0]) ret
= defdays
;
853 /* ?_W_Getmonths@_Locinfo@std@@QBEPBGXZ */
854 /* ?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ */
855 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getmonths
, 4)
856 const wchar_t* __thiscall
_Locinfo__W_Getmonths(const _Locinfo
*this)
858 static const wchar_t defmonths
[] =
860 ':','J','a','n',':','J','a','n','u','a','r','y',
861 ':','F','e','b',':','F','e','b','r','u','a','r','y',
862 ':','M','a','r',':','M','a','r','c','h',
863 ':','A','p','r',':','A','p','r','i','l',
864 ':','M','a','y',':','M','a','y',
865 ':','J','u','n',':','J','u','n','e',
866 ':','J','u','l',':','J','u','l','y',
867 ':','A','u','g',':','A','u','g','u','s','t',
868 ':','S','e','p',':','S','e','p','t','e','m','b','e','r',
869 ':','O','c','t',':','O','c','t','o','b','e','r',
870 ':','N','o','v',':','N','o','v','e','m','b','e','r',
871 ':','D','e','c',':','D','e','c','e','m','b','e','r'
873 wchar_t *wmonths
= _W_Getmonths();
876 TRACE("(%p)\n", this);
879 locale_string_wchar_dtor((locale_string_wchar
*)&this->wmonths
);
880 locale_string_wchar_ctor_cstr((locale_string_wchar
*)&this->wmonths
, wmonths
);
884 ret
= locale_string_wchar_c_str(&this->wmonths
);
885 if (!ret
[0]) ret
= defmonths
;
890 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
891 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
892 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
893 const char* __thiscall
_Locinfo__Getmonths(const _Locinfo
*this)
895 char *months
= _Getmonths();
898 TRACE("(%p)\n", this);
901 locale_string_char_dtor((locale_string
*)&this->months
);
902 locale_string_char_ctor_cstr((locale_string
*)&this->months
, months
);
906 ret
= locale_string_char_c_str(&this->months
);
907 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
908 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
912 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
913 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
914 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
915 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
917 TRACE("(%p)\n", this);
921 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
922 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
923 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
924 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
926 TRACE("(%p)\n", this);
930 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
931 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
932 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
933 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
935 TRACE("(%p)\n", this);
939 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
940 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
941 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
942 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
944 TRACE("(%p)\n", this);
946 _Timevec_ctor_timeptr(ret
, _Gettnames());
950 /* ?id@?$collate@D@std@@2V0locale@2@A */
951 locale_id collate_char_id
= {0};
953 /* ??_7?$collate@D@std@@6B@ */
954 extern const vtable_ptr MSVCP_collate_char_vtable
;
956 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
957 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
958 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
959 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
961 TRACE("(%p %p)\n", this, locinfo
);
962 _Locinfo__Getcoll(locinfo
, &this->coll
);
965 /* ??0?$collate@D@std@@IAE@PBDI@Z */
966 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
967 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
968 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
972 TRACE("(%p %s %lu)\n", this, name
, refs
);
974 locale_facet_ctor_refs(&this->facet
, refs
);
975 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
977 _Locinfo_ctor_cstr(&locinfo
, name
);
978 collate_char__Init(this, &locinfo
);
979 _Locinfo_dtor(&locinfo
);
983 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
984 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
985 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
986 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
988 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
990 locale_facet_ctor_refs(&this->facet
, refs
);
991 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
992 collate_char__Init(this, locinfo
);
996 /* ??0?$collate@D@std@@QAE@I@Z */
997 /* ??0?$collate@D@std@@QEAA@_K@Z */
998 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
999 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
1001 return collate_char_ctor_name(this, "C", refs
);
1004 /* ??1?$collate@D@std@@UAE@XZ */
1005 /* ??1?$collate@D@std@@UEAA@XZ */
1006 /* ??1?$collate@D@std@@MAE@XZ */
1007 /* ??1?$collate@D@std@@MEAA@XZ */
1008 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
1009 void __thiscall
collate_char_dtor(collate
*this)
1011 TRACE("(%p)\n", this);
1014 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
1015 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
1017 TRACE("(%p %x)\n", this, flags
);
1019 /* we have an array, with the number of elements stored before the first object */
1020 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1022 for(i
=*ptr
-1; i
>=0; i
--)
1023 collate_char_dtor(this+i
);
1024 MSVCRT_operator_delete(ptr
);
1026 collate_char_dtor(this);
1028 MSVCRT_operator_delete(this);
1034 /* ??_F?$collate@D@std@@QAEXXZ */
1035 /* ??_F?$collate@D@std@@QEAAXXZ */
1036 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
1037 collate
* __thiscall
collate_char_ctor(collate
*this)
1039 return collate_char_ctor_name(this, "C", 0);
1042 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1043 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1044 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1046 TRACE("(%p %p)\n", facet
, loc
);
1048 if(facet
&& !*facet
) {
1049 *facet
= MSVCRT_operator_new(sizeof(collate
));
1051 ERR("Out of memory\n");
1052 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1055 collate_char_ctor_name((collate
*)*facet
,
1056 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1062 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
1063 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1064 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
1066 return collate_char__Getcat(facet
, locale_classic());
1069 static collate
* collate_char_use_facet(const locale
*loc
)
1071 static collate
*obj
= NULL
;
1074 const locale_facet
*fac
;
1076 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1077 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
1079 _Lockit_dtor(&lock
);
1080 return (collate
*)fac
;
1084 _Lockit_dtor(&lock
);
1088 collate_char__Getcat(&fac
, loc
);
1089 obj
= (collate
*)fac
;
1090 call_locale_facet__Incref(&obj
->facet
);
1091 locale_facet_register(&obj
->facet
);
1092 _Lockit_dtor(&lock
);
1098 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
1099 const char *last2
, const _Collvec
*coll
)
1103 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
1105 #if _MSVCP_VER < 110
1106 lcid
= (coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
]);
1108 lcid
= LocaleNameToLCID(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
], 0);
1110 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1113 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
1114 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
1115 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
1116 #if _MSVCP_VER <= 100
1117 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1118 (const collate*, const char*, const char*, const char*, const char*), \
1119 (this, first1, last1, first2, last2))
1121 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1122 (const collate*, const char*, const char*, const char*, const char*), \
1123 (this, first1, last1, first2, last2))
1125 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
1126 const char *last1
, const char *first2
, const char *last2
)
1128 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1129 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
1132 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
1133 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
1134 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
1135 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1136 const char *last1
, const char *first2
, const char *last2
)
1138 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1139 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1142 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1143 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1144 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1145 #if _MSVCP_VER <= 100
1146 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1147 (const collate*, const char*, const char*), (this, first, last))
1149 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1150 (const collate*, const char*, const char*), (this, first, last))
1152 LONG __thiscall
collate_char_do_hash(const collate
*this,
1153 const char *first
, const char *last
)
1157 TRACE("(%p %p %p)\n", this, first
, last
);
1159 for(; first
<last
; first
++)
1160 ret
= (ret
<<8 | ret
>>24) + *first
;
1164 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1165 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1166 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1167 LONG __thiscall
collate_char_hash(const collate
*this,
1168 const char *first
, const char *last
)
1170 TRACE("(%p %p %p)\n", this, first
, last
);
1171 return call_collate_char_do_hash(this, first
, last
);
1174 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1175 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1176 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1177 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1178 basic_string_char
*ret
, const char *first
, const char *last
)
1180 FIXME("(%p %p %p) stub\n", this, first
, last
);
1184 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1185 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1186 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1187 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1188 basic_string_char
*ret
, const char *first
, const char *last
)
1190 FIXME("(%p %p %p) stub\n", this, first
, last
);
1194 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1195 locale_id collate_wchar_id
= {0};
1196 /* ?id@?$collate@G@std@@2V0locale@2@A */
1197 locale_id collate_short_id
= {0};
1199 /* ??_7?$collate@_W@std@@6B@ */
1200 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1201 /* ??_7?$collate@G@std@@6B@ */
1202 extern const vtable_ptr MSVCP_collate_short_vtable
;
1204 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1205 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1206 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1207 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1208 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1209 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1211 TRACE("(%p %p)\n", this, locinfo
);
1212 _Locinfo__Getcoll(locinfo
, &this->coll
);
1215 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1216 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1217 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1218 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1222 TRACE("(%p %s %lu)\n", this, name
, refs
);
1224 locale_facet_ctor_refs(&this->facet
, refs
);
1225 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1227 _Locinfo_ctor_cstr(&locinfo
, name
);
1228 collate_wchar__Init(this, &locinfo
);
1229 _Locinfo_dtor(&locinfo
);
1233 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1234 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1235 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1236 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1238 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1239 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1243 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1244 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1245 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1246 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1248 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1250 locale_facet_ctor_refs(&this->facet
, refs
);
1251 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1252 collate_wchar__Init(this, locinfo
);
1256 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1257 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1258 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1259 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1261 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1262 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1266 /* ??0?$collate@_W@std@@QAE@I@Z */
1267 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1268 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1269 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1271 return collate_wchar_ctor_name(this, "C", refs
);
1274 /* ??0?$collate@G@std@@QAE@I@Z */
1275 /* ??0?$collate@G@std@@QEAA@_K@Z */
1276 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1277 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1279 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1280 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1284 /* ??1?$collate@G@std@@UAE@XZ */
1285 /* ??1?$collate@G@std@@UEAA@XZ */
1286 /* ??1?$collate@_W@std@@MAE@XZ */
1287 /* ??1?$collate@_W@std@@MEAA@XZ */
1288 /* ??1?$collate@G@std@@MAE@XZ */
1289 /* ??1?$collate@G@std@@MEAA@XZ */
1290 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1291 void __thiscall
collate_wchar_dtor(collate
*this)
1293 TRACE("(%p)\n", this);
1296 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1297 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1299 TRACE("(%p %x)\n", this, flags
);
1301 /* we have an array, with the number of elements stored before the first object */
1302 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1304 for(i
=*ptr
-1; i
>=0; i
--)
1305 collate_wchar_dtor(this+i
);
1306 MSVCRT_operator_delete(ptr
);
1308 collate_wchar_dtor(this);
1310 MSVCRT_operator_delete(this);
1316 /* ??_F?$collate@_W@std@@QAEXXZ */
1317 /* ??_F?$collate@_W@std@@QEAAXXZ */
1318 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1319 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1321 return collate_wchar_ctor_name(this, "C", 0);
1324 /* ??_F?$collate@G@std@@QAEXXZ */
1325 /* ??_F?$collate@G@std@@QEAAXXZ */
1326 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1327 collate
* __thiscall
collate_short_ctor(collate
*this)
1329 collate
*ret
= collate_wchar_ctor(this);
1330 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1334 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1335 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1336 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1338 TRACE("(%p %p)\n", facet
, loc
);
1340 if(facet
&& !*facet
) {
1341 *facet
= MSVCRT_operator_new(sizeof(collate
));
1343 ERR("Out of memory\n");
1344 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1347 collate_wchar_ctor_name((collate
*)*facet
,
1348 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1354 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1355 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1356 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1358 return collate_wchar__Getcat(facet
, locale_classic());
1361 static collate
* collate_wchar_use_facet(const locale
*loc
)
1363 static collate
*obj
= NULL
;
1366 const locale_facet
*fac
;
1368 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1369 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1371 _Lockit_dtor(&lock
);
1372 return (collate
*)fac
;
1376 _Lockit_dtor(&lock
);
1380 collate_wchar__Getcat(&fac
, loc
);
1381 obj
= (collate
*)fac
;
1382 call_locale_facet__Incref(&obj
->facet
);
1383 locale_facet_register(&obj
->facet
);
1384 _Lockit_dtor(&lock
);
1389 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1390 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1391 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1393 if(facet
&& !*facet
) {
1394 collate_wchar__Getcat(facet
, loc
);
1395 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1401 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1402 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1403 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1405 return collate_short__Getcat(facet
, locale_classic());
1408 static collate
* collate_short_use_facet(const locale
*loc
)
1410 static collate
*obj
= NULL
;
1413 const locale_facet
*fac
;
1415 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1416 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1418 _Lockit_dtor(&lock
);
1419 return (collate
*)fac
;
1423 _Lockit_dtor(&lock
);
1427 collate_short__Getcat(&fac
, loc
);
1428 obj
= (collate
*)fac
;
1429 call_locale_facet__Incref(&obj
->facet
);
1430 locale_facet_register(&obj
->facet
);
1431 _Lockit_dtor(&lock
);
1437 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1438 const wchar_t *last2
, const _Collvec
*coll
)
1440 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1442 #if _MSVCP_VER < 110
1443 return CompareStringW(coll
? coll
->handle
: ___lc_handle_func()[LC_COLLATE
],
1444 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1446 return CompareStringEx(coll
? coll
->lc_name
: ___lc_locale_name_func()[LC_COLLATE
],
1447 0, first1
, last1
-first1
, first2
, last2
-first2
, NULL
, NULL
, 0)-CSTR_EQUAL
;
1451 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1452 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1453 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1454 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1455 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1456 #if _MSVCP_VER <= 100
1457 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1458 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1459 (this, first1, last1, first2, last2))
1461 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1462 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1463 (this, first1, last1, first2, last2))
1465 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1466 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1468 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1469 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1472 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1473 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1474 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1475 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1476 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1477 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1478 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1480 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1481 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1484 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1485 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1486 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1487 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1488 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1489 #if _MSVCP_VER <= 100
1490 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1491 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1493 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1494 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1496 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1497 const wchar_t *first
, const wchar_t *last
)
1501 TRACE("(%p %p %p)\n", this, first
, last
);
1503 for(; first
<last
; first
++)
1504 ret
= (ret
<<8 | ret
>>24) + *first
;
1508 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1509 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1510 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1511 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1512 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1513 LONG __thiscall
collate_wchar_hash(const collate
*this,
1514 const wchar_t *first
, const wchar_t *last
)
1516 TRACE("(%p %p %p)\n", this, first
, last
);
1517 return call_collate_wchar_do_hash(this, first
, last
);
1520 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1521 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1522 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1523 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1524 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1525 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1526 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1528 FIXME("(%p %p %p) stub\n", this, first
, last
);
1532 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1533 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1534 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1535 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1536 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1537 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1538 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1540 FIXME("(%p %p %p) stub\n", this, first
, last
);
1544 /* ??_7ctype_base@std@@6B@ */
1545 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1547 /* ??0ctype_base@std@@QAE@I@Z */
1548 /* ??0ctype_base@std@@QEAA@_K@Z */
1549 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1550 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1552 TRACE("(%p %lu)\n", this, refs
);
1553 locale_facet_ctor_refs(&this->facet
, refs
);
1554 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1558 /* ??_Fctype_base@std@@QAEXXZ */
1559 /* ??_Fctype_base@std@@QEAAXXZ */
1560 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1561 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1563 TRACE("(%p)\n", this);
1564 locale_facet_ctor_refs(&this->facet
, 0);
1565 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1569 /* ??1ctype_base@std@@UAE@XZ */
1570 /* ??1ctype_base@std@@UEAA@XZ */
1571 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1572 void __thiscall
ctype_base_dtor(ctype_base
*this)
1574 TRACE("(%p)\n", this);
1577 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1578 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1580 TRACE("(%p %x)\n", this, flags
);
1582 /* we have an array, with the number of elements stored before the first object */
1583 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1585 for(i
=*ptr
-1; i
>=0; i
--)
1586 ctype_base_dtor(this+i
);
1587 MSVCRT_operator_delete(ptr
);
1589 ctype_base_dtor(this);
1591 MSVCRT_operator_delete(this);
1597 /* ?_Xran@ctype_base@std@@KAXXZ */
1598 void __cdecl
ctype_base__Xran(void)
1600 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1603 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1604 locale_id ctype_char_id
= {0};
1605 /* ?table_size@?$ctype@D@std@@2IB */
1606 /* ?table_size@?$ctype@D@std@@2_KB */
1607 MSVCP_size_t ctype_char_table_size
= 256;
1609 /* ??_7?$ctype@D@std@@6B@ */
1610 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1612 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1613 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1614 locale_id
* __cdecl
ctype_char__Id_func(void)
1617 return &ctype_char_id
;
1620 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1621 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1622 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1623 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1625 TRACE("(%p %p)\n", this, locinfo
);
1626 _Locinfo__Getctype(locinfo
, &this->ctype
);
1629 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1630 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1631 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1632 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1634 TRACE("(%p)\n", this);
1636 if(this->ctype
.delfl
)
1637 free((short*)this->ctype
.table
);
1638 #if _MSVCP_VER >= 110
1639 free(this->ctype
.name
);
1643 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1644 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1645 const short* __cdecl
ctype_char_classic_table(void)
1650 ctype
= ctype_char_use_facet( locale_classic() );
1651 return ctype
->ctype
.table
;
1654 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1655 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1656 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1657 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1658 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1660 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1661 ctype_base_ctor_refs(&this->base
, refs
);
1662 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1663 ctype_char__Init(this, locinfo
);
1667 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1668 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1669 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1670 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1671 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1675 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1677 ctype_base_ctor_refs(&this->base
, refs
);
1678 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1680 _Locinfo_ctor(&locinfo
);
1681 ctype_char__Init(this, &locinfo
);
1682 _Locinfo_dtor(&locinfo
);
1685 ctype_char__Tidy(this);
1686 this->ctype
.table
= table
;
1687 this->ctype
.delfl
= delete;
1692 /* ??_F?$ctype@D@std@@QAEXXZ */
1693 /* ??_F?$ctype@D@std@@QEAAXXZ */
1694 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1695 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1697 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1700 /* ??1?$ctype@D@std@@UAE@XZ */
1701 /* ??1?$ctype@D@std@@UEAA@XZ */
1702 /* ??1?$ctype@D@std@@MAE@XZ */
1703 /* ??1?$ctype@D@std@@MEAA@XZ */
1704 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1705 void __thiscall
ctype_char_dtor(ctype_char
*this)
1707 TRACE("(%p)\n", this);
1708 ctype_char__Tidy(this);
1711 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1712 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1714 TRACE("(%p %x)\n", this, flags
);
1716 /* we have an array, with the number of elements stored before the first object */
1717 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1719 for(i
=*ptr
-1; i
>=0; i
--)
1720 ctype_char_dtor(this+i
);
1721 MSVCRT_operator_delete(ptr
);
1723 ctype_char_dtor(this);
1725 MSVCRT_operator_delete(this);
1731 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1732 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1733 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1734 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1735 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1736 char, (const ctype_char*, char, char), (this, ch, unused))
1737 #elif _MSVCP_VER <= 100
1738 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1739 char, (const ctype_char*, char, char), (this, ch, unused))
1741 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1742 char, (const ctype_char*, char, char), (this, ch, unused))
1744 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1746 TRACE("(%p %c %c)\n", this, ch
, unused
);
1750 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1751 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1752 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1753 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1754 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1755 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1756 (this, first, last, unused, dest))
1757 #elif _MSVCP_VER <= 100
1758 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1759 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1760 (this, first, last, unused, dest))
1762 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1763 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1764 (this, first, last, unused, dest))
1766 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1767 const char *first
, const char *last
, char unused
, char *dest
)
1769 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1770 memcpy(dest
, first
, last
-first
);
1774 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1775 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1776 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1777 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1778 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1779 (this, first, last, unused, dest, size))
1780 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1781 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1783 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1784 memcpy_s(dest
, size
, first
, last
-first
);
1788 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1789 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1790 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1791 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1793 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1794 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1797 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1798 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1799 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1800 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1801 const char *first
, const char *last
, char dflt
, char *dest
)
1803 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1804 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1807 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1808 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1809 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1810 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1811 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1813 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1814 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1817 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1818 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1819 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1820 #if _MSVCP_VER <= 100
1821 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1822 char, (const ctype_char*, char), (this, ch))
1824 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1825 char, (const ctype_char*, char), (this, ch))
1827 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1829 TRACE("(%p %c)\n", this, ch
);
1833 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1834 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1835 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1836 #if _MSVCP_VER <= 100
1837 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1838 const char*, (const ctype_char*, const char*, const char*, char*), \
1839 (this, first, last, dest))
1841 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1842 const char*, (const ctype_char*, const char*, const char*, char*), \
1843 (this, first, last, dest))
1845 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1846 const char *first
, const char *last
, char *dest
)
1848 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1849 memcpy(dest
, first
, last
-first
);
1853 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1854 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1855 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1856 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1857 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1858 (this, first, last, dest, size))
1859 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1860 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1862 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1863 memcpy_s(dest
, size
, first
, last
-first
);
1867 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1868 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1869 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1870 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1872 TRACE("(%p %c)\n", this, ch
);
1873 return call_ctype_char_do_widen_ch(this, ch
);
1876 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1877 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1878 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1879 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1880 const char *first
, const char *last
, char *dest
)
1882 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1883 return call_ctype_char_do_widen(this, first
, last
, dest
);
1886 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1887 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1888 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1889 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1890 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1892 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1893 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1896 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1897 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1898 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1900 TRACE("(%p %p)\n", facet
, loc
);
1902 if(facet
&& !*facet
) {
1905 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1907 ERR("Out of memory\n");
1908 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1912 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1913 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1914 _Locinfo_dtor(&locinfo
);
1920 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1921 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1922 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1924 return ctype_char__Getcat(facet
, locale_classic());
1927 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1929 static ctype_char
*obj
= NULL
;
1932 const locale_facet
*fac
;
1934 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1935 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1937 _Lockit_dtor(&lock
);
1938 return (ctype_char
*)fac
;
1942 _Lockit_dtor(&lock
);
1946 ctype_char__Getcat(&fac
, loc
);
1947 obj
= (ctype_char
*)fac
;
1948 call_locale_facet__Incref(&obj
->base
.facet
);
1949 locale_facet_register(&obj
->base
.facet
);
1950 _Lockit_dtor(&lock
);
1956 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1960 TRACE("%d %p\n", ch
, ctype
);
1965 cp
= ___lc_codepage_func();
1967 /* Don't convert to unicode in case of C locale */
1969 if(ch
>='A' && ch
<='Z')
1978 str
[0] = (ch
>>8) & 255;
1986 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1989 lower
= tolowerW(wide
);
1993 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1995 return str
[0] + (str
[1]<<8);
1999 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
2000 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
2001 #if _MSVCP_VER <= 100
2002 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
2003 char, (const ctype_char*, char), (this, ch))
2005 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2006 char, (const ctype_char*, char), (this, ch))
2008 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
2009 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
2011 TRACE("(%p %c)\n", this, ch
);
2012 return _Tolower(ch
, &this->ctype
);
2015 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
2016 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2017 #if _MSVCP_VER <= 100
2018 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
2019 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2021 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
2022 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2024 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
2025 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
2027 TRACE("(%p %p %p)\n", this, first
, last
);
2028 for(; first
<last
; first
++)
2029 *first
= _Tolower(*first
, &this->ctype
);
2033 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
2034 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
2035 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
2036 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
2038 TRACE("(%p %c)\n", this, ch
);
2039 return call_ctype_char_do_tolower_ch(this, ch
);
2042 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
2043 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2044 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
2045 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
2047 TRACE("(%p %p %p)\n", this, first
, last
);
2048 return call_ctype_char_do_tolower(this, first
, last
);
2052 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
2056 TRACE("%d %p\n", ch
, ctype
);
2061 cp
= ___lc_codepage_func();
2063 /* Don't convert to unicode in case of C locale */
2065 if(ch
>='a' && ch
<='z')
2074 str
[0] = (ch
>>8) & 255;
2082 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
2085 upper
= toupperW(wide
);
2089 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
2091 return str
[0] + (str
[1]<<8);
2095 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
2096 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
2097 #if _MSVCP_VER <= 100
2098 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2099 char, (const ctype_char*, char), (this, ch))
2101 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2102 char, (const ctype_char*, char), (this, ch))
2104 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
2105 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
2107 TRACE("(%p %c)\n", this, ch
);
2108 return _Toupper(ch
, &this->ctype
);
2111 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
2112 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2113 #if _MSVCP_VER <= 100
2114 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
2115 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2117 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
2118 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2120 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
2121 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
2122 char *first
, const char *last
)
2124 TRACE("(%p %p %p)\n", this, first
, last
);
2125 for(; first
<last
; first
++)
2126 *first
= _Toupper(*first
, &this->ctype
);
2130 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
2131 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
2132 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
2133 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
2135 TRACE("(%p %c)\n", this, ch
);
2136 return call_ctype_char_do_toupper_ch(this, ch
);
2139 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2140 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2141 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2142 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2144 TRACE("(%p %p %p)\n", this, first
, last
);
2145 return call_ctype_char_do_toupper(this, first
, last
);
2148 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2149 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2150 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2151 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2153 TRACE("(%p %x %c)\n", this, mask
, ch
);
2154 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2157 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2158 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2159 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2160 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2162 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2163 for(; first
<last
; first
++)
2164 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2168 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2169 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2170 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2171 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2173 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2174 for(; first
<last
; first
++)
2175 if(!ctype_char_is_ch(this, mask
, *first
))
2180 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2181 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2182 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2183 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2185 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2186 for(; first
<last
; first
++)
2187 if(ctype_char_is_ch(this, mask
, *first
))
2192 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2193 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2194 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2195 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2197 TRACE("(%p)\n", this);
2198 return this->ctype
.table
;
2201 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2202 locale_id ctype_wchar_id
= {0};
2203 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2204 locale_id ctype_short_id
= {0};
2206 /* ??_7?$ctype@_W@std@@6B@ */
2207 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2208 /* ??_7?$ctype@G@std@@6B@ */
2209 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2211 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2212 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2213 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2216 return &ctype_wchar_id
;
2219 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2220 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2221 locale_id
* __cdecl
ctype_short__Id_func(void)
2224 return &ctype_short_id
;
2227 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2228 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2229 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2230 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2231 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2232 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2234 TRACE("(%p %p)\n", this, locinfo
);
2235 _Locinfo__Getctype(locinfo
, &this->ctype
);
2236 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2239 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2240 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2241 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2242 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2243 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2245 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2246 ctype_base_ctor_refs(&this->base
, refs
);
2247 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2248 ctype_wchar__Init(this, locinfo
);
2252 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2253 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2254 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2255 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2256 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2258 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2259 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2263 /* ??0?$ctype@_W@std@@QAE@I@Z */
2264 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2265 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2266 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2270 TRACE("(%p %lu)\n", this, refs
);
2272 ctype_base_ctor_refs(&this->base
, refs
);
2273 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2275 _Locinfo_ctor(&locinfo
);
2276 ctype_wchar__Init(this, &locinfo
);
2277 _Locinfo_dtor(&locinfo
);
2281 /* ??0?$ctype@G@std@@QAE@I@Z */
2282 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2283 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2284 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2286 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2287 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2291 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2292 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2293 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2294 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2295 const char *name
, MSVCP_size_t refs
)
2299 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2301 ctype_base_ctor_refs(&this->base
, refs
);
2302 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2304 _Locinfo_ctor_cstr(&locinfo
, name
);
2305 ctype_wchar__Init(this, &locinfo
);
2306 _Locinfo_dtor(&locinfo
);
2310 /* ??_F?$ctype@_W@std@@QAEXXZ */
2311 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2312 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2313 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2315 TRACE("(%p)\n", this);
2316 return ctype_short_ctor_refs(this, 0);
2319 /* ??_F?$ctype@G@std@@QAEXXZ */
2320 /* ??_F?$ctype@G@std@@QEAAXXZ */
2321 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2322 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2324 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2325 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2329 /* ??1?$ctype@G@std@@UAE@XZ */
2330 /* ??1?$ctype@G@std@@UEAA@XZ */
2331 /* ??1?$ctype@_W@std@@MAE@XZ */
2332 /* ??1?$ctype@_W@std@@MEAA@XZ */
2333 /* ??1?$ctype@G@std@@MAE@XZ */
2334 /* ??1?$ctype@G@std@@MEAA@XZ */
2335 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2336 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2338 TRACE("(%p)\n", this);
2339 if(this->ctype
.delfl
)
2340 free((void*)this->ctype
.table
);
2341 #if _MSVCP_VER >= 110
2342 free(this->ctype
.name
);
2346 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2347 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2349 TRACE("(%p %x)\n", this, flags
);
2351 /* we have an array, with the number of elements stored before the first object */
2352 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2354 for(i
=*ptr
-1; i
>=0; i
--)
2355 ctype_wchar_dtor(this+i
);
2356 MSVCRT_operator_delete(ptr
);
2358 ctype_wchar_dtor(this);
2360 MSVCRT_operator_delete(this);
2367 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
2372 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2377 cp
= ___lc_codepage_func();
2389 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2398 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2399 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2400 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2401 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2402 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2403 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2405 char buf
[MB_LEN_MAX
];
2407 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2409 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2412 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2413 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2414 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2415 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2416 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2417 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2418 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2419 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2420 #elif _MSVCP_VER <= 100
2421 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2422 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2424 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2425 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2427 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2429 return ctype_wchar__Donarrow(this, ch
, dflt
);
2432 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2433 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2434 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2435 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2436 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2437 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2438 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2439 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2440 (this, first, last, dflt, dest))
2441 #elif _MSVCP_VER <= 100
2442 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2443 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2444 (this, first, last, dflt, dest))
2446 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2447 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2448 (this, first, last, dflt, dest))
2450 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2451 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2453 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2454 for(; first
<last
; first
++)
2455 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2459 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2460 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2461 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2462 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2463 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2464 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2465 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2466 (this, first, last, dflt, dest, size))
2467 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2468 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2470 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2471 /* This function converts all multi-byte characters to dflt,
2472 * thanks to it result size is known before converting */
2473 if(last
-first
> size
)
2475 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2478 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2479 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2480 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2481 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2482 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2483 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2485 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2486 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2489 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2490 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2491 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2492 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2493 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2494 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2495 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2497 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2498 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2501 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2502 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2503 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2504 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2505 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2506 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2507 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2509 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2510 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2514 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2520 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2528 cp
= ___lc_codepage_func();
2532 *out
= (unsigned char)*in
;
2539 ((char*)state
)[1] = *in
;
2541 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2551 GetCPInfo(cp
, &cp_info
);
2553 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2554 if(!cp_info
.LeadByte
[i
+1])
2556 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2564 *state
= (unsigned char)*in
;
2568 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2575 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2582 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2587 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2590 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2591 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2592 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2593 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2594 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2595 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2599 TRACE("(%p %d)\n", this, ch
);
2600 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2603 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2604 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2605 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2606 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2607 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2608 #if _MSVCP_VER <= 100
2609 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2610 wchar_t, (const ctype_wchar*, char), (this, ch))
2612 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2613 wchar_t, (const ctype_wchar*, char), (this, ch))
2615 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2617 return ctype_wchar__Dowiden(this, ch
);
2620 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2621 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2622 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2623 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2624 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2625 #if _MSVCP_VER <= 100
2626 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2627 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2628 (this, first, last, dest))
2630 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2631 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2632 (this, first, last, dest))
2634 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2635 const char *first
, const char *last
, wchar_t *dest
)
2637 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2638 for(; first
<last
; first
++)
2639 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2643 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2644 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2645 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2646 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2647 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2648 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2649 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2650 (this, first, last, dest, size))
2651 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2652 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2654 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2655 /* This function converts all multi-byte characters to WEOF,
2656 * thanks to it result size is known before converting */
2657 if(size
< last
-first
)
2659 return ctype_wchar_do_widen(this, first
, last
, dest
);
2662 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2663 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2664 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2665 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2666 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2667 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2669 TRACE("(%p %d)\n", this, ch
);
2670 return call_ctype_wchar_do_widen_ch(this, ch
);
2673 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2674 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2675 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2676 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2677 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2678 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2679 const char *first
, const char *last
, wchar_t *dest
)
2681 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2682 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2685 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2686 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2687 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2688 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2689 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2690 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2691 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2693 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2694 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2697 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2698 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2699 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2701 TRACE("(%p %p)\n", facet
, loc
);
2703 if(facet
&& !*facet
) {
2706 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2708 ERR("Out of memory\n");
2709 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2713 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2714 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2715 _Locinfo_dtor(&locinfo
);
2721 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2722 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2723 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2725 return ctype_wchar__Getcat(facet
, locale_classic());
2728 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2729 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2730 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2732 if(facet
&& !*facet
) {
2733 ctype_wchar__Getcat(facet
, loc
);
2734 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2740 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2741 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2742 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2744 return ctype_short__Getcat(facet
, locale_classic());
2748 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2750 TRACE("(%d %p)\n", ch
, ctype
);
2751 return tolowerW(ch
);
2754 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2756 static ctype_wchar
*obj
= NULL
;
2759 const locale_facet
*fac
;
2761 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2762 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2764 _Lockit_dtor(&lock
);
2765 return (ctype_wchar
*)fac
;
2769 _Lockit_dtor(&lock
);
2773 ctype_wchar__Getcat(&fac
, loc
);
2774 obj
= (ctype_wchar
*)fac
;
2775 call_locale_facet__Incref(&obj
->base
.facet
);
2776 locale_facet_register(&obj
->base
.facet
);
2777 _Lockit_dtor(&lock
);
2782 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2784 static ctype_wchar
*obj
= NULL
;
2787 const locale_facet
*fac
;
2789 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2790 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2792 _Lockit_dtor(&lock
);
2793 return (ctype_wchar
*)fac
;
2797 _Lockit_dtor(&lock
);
2801 ctype_short__Getcat(&fac
, loc
);
2802 obj
= (ctype_wchar
*)fac
;
2803 call_locale_facet__Incref(&obj
->base
.facet
);
2804 locale_facet_register(&obj
->base
.facet
);
2805 _Lockit_dtor(&lock
);
2810 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2811 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2812 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2813 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2814 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2815 #if _MSVCP_VER <= 100
2816 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2817 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2819 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2820 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2822 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2824 return _Towlower(ch
, &this->ctype
);
2827 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2828 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2829 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2830 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2831 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2832 #if _MSVCP_VER <= 100
2833 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2834 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2835 (this, first, last))
2837 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2838 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2839 (this, first, last))
2841 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2842 wchar_t *first
, const wchar_t *last
)
2844 TRACE("(%p %p %p)\n", this, first
, last
);
2845 for(; first
<last
; first
++)
2846 *first
= _Towlower(*first
, &this->ctype
);
2850 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2851 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2852 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2853 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2854 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2855 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2857 TRACE("(%p %d)\n", this, ch
);
2858 return call_ctype_wchar_do_tolower_ch(this, ch
);
2861 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2862 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2863 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2864 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2865 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2866 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2867 wchar_t *first
, const wchar_t *last
)
2869 TRACE("(%p %p %p)\n", this, first
, last
);
2870 return call_ctype_wchar_do_tolower(this, first
, last
);
2874 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2876 TRACE("(%d %p)\n", ch
, ctype
);
2877 return toupperW(ch
);
2880 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2881 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2882 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2883 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2884 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2885 #if _MSVCP_VER <= 100
2886 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2887 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2889 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2890 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2892 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2894 return _Towupper(ch
, &this->ctype
);
2897 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2898 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2899 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2900 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2901 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2902 #if _MSVCP_VER <= 100
2903 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2904 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2905 (this, first, last))
2907 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2908 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2909 (this, first, last))
2911 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2912 wchar_t *first
, const wchar_t *last
)
2914 TRACE("(%p %p %p)\n", this, first
, last
);
2915 for(; first
<last
; first
++)
2916 *first
= _Towupper(*first
, &this->ctype
);
2920 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2921 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2922 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2923 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2924 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2925 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2927 TRACE("(%p %d)\n", this, ch
);
2928 return call_ctype_wchar_do_toupper_ch(this, ch
);
2931 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2932 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2933 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2934 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2935 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2936 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2937 wchar_t *first
, const wchar_t *last
)
2939 TRACE("(%p %p %p)\n", this, first
, last
);
2940 return call_ctype_wchar_do_toupper(this, first
, last
);
2944 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2945 short *mask
, const _Ctypevec
*ctype
)
2947 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2948 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2953 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2956 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2960 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2961 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2962 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2963 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2964 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2965 #if _MSVCP_VER <= 100
2966 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2967 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2969 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2970 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2972 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2974 TRACE("(%p %x %d)\n", this, mask
, ch
);
2975 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2978 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2979 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2980 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2981 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2982 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2983 #if _MSVCP_VER <= 100
2984 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2985 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2986 (this, first, last, dest))
2988 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
2989 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2990 (this, first, last, dest))
2992 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2993 const wchar_t *first
, const wchar_t *last
, short *dest
)
2995 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2996 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2999 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
3000 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
3001 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
3002 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
3003 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
3004 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
3006 TRACE("(%p %x %d)\n", this, mask
, ch
);
3007 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
3010 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
3011 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
3012 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
3013 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
3014 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
3015 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
3016 const wchar_t *first
, const wchar_t *last
, short *dest
)
3018 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3019 return call_ctype_wchar_do_is(this, first
, last
, dest
);
3022 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3023 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3024 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
3025 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3026 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
3027 #if _MSVCP_VER <= 100
3028 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
3029 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3030 (this, mask, first, last))
3032 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
3033 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3034 (this, mask, first, last))
3036 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
3037 short mask
, const wchar_t *first
, const wchar_t *last
)
3039 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
3040 for(; first
<last
; first
++)
3041 if(!ctype_wchar_is_ch(this, mask
, *first
))
3046 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3047 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3048 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
3049 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3050 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
3051 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
3052 short mask
, const wchar_t *first
, const wchar_t *last
)
3054 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3055 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
3058 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3059 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3060 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
3061 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3062 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
3063 #if _MSVCP_VER <= 100
3064 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
3065 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3066 (this, mask, first, last))
3068 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
3069 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3070 (this, mask, first, last))
3072 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
3073 short mask
, const wchar_t *first
, const wchar_t *last
)
3075 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3076 for(; first
<last
; first
++)
3077 if(ctype_wchar_is_ch(this, mask
, *first
))
3082 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3083 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3084 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
3085 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3086 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
3087 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
3088 short mask
, const wchar_t *first
, const wchar_t *last
)
3090 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3091 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
3094 /* ??_7codecvt_base@std@@6B@ */
3095 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
3097 /* ??0codecvt_base@std@@QAE@I@Z */
3098 /* ??0codecvt_base@std@@QEAA@_K@Z */
3099 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
3100 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
3102 TRACE("(%p %lu)\n", this, refs
);
3103 locale_facet_ctor_refs(&this->facet
, refs
);
3104 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
3108 /* ??_Fcodecvt_base@std@@QAEXXZ */
3109 /* ??_Fcodecvt_base@std@@QEAAXXZ */
3110 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
3111 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
3113 return codecvt_base_ctor_refs(this, 0);
3116 /* ??1codecvt_base@std@@UAE@XZ */
3117 /* ??1codecvt_base@std@@UEAA@XZ */
3118 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
3119 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
3121 TRACE("(%p)\n", this);
3122 locale_facet_dtor(&this->facet
);
3125 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
3126 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
3128 TRACE("(%p %x)\n", this, flags
);
3130 /* we have an array, with the number of elements stored before the first object */
3131 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3133 for(i
=*ptr
-1; i
>=0; i
--)
3134 codecvt_base_dtor(this+i
);
3135 MSVCRT_operator_delete(ptr
);
3137 codecvt_base_dtor(this);
3139 MSVCRT_operator_delete(this);
3145 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3146 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3147 #if _MSVCP_VER <= 100
3148 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3149 MSVCP_bool, (const codecvt_base*), (this))
3151 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3152 MSVCP_bool, (const codecvt_base*), (this))
3154 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3155 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3157 TRACE("(%p)\n", this);
3161 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3162 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3163 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3164 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3166 TRACE("(%p)\n", this);
3167 return call_codecvt_base_do_always_noconv(this);
3170 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3171 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3172 #if _MSVCP_VER <= 100
3173 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3174 int, (const codecvt_base*), (this))
3176 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3177 int, (const codecvt_base*), (this))
3179 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3180 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3182 TRACE("(%p)\n", this);
3186 /* ?max_length@codecvt_base@std@@QBEHXZ */
3187 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3188 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3189 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3191 TRACE("(%p)\n", this);
3192 return call_codecvt_base_do_max_length(this);
3195 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3196 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3197 #if _MSVCP_VER <= 100
3198 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3199 int, (const codecvt_base*), (this))
3201 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3202 int, (const codecvt_base*), (this))
3204 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3205 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3207 TRACE("(%p)\n", this);
3211 /* ?encoding@codecvt_base@std@@QBEHXZ */
3212 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3213 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3214 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3216 TRACE("(%p)\n", this);
3217 return call_codecvt_base_do_encoding(this);
3220 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3221 locale_id codecvt_char_id
= {0};
3223 /* ??_7?$codecvt@DDH@std@@6B@ */
3224 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3226 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3227 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3228 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3229 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3231 TRACE("(%p %p)\n", this, locinfo
);
3234 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3235 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3236 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3237 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3239 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3240 codecvt_base_ctor_refs(&this->base
, refs
);
3241 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3245 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3246 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3247 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3248 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3250 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3253 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3254 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3255 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3256 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3258 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3261 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3262 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3263 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3264 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3265 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3266 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3268 TRACE("(%p)\n", this);
3269 codecvt_base_dtor(&this->base
);
3272 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3273 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3275 TRACE("(%p %x)\n", this, flags
);
3277 /* we have an array, with the number of elements stored before the first object */
3278 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3280 for(i
=*ptr
-1; i
>=0; i
--)
3281 codecvt_char_dtor(this+i
);
3282 MSVCRT_operator_delete(ptr
);
3284 codecvt_char_dtor(this);
3286 MSVCRT_operator_delete(this);
3292 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3293 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3294 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3296 TRACE("(%p %p)\n", facet
, loc
);
3298 if(facet
&& !*facet
) {
3299 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3301 ERR("Out of memory\n");
3302 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3305 codecvt_char_ctor((codecvt_char
*)*facet
);
3311 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3312 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3313 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3315 return codecvt_char__Getcat(facet
, locale_classic());
3318 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3320 static codecvt_char
*obj
= NULL
;
3323 const locale_facet
*fac
;
3325 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3326 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3328 _Lockit_dtor(&lock
);
3329 return (codecvt_char
*)fac
;
3333 _Lockit_dtor(&lock
);
3337 codecvt_char__Getcat(&fac
, loc
);
3338 obj
= (codecvt_char
*)fac
;
3339 call_locale_facet__Incref(&obj
->base
.facet
);
3340 locale_facet_register(&obj
->base
.facet
);
3341 _Lockit_dtor(&lock
);
3346 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3347 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3348 #if _MSVCP_VER <= 100
3349 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3350 CALL_VTBL_FUNC(this, 16, int, \
3351 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3352 (this, state, from, from_end, from_next, to, to_end, to_next))
3354 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3355 CALL_VTBL_FUNC(this, 24, int, \
3356 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3357 (this, state, from, from_end, from_next, to, to_end, to_next))
3359 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3360 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
3361 const char *from
, const char *from_end
, const char **from_next
,
3362 char *to
, char *to_end
, char **to_next
)
3364 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3365 from_next
, to
, to_end
, to_next
);
3368 return CODECVT_noconv
;
3371 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3372 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3373 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3374 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
3375 const char *from
, const char *from_end
, const char **from_next
,
3376 char *to
, char *to_end
, char **to_next
)
3378 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3379 from_next
, to
, to_end
, to_next
);
3380 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3381 to
, to_end
, to_next
);
3384 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3385 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3386 #if _MSVCP_VER <= 100
3387 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3388 CALL_VTBL_FUNC(this, 20, int, \
3389 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3390 (this, state, from, from_end, from_next, to, to_end, to_next))
3392 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3393 CALL_VTBL_FUNC(this, 28, int, \
3394 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3395 (this, state, from, from_end, from_next, to, to_end, to_next))
3397 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3398 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
3399 const char *from
, const char *from_end
, const char **from_next
,
3400 char *to
, char *to_end
, char **to_next
)
3402 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3403 from_end
, from_next
, to
, to_end
, to_next
);
3406 return CODECVT_noconv
;
3409 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3410 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3411 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3412 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
3413 const char *from
, const char *from_end
, const char **from_next
,
3414 char *to
, char *to_end
, char **to_next
)
3416 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3417 from_next
, to
, to_end
, to_next
);
3418 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3419 to
, to_end
, to_next
);
3422 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3423 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3424 #if _MSVCP_VER <= 100
3425 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3426 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3428 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3429 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3431 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3432 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3433 int *state
, char *to
, char *to_end
, char **to_next
)
3435 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3437 return CODECVT_noconv
;
3440 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3441 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3442 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3443 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3444 int *state
, char *to
, char *to_end
, char **to_next
)
3446 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3447 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3450 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3451 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3452 #if _MSVCP_VER <= 100
3453 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3454 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3455 (this, state, from, from_end, max))
3457 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3458 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3459 (this, state, from, from_end, max))
3461 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3462 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
3463 const char *from
, const char *from_end
, MSVCP_size_t max
)
3465 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3466 return (from_end
-from
> max
? max
: from_end
-from
);
3469 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3470 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3471 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3472 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
3473 const char *from
, const char *from_end
, MSVCP_size_t max
)
3475 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3476 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3479 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3480 locale_id codecvt_wchar_id
= {0};
3481 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3482 locale_id codecvt_short_id
= {0};
3484 /* ??_7?$codecvt@_WDH@std@@6B@ */
3485 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3486 /* ??_7?$codecvt@GDH@std@@6B@ */
3487 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3489 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3490 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3491 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3492 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3493 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3494 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3496 TRACE("(%p %p)\n", this, locinfo
);
3497 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3500 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3501 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3502 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3503 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3505 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3507 codecvt_base_ctor_refs(&this->base
, refs
);
3508 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3510 codecvt_wchar__Init(this, locinfo
);
3514 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3515 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3516 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3517 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3519 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3521 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3522 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3526 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3527 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3528 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3529 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3533 TRACE("(%p %ld)\n", this, refs
);
3535 _Locinfo_ctor(&locinfo
);
3536 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3537 _Locinfo_dtor(&locinfo
);
3541 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3542 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3543 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3544 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3548 TRACE("(%p %ld)\n", this, refs
);
3550 _Locinfo_ctor(&locinfo
);
3551 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3552 _Locinfo_dtor(&locinfo
);
3556 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3557 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3558 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3559 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3563 TRACE("(%p %s %ld)\n", this, name
, refs
);
3565 _Locinfo_ctor_cstr(&locinfo
, name
);
3566 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3567 _Locinfo_dtor(&locinfo
);
3571 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3572 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3573 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3574 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3576 return codecvt_wchar_ctor_refs(this, 0);
3579 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3580 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3581 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3582 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3584 return codecvt_short_ctor_refs(this, 0);
3587 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3588 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3589 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3590 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3591 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3592 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3593 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3594 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3596 TRACE("(%p)\n", this);
3597 codecvt_base_dtor(&this->base
);
3600 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3601 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3603 TRACE("(%p %x)\n", this, flags
);
3605 /* we have an array, with the number of elements stored before the first object */
3606 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3608 for(i
=*ptr
-1; i
>=0; i
--)
3609 codecvt_wchar_dtor(this+i
);
3610 MSVCRT_operator_delete(ptr
);
3612 codecvt_wchar_dtor(this);
3614 MSVCRT_operator_delete(this);
3620 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3621 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3622 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3624 TRACE("(%p %p)\n", facet
, loc
);
3626 if(facet
&& !*facet
) {
3629 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3631 ERR("Out of memory\n");
3632 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3636 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3637 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3638 _Locinfo_dtor(&locinfo
);
3644 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3645 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3646 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3648 return codecvt_wchar__Getcat(facet
, locale_classic());
3651 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3653 static codecvt_wchar
*obj
= NULL
;
3656 const locale_facet
*fac
;
3658 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3659 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3661 _Lockit_dtor(&lock
);
3662 return (codecvt_wchar
*)fac
;
3666 _Lockit_dtor(&lock
);
3670 codecvt_wchar__Getcat(&fac
, loc
);
3671 obj
= (codecvt_wchar
*)fac
;
3672 call_locale_facet__Incref(&obj
->base
.facet
);
3673 locale_facet_register(&obj
->base
.facet
);
3674 _Lockit_dtor(&lock
);
3679 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3680 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3681 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3683 TRACE("(%p %p)\n", facet
, loc
);
3685 if(facet
&& !*facet
) {
3688 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3690 ERR("Out of memory\n");
3691 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3695 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3696 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3697 _Locinfo_dtor(&locinfo
);
3703 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3704 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3705 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3707 return codecvt_short__Getcat(facet
, locale_classic());
3710 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3712 static codecvt_wchar
*obj
= NULL
;
3715 const locale_facet
*fac
;
3717 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3718 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3720 _Lockit_dtor(&lock
);
3721 return (codecvt_wchar
*)fac
;
3725 _Lockit_dtor(&lock
);
3729 codecvt_short__Getcat(&fac
, loc
);
3730 obj
= (codecvt_wchar
*)fac
;
3731 call_locale_facet__Incref(&obj
->base
.facet
);
3732 locale_facet_register(&obj
->base
.facet
);
3733 _Lockit_dtor(&lock
);
3738 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3739 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3740 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3743 return &codecvt_wchar_id
;
3746 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3747 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3748 locale_id
* __cdecl
codecvt_short__Id_func(void)
3751 return &codecvt_short_id
;
3754 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3755 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3756 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3757 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3758 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3759 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3761 TRACE("(%p)\n", this);
3765 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3766 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3767 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3768 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3769 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3770 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3772 TRACE("(%p)\n", this);
3776 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3777 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3778 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3779 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3780 #if _MSVCP_VER <= 100
3781 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3782 CALL_VTBL_FUNC(this, 16, int, \
3783 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3784 (this, state, from, from_end, from_next, to, to_end, to_next))
3786 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3787 CALL_VTBL_FUNC(this, 24, int, \
3788 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3789 (this, state, from, from_end, from_next, to, to_end, to_next))
3791 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3792 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3793 const char *from
, const char *from_end
, const char **from_next
,
3794 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3796 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3797 from_end
, from_next
, to
, to_end
, to_next
);
3802 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3803 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3805 *from_next
= from_end
;
3806 return CODECVT_partial
;
3808 return CODECVT_error
;
3822 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3823 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3824 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3825 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3826 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3827 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3828 const char *from
, const char *from_end
, const char **from_next
,
3829 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3831 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3832 from_end
, from_next
, to
, to_end
, to_next
);
3833 return call_codecvt_wchar_do_in(this, state
, from
,
3834 from_end
, from_next
, to
, to_end
, to_next
);
3837 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3838 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3839 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3840 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3841 #if _MSVCP_VER <= 100
3842 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3843 CALL_VTBL_FUNC(this, 20, int, \
3844 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3845 (this, state, from, from_end, from_next, to, to_end, to_next))
3847 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3848 CALL_VTBL_FUNC(this, 28, int, \
3849 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3850 (this, state, from, from_end, from_next, to, to_end, to_next))
3852 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3853 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3854 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3855 char *to
, char *to_end
, char **to_next
)
3857 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3858 from_end
, from_next
, to
, to_end
, to_next
);
3863 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3864 int old_state
= *state
, size
;
3865 char buf
[MB_LEN_MAX
];
3867 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3869 return CODECVT_error
;
3871 if(size
> from_end
-*from_next
) {
3873 return CODECVT_partial
;
3877 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3885 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3886 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3887 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3888 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3889 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3890 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3891 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3892 char *to
, char *to_end
, char **to_next
)
3894 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3895 from_end
, from_next
, to
, to_end
, to_next
);
3896 return call_codecvt_wchar_do_out(this, state
, from
,
3897 from_end
, from_next
, to
, to_end
, to_next
);
3900 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3901 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3902 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3903 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3904 #if _MSVCP_VER <= 100
3905 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3906 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3908 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3909 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3911 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3912 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3913 int *state
, char *to
, char *to_end
, char **to_next
)
3915 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3917 WARN("unexpected state: %x\n", *state
);
3923 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3924 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3925 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3926 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3927 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3928 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3929 int *state
, char *to
, char *to_end
, char **to_next
)
3931 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3932 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3935 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3936 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3937 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3938 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3939 #if _MSVCP_VER <= 100
3940 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3941 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3942 (this, state, from, from_end, max))
3944 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3945 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3946 (this, state, from, from_end, max))
3948 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3949 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3950 const char *from
, const char *from_end
, MSVCP_size_t max
)
3952 int tmp_state
= *state
, ret
=0;
3954 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3956 while(ret
<max
&& from
!=from_end
) {
3957 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3974 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3975 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3976 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3977 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3978 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3979 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3980 const char *from
, const char *from_end
, MSVCP_size_t max
)
3982 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3983 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3986 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3987 locale_id numpunct_char_id
= {0};
3989 /* ??_7?$numpunct@D@std@@6B@ */
3990 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3992 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3993 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3994 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3995 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3999 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4001 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
4002 this->false_name
= MSVCRT_operator_new(len
);
4003 if(this->false_name
)
4004 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
4006 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
4007 this->true_name
= MSVCRT_operator_new(len
);
4009 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
4012 this->grouping
= MSVCRT_operator_new(1);
4014 *(char*)this->grouping
= 0;
4019 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4021 len
= strlen(lc
->grouping
)+1;
4022 this->grouping
= MSVCRT_operator_new(len
);
4024 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4026 this->dp
= lc
->decimal_point
[0];
4027 this->sep
= lc
->thousands_sep
[0];
4030 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4031 MSVCRT_operator_delete((char*)this->grouping
);
4032 MSVCRT_operator_delete((char*)this->false_name
);
4033 MSVCRT_operator_delete((char*)this->true_name
);
4035 ERR("Out of memory\n");
4036 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4040 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
4041 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
4042 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
4043 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
4045 TRACE("(%p)\n", this);
4047 MSVCRT_operator_delete((char*)this->grouping
);
4048 MSVCRT_operator_delete((char*)this->false_name
);
4049 MSVCRT_operator_delete((char*)this->true_name
);
4052 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
4053 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4054 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
4055 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
4056 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4058 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4059 locale_facet_ctor_refs(&this->facet
, refs
);
4060 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4061 numpunct_char__Init(this, locinfo
, usedef
);
4065 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
4066 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
4067 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
4068 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
4069 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4073 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4074 locale_facet_ctor_refs(&this->facet
, refs
);
4075 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4077 _Locinfo_ctor_cstr(&locinfo
, name
);
4078 numpunct_char__Init(this, &locinfo
, usedef
);
4079 _Locinfo_dtor(&locinfo
);
4083 /* ??0?$numpunct@D@std@@QAE@I@Z */
4084 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
4085 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
4086 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
4088 TRACE("(%p %lu)\n", this, refs
);
4089 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
4092 /* ??_F?$numpunct@D@std@@QAEXXZ */
4093 /* ??_F?$numpunct@D@std@@QEAAXXZ */
4094 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
4095 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
4097 return numpunct_char_ctor_refs(this, 0);
4100 /* ??1?$numpunct@D@std@@UAE@XZ */
4101 /* ??1?$numpunct@D@std@@UEAA@XZ */
4102 /* ??1?$numpunct@D@std@@MAE@XZ */
4103 /* ??1?$numpunct@D@std@@MEAA@XZ */
4104 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
4105 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
4107 TRACE("(%p)\n", this);
4108 numpunct_char__Tidy(this);
4111 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
4112 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
4114 TRACE("(%p %x)\n", this, flags
);
4116 /* we have an array, with the number of elements stored before the first object */
4117 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4119 for(i
=*ptr
-1; i
>=0; i
--)
4120 numpunct_char_dtor(this+i
);
4121 MSVCRT_operator_delete(ptr
);
4123 numpunct_char_dtor(this);
4125 MSVCRT_operator_delete(this);
4131 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4132 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4133 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4135 TRACE("(%p %p)\n", facet
, loc
);
4137 if(facet
&& !*facet
) {
4138 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4140 ERR("Out of memory\n");
4141 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4144 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4145 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4151 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4152 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4153 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4155 return numpunct_char__Getcat(facet
, locale_classic());
4158 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4160 static numpunct_char
*obj
= NULL
;
4163 const locale_facet
*fac
;
4165 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4166 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4168 _Lockit_dtor(&lock
);
4169 return (numpunct_char
*)fac
;
4173 _Lockit_dtor(&lock
);
4177 numpunct_char__Getcat(&fac
, loc
);
4178 obj
= (numpunct_char
*)fac
;
4179 call_locale_facet__Incref(&obj
->facet
);
4180 locale_facet_register(&obj
->facet
);
4181 _Lockit_dtor(&lock
);
4186 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4187 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4188 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4189 #if _MSVCP_VER <= 100
4190 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4191 char, (const numpunct_char *this), (this))
4193 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4194 char, (const numpunct_char *this), (this))
4196 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4198 TRACE("(%p)\n", this);
4202 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4203 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4204 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4205 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4207 TRACE("(%p)\n", this);
4208 return call_numpunct_char_do_decimal_point(this);
4211 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4212 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4213 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4214 #if _MSVCP_VER <= 100
4215 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4216 char, (const numpunct_char*), (this))
4218 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4219 char, (const numpunct_char*), (this))
4221 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4223 TRACE("(%p)\n", this);
4227 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4228 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4229 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4230 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4232 TRACE("(%p)\n", this);
4233 return call_numpunct_char_do_thousands_sep(this);
4236 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4237 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4238 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4239 #if _MSVCP_VER <= 100
4240 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4241 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4243 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4244 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4246 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4247 const numpunct_char
*this, basic_string_char
*ret
)
4249 TRACE("(%p)\n", this);
4250 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4253 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4254 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4255 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4256 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4258 TRACE("(%p)\n", this);
4259 return call_numpunct_char_do_grouping(this, ret
);
4262 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4263 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4264 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4265 #if _MSVCP_VER <= 100
4266 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4267 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4269 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4270 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4272 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4273 const numpunct_char
*this, basic_string_char
*ret
)
4275 TRACE("(%p)\n", this);
4276 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4279 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4280 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4281 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4282 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4284 TRACE("(%p)\n", this);
4285 return call_numpunct_char_do_falsename(this, ret
);
4288 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4289 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4290 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4291 #if _MSVCP_VER <= 100
4292 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4293 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4295 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4296 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4298 basic_string_char
* __thiscall
numpunct_char_do_truename(
4299 const numpunct_char
*this, basic_string_char
*ret
)
4301 TRACE("(%p)\n", this);
4302 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4305 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4306 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4307 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4308 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4310 TRACE("(%p)\n", this);
4311 return call_numpunct_char_do_truename(this, ret
);
4314 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4315 locale_id numpunct_wchar_id
= {0};
4316 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4317 locale_id numpunct_short_id
= {0};
4319 /* ??_7?$numpunct@_W@std@@6B@ */
4320 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4321 /* ??_7?$numpunct@G@std@@6B@ */
4322 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4324 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4325 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4326 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4327 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4328 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4329 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4330 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4332 const char *to_convert
;
4336 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4338 _Locinfo__Getcvt(locinfo
, &cvt
);
4340 to_convert
= _Locinfo__Getfalse(locinfo
);
4341 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4342 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4343 if(this->false_name
)
4344 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4345 (wchar_t*)this->false_name
, len
);
4347 to_convert
= _Locinfo__Gettrue(locinfo
);
4348 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4349 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4351 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4352 (wchar_t*)this->true_name
, len
);
4355 this->grouping
= MSVCRT_operator_new(1);
4357 *(char*)this->grouping
= 0;
4362 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4364 len
= strlen(lc
->grouping
)+1;
4365 this->grouping
= MSVCRT_operator_new(len
);
4367 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4369 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4370 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4373 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4374 MSVCRT_operator_delete((char*)this->grouping
);
4375 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4376 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4378 ERR("Out of memory\n");
4379 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4383 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4384 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4385 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4386 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4387 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4388 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4390 TRACE("(%p)\n", this);
4392 MSVCRT_operator_delete((char*)this->grouping
);
4393 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4394 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4397 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4398 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4399 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4400 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4401 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4403 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4404 locale_facet_ctor_refs(&this->facet
, refs
);
4405 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4406 numpunct_wchar__Init(this, locinfo
, usedef
);
4410 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4411 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4412 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4413 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4414 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4416 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4417 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4421 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4422 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4423 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4424 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4425 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4429 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4430 locale_facet_ctor_refs(&this->facet
, refs
);
4431 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4433 _Locinfo_ctor_cstr(&locinfo
, name
);
4434 numpunct_wchar__Init(this, &locinfo
, usedef
);
4435 _Locinfo_dtor(&locinfo
);
4439 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4440 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4441 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4442 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4443 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4445 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4446 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4450 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4451 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4452 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4453 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4455 TRACE("(%p %lu)\n", this, refs
);
4456 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4459 /* ??0?$numpunct@G@std@@QAE@I@Z */
4460 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4461 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4462 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4464 numpunct_wchar_ctor_refs(this, refs
);
4465 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4469 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4470 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4471 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4472 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4474 return numpunct_wchar_ctor_refs(this, 0);
4477 /* ??_F?$numpunct@G@std@@QAEXXZ */
4478 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4479 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4480 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4482 return numpunct_short_ctor_refs(this, 0);
4485 /* ??1?$numpunct@G@std@@UAE@XZ */
4486 /* ??1?$numpunct@G@std@@UEAA@XZ */
4487 /* ??1?$numpunct@_W@std@@MAE@XZ */
4488 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4489 /* ??1?$numpunct@G@std@@MAE@XZ */
4490 /* ??1?$numpunct@G@std@@MEAA@XZ */
4491 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4492 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4494 TRACE("(%p)\n", this);
4495 numpunct_wchar__Tidy(this);
4498 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4499 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4501 TRACE("(%p %x)\n", this, flags
);
4503 /* we have an array, with the number of elements stored before the first object */
4504 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4506 for(i
=*ptr
-1; i
>=0; i
--)
4507 numpunct_wchar_dtor(this+i
);
4508 MSVCRT_operator_delete(ptr
);
4510 numpunct_wchar_dtor(this);
4512 MSVCRT_operator_delete(this);
4518 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4519 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4520 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4522 TRACE("(%p %p)\n", facet
, loc
);
4524 if(facet
&& !*facet
) {
4525 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4527 ERR("Out of memory\n");
4528 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4531 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4532 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4538 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4539 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4540 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4542 return numpunct_wchar__Getcat(facet
, locale_classic());
4545 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4547 static numpunct_wchar
*obj
= NULL
;
4550 const locale_facet
*fac
;
4552 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4553 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4555 _Lockit_dtor(&lock
);
4556 return (numpunct_wchar
*)fac
;
4560 _Lockit_dtor(&lock
);
4564 numpunct_wchar__Getcat(&fac
, loc
);
4565 obj
= (numpunct_wchar
*)fac
;
4566 call_locale_facet__Incref(&obj
->facet
);
4567 locale_facet_register(&obj
->facet
);
4568 _Lockit_dtor(&lock
);
4573 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4574 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4575 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4577 TRACE("(%p %p)\n", facet
, loc
);
4579 if(facet
&& !*facet
) {
4580 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4582 ERR("Out of memory\n");
4583 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4586 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4587 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4593 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4594 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4595 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4597 return numpunct_short__Getcat(facet
, locale_classic());
4600 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4602 static numpunct_wchar
*obj
= NULL
;
4605 const locale_facet
*fac
;
4607 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4608 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4610 _Lockit_dtor(&lock
);
4611 return (numpunct_wchar
*)fac
;
4615 _Lockit_dtor(&lock
);
4619 numpunct_short__Getcat(&fac
, loc
);
4620 obj
= (numpunct_wchar
*)fac
;
4621 call_locale_facet__Incref(&obj
->facet
);
4622 locale_facet_register(&obj
->facet
);
4623 _Lockit_dtor(&lock
);
4628 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4629 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4630 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4631 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4632 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4633 #if _MSVCP_VER <= 100
4634 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4635 wchar_t, (const numpunct_wchar *this), (this))
4637 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4638 wchar_t, (const numpunct_wchar *this), (this))
4640 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4642 TRACE("(%p)\n", this);
4646 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4647 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4648 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4649 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4650 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4651 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4653 TRACE("(%p)\n", this);
4654 return call_numpunct_wchar_do_decimal_point(this);
4657 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4658 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4659 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4660 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4661 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4662 #if _MSVCP_VER <= 100
4663 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4664 wchar_t, (const numpunct_wchar *this), (this))
4666 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4667 wchar_t, (const numpunct_wchar *this), (this))
4669 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4671 TRACE("(%p)\n", this);
4675 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4676 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4677 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4678 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4679 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4680 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4682 TRACE("(%p)\n", this);
4683 return call_numpunct_wchar_do_thousands_sep(this);
4686 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4687 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4688 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4689 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4690 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4691 #if _MSVCP_VER <= 100
4692 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4693 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4695 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4696 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4698 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4700 TRACE("(%p)\n", this);
4701 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4704 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4705 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4706 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4707 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4708 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4709 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4711 TRACE("(%p)\n", this);
4712 return call_numpunct_wchar_do_grouping(this, ret
);
4715 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4716 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4717 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4718 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4719 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4720 #if _MSVCP_VER <= 100
4721 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4722 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4724 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4725 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4727 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4729 TRACE("(%p)\n", this);
4730 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4733 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4734 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4735 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4736 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4737 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4738 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4740 TRACE("(%p)\n", this);
4741 return call_numpunct_wchar_do_falsename(this, ret
);
4744 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4745 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4746 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4747 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4748 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4749 #if _MSVCP_VER <= 100
4750 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4751 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4753 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4754 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4756 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4758 TRACE("(%p)\n", this);
4759 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4762 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4763 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4764 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4765 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4766 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4767 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4769 TRACE("(%p)\n", this);
4770 return call_numpunct_wchar_do_truename(this, ret
);
4773 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4775 double ret
= strtod(buf
, buf_end
);
4778 ret
*= pow(10, exp
);
4782 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4788 ret
= _Stod(buf
, buf_end
, exp
);
4798 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4800 return _Stod(buf
, buf_end
, exp
);
4803 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4805 return _Stodx(buf
, buf_end
, exp
, err
);
4808 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4810 return _strtoi64(buf
, buf_end
, base
);
4813 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4819 ret
= _strtoi64(buf
, buf_end
, base
);
4829 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4831 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4832 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4837 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4839 return _strtoui64(buf
, buf_end
, base
);
4842 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4844 unsigned __int64 ret
;
4848 ret
= _strtoui64(buf
, buf_end
, base
);
4858 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4861 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4862 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4864 return buf
[0]=='-' ? -i
: i
;
4867 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4869 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4870 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4872 return buf
[0]=='-' ? -i
: i
;
4875 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4876 locale_id num_get_wchar_id
= {0};
4877 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4878 locale_id num_get_short_id
= {0};
4880 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4881 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4882 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4883 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4885 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4886 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4887 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4888 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4889 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4890 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4892 TRACE("(%p %p)\n", this, locinfo
);
4893 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4896 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4897 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4898 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4899 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4900 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4902 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4904 locale_facet_ctor_refs(&this->facet
, refs
);
4905 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4907 num_get_wchar__Init(this, locinfo
);
4911 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4912 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4913 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4914 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4915 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4917 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4918 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4922 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4923 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4924 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4925 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4929 TRACE("(%p %lu)\n", this, refs
);
4931 _Locinfo_ctor(&locinfo
);
4932 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4933 _Locinfo_dtor(&locinfo
);
4937 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4938 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4939 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4940 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4942 num_get_wchar_ctor_refs(this, refs
);
4943 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4947 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4948 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4949 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4950 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4952 return num_get_wchar_ctor_refs(this, 0);
4955 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4956 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4957 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4958 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4960 return num_get_short_ctor_refs(this, 0);
4963 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
4964 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
4965 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4966 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4967 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4968 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4969 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4970 void __thiscall
num_get_wchar_dtor(num_get
*this)
4972 TRACE("(%p)\n", this);
4973 locale_facet_dtor(&this->facet
);
4976 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4977 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4979 TRACE("(%p %x)\n", this, flags
);
4981 /* we have an array, with the number of elements stored before the first object */
4982 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4984 for(i
=*ptr
-1; i
>=0; i
--)
4985 num_get_wchar_dtor(this+i
);
4986 MSVCRT_operator_delete(ptr
);
4988 num_get_wchar_dtor(this);
4990 MSVCRT_operator_delete(this);
4996 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4997 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4998 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
5000 TRACE("(%p %p)\n", facet
, loc
);
5002 if(facet
&& !*facet
) {
5005 *facet
= MSVCRT_operator_new(sizeof(num_get
));
5007 ERR("Out of memory\n");
5008 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
5012 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
5013 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
5014 _Locinfo_dtor(&locinfo
);
5020 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5021 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5022 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
5024 return num_get_wchar__Getcat(facet
, locale_classic());
5027 num_get
* num_get_wchar_use_facet(const locale
*loc
)
5029 static num_get
*obj
= NULL
;
5032 const locale_facet
*fac
;
5034 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5035 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
5037 _Lockit_dtor(&lock
);
5038 return (num_get
*)fac
;
5042 _Lockit_dtor(&lock
);
5046 num_get_wchar__Getcat(&fac
, loc
);
5047 obj
= (num_get
*)fac
;
5048 call_locale_facet__Incref(&obj
->facet
);
5049 locale_facet_register(&obj
->facet
);
5050 _Lockit_dtor(&lock
);
5055 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5056 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5057 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
5059 if(facet
&& !*facet
) {
5060 num_get_wchar__Getcat(facet
, loc
);
5061 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
5067 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5068 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5069 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
5071 return num_get_short__Getcat(facet
, locale_classic());
5074 num_get
* num_get_short_use_facet(const locale
*loc
)
5076 static num_get
*obj
= NULL
;
5079 const locale_facet
*fac
;
5081 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5082 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
5084 _Lockit_dtor(&lock
);
5085 return (num_get
*)fac
;
5089 _Lockit_dtor(&lock
);
5093 num_get_short__Getcat(&fac
, loc
);
5094 obj
= (num_get
*)fac
;
5095 call_locale_facet__Incref(&obj
->facet
);
5096 locale_facet_register(&obj
->facet
);
5097 _Lockit_dtor(&lock
);
5102 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5103 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
5105 basic_string_char grouping_bstr
;
5106 basic_string_char groups_found
;
5107 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
5108 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
5109 wchar_t sep
= 0, digits
[11], *digits_pos
;
5110 const char *grouping
, *groups
;
5111 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5113 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5116 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5119 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5120 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5121 #if _MSVCP_VER >= 70
5122 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5126 MSVCP_basic_string_char_ctor(&groups_found
);
5128 istreambuf_iterator_wchar_val(first
);
5130 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5132 istreambuf_iterator_wchar_inc(first
);
5133 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5135 istreambuf_iterator_wchar_inc(first
);
5138 /* read possibly grouped numbers before decimal */
5139 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5140 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5141 if(sep
&& first
->val
==sep
) {
5142 if(!groups_no
) break; /* empty group - stop parsing */
5143 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5150 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5151 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5152 if(!got_nonzero
&& first
->val
== digits
[0])
5159 *dest
++ = '0'+digits_pos
-digits
;
5161 exp
++; /* too many digits, just multiply by 10 */
5162 if(sep
&& groups_no
<CHAR_MAX
)
5167 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5168 if(got_digit
&& !got_nonzero
)
5171 /* get decimal, if any */
5172 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5174 *dest
++ = *localeconv()->decimal_point
;
5175 istreambuf_iterator_wchar_inc(first
);
5178 /* read non-grouped after decimal */
5179 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5180 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5182 else if(dest
<num_end
) {
5184 *dest
++ = '0'+digits_pos
-digits
;
5188 /* read exponent, if any */
5189 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
5191 istreambuf_iterator_wchar_inc(first
);
5193 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5195 istreambuf_iterator_wchar_inc(first
);
5196 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5198 istreambuf_iterator_wchar_inc(first
);
5201 got_digit
= got_nonzero
= FALSE
;
5203 /* skip any leading zeroes */
5204 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5207 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5208 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5211 *dest
++ = '0'+digits_pos
-digits
;
5214 /* if just found zeroes for exponent, use that */
5215 if(got_digit
&& !got_nonzero
)
5223 if(sep
&& groups_no
)
5224 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5226 if(!cur_group
) /* no groups, skip loop */
5228 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5229 error
= TRUE
; /* trailing empty */
5231 for(; cur_group
>=0 && !error
; cur_group
--) {
5232 if(*grouping
== CHAR_MAX
) {
5236 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5237 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5240 }else if(grouping
[1]) {
5244 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5246 MSVCP_basic_string_char_dtor(&groups_found
);
5256 /* ?_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 */
5257 /* ?_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 */
5258 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5259 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5261 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5264 /* ?_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 */
5265 /* ?_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 */
5266 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5267 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5269 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5272 /* ?_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 */
5273 /* ?_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 */
5274 /* ?_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 */
5275 /* ?_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 */
5276 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5277 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5279 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5283 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5284 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5286 wchar_t digits
[23], *digits_pos
, sep
= 0;
5287 basic_string_char grouping_bstr
;
5288 basic_string_char groups_found
;
5289 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5290 char *dest_beg
= dest
, *dest_end
= dest
+24;
5291 const char *grouping
, *groups
;
5292 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5294 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5297 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5298 for(i
=0; i
<6; i
++) {
5299 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5300 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5303 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5304 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5305 #if _MSVCP_VER >= 70
5306 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5309 basefield
= fmtflags
& FMTFLAG_basefield
;
5310 if(basefield
== FMTFLAG_oct
)
5312 else if(basefield
== FMTFLAG_hex
)
5313 base
= 22; /* equal to the size of digits buffer */
5319 istreambuf_iterator_wchar_val(first
);
5320 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5322 istreambuf_iterator_wchar_inc(first
);
5323 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5325 istreambuf_iterator_wchar_inc(first
);
5328 if(first
->strbuf
&& first
->val
==digits
[0]) {
5330 istreambuf_iterator_wchar_inc(first
);
5331 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5332 if(!base
|| base
== 22) {
5334 istreambuf_iterator_wchar_inc(first
);
5344 if(!base
) base
= 10;
5349 MSVCP_basic_string_char_ctor(&groups_found
);
5350 if(found_zero
) ++groups_no
;
5353 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5354 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5355 if(sep
&& first
->val
==sep
) {
5356 if(!groups_no
) break; /* empty group - stop parsing */
5357 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5365 if(dest_empty
&& first
->val
== digits
[0]) {
5371 /* skip digits that can't be copied to dest buffer, other
5372 * functions are responsible for detecting overflows */
5374 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5375 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5376 'A'+digits_pos
-digits
-16));
5377 if(sep
&& groups_no
<CHAR_MAX
)
5382 if(sep
&& groups_no
)
5383 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5385 if(!cur_group
) { /* no groups, skip loop */
5387 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5388 error
= TRUE
; /* trailing empty */
5392 for(; cur_group
>=0 && !error
; cur_group
--) {
5393 if(*grouping
== CHAR_MAX
) {
5397 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5398 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5401 }else if(grouping
[1]) {
5406 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5408 MSVCP_basic_string_char_dtor(&groups_found
);
5415 }else if(dest_empty
)
5419 return (base
==22 ? 16 : base
);
5422 /* ?_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 */
5423 /* ?_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 */
5424 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5425 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5427 return num_get__Getifld(this, dest
, first
, last
,
5428 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5431 /* ?_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 */
5432 /* ?_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 */
5433 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5434 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5436 return num_get__Getifld(this, dest
, first
, last
,
5437 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5440 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5441 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5442 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5443 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5444 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5445 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5447 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5451 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5452 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5453 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5454 void **pval
, numpunct_wchar
*numpunct
)
5460 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5462 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5463 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5464 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5465 *state
|= IOSTATE_failbit
;
5466 else if(end
!=tmp
&& !err
)
5467 *pval
= (void*)((INT_PTR
)v
);
5469 *state
|= IOSTATE_failbit
;
5472 *state
|= IOSTATE_eofbit
;
5478 /* ?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 */
5479 /* ?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 */
5480 #if _MSVCP_VER <= 100
5481 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5482 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5483 (this, ret, first, last, base, state, pval))
5485 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5486 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5487 (this, ret, first, last, base, state, pval))
5489 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5490 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5491 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5493 return num_get_do_get_void(this, ret
, first
, last
, base
,
5494 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5497 /* ?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 */
5498 /* ?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 */
5499 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5500 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5501 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5503 return num_get_do_get_void(this, ret
, first
, last
, base
,
5504 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5507 /* ?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 */
5508 /* ?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 */
5509 /* ?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 */
5510 /* ?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 */
5511 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5512 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5513 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5515 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5516 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5519 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5520 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5521 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5522 double *pval
, numpunct_wchar
*numpunct
)
5528 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5530 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5531 if(end
!=tmp
&& !err
)
5534 *state
|= IOSTATE_failbit
;
5537 *state
|= IOSTATE_eofbit
;
5543 /* ?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 */
5544 /* ?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 */
5545 /* ?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 */
5546 /* ?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 */
5547 #if _MSVCP_VER <= 100
5548 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5549 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5550 (this, ret, first, last, base, state, pval))
5551 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5552 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5553 (this, ret, first, last, base, state, pval))
5555 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5556 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5557 (this, ret, first, last, base, state, pval))
5558 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5559 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5560 (this, ret, first, last, base, state, pval))
5562 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5563 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5564 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5566 return num_get_do_get_double(this, ret
, first
, last
, base
,
5567 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5570 /* ?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 */
5571 /* ?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 */
5572 /* ?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 */
5573 /* ?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 */
5574 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5575 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5576 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5578 return num_get_do_get_double(this, ret
, first
, last
, base
,
5579 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5582 /* ?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 */
5583 /* ?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 */
5584 /* ?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 */
5585 /* ?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 */
5586 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5587 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5588 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5590 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5591 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5594 /* ?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 */
5595 /* ?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 */
5596 /* ?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 */
5597 /* ?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 */
5598 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5599 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5600 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5602 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5603 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5606 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5607 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5608 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5609 float *pval
, numpunct_wchar
*numpunct
)
5615 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5617 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5618 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5619 if(end
!=tmp
&& !err
)
5622 *state
|= IOSTATE_failbit
;
5625 *state
|= IOSTATE_eofbit
;
5631 /* ?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 */
5632 /* ?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 */
5633 #if _MSVCP_VER <= 100
5634 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5635 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5636 (this, ret, first, last, base, state, pval))
5638 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5639 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5640 (this, ret, first, last, base, state, pval))
5642 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5643 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5644 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5646 return num_get_do_get_float(this, ret
, first
, last
, base
,
5647 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5650 /* ?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 */
5651 /* ?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 */
5652 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5653 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5654 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5656 return num_get_do_get_float(this, ret
, first
, last
, base
,
5657 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5660 /* ?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 */
5661 /* ?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 */
5662 /* ?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 */
5663 /* ?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 */
5664 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5665 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5666 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5668 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5669 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5672 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5673 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5674 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5675 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5681 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5683 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5684 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5685 if(end
!=tmp
&& !err
)
5688 *state
|= IOSTATE_failbit
;
5691 *state
|= IOSTATE_eofbit
;
5697 /* ?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 */
5698 /* ?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 */
5699 #if _MSVCP_VER <= 100
5700 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5701 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5702 (this, ret, first, last, base, state, pval))
5704 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5705 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5706 (this, ret, first, last, base, state, pval))
5708 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5709 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5710 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5712 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5713 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5716 /* ?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 */
5717 /* ?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 */
5718 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5719 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5720 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5722 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5723 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5726 /* ?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 */
5727 /* ?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 */
5728 /* ?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 */
5729 /* ?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 */
5730 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5731 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5732 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5734 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5735 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5738 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5739 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5740 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5741 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5747 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5749 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5750 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5751 if(end
!=tmp
&& !err
)
5754 *state
|= IOSTATE_failbit
;
5757 *state
|= IOSTATE_eofbit
;
5763 /* ?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 */
5764 /* ?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 */
5765 #if _MSVCP_VER <= 100
5766 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5767 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5768 (this, ret, first, last, base, state, pval))
5770 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5771 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5772 (this, ret, first, last, base, state, pval))
5774 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5775 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5776 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5778 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5779 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5782 /* ?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 */
5783 /* ?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 */
5784 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5785 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5786 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5788 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5789 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5792 /* ?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 */
5793 /* ?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 */
5794 /* ?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 */
5795 /* ?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 */
5796 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5797 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5798 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5800 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5801 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5804 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5805 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5806 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5807 ULONG
*pval
, numpunct_wchar
*numpunct
)
5813 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5815 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5816 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5817 if(end
!=tmp
&& !err
)
5820 *state
|= IOSTATE_failbit
;
5823 *state
|= IOSTATE_eofbit
;
5829 /* ?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 */
5830 /* ?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 */
5831 #if _MSVCP_VER <= 100
5832 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5833 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5834 (this, ret, first, last, base, state, pval))
5836 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5837 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5838 (this, ret, first, last, base, state, pval))
5840 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5841 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5842 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5844 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5845 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5848 /* ?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 */
5849 /* ?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 */
5850 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5851 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5852 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5854 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5855 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5858 /* ?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 */
5859 /* ?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 */
5860 /* ?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 */
5861 /* ?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 */
5862 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5863 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5864 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5866 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5867 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5870 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5871 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5872 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5873 LONG
*pval
, numpunct_wchar
*numpunct
)
5879 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5881 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5882 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5883 if(end
!=tmp
&& !err
)
5886 *state
|= IOSTATE_failbit
;
5889 *state
|= IOSTATE_eofbit
;
5895 /* ?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 */
5896 /* ?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 */
5897 #if _MSVCP_VER <= 100
5898 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5899 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5900 (this, ret, first, last, base, state, pval))
5902 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5903 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5904 (this, ret, first, last, base, state, pval))
5906 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5907 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5908 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5910 return num_get_do_get_long(this, ret
, first
, last
, base
,
5911 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5914 /* ?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 */
5915 /* ?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 */
5916 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5917 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5918 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5920 return num_get_do_get_long(this, ret
, first
, last
, base
,
5921 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5924 /* ?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 */
5925 /* ?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 */
5926 /* ?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 */
5927 /* ?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 */
5928 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5929 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5930 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5932 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5933 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5936 /* ?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 */
5937 /* ?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 */
5938 #if _MSVCP_VER <= 100
5939 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5940 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5941 (this, ret, first, last, base, state, pval))
5943 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5944 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5945 (this, ret, first, last, base, state, pval))
5947 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5948 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5949 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5951 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5952 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5955 /* ?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 */
5956 /* ?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 */
5957 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5958 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5959 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5961 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5962 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5965 /* ?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 */
5966 /* ?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 */
5967 /* ?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 */
5968 /* ?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 */
5969 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5970 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5971 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5973 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5974 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5977 /* ?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 */
5978 /* ?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 */
5979 #if _MSVCP_VER <= 100
5980 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5981 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5982 (this, ret, first, last, base, state, pval))
5984 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
5985 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5986 (this, ret, first, last, base, state, pval))
5988 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5989 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5990 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5993 char tmp
[25], *beg
, *end
;
5996 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5998 b
= num_get_wchar__Getifld(this, tmp
,
5999 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6000 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6001 v
= _Stoulx(beg
, &end
, b
, &err
);
6003 if(v
!= (ULONG
)((unsigned short)v
))
6004 *state
|= IOSTATE_failbit
;
6005 else if(end
!=beg
&& !err
)
6006 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6008 *state
|= IOSTATE_failbit
;
6011 *state
|= IOSTATE_eofbit
;
6017 /* ?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 */
6018 /* ?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 */
6019 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
6020 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6021 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6023 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
6027 /* ?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 */
6028 /* ?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 */
6029 /* ?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@ */
6030 /* ?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 */
6031 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
6032 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6033 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6035 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6036 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6039 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
6040 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
6041 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
6042 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
6044 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6046 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6047 basic_string_wchar false_bstr
, true_bstr
;
6048 const wchar_t *pfalse
, *ptrue
;
6050 numpunct_wchar_falsename(numpunct
, &false_bstr
);
6051 numpunct_wchar_truename(numpunct
, &true_bstr
);
6052 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
6053 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
6055 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
6056 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6058 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6061 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6063 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6072 istreambuf_iterator_wchar_inc(&first
);
6074 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6083 *state
|= IOSTATE_failbit
;
6085 MSVCP_basic_string_wchar_dtor(&false_bstr
);
6086 MSVCP_basic_string_wchar_dtor(&true_bstr
);
6090 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
6091 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
6093 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6096 *state
|= IOSTATE_failbit
;
6100 *state
|= IOSTATE_eofbit
;
6101 memcpy(ret
, &first
, sizeof(first
));
6105 /* ?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 */
6106 /* ?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 */
6107 #if _MSVCP_VER <= 100
6108 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
6109 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6110 (this, ret, first, last, base, state, pval))
6112 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
6113 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6114 (this, ret, first, last, base, state, pval))
6116 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
6117 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6118 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6120 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6121 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
6124 /* ?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 */
6125 /* ?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 */
6126 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
6127 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6128 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6130 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6131 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
6134 /* ?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 */
6135 /* ?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 */
6136 /* ?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 */
6137 /* ?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 */
6138 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6139 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6140 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6142 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6143 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6146 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6147 locale_id num_get_char_id
= {0};
6149 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6150 extern const vtable_ptr MSVCP_num_get_char_vtable
;
6152 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6153 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6154 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6155 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6157 TRACE("(%p %p)\n", this, locinfo
);
6158 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6161 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6162 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6163 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6164 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6165 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6167 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
6169 locale_facet_ctor_refs(&this->facet
, refs
);
6170 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
6172 num_get_char__Init(this, locinfo
);
6176 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6177 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6178 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6179 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
6183 TRACE("(%p %lu)\n", this, refs
);
6185 _Locinfo_ctor(&locinfo
);
6186 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6187 _Locinfo_dtor(&locinfo
);
6191 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6192 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6193 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6194 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6196 return num_get_char_ctor_refs(this, 0);
6199 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6200 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6201 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6202 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6203 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6204 void __thiscall
num_get_char_dtor(num_get
*this)
6206 TRACE("(%p)\n", this);
6207 locale_facet_dtor(&this->facet
);
6210 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6211 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6213 TRACE("(%p %x)\n", this, flags
);
6215 /* we have an array, with the number of elements stored before the first object */
6216 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6218 for(i
=*ptr
-1; i
>=0; i
--)
6219 num_get_char_dtor(this+i
);
6220 MSVCRT_operator_delete(ptr
);
6222 num_get_char_dtor(this);
6224 MSVCRT_operator_delete(this);
6230 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6231 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6232 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6234 TRACE("(%p %p)\n", facet
, loc
);
6236 if(facet
&& !*facet
) {
6239 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6241 ERR("Out of memory\n");
6242 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6246 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6247 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6248 _Locinfo_dtor(&locinfo
);
6254 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6255 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6256 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6258 return num_get_char__Getcat(facet
, locale_classic());
6261 num_get
* num_get_char_use_facet(const locale
*loc
)
6263 static num_get
*obj
= NULL
;
6266 const locale_facet
*fac
;
6268 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6269 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6271 _Lockit_dtor(&lock
);
6272 return (num_get
*)fac
;
6276 _Lockit_dtor(&lock
);
6280 num_get_char__Getcat(&fac
, loc
);
6281 obj
= (num_get
*)fac
;
6282 call_locale_facet__Incref(&obj
->facet
);
6283 locale_facet_register(&obj
->facet
);
6284 _Lockit_dtor(&lock
);
6289 /* ?_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 */
6290 /* ?_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 */
6291 /* Copies number to dest buffer, validates grouping and skips separators.
6292 * Updates first so it points past the number, all digits are skipped.
6293 * Returns how exponent needs to changed.
6294 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6295 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
6297 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6298 istreambuf_iterator_char
*last
, const locale
*loc
)
6300 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6301 basic_string_char grouping_bstr
;
6302 basic_string_char groups_found
;
6303 int groups_no
= 0, cur_group
= 0, exp
= 0;
6304 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6305 const char *grouping
, *groups
;
6306 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6308 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6310 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6311 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6312 #if _MSVCP_VER >= 70
6313 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6317 MSVCP_basic_string_char_ctor(&groups_found
);
6319 istreambuf_iterator_char_val(first
);
6321 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6322 *dest
++ = first
->val
;
6323 istreambuf_iterator_char_inc(first
);
6326 /* read possibly grouped numbers before decimal */
6327 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6328 if(first
->val
<'0' || first
->val
>'9') {
6329 if(sep
&& first
->val
==sep
) {
6330 if(!groups_no
) break; /* empty group - stop parsing */
6331 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6338 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6339 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6340 if(!got_nonzero
&& first
->val
== '0')
6347 *dest
++ = first
->val
;
6349 exp
++; /* too many digits, just multiply by 10 */
6350 if(sep
&& groups_no
<CHAR_MAX
)
6355 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6356 if(got_digit
&& !got_nonzero
)
6359 /* get decimal, if any */
6360 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6362 *dest
++ = *localeconv()->decimal_point
;
6363 istreambuf_iterator_char_inc(first
);
6366 /* read non-grouped after decimal */
6367 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6368 if(first
->val
<'0' || first
->val
>'9')
6370 else if(dest
<num_end
) {
6372 *dest
++ = first
->val
;
6376 /* read exponent, if any */
6377 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6378 *dest
++ = first
->val
;
6379 istreambuf_iterator_char_inc(first
);
6381 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6382 *dest
++ = first
->val
;
6383 istreambuf_iterator_char_inc(first
);
6386 got_digit
= got_nonzero
= FALSE
;
6388 /* skip any leading zeroes */
6389 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6392 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6393 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6396 *dest
++ = first
->val
;
6399 /* if just found zeroes for exponent, use that */
6400 if(got_digit
&& !got_nonzero
)
6408 if(sep
&& groups_no
)
6409 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6411 if(!cur_group
) /* no groups, skip loop */
6413 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6414 error
= TRUE
; /* trailing empty */
6416 for(; cur_group
>=0 && !error
; cur_group
--) {
6417 if(*grouping
== CHAR_MAX
) {
6421 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6422 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6425 }else if(grouping
[1]) {
6429 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6431 MSVCP_basic_string_char_dtor(&groups_found
);
6441 /* ?_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 */
6442 /* ?_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 */
6443 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6444 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6446 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6450 /* ?_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 */
6451 /* ?_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 */
6452 /* Copies number to dest buffer, validates grouping and skips separators.
6453 * Updates first so it points past the number, all digits are skipped.
6454 * Returns number base (8, 10 or 16).
6455 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6456 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6458 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6459 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6461 static const char digits
[] = "0123456789abcdefABCDEF";
6463 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6464 basic_string_char grouping_bstr
;
6465 basic_string_char groups_found
;
6466 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6467 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6468 const char *grouping
, *groups
;
6469 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6471 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6473 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6474 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6475 #if _MSVCP_VER >= 70
6476 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6479 basefield
= fmtflags
& FMTFLAG_basefield
;
6480 if(basefield
== FMTFLAG_oct
)
6482 else if(basefield
== FMTFLAG_hex
)
6483 base
= 22; /* equal to the size of digits buffer */
6489 istreambuf_iterator_char_val(first
);
6490 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6491 *dest
++ = first
->val
;
6492 istreambuf_iterator_char_inc(first
);
6495 if(first
->strbuf
&& first
->val
=='0') {
6497 istreambuf_iterator_char_inc(first
);
6498 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6499 if(!base
|| base
== 22) {
6501 istreambuf_iterator_char_inc(first
);
6511 if (!base
) base
= 10;
6516 MSVCP_basic_string_char_ctor(&groups_found
);
6517 if(found_zero
) ++groups_no
;
6520 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6521 if(!memchr(digits
, first
->val
, base
)) {
6522 if(sep
&& first
->val
==sep
) {
6523 if(!groups_no
) break; /* empty group - stop parsing */
6524 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6532 if(dest_empty
&& first
->val
== '0')
6539 /* skip digits that can't be copied to dest buffer, other
6540 * functions are responsible for detecting overflows */
6542 *dest
++ = first
->val
;
6543 if(sep
&& groups_no
<CHAR_MAX
)
6548 if(sep
&& groups_no
)
6549 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6551 if(!cur_group
) { /* no groups, skip loop */
6553 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6554 error
= TRUE
; /* trailing empty */
6558 for(; cur_group
>=0 && !error
; cur_group
--) {
6559 if(*grouping
== CHAR_MAX
) {
6563 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6564 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6567 }else if(grouping
[1]) {
6572 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6574 MSVCP_basic_string_char_dtor(&groups_found
);
6581 }else if(dest_empty
)
6585 return (base
==22 ? 16 : base
);
6588 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6589 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6590 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6591 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6593 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6597 /* ?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 */
6598 /* ?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 */
6599 #if _MSVCP_VER <= 100
6600 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6601 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6602 (this, ret, first, last, base, state, pval))
6604 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6605 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6606 (this, ret, first, last, base, state, pval))
6608 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6609 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6610 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6616 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6618 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6619 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6620 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6621 *state
|= IOSTATE_failbit
;
6622 else if(end
!=tmp
&& !err
)
6623 *pval
= (void*)((INT_PTR
)v
);
6625 *state
|= IOSTATE_failbit
;
6628 *state
|= IOSTATE_eofbit
;
6634 /* ?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 */
6635 /* ?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 */
6636 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6637 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6638 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6640 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6641 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6644 /* ?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 */
6645 /* ?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 */
6646 /* ?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 */
6647 /* ?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 */
6648 #if _MSVCP_VER <= 100
6649 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6650 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6651 (this, ret, first, last, base, state, pval))
6652 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6653 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6654 (this, ret, first, last, base, state, pval))
6656 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6657 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6658 (this, ret, first, last, base, state, pval))
6659 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6660 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6661 (this, ret, first, last, base, state, pval))
6663 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6664 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6665 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6671 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6673 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6674 if(end
!=tmp
&& !err
)
6677 *state
|= IOSTATE_failbit
;
6680 *state
|= IOSTATE_eofbit
;
6686 /* ?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 */
6687 /* ?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 */
6688 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6689 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6690 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6692 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6693 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6696 /* ?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 */
6697 /* ?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 */
6698 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6699 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6700 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6702 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6703 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6706 /* ?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 */
6707 /* ?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 */
6708 #if _MSVCP_VER <= 100
6709 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6710 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6711 (this, ret, first, last, base, state, pval))
6713 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6714 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6715 (this, ret, first, last, base, state, pval))
6717 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6718 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6719 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6725 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6727 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6728 if(end
!=tmp
&& !err
)
6731 *state
|= IOSTATE_failbit
;
6734 *state
|= IOSTATE_eofbit
;
6740 /* ?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 */
6741 /* ?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 */
6742 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6743 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6744 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6746 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6747 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6750 /* ?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 */
6751 /* ?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 */
6752 #if _MSVCP_VER <= 100
6753 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6754 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6755 (this, ret, first, last, base, state, pval))
6757 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6758 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6759 (this, ret, first, last, base, state, pval))
6761 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6762 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6763 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6769 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6771 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6772 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6773 if(end
!=tmp
&& !err
)
6776 *state
|= IOSTATE_failbit
;
6779 *state
|= IOSTATE_eofbit
;
6785 /* ?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 */
6786 /* ?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 */
6787 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6788 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6789 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6791 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6792 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6795 /* ?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 */
6796 /* ?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 */
6797 #if _MSVCP_VER <= 100
6798 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6799 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6800 (this, ret, first, last, base, state, pval))
6802 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6803 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6804 (this, ret, first, last, base, state, pval))
6806 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6807 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6808 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6814 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6816 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6817 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6818 if(end
!=tmp
&& !err
)
6821 *state
|= IOSTATE_failbit
;
6824 *state
|= IOSTATE_eofbit
;
6830 /* ?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 */
6831 /* ?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 */
6832 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6833 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6834 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6836 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6837 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6840 /* ?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 */
6841 /* ?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 */
6842 #if _MSVCP_VER <= 100
6843 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6844 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6845 (this, ret, first, last, base, state, pval))
6847 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6848 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6849 (this, ret, first, last, base, state, pval))
6851 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6852 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6853 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6859 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6861 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6862 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6863 if(end
!=tmp
&& !err
)
6866 *state
|= IOSTATE_failbit
;
6869 *state
|= IOSTATE_eofbit
;
6875 /* ?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 */
6876 /* ?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 */
6877 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6878 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6879 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6881 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6882 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6885 /* ?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 */
6886 /* ?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 */
6887 #if _MSVCP_VER <= 100
6888 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6889 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6890 (this, ret, first, last, base, state, pval))
6892 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6893 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6894 (this, ret, first, last, base, state, pval))
6896 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6897 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6898 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6904 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6906 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6907 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6908 if(end
!=tmp
&& !err
)
6911 *state
|= IOSTATE_failbit
;
6914 *state
|= IOSTATE_eofbit
;
6920 /* ?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 */
6921 /* ?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 */
6922 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6923 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6924 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6926 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6927 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6930 /* ?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 */
6931 /* ?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 */
6932 #if _MSVCP_VER <= 100
6933 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6934 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6935 (this, ret, first, last, base, state, pval))
6937 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6938 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6939 (this, ret, first, last, base, state, pval))
6941 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6942 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6943 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6945 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6946 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6949 /* ?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 */
6950 /* ?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 */
6951 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6952 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6953 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6955 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6956 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6959 /* ?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 */
6960 /* ?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 */
6961 #if _MSVCP_VER <= 100
6962 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6963 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6964 (this, ret, first, last, base, state, pval))
6966 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
6967 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6968 (this, ret, first, last, base, state, pval))
6970 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6971 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6972 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6975 char tmp
[25], *beg
, *end
;
6978 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6980 b
= num_get_char__Getifld(this, tmp
,
6981 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6982 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6983 v
= _Stoulx(beg
, &end
, b
, &err
);
6985 if(v
!= (ULONG
)((unsigned short)v
))
6986 *state
|= IOSTATE_failbit
;
6987 else if(end
!=beg
&& !err
)
6988 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6990 *state
|= IOSTATE_failbit
;
6993 *state
|= IOSTATE_eofbit
;
6999 /* ?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 */
7000 /* ?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 */
7001 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
7002 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
7003 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
7005 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7006 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
7009 /* ?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 */
7010 /* ?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 */
7011 #if _MSVCP_VER <= 100
7012 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
7013 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
7014 (this, ret, first, last, base, state, pval))
7016 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
7017 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
7018 (this, ret, first, last, base, state, pval))
7020 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
7021 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7022 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7024 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7026 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7027 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7028 basic_string_char false_bstr
, true_bstr
;
7029 const char *pfalse
, *ptrue
;
7031 numpunct_char_falsename(numpunct
, &false_bstr
);
7032 numpunct_char_truename(numpunct
, &true_bstr
);
7033 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
7034 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
7036 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
7037 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
7039 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
7042 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
7044 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
7053 istreambuf_iterator_char_inc(&first
);
7055 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
7064 *state
|= IOSTATE_failbit
;
7066 MSVCP_basic_string_char_dtor(&false_bstr
);
7067 MSVCP_basic_string_char_dtor(&true_bstr
);
7071 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
7072 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
7074 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
7077 *state
|= IOSTATE_failbit
;
7081 *state
|= IOSTATE_eofbit
;
7082 memcpy(ret
, &first
, sizeof(first
));
7086 /* ?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 */
7087 /* ?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 */
7088 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
7089 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7090 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7092 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7093 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
7096 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
7097 locale_id num_put_char_id
= {0};
7099 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
7100 extern const vtable_ptr MSVCP_num_put_char_vtable
;
7102 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7103 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7104 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
7105 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
7107 TRACE("(%p %p)\n", this, locinfo
);
7108 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7111 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7112 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7113 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
7114 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7116 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7118 locale_facet_ctor_refs(&this->facet
, refs
);
7119 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
7121 num_put_char__Init(this, locinfo
);
7125 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
7126 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
7127 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
7128 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7132 TRACE("(%p %lu)\n", this, refs
);
7134 _Locinfo_ctor(&locinfo
);
7135 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7136 _Locinfo_dtor(&locinfo
);
7140 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7141 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7142 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7143 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7145 return num_put_char_ctor_refs(this, 0);
7148 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7149 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7150 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7151 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7152 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7153 void __thiscall
num_put_char_dtor(num_put
*this)
7155 TRACE("(%p)\n", this);
7156 locale_facet_dtor(&this->facet
);
7159 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7160 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7162 TRACE("(%p %x)\n", this, flags
);
7164 /* we have an array, with the number of elements stored before the first object */
7165 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7167 for(i
=*ptr
-1; i
>=0; i
--)
7168 num_put_char_dtor(this+i
);
7169 MSVCRT_operator_delete(ptr
);
7171 num_put_char_dtor(this);
7173 MSVCRT_operator_delete(this);
7179 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7180 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7181 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7183 TRACE("(%p %p)\n", facet
, loc
);
7185 if(facet
&& !*facet
) {
7188 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7190 ERR("Out of memory\n");
7191 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7195 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7196 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7197 _Locinfo_dtor(&locinfo
);
7203 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7204 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7205 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7207 return num_put_char__Getcat(facet
, locale_classic());
7210 num_put
* num_put_char_use_facet(const locale
*loc
)
7212 static num_put
*obj
= NULL
;
7215 const locale_facet
*fac
;
7217 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7218 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7220 _Lockit_dtor(&lock
);
7221 return (num_put
*)fac
;
7225 _Lockit_dtor(&lock
);
7229 num_put_char__Getcat(&fac
, loc
);
7230 obj
= (num_put
*)fac
;
7231 call_locale_facet__Incref(&obj
->facet
);
7232 locale_facet_register(&obj
->facet
);
7233 _Lockit_dtor(&lock
);
7238 /* ?_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 */
7239 /* ?_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 */
7240 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7241 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7243 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7245 for(; count
>0; count
--)
7246 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7252 /* ?_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 */
7253 /* ?_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 */
7254 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7255 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7257 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7259 for(; count
>0; count
--)
7260 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7266 /* ?_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 */
7267 /* ?_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 */
7268 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7269 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7271 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7275 /* ?_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 */
7276 /* ?_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 */
7277 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7278 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7280 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7282 for(; count
>0; count
--)
7283 ostreambuf_iterator_char_put(&dest
, c
);
7289 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7290 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7291 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7293 int type
= fmtfl
& FMTFLAG_floatfield
;
7296 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7299 if(fmtfl
& FMTFLAG_showpos
)
7301 if(fmtfl
& FMTFLAG_showpoint
)
7308 if(type
== FMTFLAG_fixed
)
7310 else if(type
== FMTFLAG_scientific
)
7311 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7312 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7313 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7315 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7321 /* ?_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 */
7322 /* ?_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 */
7323 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7324 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7325 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7327 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7328 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7332 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7333 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7334 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7336 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7337 basic_string_char grouping_bstr
;
7338 const char *grouping
;
7339 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7340 int cur_group
= 0, group_size
= 0;
7341 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7344 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7346 /* Change decimal point */
7347 for(p
=buf
; p
<buf
+count
; p
++) {
7348 if(*p
== dec_point
) {
7349 *p
= numpunct_char_decimal_point(numpunct
);
7355 /* Add separators to number */
7356 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7357 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7358 #if _MSVCP_VER >= 70
7359 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7362 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7364 if(group_size
== grouping
[cur_group
]) {
7366 if(grouping
[cur_group
+1])
7369 memmove(p
+1, p
, buf
+count
-p
);
7374 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7376 /* Display number with padding */
7377 if(count
>= base
->wide
)
7380 pad
= base
->wide
-count
;
7383 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7384 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7387 if(adjustfield
!= FMTFLAG_left
) {
7388 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7391 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7392 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7395 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7396 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7397 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7399 int base
= fmtfl
& FMTFLAG_basefield
;
7402 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7405 if(fmtfl
& FMTFLAG_showpos
)
7407 if(fmtfl
& FMTFLAG_showbase
)
7414 if(base
== FMTFLAG_oct
)
7416 else if(base
== FMTFLAG_hex
)
7417 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7425 /* ?_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 */
7426 /* ?_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 */
7427 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7428 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7430 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7431 basic_string_char grouping_bstr
;
7432 const char *grouping
;
7434 int cur_group
= 0, group_size
= 0;
7435 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7438 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7440 /* Add separators to number */
7441 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7442 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7443 #if _MSVCP_VER >= 70
7444 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7447 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7449 if(group_size
== grouping
[cur_group
]) {
7451 if(grouping
[cur_group
+1])
7454 memmove(p
+1, p
, buf
+count
-p
);
7459 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7461 /* Display number with padding */
7462 if(count
>= base
->wide
)
7465 pad
= base
->wide
-count
;
7468 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7469 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7471 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7472 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7475 if(adjustfield
!= FMTFLAG_left
) {
7476 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7479 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7480 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7483 /* ?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 */
7484 /* ?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 */
7485 #if _MSVCP_VER <= 100
7486 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7487 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7488 (this, ret, dest, base, fill, v))
7490 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7491 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7492 (this, ret, dest, base, fill, v))
7494 #if _MSVCP_VER != 80
7495 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7497 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7499 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7500 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7502 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7503 char fmt
[7]; /* strlen("%+#lld")+1 */
7505 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7507 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7508 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7511 /* ?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 */
7512 /* ?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 */
7513 #if _MSVCP_VER != 80
7514 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7516 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7518 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7519 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7521 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7522 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7525 /* ?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 */
7526 /* ?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 */
7527 #if _MSVCP_VER <= 100
7528 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7529 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7530 (this, ret, dest, base, fill, v))
7532 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7533 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7534 (this, ret, dest, base, fill, v))
7536 #if _MSVCP_VER != 80
7537 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7539 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7541 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7542 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7544 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7545 char fmt
[7]; /* strlen("%+#lld")+1 */
7547 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7549 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7550 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7553 /* ?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 */
7554 /* ?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 */
7555 #if _MSVCP_VER != 80
7556 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7558 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7560 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7561 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7563 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7564 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7567 static inline unsigned get_precision(const ios_base
*base
)
7569 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7575 /* ?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 */
7576 /* ?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 */
7577 /* ?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 */
7578 /* ?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 */
7579 #if _MSVCP_VER <= 100
7580 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7581 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7582 (this, ret, dest, base, fill, v))
7583 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7584 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7585 (this, ret, dest, base, fill, v))
7587 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7588 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7589 (this, ret, dest, base, fill, v))
7590 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7591 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7592 (this, ret, dest, base, fill, v))
7594 #if _MSVCP_VER != 80
7595 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7597 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7599 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7600 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7603 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7607 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7609 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7610 prec
= get_precision(base
);
7611 size
= _scprintf(fmt
, prec
, v
);
7613 /* TODO: don't use dynamic allocation */
7614 tmp
= MSVCRT_operator_new(size
*2);
7616 ERR("Out of memory\n");
7617 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7619 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7620 MSVCRT_operator_delete(tmp
);
7624 /* ?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 */
7625 /* ?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 */
7626 #if _MSVCP_VER != 80
7627 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7629 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7631 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7632 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7634 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7635 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7638 /* ?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 */
7639 /* ?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 */
7640 #if _MSVCP_VER != 80
7641 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7643 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7645 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7646 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7648 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7649 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7652 /* ?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 */
7653 /* ?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 */
7654 #if _MSVCP_VER <= 100
7655 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7656 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7657 (this, ret, dest, base, fill, v))
7659 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7660 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7661 (this, ret, dest, base, fill, v))
7663 #if _MSVCP_VER != 80
7664 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7666 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7668 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7669 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7671 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7673 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7675 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7678 /* ?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 */
7679 /* ?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 */
7680 #if _MSVCP_VER != 80
7681 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7683 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7685 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7686 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7688 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7689 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7692 /* ?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 */
7693 /* ?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 */
7694 #if _MSVCP_VER <= 100
7695 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7696 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7697 (this, ret, dest, base, fill, v))
7699 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7700 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7701 (this, ret, dest, base, fill, v))
7703 #if _MSVCP_VER != 80
7704 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7706 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7708 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7709 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7711 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7712 char fmt
[7]; /* strlen("%+#lld")+1 */
7714 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7716 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7717 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7720 /* ?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 */
7721 /* ?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 */
7722 #if _MSVCP_VER != 80
7723 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7725 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7727 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7728 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7730 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7731 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7734 /* ?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 */
7735 /* ?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 */
7736 #if _MSVCP_VER <= 100
7737 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7738 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7739 (this, ret, dest, base, fill, v))
7741 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7742 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7743 (this, ret, dest, base, fill, v))
7745 #if _MSVCP_VER != 80
7746 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7748 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7750 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7751 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7753 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7754 char fmt
[7]; /* strlen("%+#lld")+1 */
7756 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7758 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7759 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7762 /* ?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 */
7763 /* ?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 */
7764 #if _MSVCP_VER != 80
7765 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7767 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7769 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7770 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7772 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7773 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7776 /* ?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 */
7777 /* ?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 */
7778 #if _MSVCP_VER <= 100
7779 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7780 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7781 (this, ret, dest, base, fill, v))
7783 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7784 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7785 (this, ret, dest, base, fill, v))
7787 #if _MSVCP_VER != 80
7788 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7790 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7792 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7793 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7795 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7797 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7798 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7799 basic_string_char str
;
7800 MSVCP_size_t pad
, len
;
7803 numpunct_char_truename(numpunct
, &str
);
7805 numpunct_char_falsename(numpunct
, &str
);
7807 len
= MSVCP_basic_string_char_length(&str
);
7808 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7811 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7812 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7815 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7816 MSVCP_basic_string_char_dtor(&str
);
7817 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7820 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7823 /* ?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 */
7824 /* ?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 */
7825 #if _MSVCP_VER != 80
7826 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7828 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7830 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7831 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7833 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7834 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7837 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7838 locale_id num_put_wchar_id
= {0};
7839 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7840 locale_id num_put_short_id
= {0};
7842 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7843 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7844 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7845 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7847 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7848 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7849 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7850 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7852 TRACE("(%p %p)\n", this, locinfo
);
7853 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7856 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7857 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7858 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7859 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7861 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7863 locale_facet_ctor_refs(&this->facet
, refs
);
7864 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7866 num_put_wchar__Init(this, locinfo
);
7870 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7871 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7872 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7873 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7875 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7876 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7880 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7881 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7882 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7883 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7887 TRACE("(%p %lu)\n", this, refs
);
7889 _Locinfo_ctor(&locinfo
);
7890 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7891 _Locinfo_dtor(&locinfo
);
7895 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7896 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7897 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7898 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7900 num_put_wchar_ctor_refs(this, refs
);
7901 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7905 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7906 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7907 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7908 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7910 return num_put_wchar_ctor_refs(this, 0);
7913 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7914 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7915 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7916 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7918 return num_put_short_ctor_refs(this, 0);
7921 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7922 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7923 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7924 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7925 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7926 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7927 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7928 void __thiscall
num_put_wchar_dtor(num_put
*this)
7930 TRACE("(%p)\n", this);
7931 locale_facet_dtor(&this->facet
);
7934 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7935 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7937 TRACE("(%p %x)\n", this, flags
);
7939 /* we have an array, with the number of elements stored before the first object */
7940 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7942 for(i
=*ptr
-1; i
>=0; i
--)
7943 num_put_wchar_dtor(this+i
);
7944 MSVCRT_operator_delete(ptr
);
7946 num_put_wchar_dtor(this);
7948 MSVCRT_operator_delete(this);
7954 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7955 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7956 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7958 TRACE("(%p %p)\n", facet
, loc
);
7960 if(facet
&& !*facet
) {
7963 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7965 ERR("Out of memory\n");
7966 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7970 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7971 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7972 _Locinfo_dtor(&locinfo
);
7978 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7979 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7980 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
7982 return num_put_wchar__Getcat(facet
, locale_classic());
7985 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7986 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7987 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
7989 TRACE("(%p %p)\n", facet
, loc
);
7991 if(facet
&& !*facet
) {
7994 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7996 ERR("Out of memory\n");
7997 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8001 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8002 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
8003 _Locinfo_dtor(&locinfo
);
8009 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8010 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8011 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
8013 return num_put_short__Getcat(facet
, locale_classic());
8016 num_put
* num_put_wchar_use_facet(const locale
*loc
)
8018 static num_put
*obj
= NULL
;
8021 const locale_facet
*fac
;
8023 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8024 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
8026 _Lockit_dtor(&lock
);
8027 return (num_put
*)fac
;
8031 _Lockit_dtor(&lock
);
8035 num_put_wchar__Getcat(&fac
, loc
);
8036 obj
= (num_put
*)fac
;
8037 call_locale_facet__Incref(&obj
->facet
);
8038 locale_facet_register(&obj
->facet
);
8039 _Lockit_dtor(&lock
);
8044 num_put
* num_put_short_use_facet(const locale
*loc
)
8046 static num_put
*obj
= NULL
;
8049 const locale_facet
*fac
;
8051 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8052 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
8054 _Lockit_dtor(&lock
);
8055 return (num_put
*)fac
;
8059 _Lockit_dtor(&lock
);
8063 num_put_short__Getcat(&fac
, loc
);
8064 obj
= (num_put
*)fac
;
8065 call_locale_facet__Incref(&obj
->facet
);
8066 locale_facet_register(&obj
->facet
);
8067 _Lockit_dtor(&lock
);
8072 /* ?_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 */
8073 /* ?_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 */
8074 /* ?_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 */
8075 /* ?_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 */
8076 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8077 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
8079 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
8081 for(; count
>0; count
--)
8082 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
8088 /* ?_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 */
8089 /* ?_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 */
8090 /* ?_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 */
8091 /* ?_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 */
8092 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8093 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
8098 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
8100 for(; count
>0; count
--) {
8101 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
8102 ostreambuf_iterator_wchar_put(&dest
, ch
);
8109 /* ?_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 */
8110 /* ?_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 */
8111 /* ?_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 */
8112 /* ?_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 */
8113 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8114 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
8116 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
8120 /* ?_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 */
8121 /* ?_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 */
8122 /* ?_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 */
8123 /* ?_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 */
8124 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8125 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
8127 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
8129 for(; count
>0; count
--)
8130 ostreambuf_iterator_wchar_put(&dest
, c
);
8136 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8137 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8138 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8139 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8140 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8142 int type
= fmtfl
& FMTFLAG_floatfield
;
8145 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8148 if(fmtfl
& FMTFLAG_showpos
)
8150 if(fmtfl
& FMTFLAG_showbase
)
8157 if(type
== FMTFLAG_fixed
)
8159 else if(type
== FMTFLAG_scientific
)
8160 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8161 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8162 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8164 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8170 /* ?_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 */
8171 /* ?_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 */
8172 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8173 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8174 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8176 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8177 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8181 /* ?_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 */
8182 /* ?_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 */
8183 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8184 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8185 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8187 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8188 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8192 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8193 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8194 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8195 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8197 basic_string_char grouping_bstr
;
8198 const char *grouping
;
8199 char *p
, dec_point
= *localeconv()->decimal_point
;
8201 int cur_group
= 0, group_size
= 0;
8202 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8203 MSVCP_size_t i
, pad
;
8205 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8207 for(p
=buf
; p
<buf
+count
; p
++) {
8213 /* Add separators to number */
8214 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8215 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8216 #if _MSVCP_VER >= 70
8217 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8220 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8222 if(group_size
== grouping
[cur_group
]) {
8224 if(grouping
[cur_group
+1])
8227 memmove(p
+1, p
, buf
+count
-p
);
8228 *p
= '\0'; /* mark thousands separator positions */
8232 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8234 /* Display number with padding */
8235 if(count
>= base
->wide
)
8238 pad
= base
->wide
-count
;
8241 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8242 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8245 if(adjustfield
!= FMTFLAG_left
) {
8246 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8250 for(i
=0; i
<count
; i
++) {
8251 if(buf
[i
] == dec_point
)
8252 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8254 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8256 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8259 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8262 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8263 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8264 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8265 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8266 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8268 int base
= fmtfl
& FMTFLAG_basefield
;
8271 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8274 if(fmtfl
& FMTFLAG_showpos
)
8276 if(fmtfl
& FMTFLAG_showbase
)
8283 if(base
== FMTFLAG_oct
)
8285 else if(base
== FMTFLAG_hex
)
8286 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8294 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8295 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8296 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8298 basic_string_char grouping_bstr
;
8299 const char *grouping
;
8302 int cur_group
= 0, group_size
= 0;
8303 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8304 MSVCP_size_t i
, pad
;
8306 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8308 /* Add separators to number */
8309 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8310 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8311 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8313 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8315 if(group_size
== grouping
[cur_group
]) {
8317 if(grouping
[cur_group
+1])
8320 memmove(p
+1, p
, buf
+count
-p
);
8321 *p
= '\0'; /* mark thousands separator positions */
8325 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8327 /* Display number with padding */
8328 if(count
>= base
->wide
)
8331 pad
= base
->wide
-count
;
8334 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8335 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8337 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8338 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
8341 if(adjustfield
!= FMTFLAG_left
) {
8342 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8346 for(i
=0; i
<count
; i
++) {
8348 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8350 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8353 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8356 /* ?_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 */
8357 /* ?_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 */
8358 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8359 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8361 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8364 /* ?_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 */
8365 /* ?_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 */
8366 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8367 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8369 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8372 /* ?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 */
8373 /* ?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 */
8374 #if _MSVCP_VER <= 100
8375 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8376 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8377 (this, ret, dest, base, fill, v))
8379 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8380 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8381 (this, ret, dest, base, fill, v))
8383 #if _MSVCP_VER != 80
8384 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8386 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8388 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8389 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8391 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8392 char fmt
[7]; /* strlen("%+#lld")+1 */
8394 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8396 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8397 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8400 /* ?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 */
8401 /* ?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 */
8402 #if _MSVCP_VER != 80
8403 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8405 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8407 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8408 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8410 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8411 char fmt
[7]; /* strlen("%+#lld")+1 */
8413 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8415 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8416 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8419 /* ?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 */
8420 /* ?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 */
8421 /* ?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 */
8422 /* ?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 */
8423 #if _MSVCP_VER != 80
8424 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8426 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8428 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8429 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8431 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8432 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8435 /* ?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 */
8436 /* ?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 */
8437 #if _MSVCP_VER <= 100
8438 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8439 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8440 (this, ret, dest, base, fill, v))
8442 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8443 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8444 (this, ret, dest, base, fill, v))
8446 #if _MSVCP_VER != 80
8447 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8449 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8451 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8452 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8454 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8455 char fmt
[7]; /* strlen("%+#lld")+1 */
8457 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8459 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8460 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8463 /* ?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 */
8464 /* ?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 */
8465 #if _MSVCP_VER != 80
8466 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8468 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8470 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8471 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8473 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8474 char fmt
[7]; /* strlen("%+#lld")+1 */
8476 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8478 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8479 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8482 /* ?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 */
8483 /* ?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 */
8484 /* ?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 */
8485 /* ?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 */
8486 #if _MSVCP_VER != 80
8487 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8489 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8491 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8492 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8494 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8495 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8498 /* ?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 */
8499 /* ?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 */
8500 /* ?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 */
8501 /* ?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 */
8502 #if _MSVCP_VER <= 100
8503 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8504 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8505 (this, ret, dest, base, fill, v))
8506 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8507 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8508 (this, ret, dest, base, fill, v))
8510 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8511 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8512 (this, ret, dest, base, fill, v))
8513 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8514 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8515 (this, ret, dest, base, fill, v))
8517 #if _MSVCP_VER != 80
8518 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8520 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8522 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8523 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8526 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8530 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8532 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8533 prec
= get_precision(base
);
8534 size
= _scprintf(fmt
, prec
, v
);
8536 /* TODO: don't use dynamic allocation */
8537 tmp
= MSVCRT_operator_new(size
*2);
8539 ERR("Out of memory\n");
8540 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8542 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8543 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8544 MSVCRT_operator_delete(tmp
);
8548 /* ?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 */
8549 /* ?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 */
8550 /* ?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 */
8551 /* ?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 */
8552 #if _MSVCP_VER != 80
8553 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8555 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8557 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8558 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8561 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8565 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8567 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8568 prec
= get_precision(base
);
8569 size
= _scprintf(fmt
, prec
, v
);
8571 /* TODO: don't use dynamic allocation */
8572 tmp
= MSVCRT_operator_new(size
*2);
8574 ERR("Out of memory\n");
8575 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8577 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8578 numpunct_short_use_facet(IOS_LOCALE(base
)));
8579 MSVCRT_operator_delete(tmp
);
8583 /* ?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 */
8584 /* ?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 */
8585 /* ?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 */
8586 /* ?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 */
8587 #if _MSVCP_VER != 80
8588 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8590 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8592 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8593 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8595 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8596 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8599 /* ?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 */
8600 /* ?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 */
8601 /* ?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 */
8602 /* ?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 */
8603 #if _MSVCP_VER != 80
8604 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8606 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8608 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8609 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8611 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8612 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8615 /* ?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 */
8616 /* ?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 */
8617 #if _MSVCP_VER <= 100
8618 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8619 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8620 (this, ret, dest, base, fill, v))
8622 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8623 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8624 (this, ret, dest, base, fill, v))
8626 #if _MSVCP_VER != 80
8627 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8629 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8631 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8632 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8634 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8636 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8638 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8641 /* ?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 */
8642 /* ?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 */
8643 #if _MSVCP_VER != 80
8644 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8646 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8648 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8649 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8651 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8653 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8655 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8658 /* ?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 */
8659 /* ?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 */
8660 /* ?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 */
8661 /* ?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 */
8662 #if _MSVCP_VER != 80
8663 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8665 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8667 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8668 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8670 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8671 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8674 /* ?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 */
8675 /* ?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 */
8676 #if _MSVCP_VER <= 100
8677 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8678 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8679 (this, ret, dest, base, fill, v))
8681 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8682 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8683 (this, ret, dest, base, fill, v))
8685 #if _MSVCP_VER != 80
8686 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8688 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8690 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8691 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8693 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8694 char fmt
[7]; /* strlen("%+#lld")+1 */
8696 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8698 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8699 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8702 /* ?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 */
8703 /* ?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 */
8704 #if _MSVCP_VER != 80
8705 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8707 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8709 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8710 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8712 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8713 char fmt
[7]; /* strlen("%+#lld")+1 */
8715 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8717 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8718 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8721 /* ?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 */
8722 /* ?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 */
8723 /* ?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 */
8724 /* ?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 */
8725 #if _MSVCP_VER != 80
8726 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8728 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8730 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8731 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8733 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8734 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8737 /* ?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 */
8738 /* ?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 */
8739 #if _MSVCP_VER <= 100
8740 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8741 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8742 (this, ret, dest, base, fill, v))
8744 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8745 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8746 (this, ret, dest, base, fill, v))
8748 #if _MSVCP_VER != 80
8749 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8751 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8753 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8754 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8756 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8757 char fmt
[7]; /* strlen("%+#lld")+1 */
8759 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8761 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8762 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8765 /* ?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 */
8766 /* ?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 */
8767 #if _MSVCP_VER != 80
8768 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8770 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8772 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8773 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8775 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8776 char fmt
[7]; /* strlen("%+#lld")+1 */
8778 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8780 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8781 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8784 /* ?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 */
8785 /* ?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 */
8786 /* ?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 */
8787 /* ?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 */
8788 #if _MSVCP_VER != 80
8789 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8791 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8793 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8794 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8796 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8797 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8800 /* ?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 */
8801 /* ?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 */
8802 #if _MSVCP_VER <= 100
8803 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8804 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8805 (this, ret, dest, base, fill, v))
8807 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8808 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8809 (this, ret, dest, base, fill, v))
8811 #if _MSVCP_VER != 80
8812 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8814 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8816 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8817 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8819 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8821 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8822 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8823 basic_string_wchar str
;
8824 MSVCP_size_t pad
, len
;
8827 numpunct_wchar_truename(numpunct
, &str
);
8829 numpunct_wchar_falsename(numpunct
, &str
);
8831 len
= MSVCP_basic_string_wchar_length(&str
);
8832 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8835 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8836 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8839 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8840 MSVCP_basic_string_wchar_dtor(&str
);
8841 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8844 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8847 /* ?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 */
8848 /* ?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 */
8849 #if _MSVCP_VER != 80
8850 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8852 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8854 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8855 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8857 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8859 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8860 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8861 basic_string_wchar str
;
8862 MSVCP_size_t pad
, len
;
8865 numpunct_wchar_truename(numpunct
, &str
);
8867 numpunct_wchar_falsename(numpunct
, &str
);
8869 len
= MSVCP_basic_string_wchar_length(&str
);
8870 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8873 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8874 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8877 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8878 MSVCP_basic_string_wchar_dtor(&str
);
8879 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8882 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8885 /* ?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 */
8886 /* ?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 */
8887 /* ?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 */
8888 /* ?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 */
8889 #if _MSVCP_VER != 80
8890 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8892 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8894 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8895 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8897 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8898 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8901 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8902 locale_id time_put_char_id
= {0};
8904 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8905 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8907 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8908 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8909 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8910 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8912 TRACE("(%p %p)\n", this, locinfo
);
8913 _Locinfo__Gettnames(locinfo
, &this->time
);
8914 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8917 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8918 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8919 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8920 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8922 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8923 locale_facet_ctor_refs(&this->facet
, refs
);
8924 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8925 time_put_char__Init(this, locinfo
);
8929 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8930 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8931 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8932 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8936 TRACE("(%p %lu)\n", this, refs
);
8938 _Locinfo_ctor(&locinfo
);
8939 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
8940 _Locinfo_dtor(&locinfo
);
8944 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
8945 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
8946 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
8947 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
8949 return time_put_char_ctor_refs(this, 0);
8952 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
8953 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
8954 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
8955 void __thiscall
time_put_char_dtor(time_put
*this)
8957 TRACE("(%p)\n", this);
8958 _Timevec_dtor(&this->time
);
8961 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
8962 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
8964 TRACE("(%p %x)\n", this, flags
);
8966 /* we have an array, with the number of elements stored before the first object */
8967 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8969 for(i
=*ptr
-1; i
>=0; i
--)
8970 time_put_char_dtor(this+i
);
8971 MSVCRT_operator_delete(ptr
);
8973 time_put_char_dtor(this);
8975 MSVCRT_operator_delete(this);
8981 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8982 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8983 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
8985 TRACE("(%p %p)\n", facet
, loc
);
8987 if(facet
&& !*facet
) {
8990 *facet
= MSVCRT_operator_new(sizeof(time_put
));
8992 ERR("Out of memory\n");
8993 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8997 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8998 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
8999 _Locinfo_dtor(&locinfo
);
9005 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9006 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9007 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
9009 return time_put_char__Getcat(facet
, locale_classic());
9012 static time_put
* time_put_char_use_facet(const locale
*loc
)
9014 static time_put
*obj
= NULL
;
9017 const locale_facet
*fac
;
9019 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9020 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
9022 _Lockit_dtor(&lock
);
9023 return (time_put
*)fac
;
9027 _Lockit_dtor(&lock
);
9031 time_put_char__Getcat(&fac
, loc
);
9032 obj
= (time_put
*)fac
;
9033 call_locale_facet__Incref(&obj
->facet
);
9034 locale_facet_register(&obj
->facet
);
9035 _Lockit_dtor(&lock
);
9040 #if _MSVCP_VER >= 70
9042 /* ?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 */
9043 /* ?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 */
9044 #if _MSVCP_VER != 80
9045 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
9047 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
9049 #if _MSVCP_VER <= 100
9050 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9051 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9052 (this, ret, dest, base, fill, t, spec, mod))
9054 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
9055 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9056 (this, ret, dest, base, fill, t, spec, mod))
9058 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9059 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9061 char buf
[64], fmt
[4], *p
= fmt
;
9062 MSVCP_size_t i
, len
;
9064 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9072 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9073 for(i
=0; i
<len
; i
++)
9074 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9080 /* ?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 */
9081 /* ?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 */
9082 #if _MSVCP_VER != 80
9083 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
9085 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
9087 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9088 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9090 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9091 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9094 /* ?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 */
9095 /* ?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 */
9096 #if _MSVCP_VER != 80
9097 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
9099 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
9101 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9102 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9104 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
9106 while(pat
< pat_end
) {
9108 ostreambuf_iterator_char_put(&dest
, *pat
++);
9109 }else if(++pat
== pat_end
) {
9110 ostreambuf_iterator_char_put(&dest
, '%');
9111 }else if(*pat
=='#' && pat
+1==pat_end
) {
9112 ostreambuf_iterator_char_put(&dest
, '%');
9113 ostreambuf_iterator_char_put(&dest
, *pat
++);
9124 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
9132 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9134 /* ?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 */
9135 /* ?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 */
9136 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9137 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9138 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9139 (this, ret, dest, base, t, spec, mod))
9140 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9141 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9143 char buf
[64], fmt
[4], *p
= fmt
;
9144 MSVCP_size_t i
, len
;
9146 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9154 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9155 for(i
=0; i
<len
; i
++)
9156 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9162 /* ?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 */
9163 /* ?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 */
9164 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9165 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9166 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9168 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9169 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9172 /* ?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 */
9173 /* ?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 */
9174 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9175 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9176 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9178 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9180 while(pat
< pat_end
) {
9182 ostreambuf_iterator_char_put(&dest
, *pat
++);
9183 }else if(++pat
== pat_end
) {
9184 ostreambuf_iterator_char_put(&dest
, '%');
9185 }else if(*pat
=='#' && pat
+1==pat_end
) {
9186 ostreambuf_iterator_char_put(&dest
, '%');
9187 ostreambuf_iterator_char_put(&dest
, *pat
++);
9198 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9206 #endif /* MSVCP_VER >= 70 */
9208 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9209 locale_id time_put_wchar_id
= {0};
9210 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9211 locale_id time_put_short_id
= {0};
9213 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9214 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
9215 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9216 extern const vtable_ptr MSVCP_time_put_short_vtable
;
9218 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9219 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9220 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9221 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9222 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9223 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9225 TRACE("(%p %p)\n", this, locinfo
);
9226 _Locinfo__Gettnames(locinfo
, &this->time
);
9227 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9230 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9231 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9232 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9233 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9235 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9236 locale_facet_ctor_refs(&this->facet
, refs
);
9237 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
9238 time_put_wchar__Init(this, locinfo
);
9242 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9243 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9244 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9245 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9247 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9248 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9252 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9253 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9254 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9255 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9259 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
9261 _Locinfo_ctor_cstr(&locinfo
, name
);
9262 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9263 _Locinfo_dtor(&locinfo
);
9267 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9268 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9269 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9270 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9272 time_put_wchar_ctor_name(this, name
, refs
);
9273 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9277 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9278 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9279 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9280 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9284 TRACE("(%p %lu)\n", this, refs
);
9286 _Locinfo_ctor(&locinfo
);
9287 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9288 _Locinfo_dtor(&locinfo
);
9292 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9293 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9294 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9295 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9297 time_put_wchar_ctor_refs(this, refs
);
9298 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9302 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9303 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9304 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9305 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9307 return time_put_wchar_ctor_refs(this, 0);
9310 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9311 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9312 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9313 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9315 time_put_wchar_ctor(this);
9316 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9320 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9321 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9322 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9323 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9324 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9325 void __thiscall
time_put_wchar_dtor(time_put
*this)
9327 TRACE("(%p)\n", this);
9328 _Timevec_dtor(&this->time
);
9331 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9332 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9334 TRACE("(%p %x)\n", this, flags
);
9336 /* we have an array, with the number of elements stored before the first object */
9337 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9339 for(i
=*ptr
-1; i
>=0; i
--)
9340 time_put_wchar_dtor(this+i
);
9341 MSVCRT_operator_delete(ptr
);
9343 time_put_wchar_dtor(this);
9345 MSVCRT_operator_delete(this);
9351 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9352 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9353 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9355 TRACE("(%p %p)\n", facet
, loc
);
9357 if(facet
&& !*facet
) {
9358 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9360 ERR("Out of memory\n");
9361 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9364 time_put_wchar_ctor_name((time_put
*)*facet
,
9365 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9371 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9372 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9373 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9375 return time_put_wchar__Getcat(facet
, locale_classic());
9378 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9380 static time_put
*obj
= NULL
;
9383 const locale_facet
*fac
;
9385 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9386 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9388 _Lockit_dtor(&lock
);
9389 return (time_put
*)fac
;
9393 _Lockit_dtor(&lock
);
9397 time_put_wchar__Getcat(&fac
, loc
);
9398 obj
= (time_put
*)fac
;
9399 call_locale_facet__Incref(&obj
->facet
);
9400 locale_facet_register(&obj
->facet
);
9401 _Lockit_dtor(&lock
);
9406 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9407 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9408 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9410 TRACE("(%p %p)\n", facet
, loc
);
9412 if(facet
&& !*facet
) {
9413 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9415 ERR("Out of memory\n");
9416 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9419 time_put_short_ctor_name((time_put
*)*facet
,
9420 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9426 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9427 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9428 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9430 return time_put_short__Getcat(facet
, locale_classic());
9433 static time_put
* time_put_short_use_facet(const locale
*loc
)
9435 static time_put
*obj
= NULL
;
9438 const locale_facet
*fac
;
9440 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9441 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9443 _Lockit_dtor(&lock
);
9444 return (time_put
*)fac
;
9448 _Lockit_dtor(&lock
);
9452 time_put_short__Getcat(&fac
, loc
);
9453 obj
= (time_put
*)fac
;
9454 call_locale_facet__Incref(&obj
->facet
);
9455 locale_facet_register(&obj
->facet
);
9456 _Lockit_dtor(&lock
);
9461 #if _MSVCP_VER >= 70
9463 /* ?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 */
9464 /* ?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 */
9465 /* ?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 */
9466 /* ?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 */
9467 #if _MSVCP_VER != 80
9468 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9470 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9472 #if _MSVCP_VER <= 100
9473 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9474 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9475 (this, ret, dest, base, fill, t, spec, mod))
9477 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9478 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9479 (this, ret, dest, base, fill, t, spec, mod))
9481 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9482 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9483 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9485 char buf
[64], fmt
[4], *p
= fmt
;
9486 MSVCP_size_t i
, len
;
9489 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9497 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9498 for(i
=0; i
<len
; i
++) {
9499 c
= mb_to_wc(buf
[i
], &this->cvt
);
9500 ostreambuf_iterator_wchar_put(&dest
, c
);
9507 /* ?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 */
9508 /* ?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 */
9509 /* ?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 */
9510 /* ?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 */
9511 #if _MSVCP_VER != 80
9512 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9514 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9516 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9517 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9518 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9520 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9521 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9524 /* ?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 */
9525 /* ?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 */
9526 /* ?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 */
9527 /* ?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 */
9528 #if _MSVCP_VER != 80
9529 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9531 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9533 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9534 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9535 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9537 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9540 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9542 while(pat
< pat_end
) {
9543 if(*pat
!= percent
) {
9544 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9545 }else if(++pat
== pat_end
) {
9546 ostreambuf_iterator_wchar_put(&dest
, percent
);
9547 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9548 ostreambuf_iterator_wchar_put(&dest
, percent
);
9549 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9553 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9554 ostreambuf_iterator_wchar_put(&dest
, percent
);
9555 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9556 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9558 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9561 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9570 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9572 /* ?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 */
9573 /* ?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 */
9574 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9575 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9576 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9577 (this, ret, dest, base, t, spec, mod))
9578 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9579 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9580 const struct tm
*t
, char spec
, char mod
)
9582 char buf
[64], fmt
[4], *p
= fmt
;
9583 MSVCP_size_t i
, len
;
9586 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9594 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9595 for(i
=0; i
<len
; i
++) {
9596 c
= mb_to_wc(buf
[i
], &this->cvt
);
9597 ostreambuf_iterator_wchar_put(&dest
, c
);
9604 /* ?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 */
9605 /* ?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 */
9606 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9607 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9608 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9609 const struct tm
*t
, char spec
, char mod
)
9611 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9612 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9615 /* ?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 */
9616 /* ?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 */
9617 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9618 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9619 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9620 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9622 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9625 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9627 while(pat
< pat_end
) {
9628 if(*pat
!= percent
) {
9629 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9630 }else if(++pat
== pat_end
) {
9631 ostreambuf_iterator_wchar_put(&dest
, percent
);
9632 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9633 ostreambuf_iterator_wchar_put(&dest
, percent
);
9634 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9638 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9639 ostreambuf_iterator_wchar_put(&dest
, percent
);
9640 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9641 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9643 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9646 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9655 #endif /* _MSVCP_VER >= 70 */
9657 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9658 locale_id time_get_char_id
= {0};
9660 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9661 extern const vtable_ptr MSVCP_time_get_char_vtable
;
9663 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9664 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9665 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9666 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9672 TRACE("(%p %p)\n", this, locinfo
);
9674 days
= _Locinfo__Getdays(locinfo
);
9675 len
= strlen(days
)+1;
9676 this->days
= MSVCRT_operator_new(len
);
9679 ERR("Out of memory\n");
9680 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9682 memcpy((char*)this->days
, days
, len
);
9684 months
= _Locinfo__Getmonths(locinfo
);
9685 len
= strlen(months
)+1;
9686 this->months
= MSVCRT_operator_new(len
);
9689 MSVCRT_operator_delete((char*)this->days
);
9691 ERR("Out of memory\n");
9692 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9694 memcpy((char*)this->months
, months
, len
);
9696 this->dateorder
= _Locinfo__Getdateorder(locinfo
);
9697 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9700 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9701 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9702 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9703 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9704 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9706 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9707 locale_facet_ctor_refs(&this->facet
, refs
);
9708 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9709 time_get_char__Init(this, locinfo
);
9713 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9714 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9715 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9716 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, MSVCP_size_t refs
)
9720 TRACE("(%p %s %lu)\n", this, name
, refs
);
9722 _Locinfo_ctor_cstr(&locinfo
, name
);
9723 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9724 _Locinfo_dtor(&locinfo
);
9728 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9729 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9730 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9731 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, MSVCP_size_t refs
)
9735 TRACE("(%p %lu)\n", this, refs
);
9737 _Locinfo_ctor(&locinfo
);
9738 time_get_char_ctor_locinfo(this, &locinfo
, refs
);
9739 _Locinfo_dtor(&locinfo
);
9743 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9744 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9745 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9746 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9748 return time_get_char_ctor_refs(this, 0);
9751 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9752 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9753 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9754 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9756 TRACE("(%p)\n", this);
9758 MSVCRT_operator_delete((char*)this->days
);
9759 MSVCRT_operator_delete((char*)this->months
);
9762 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9763 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9764 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9765 void __thiscall
time_get_char_dtor(time_get_char
*this)
9767 TRACE("(%p)\n", this);
9769 time_get_char__Tidy(this);
9772 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9773 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9775 TRACE("(%p %x)\n", this, flags
);
9777 /* we have an array, with the number of elements stored before the first object */
9778 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9780 for(i
=*ptr
-1; i
>=0; i
--)
9781 time_get_char_dtor(this+i
);
9782 MSVCRT_operator_delete(ptr
);
9784 time_get_char_dtor(this);
9786 MSVCRT_operator_delete(this);
9792 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9793 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9794 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9796 TRACE("(%p %p)\n", facet
, loc
);
9798 if(facet
&& !*facet
) {
9801 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9803 ERR("Out of memory\n");
9804 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9808 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9809 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9810 _Locinfo_dtor(&locinfo
);
9816 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9818 static time_get_char
*obj
= NULL
;
9821 const locale_facet
*fac
;
9823 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9824 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9826 _Lockit_dtor(&lock
);
9827 return (time_get_char
*)fac
;
9831 _Lockit_dtor(&lock
);
9835 time_get_char__Getcat(&fac
, loc
);
9836 obj
= (time_get_char
*)fac
;
9837 call_locale_facet__Incref(&obj
->facet
);
9838 locale_facet_register(&obj
->facet
);
9839 _Lockit_dtor(&lock
);
9844 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9845 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9846 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9847 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9848 int unk1
, int unk2
, int *val
)
9850 FIXME("(%p %p %p %d %d %p) stub\n", this, b
, e
, unk1
, unk2
, val
);
9854 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
9855 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
9856 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
9857 #if _MSVCP_VER <= 100
9858 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
9860 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
9862 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
9864 TRACE("(%p)\n", this);
9865 return this->dateorder
;
9868 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
9869 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
9870 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
9871 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
9873 return call_time_get_char_do_date_order(this);
9876 /* ?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 */
9877 /* ?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 */
9878 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
9879 #if _MSVCP_VER <= 100
9880 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
9881 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9882 (this, ret, s, e, base, err, t))
9884 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9885 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9886 (this, ret, s, e, base, err, t))
9888 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
9889 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9890 ios_base
*base
, int *err
, struct tm
*t
)
9892 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9896 /* ?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 */
9897 /* ?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 */
9898 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
9899 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
9900 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9901 ios_base
*base
, int *err
, struct tm
*t
)
9903 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
9906 /* ?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 */
9907 /* ?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 */
9908 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
9909 #if _MSVCP_VER <= 100
9910 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9911 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9912 (this, ret, s, e, base, err, t))
9914 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
9915 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9916 (this, ret, s, e, base, err, t))
9918 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
9919 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9920 ios_base
*base
, int *err
, struct tm
*t
)
9922 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9926 /* ?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 */
9927 /* ?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 */
9928 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
9929 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
9930 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9931 ios_base
*base
, int *err
, struct tm
*t
)
9933 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
9936 /* ?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 */
9937 /* ?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 */
9938 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
9939 #if _MSVCP_VER <= 100
9940 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
9941 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9942 (this, ret, s, e, base, err, t))
9944 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9945 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9946 (this, ret, s, e, base, err, t))
9948 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
9949 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9950 ios_base
*base
, int *err
, struct tm
*t
)
9952 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9956 /* ?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 */
9957 /* ?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 */
9958 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
9959 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
9960 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9961 ios_base
*base
, int *err
, struct tm
*t
)
9963 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
9966 /* ?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 */
9967 /* ?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 */
9968 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
9969 #if _MSVCP_VER <= 100
9970 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9971 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9972 (this, ret, s, e, base, err, t))
9974 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9975 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9976 (this, ret, s, e, base, err, t))
9978 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
9979 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9980 ios_base
*base
, int *err
, struct tm
*t
)
9982 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9986 /* ?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 */
9987 /* ?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 */
9988 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
9989 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
9990 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9991 ios_base
*base
, int *err
, struct tm
*t
)
9993 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
9996 /* ?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 */
9997 /* ?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 */
9998 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
9999 #if _MSVCP_VER <= 100
10000 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
10001 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10002 (this, ret, s, e, base, err, t))
10004 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
10005 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
10006 (this, ret, s, e, base, err, t))
10008 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
10009 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10010 ios_base
*base
, int *err
, struct tm
*t
)
10012 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
10016 /* ?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 */
10017 /* ?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 */
10018 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
10019 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
10020 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
10021 ios_base
*base
, int *err
, struct tm
*t
)
10023 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
10026 /* ??_7_Locimp@locale@std@@6B@ */
10027 extern const vtable_ptr MSVCP_locale__Locimp_vtable
;
10029 /* ??0_Locimp@locale@std@@AAE@_N@Z */
10030 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
10031 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
10032 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
10034 TRACE("(%p %d)\n", this, transparent
);
10036 memset(this, 0, sizeof(locale__Locimp
));
10037 locale_facet_ctor_refs(&this->facet
, 1);
10038 this->facet
.vtable
= &MSVCP_locale__Locimp_vtable
;
10039 this->transparent
= transparent
;
10040 locale_string_char_ctor_cstr(&this->name
, "*");
10044 /* ??_F_Locimp@locale@std@@QAEXXZ */
10045 /* ??_F_Locimp@locale@std@@QEAAXXZ */
10046 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
10047 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
10049 return locale__Locimp_ctor_transparent(this, FALSE
);
10052 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
10053 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
10054 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
10055 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
10060 TRACE("(%p %p)\n", this, copy
);
10062 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10063 memcpy(this, copy
, sizeof(locale__Locimp
));
10064 locale_facet_ctor_refs(&this->facet
, 1);
10065 this->facet
.vtable
= &MSVCP_locale__Locimp_vtable
;
10066 if(copy
->facetvec
) {
10067 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
10068 if(!this->facetvec
) {
10069 _Lockit_dtor(&lock
);
10070 ERR("Out of memory\n");
10071 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10074 for(i
=0; i
<this->facet_cnt
; i
++)
10076 this->facetvec
[i
] = copy
->facetvec
[i
];
10077 if(this->facetvec
[i
])
10078 call_locale_facet__Incref(this->facetvec
[i
]);
10081 locale_string_char_copy_ctor(&this->name
, ©
->name
);
10082 _Lockit_dtor(&lock
);
10086 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
10087 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
10088 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
10090 return locale__Locimp_copy_ctor(this, copy
);
10093 /* ??1_Locimp@locale@std@@MAE@XZ */
10094 /* ??1_Locimp@locale@std@@MEAA@XZ */
10095 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
10096 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
10100 TRACE("(%p)\n", this);
10102 locale_facet_dtor(&this->facet
);
10103 for(i
=0; i
<this->facet_cnt
; i
++)
10104 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
10105 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
10107 MSVCRT_operator_delete(this->facetvec
);
10108 locale_string_char_dtor(&this->name
);
10111 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
10112 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
10113 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
10115 locale__Locimp_dtor(this);
10118 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
10119 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
10121 TRACE("(%p %x)\n", this, flags
);
10123 /* we have an array, with the number of elements stored before the first object */
10124 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10126 for(i
=*ptr
-1; i
>=0; i
--)
10127 locale__Locimp_dtor(this+i
);
10128 MSVCRT_operator_delete(ptr
);
10130 locale__Locimp_dtor(this);
10132 MSVCRT_operator_delete(this);
10138 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
10139 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
10140 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
10142 locale__Locimp
*ret
;
10144 TRACE("(%p)\n", copy
);
10146 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10148 ERR("Out of memory\n");
10149 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10152 return locale__Locimp_copy_ctor(ret
, copy
);
10155 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
10156 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
10157 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
10159 locale__Locimp
*ret
;
10161 TRACE("(%x)\n", transparent
);
10163 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10165 ERR("Out of memory\n");
10166 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10169 return locale__Locimp_ctor_transparent(ret
, transparent
);
10172 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
10173 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
10174 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
10178 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
10180 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10181 if(id
>= locimp
->facet_cnt
) {
10182 MSVCP_size_t new_size
= id
+1;
10183 locale_facet
**new_facetvec
;
10185 if(new_size
< locale_id__Id_cnt
+1)
10186 new_size
= locale_id__Id_cnt
+1;
10188 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
10189 if(!new_facetvec
) {
10190 _Lockit_dtor(&lock
);
10191 ERR("Out of memory\n");
10192 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10196 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
10197 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
10198 MSVCRT_operator_delete(locimp
->facetvec
);
10199 locimp
->facetvec
= new_facetvec
;
10200 locimp
->facet_cnt
= new_size
;
10203 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
10204 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
10206 locimp
->facetvec
[id
] = facet
;
10208 call_locale_facet__Incref(facet
);
10209 _Lockit_dtor(&lock
);
10212 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
10213 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
10214 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
10215 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
10217 locale__Locimp__Locimp_Addfac(this, facet
, id
);
10220 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
10221 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
10222 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
10228 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10229 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10230 /* List of missing facets:
10231 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10233 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10235 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10237 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
10238 ctype_wchar
*ctype
;
10241 ctype
= ctype_short_use_facet(loc
);
10243 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10245 ERR("Out of memory\n");
10246 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10248 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
10250 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
10253 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
10257 numget
= num_get_short_use_facet(loc
);
10259 numget
= MSVCRT_operator_new(sizeof(num_get
));
10261 ERR("Out of memory\n");
10262 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10264 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
10266 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
10269 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
10273 numput
= num_put_short_use_facet(loc
);
10275 numput
= MSVCRT_operator_new(sizeof(num_put
));
10277 ERR("Out of memory\n");
10278 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10280 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
10282 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
10285 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
10286 numpunct_wchar
*numpunct
;
10289 numpunct
= numpunct_short_use_facet(loc
);
10291 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10293 ERR("Out of memory\n");
10294 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10296 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10298 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
10301 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
10305 c
= collate_short_use_facet(loc
);
10307 c
= MSVCRT_operator_new(sizeof(collate
));
10309 ERR("Out of memory\n");
10310 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10312 collate_short_ctor_locinfo(c
, locinfo
, 0);
10314 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
10317 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
10321 t
= time_put_short_use_facet(loc
);
10323 t
= MSVCRT_operator_new(sizeof(time_put
));
10325 ERR("Out of memory\n");
10326 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10328 time_put_short_ctor_locinfo(t
, locinfo
, 0);
10330 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
10333 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
10334 codecvt_wchar
*codecvt
;
10337 codecvt
= codecvt_short_use_facet(loc
);
10339 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10341 ERR("Out of memory\n");
10342 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10344 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
10346 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
10350 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10351 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10352 /* List of missing facets:
10353 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10355 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10357 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10359 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
10360 ctype_wchar
*ctype
;
10363 ctype
= ctype_wchar_use_facet(loc
);
10365 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10367 ERR("Out of memory\n");
10368 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10370 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
10372 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
10375 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
10379 numget
= num_get_wchar_use_facet(loc
);
10381 numget
= MSVCRT_operator_new(sizeof(num_get
));
10383 ERR("Out of memory\n");
10384 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10386 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
10388 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
10391 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
10395 numput
= num_put_wchar_use_facet(loc
);
10397 numput
= MSVCRT_operator_new(sizeof(num_put
));
10399 ERR("Out of memory\n");
10400 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10402 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
10404 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
10407 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
10408 numpunct_wchar
*numpunct
;
10411 numpunct
= numpunct_wchar_use_facet(loc
);
10413 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10415 ERR("Out of memory\n");
10416 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10418 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10420 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
10423 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
10427 c
= collate_wchar_use_facet(loc
);
10429 c
= MSVCRT_operator_new(sizeof(collate
));
10431 ERR("Out of memory\n");
10432 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10434 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
10436 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
10439 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
10443 t
= time_put_wchar_use_facet(loc
);
10445 t
= MSVCRT_operator_new(sizeof(time_put
));
10447 ERR("Out of memory\n");
10448 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10450 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
10452 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
10455 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
10456 codecvt_wchar
*codecvt
;
10459 codecvt
= codecvt_wchar_use_facet(loc
);
10461 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10463 ERR("Out of memory\n");
10464 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10466 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
10468 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
10472 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10473 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10474 /* List of missing facets:
10475 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10477 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10479 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10481 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
10485 ctype
= ctype_char_use_facet(loc
);
10487 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
10489 ERR("Out of memory\n");
10490 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10492 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
10494 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
10497 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
10501 numget
= num_get_char_use_facet(loc
);
10503 numget
= MSVCRT_operator_new(sizeof(num_get
));
10505 ERR("Out of memory\n");
10506 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10508 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
10510 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
10513 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
10517 numput
= num_put_char_use_facet(loc
);
10519 numput
= MSVCRT_operator_new(sizeof(num_put
));
10521 ERR("Out of memory\n");
10522 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10524 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
10526 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
10529 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
10530 numpunct_char
*numpunct
;
10533 numpunct
= numpunct_char_use_facet(loc
);
10535 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
10537 ERR("Out of memory\n");
10538 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10540 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10542 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
10545 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
10549 c
= collate_char_use_facet(loc
);
10551 c
= MSVCRT_operator_new(sizeof(collate
));
10553 ERR("Out of memory\n");
10554 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10556 collate_char_ctor_locinfo(c
, locinfo
, 0);
10558 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
10561 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
10565 t
= time_get_char_use_facet(loc
);
10567 t
= MSVCRT_operator_new(sizeof(time_get_char
));
10569 ERR("Out of memory\n");
10570 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10572 time_get_char_ctor_locinfo(t
, locinfo
, 0);
10574 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
10577 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
10581 t
= time_put_char_use_facet(loc
);
10583 t
= MSVCRT_operator_new(sizeof(time_put
));
10585 ERR("Out of memory\n");
10586 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10588 time_put_char_ctor_locinfo(t
, locinfo
, 0);
10590 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
10593 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
10594 codecvt_char
*codecvt
;
10597 codecvt
= codecvt_char_use_facet(loc
);
10599 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
10601 ERR("Out of memory\n");
10602 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10604 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
10606 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
10610 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
10611 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10612 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10614 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
10616 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
10617 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
10618 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
10620 locimp
->catmask
|= cat
;
10621 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
10625 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
10626 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
10627 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
10628 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
10630 TRACE("(%p %p)\n", this, locimp
);
10631 /* Don't change locimp reference counter */
10632 this->ptr
= locimp
;
10636 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
10637 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
10638 locale__Locimp
* __cdecl
locale__Init(void)
10644 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10645 if(global_locale
) {
10646 _Lockit_dtor(&lock
);
10647 return global_locale
;
10650 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10651 if(!global_locale
) {
10652 _Lockit_dtor(&lock
);
10653 ERR("Out of memory\n");
10654 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10658 locale__Locimp_ctor(global_locale
);
10659 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
10660 locale_string_char_dtor(&global_locale
->name
);
10661 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
10663 locale__Locimp__Clocptr
= global_locale
;
10664 global_locale
->facet
.refs
++;
10665 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
10666 _Lockit_dtor(&lock
);
10668 return global_locale
;
10671 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
10672 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
10673 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
10675 locale__Locimp
*ret
;
10678 TRACE("(%x)\n", inc_ref
);
10680 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10681 if(inc_ref
&& global_locale
) {
10682 call_locale_facet__Incref(&global_locale
->facet
);
10683 _Lockit_dtor(&lock
);
10684 return global_locale
;
10687 ret
= locale__Init();
10688 _Lockit_dtor(&lock
);
10692 /* ?_Iscloc@locale@std@@QBE_NXZ */
10693 /* ?_Iscloc@locale@std@@QEBA_NXZ */
10694 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
10695 MSVCP_bool __thiscall
locale__Iscloc(const locale
*this)
10697 TRACE("(%p)\n", this);
10698 return this->ptr
== locale__Locimp__Clocptr
;
10701 /* ??0locale@std@@QAE@ABV01@0H@Z */
10702 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
10703 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
10704 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
10708 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
10710 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10712 ERR("Out of memory\n");
10713 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10715 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10717 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
10718 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
10719 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
10720 _Locinfo_dtor(&locinfo
);
10725 /* ??0locale@std@@QAE@ABV01@@Z */
10726 /* ??0locale@std@@QEAA@AEBV01@@Z */
10727 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
10728 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
10730 TRACE("(%p %p)\n", this, copy
);
10731 this->ptr
= copy
->ptr
;
10732 call_locale_facet__Incref(&this->ptr
->facet
);
10736 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
10737 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
10738 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
10739 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
10743 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
10745 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10746 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10747 _Locinfo_dtor(&locinfo
);
10748 MSVCRT_operator_delete(this->ptr
);
10749 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10752 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10754 ERR("Out of memory\n");
10755 _Locinfo_dtor(&locinfo
);
10756 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10758 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10760 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10761 _Locinfo_dtor(&locinfo
);
10765 /* ??0locale@std@@QAE@PBDH@Z */
10766 /* ??0locale@std@@QEAA@PEBDH@Z */
10767 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
10768 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
10772 TRACE("(%p %s %d)\n", this, locname
, cat
);
10774 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10776 ERR("Out of memory\n");
10777 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10779 locale__Locimp_ctor(this->ptr
);
10783 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10784 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10785 _Locinfo_dtor(&locinfo
);
10786 MSVCRT_operator_delete(this->ptr
);
10787 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10790 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10791 _Locinfo_dtor(&locinfo
);
10796 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10797 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10798 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10799 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10801 TRACE("(%p)\n", this);
10806 /* ??0locale@std@@QAE@XZ */
10807 /* ??0locale@std@@QEAA@XZ */
10808 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10809 locale
* __thiscall
locale_ctor(locale
*this)
10811 TRACE("(%p)\n", this);
10812 this->ptr
= locale__Init();
10813 call_locale_facet__Incref(&this->ptr
->facet
);
10817 /* ??1locale@std@@QAE@XZ */
10818 /* ??1locale@std@@QEAA@XZ */
10819 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10820 void __thiscall
locale_dtor(locale
*this)
10822 TRACE("(%p)\n", this);
10823 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10825 locale__Locimp_dtor(this->ptr
);
10826 MSVCRT_operator_delete(this->ptr
);
10830 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10831 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10832 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10833 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10835 FIXME("(%p %p) stub\n", this, loc
);
10839 /* ??8locale@std@@QBE_NABV01@@Z */
10840 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10841 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10842 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10844 FIXME("(%p %p) stub\n", this, loc
);
10848 /* ??9locale@std@@QBE_NABV01@@Z */
10849 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10850 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10851 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10853 FIXME("(%p %p) stub\n", this, loc
);
10857 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10858 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10859 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10860 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10862 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10864 if(this->ptr
->facet
.refs
> 1) {
10865 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10867 ERR("Out of memory\n");
10868 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10871 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10872 call_locale_facet__Decref(&this->ptr
->facet
);
10873 this->ptr
= new_ptr
;
10876 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10879 locale_string_char_dtor(&this->ptr
->name
);
10880 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10885 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
10886 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
10887 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
10888 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
10889 MSVCP_size_t id
, MSVCP_bool allow_transparent
)
10893 TRACE("(%p %lu)\n", this, id
);
10895 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10896 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
10899 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10902 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10903 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10904 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10905 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10907 return locale__Getfacet_bool( this, id
, TRUE
);
10910 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10911 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10912 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10915 return global_locale
;
10918 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
10919 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
10920 void __cdecl
locale__Setgloballocale(void *locimp
)
10922 TRACE("(%p)\n", locimp
);
10923 global_locale
= locimp
;
10926 /* ?classic@locale@std@@SAABV12@XZ */
10927 /* ?classic@locale@std@@SAAEBV12@XZ */
10928 const locale
* __cdecl
locale_classic(void)
10932 return &classic_locale
;
10935 /* ?empty@locale@std@@SA?AV12@XZ */
10936 locale
* __cdecl
locale_empty(locale
*ret
)
10942 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10944 ERR("Out of memory\n");
10945 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10947 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
10951 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
10952 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
10953 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
10958 TRACE("(%p %p)\n", loc
, ret
);
10960 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10963 if(loc
->ptr
!= global_locale
) {
10964 call_locale_facet__Decref(&global_locale
->facet
);
10965 global_locale
= loc
->ptr
;
10966 call_locale_facet__Incref(&global_locale
->facet
);
10968 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
10969 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
10971 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
10974 _Lockit_dtor(&lock
);
10978 #if _MSVCP_VER < 100
10980 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10981 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10982 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
10983 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
10985 TRACE("(%p)\n", this);
10987 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
10991 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10992 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10993 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
10994 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
10996 TRACE( "(%p)\n", this);
10997 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
11003 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
11004 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
11005 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
11006 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
11008 return locale_string_char_c_str( &this->newlocname
);
11011 #endif /* _MSVCP_VER < 100 */
11014 wctrans_t __cdecl
wctrans(const char *property
)
11016 static const char str_tolower
[] = "tolower";
11017 static const char str_toupper
[] = "toupper";
11019 if(!strcmp(property
, str_tolower
))
11021 if(!strcmp(property
, str_toupper
))
11027 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
11030 return towupper(c
);
11031 return towlower(c
);
11035 wint_t __cdecl
btowc(int c
)
11041 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
11046 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
11048 static int local_state
;
11050 if (!state
) state
= &local_state
;
11051 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
11055 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
11057 static int local_state
;
11059 if (!state
) state
= &local_state
;
11060 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
11064 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
11066 static int local_state
;
11072 if (!state
) state
= &local_state
;
11074 while (!dst
|| n
> ret
)
11076 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
11077 if (len
< 0) return -1;
11079 if (dst
) dst
[ret
] = wc
;
11088 int __cdecl
wctob(wint_t wc
)
11090 char ret
[MB_LEN_MAX
];
11092 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
11097 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
11099 return _Wcrtomb( dst
, wc
, state
, NULL
);
11103 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
11105 const wchar_t *src
;
11106 char buffer
[MB_LEN_MAX
];
11111 while (!dst
|| n
> ret
)
11113 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
11114 if (len
<= 0) return -1;
11115 if (n
< ret
+ len
) break;
11116 memcpy( dst
+ ret
, buffer
, len
);
11118 if (!buffer
[0]) break;
11125 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
11126 DEFINE_RTTI_DATA1(locale__Locimp
, 0, &locale_facet_rtti_base_descriptor
, ".?AV_Locimp@locale@std@@")
11127 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
11128 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
11129 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
11130 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
11131 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
11132 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
11133 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
11134 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
11135 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
11136 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
11137 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
11138 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
11139 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
11140 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
11141 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@@")
11142 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@@")
11143 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@@")
11144 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@@")
11145 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@@")
11146 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@@")
11147 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@@")
11148 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@@")
11149 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@@")
11150 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
11151 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@@")
11154 void __asm_dummy_vtables(void) {
11156 __ASM_VTABLE(locale_facet
,
11157 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
11158 #if _MSVCP_VER >= 110
11159 VTABLE_ADD_FUNC(locale_facet__Incref
)
11160 VTABLE_ADD_FUNC(locale_facet__Decref
)
11163 __ASM_VTABLE(locale__Locimp
,
11164 VTABLE_ADD_FUNC(locale__Locimp_vector_dtor
)
11165 #if _MSVCP_VER >= 110
11166 VTABLE_ADD_FUNC(locale_facet__Incref
)
11167 VTABLE_ADD_FUNC(locale_facet__Decref
)
11170 __ASM_VTABLE(collate_char
,
11171 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
11172 #if _MSVCP_VER >= 110
11173 VTABLE_ADD_FUNC(locale_facet__Incref
)
11174 VTABLE_ADD_FUNC(locale_facet__Decref
)
11176 VTABLE_ADD_FUNC(collate_char_do_compare
)
11177 VTABLE_ADD_FUNC(collate_char_do_transform
)
11178 VTABLE_ADD_FUNC(collate_char_do_hash
));
11179 __ASM_VTABLE(collate_wchar
,
11180 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11181 #if _MSVCP_VER >= 110
11182 VTABLE_ADD_FUNC(locale_facet__Incref
)
11183 VTABLE_ADD_FUNC(locale_facet__Decref
)
11185 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11186 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11187 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11188 __ASM_VTABLE(collate_short
,
11189 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11190 #if _MSVCP_VER >= 110
11191 VTABLE_ADD_FUNC(locale_facet__Incref
)
11192 VTABLE_ADD_FUNC(locale_facet__Decref
)
11194 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11195 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11196 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11197 __ASM_VTABLE(ctype_base
,
11198 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
11199 #if _MSVCP_VER >= 110
11200 VTABLE_ADD_FUNC(locale_facet__Incref
)
11201 VTABLE_ADD_FUNC(locale_facet__Decref
)
11204 __ASM_VTABLE(ctype_char
,
11205 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
11206 #if _MSVCP_VER >= 110
11207 VTABLE_ADD_FUNC(locale_facet__Incref
)
11208 VTABLE_ADD_FUNC(locale_facet__Decref
)
11210 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
11211 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
11212 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
11213 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
11214 VTABLE_ADD_FUNC(ctype_char_do_widen
)
11215 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
11216 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11217 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
11218 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11219 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11220 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
11222 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11223 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11226 __ASM_VTABLE(ctype_wchar
,
11227 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11228 #if _MSVCP_VER >= 110
11229 VTABLE_ADD_FUNC(locale_facet__Incref
)
11230 VTABLE_ADD_FUNC(locale_facet__Decref
)
11232 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11233 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11234 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11235 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11236 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11237 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11238 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11239 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11240 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11241 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11242 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11243 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11244 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11245 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11246 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11248 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11249 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11252 __ASM_VTABLE(ctype_short
,
11253 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11254 #if _MSVCP_VER >= 110
11255 VTABLE_ADD_FUNC(locale_facet__Incref
)
11256 VTABLE_ADD_FUNC(locale_facet__Decref
)
11258 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11259 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11260 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11261 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11262 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11263 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11264 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11265 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11266 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11267 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11268 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11269 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11270 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11271 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11272 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11274 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11275 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11278 __ASM_VTABLE(codecvt_base
,
11279 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
11280 #if _MSVCP_VER >= 110
11281 VTABLE_ADD_FUNC(locale_facet__Incref
)
11282 VTABLE_ADD_FUNC(locale_facet__Decref
)
11284 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11285 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11286 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
11287 __ASM_VTABLE(codecvt_char
,
11288 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
11289 #if _MSVCP_VER >= 110
11290 VTABLE_ADD_FUNC(locale_facet__Incref
)
11291 VTABLE_ADD_FUNC(locale_facet__Decref
)
11293 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11294 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11295 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11296 VTABLE_ADD_FUNC(codecvt_char_do_in
)
11297 VTABLE_ADD_FUNC(codecvt_char_do_out
)
11298 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
11299 VTABLE_ADD_FUNC(codecvt_char_do_length
));
11300 __ASM_VTABLE(codecvt_wchar
,
11301 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11302 #if _MSVCP_VER >= 110
11303 VTABLE_ADD_FUNC(locale_facet__Incref
)
11304 VTABLE_ADD_FUNC(locale_facet__Decref
)
11306 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11307 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11308 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11309 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11310 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11311 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11312 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11313 __ASM_VTABLE(codecvt_short
,
11314 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11315 #if _MSVCP_VER >= 110
11316 VTABLE_ADD_FUNC(locale_facet__Incref
)
11317 VTABLE_ADD_FUNC(locale_facet__Decref
)
11319 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11320 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11321 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11322 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11323 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11324 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11325 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11326 __ASM_VTABLE(numpunct_char
,
11327 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
11328 #if _MSVCP_VER >= 110
11329 VTABLE_ADD_FUNC(locale_facet__Incref
)
11330 VTABLE_ADD_FUNC(locale_facet__Decref
)
11332 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
11333 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
11334 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
11335 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
11336 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
11337 __ASM_VTABLE(numpunct_wchar
,
11338 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11339 #if _MSVCP_VER >= 110
11340 VTABLE_ADD_FUNC(locale_facet__Incref
)
11341 VTABLE_ADD_FUNC(locale_facet__Decref
)
11343 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11344 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11345 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11346 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11347 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11348 __ASM_VTABLE(numpunct_short
,
11349 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11350 #if _MSVCP_VER >= 110
11351 VTABLE_ADD_FUNC(locale_facet__Incref
)
11352 VTABLE_ADD_FUNC(locale_facet__Decref
)
11354 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11355 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11356 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11357 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11358 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11359 __ASM_VTABLE(num_get_char
,
11360 VTABLE_ADD_FUNC(num_get_char_vector_dtor
)
11361 #if _MSVCP_VER >= 110
11362 VTABLE_ADD_FUNC(locale_facet__Incref
)
11363 VTABLE_ADD_FUNC(locale_facet__Decref
)
11365 VTABLE_ADD_FUNC(num_get_char_do_get_void
)
11366 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11367 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11368 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
11369 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
11370 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
11371 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
11372 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
11373 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
11374 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
11375 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
11376 __ASM_VTABLE(num_get_short
,
11377 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11378 #if _MSVCP_VER >= 110
11379 VTABLE_ADD_FUNC(locale_facet__Incref
)
11380 VTABLE_ADD_FUNC(locale_facet__Decref
)
11382 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
11383 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11384 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11385 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
11386 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
11387 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
11388 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
11389 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
11390 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
11391 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
11392 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
11393 __ASM_VTABLE(num_get_wchar
,
11394 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11395 #if _MSVCP_VER >= 110
11396 VTABLE_ADD_FUNC(locale_facet__Incref
)
11397 VTABLE_ADD_FUNC(locale_facet__Decref
)
11399 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
11400 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11401 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11402 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
11403 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
11404 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
11405 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
11406 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
11407 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
11408 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
11409 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
11410 __ASM_VTABLE(num_put_char
,
11411 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
11412 #if _MSVCP_VER >= 110
11413 VTABLE_ADD_FUNC(locale_facet__Incref
)
11414 VTABLE_ADD_FUNC(locale_facet__Decref
)
11416 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
11417 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11418 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11419 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
11420 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
11421 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
11422 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
11423 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
11424 __ASM_VTABLE(num_put_wchar
,
11425 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11426 #if _MSVCP_VER >= 110
11427 VTABLE_ADD_FUNC(locale_facet__Incref
)
11428 VTABLE_ADD_FUNC(locale_facet__Decref
)
11430 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
11431 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11432 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11433 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
11434 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
11435 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
11436 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
11437 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
11438 __ASM_VTABLE(num_put_short
,
11439 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11440 #if _MSVCP_VER >= 110
11441 VTABLE_ADD_FUNC(locale_facet__Incref
)
11442 VTABLE_ADD_FUNC(locale_facet__Decref
)
11444 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
11445 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11446 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11447 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
11448 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
11449 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
11450 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
11451 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
11452 __ASM_VTABLE(time_put_char
,
11453 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
11454 #if _MSVCP_VER >= 110
11455 VTABLE_ADD_FUNC(locale_facet__Incref
)
11456 VTABLE_ADD_FUNC(locale_facet__Decref
)
11458 VTABLE_ADD_FUNC(time_put_char_do_put
));
11459 __ASM_VTABLE(time_put_wchar
,
11460 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11461 #if _MSVCP_VER >= 110
11462 VTABLE_ADD_FUNC(locale_facet__Incref
)
11463 VTABLE_ADD_FUNC(locale_facet__Decref
)
11465 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11466 __ASM_VTABLE(time_put_short
,
11467 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11468 #if _MSVCP_VER >= 110
11469 VTABLE_ADD_FUNC(locale_facet__Incref
)
11470 VTABLE_ADD_FUNC(locale_facet__Decref
)
11472 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11473 __ASM_VTABLE(time_get_char
,
11474 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
11475 #if _MSVCP_VER >= 110
11476 VTABLE_ADD_FUNC(locale_facet__Incref
)
11477 VTABLE_ADD_FUNC(locale_facet__Decref
)
11479 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
11480 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
11481 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
11482 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
11483 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
11484 VTABLE_ADD_FUNC(time_get_char_do_get_year
));
11489 void init_locale(void *base
)
11492 init_locale_facet_rtti(base
);
11493 init_locale__Locimp_rtti(base
);
11494 init_collate_char_rtti(base
);
11495 init_collate_wchar_rtti(base
);
11496 init_collate_short_rtti(base
);
11497 init_ctype_base_rtti(base
);
11498 init_ctype_char_rtti(base
);
11499 init_ctype_wchar_rtti(base
);
11500 init_ctype_short_rtti(base
);
11501 init_codecvt_base_rtti(base
);
11502 init_codecvt_char_rtti(base
);
11503 init_codecvt_wchar_rtti(base
);
11504 init_codecvt_short_rtti(base
);
11505 init_numpunct_char_rtti(base
);
11506 init_numpunct_wchar_rtti(base
);
11507 init_numpunct_short_rtti(base
);
11508 init_num_get_char_rtti(base
);
11509 init_num_get_wchar_rtti(base
);
11510 init_num_get_short_rtti(base
);
11511 init_num_put_char_rtti(base
);
11512 init_num_put_wchar_rtti(base
);
11513 init_num_put_short_rtti(base
);
11514 init_time_put_char_rtti(base
);
11515 init_time_put_wchar_rtti(base
);
11516 init_time_put_short_rtti(base
);
11517 init_time_base_rtti(base
);
11518 init_time_get_char_rtti(base
);
11522 void free_locale(void)
11524 facets_elem
*iter
, *safe
;
11526 if(global_locale
) {
11527 locale_dtor(&classic_locale
);
11528 locale__Locimp_dtor(global_locale
);
11529 MSVCRT_operator_delete(global_locale
);
11532 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
11533 list_remove(&iter
->entry
);
11534 if(call_locale_facet__Decref(iter
->fac
))
11535 call_locale_facet_vector_dtor(iter
->fac
, 1);
11536 MSVCRT_operator_delete(iter
);