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);
65 static LCID
* ___lc_handle_func(void)
69 _locale_t loc
= _get_current_locale();
70 ret
= loc
->locinfo
->lc_handle
;
75 LCID
* __cdecl
___lc_handle_func(void);
79 #define locale_string basic_string_char
80 #define locale_string_char_ctor_cstr(this,str) MSVCP_basic_string_char_ctor_cstr(this,str)
81 #define locale_string_char_copy_ctor(this,copy) MSVCP_basic_string_char_copy_ctor(this,copy)
82 #define locale_string_char_dtor(this) MSVCP_basic_string_char_dtor(this)
83 #define locale_string_char_c_str(this) MSVCP_basic_string_char_c_str(this)
84 #define locale_string_char_assign(this,assign) MSVCP_basic_string_char_assign(this,assign)
86 #define locale_string _Yarn_char
87 #define locale_string_char_ctor_cstr(this,str) _Yarn_char_ctor_cstr(this,str)
88 #define locale_string_char_copy_ctor(this,copy) _Yarn_char_copy_ctor(this,copy)
89 #define locale_string_char_dtor(this) _Yarn_char_dtor(this)
90 #define locale_string_char_c_str(this) _Yarn_char_c_str(this)
91 #define locale_string_char_assign(this,assign) _Yarn_char_op_assign(this,assign)
93 #define locale_string_wchar _Yarn_wchar
94 #define locale_string_wchar_ctor(this) _Yarn_wchar_ctor(this)
95 #define locale_string_wchar_ctor_cstr(this,str) _Yarn_wchar_ctor(this); _Yarn_wchar_op_assign_cstr(this,str)
96 #define locale_string_wchar_dtor(this) _Yarn_wchar_dtor(this)
97 #define locale_string_wchar_c_str(this) _Yarn_wchar__C_str(this)
100 typedef int category
;
106 typedef struct _locale__Locimp
{
108 locale_facet
**facetvec
;
109 MSVCP_size_t facet_cnt
;
111 MSVCP_bool transparent
;
122 locale_string months
;
123 #if _MSVCP_VER >= 110
124 locale_string_wchar wdays
;
125 locale_string_wchar wmonths
;
127 locale_string oldlocname
;
128 locale_string newlocname
;
143 const char *grouping
;
146 const char *false_name
;
147 const char *true_name
;
152 const char *grouping
;
155 const wchar_t *false_name
;
156 const wchar_t *true_name
;
173 /* ?_Id_cnt@id@locale@std@@0HA */
174 int locale_id__Id_cnt
= 0;
176 static locale classic_locale
;
178 /* ?_Global@_Locimp@locale@std@@0PAV123@A */
179 /* ?_Global@_Locimp@locale@std@@0PEAV123@EA */
180 locale__Locimp
*global_locale
= NULL
;
182 /* ?_Clocptr@_Locimp@locale@std@@0PAV123@A */
183 /* ?_Clocptr@_Locimp@locale@std@@0PEAV123@EA */
184 locale__Locimp
*locale__Locimp__Clocptr
= NULL
;
186 static char istreambuf_iterator_char_val(istreambuf_iterator_char
*this)
188 if(this->strbuf
&& !this->got
) {
189 int c
= basic_streambuf_char_sgetc(this->strbuf
);
200 static wchar_t istreambuf_iterator_wchar_val(istreambuf_iterator_wchar
*this)
202 if(this->strbuf
&& !this->got
) {
203 unsigned short c
= basic_streambuf_wchar_sgetc(this->strbuf
);
214 static void istreambuf_iterator_char_inc(istreambuf_iterator_char
*this)
216 if(!this->strbuf
|| basic_streambuf_char_sbumpc(this->strbuf
)==EOF
) {
221 istreambuf_iterator_char_val(this);
225 static void istreambuf_iterator_wchar_inc(istreambuf_iterator_wchar
*this)
227 if(!this->strbuf
|| basic_streambuf_wchar_sbumpc(this->strbuf
)==WEOF
) {
232 istreambuf_iterator_wchar_val(this);
236 static void ostreambuf_iterator_char_put(ostreambuf_iterator_char
*this, char ch
)
238 if(this->failed
|| basic_streambuf_char_sputc(this->strbuf
, ch
)==EOF
)
242 static void ostreambuf_iterator_wchar_put(ostreambuf_iterator_wchar
*this, wchar_t ch
)
244 if(this->failed
|| basic_streambuf_wchar_sputc(this->strbuf
, ch
)==WEOF
)
248 /* ??1facet@locale@std@@UAE@XZ */
249 /* ??1facet@locale@std@@UEAA@XZ */
250 /* ??1facet@locale@std@@MAA@XZ */
251 /* ??1facet@locale@std@@MAE@XZ */
252 /* ??1facet@locale@std@@MEAA@XZ */
253 DEFINE_THISCALL_WRAPPER(locale_facet_dtor
, 4)
254 void __thiscall
locale_facet_dtor(locale_facet
*this)
256 TRACE("(%p)\n", this);
259 DEFINE_THISCALL_WRAPPER(locale_facet_vector_dtor
, 8)
260 #define call_locale_facet_vector_dtor(this, flags) CALL_VTBL_FUNC(this, 0, \
261 locale_facet*, (locale_facet*, unsigned int), (this, flags))
262 locale_facet
* __thiscall
locale_facet_vector_dtor(locale_facet
*this, unsigned int flags
)
264 TRACE("(%p %x)\n", this, flags
);
266 /* we have an array, with the number of elements stored before the first object */
267 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
269 for(i
=*ptr
-1; i
>=0; i
--)
270 locale_facet_dtor(this+i
);
271 MSVCRT_operator_delete(ptr
);
273 locale_facet_dtor(this);
275 MSVCRT_operator_delete(this);
286 static struct list lazy_facets
= LIST_INIT(lazy_facets
);
288 /* Not exported from msvcp90 */
289 /* ?facet_Register@facet@locale@std@@CAXPAV123@@Z */
290 /* ?facet_Register@facet@locale@std@@CAXPEAV123@@Z */
291 void __cdecl
locale_facet_register(locale_facet
*add
)
293 facets_elem
*head
= MSVCRT_operator_new(sizeof(*head
));
295 ERR("Out of memory\n");
296 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
300 list_add_head(&lazy_facets
, &head
->entry
);
303 /* Not exported from msvcp90 */
304 /* ?_Register@facet@locale@std@@QAEXXZ */
305 /* ?_Register@facet@locale@std@@QEAAXXZ */
306 DEFINE_THISCALL_WRAPPER(locale_facet__Register
, 4)
307 void __thiscall
locale_facet__Register(locale_facet
*this)
309 TRACE("(%p)\n", this);
310 locale_facet_register(this);
313 /* Not exported from msvcp90 */
314 /* ??_7facet@locale@std@@6B@ */
315 extern const vtable_ptr MSVCP_locale_facet_vtable
;
317 /* ??0id@locale@std@@QAE@I@Z */
318 /* ??0id@locale@std@@QEAA@_K@Z */
319 DEFINE_THISCALL_WRAPPER(locale_id_ctor_id
, 8)
320 locale_id
* __thiscall
locale_id_ctor_id(locale_id
*this, MSVCP_size_t id
)
322 TRACE("(%p %lu)\n", this, id
);
328 /* ??_Fid@locale@std@@QAEXXZ */
329 /* ??_Fid@locale@std@@QEAAXXZ */
330 DEFINE_THISCALL_WRAPPER(locale_id_ctor
, 4)
331 locale_id
* __thiscall
locale_id_ctor(locale_id
*this)
333 TRACE("(%p)\n", this);
339 /* ??Bid@locale@std@@QAEIXZ */
340 /* ??Bid@locale@std@@QEAA_KXZ */
341 DEFINE_THISCALL_WRAPPER(locale_id_operator_size_t
, 4)
342 MSVCP_size_t __thiscall
locale_id_operator_size_t(locale_id
*this)
346 TRACE("(%p)\n", this);
349 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
350 this->id
= ++locale_id__Id_cnt
;
357 /* ?_Id_cnt_func@id@locale@std@@CAAAHXZ */
358 /* ?_Id_cnt_func@id@locale@std@@CAAEAHXZ */
359 int* __cdecl
locale_id__Id_cnt_func(void)
362 return &locale_id__Id_cnt
;
365 /* ??_Ffacet@locale@std@@QAEXXZ */
366 /* ??_Ffacet@locale@std@@QEAAXXZ */
367 DEFINE_THISCALL_WRAPPER(locale_facet_ctor
, 4)
368 locale_facet
* __thiscall
locale_facet_ctor(locale_facet
*this)
370 TRACE("(%p)\n", this);
371 this->vtable
= &MSVCP_locale_facet_vtable
;
376 /* ??0facet@locale@std@@IAE@I@Z */
377 /* ??0facet@locale@std@@IEAA@_K@Z */
378 DEFINE_THISCALL_WRAPPER(locale_facet_ctor_refs
, 8)
379 locale_facet
* __thiscall
locale_facet_ctor_refs(locale_facet
*this, MSVCP_size_t refs
)
381 TRACE("(%p %lu)\n", this, refs
);
382 this->vtable
= &MSVCP_locale_facet_vtable
;
387 /* ?_Incref@facet@locale@std@@QAEXXZ */
388 /* ?_Incref@facet@locale@std@@QEAAXXZ */
389 /* ?_Incref@facet@locale@std@@UAEXXZ */
390 /* ?_Incref@facet@locale@std@@UEAAXXZ */
391 #if _MSVCP_VER >= 110
392 #define call_locale_facet__Incref(this) CALL_VTBL_FUNC(this, 4, void, (locale_facet*), (this))
394 #define call_locale_facet__Incref locale_facet__Incref
396 DEFINE_THISCALL_WRAPPER(locale_facet__Incref
, 4)
397 void __thiscall
locale_facet__Incref(locale_facet
*this)
401 TRACE("(%p)\n", this);
403 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
408 /* ?_Decref@facet@locale@std@@QAEPAV123@XZ */
409 /* ?_Decref@facet@locale@std@@QEAAPEAV123@XZ */
410 /* ?_Decref@facet@locale@std@@UAEPAV_Facet_base@3@XZ */
411 /* ?_Decref@facet@locale@std@@UEAAPEAV_Facet_base@3@XZ */
412 #if _MSVCP_VER >= 110
413 #define call_locale_facet__Decref(this) CALL_VTBL_FUNC(this, 8, \
414 locale_facet*, (locale_facet*), (this))
416 #define call_locale_facet__Decref locale_facet__Decref
418 DEFINE_THISCALL_WRAPPER(locale_facet__Decref
, 4)
419 locale_facet
* __thiscall
locale_facet__Decref(locale_facet
*this)
424 TRACE("(%p)\n", this);
426 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
430 ret
= this->refs
? NULL
: this;
436 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@PBV23@@Z */
437 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@PEBV23@@Z */
438 MSVCP_size_t __cdecl
locale_facet__Getcat(const locale_facet
**facet
, const locale
*loc
)
440 TRACE("(%p %p)\n", facet
, loc
);
444 /* ?_Getcat@facet@locale@std@@SAIPAPBV123@@Z */
445 /* ?_Getcat@facet@locale@std@@SA_KPEAPEBV123@@Z */
446 MSVCP_size_t __cdecl
locale_facet__Getcat_old(const locale_facet
**facet
)
448 TRACE("(%p)\n", facet
);
452 /* ??0_Timevec@std@@QAE@ABV01@@Z */
453 /* ??0_Timevec@std@@QEAA@AEBV01@@Z */
454 /* This copy constructor modifies copied object */
455 DEFINE_THISCALL_WRAPPER(_Timevec_copy_ctor
, 8)
456 _Timevec
* __thiscall
_Timevec_copy_ctor(_Timevec
*this, _Timevec
*copy
)
458 TRACE("(%p %p)\n", this, copy
);
459 this->timeptr
= copy
->timeptr
;
460 copy
->timeptr
= NULL
;
464 /* ??0_Timevec@std@@QAE@PAX@Z */
465 /* ??0_Timevec@std@@QEAA@PEAX@Z */
466 DEFINE_THISCALL_WRAPPER(_Timevec_ctor_timeptr
, 8)
467 _Timevec
* __thiscall
_Timevec_ctor_timeptr(_Timevec
*this, void *timeptr
)
469 TRACE("(%p %p)\n", this, timeptr
);
470 this->timeptr
= timeptr
;
474 /* ??_F_Timevec@std@@QAEXXZ */
475 /* ??_F_Timevec@std@@QEAAXXZ */
476 DEFINE_THISCALL_WRAPPER(_Timevec_ctor
, 4)
477 _Timevec
* __thiscall
_Timevec_ctor(_Timevec
*this)
479 TRACE("(%p)\n", this);
480 this->timeptr
= NULL
;
484 /* ??1_Timevec@std@@QAE@XZ */
485 /* ??1_Timevec@std@@QEAA@XZ */
486 DEFINE_THISCALL_WRAPPER(_Timevec_dtor
, 4)
487 void __thiscall
_Timevec_dtor(_Timevec
*this)
489 TRACE("(%p)\n", this);
493 /* ??4_Timevec@std@@QAEAAV01@ABV01@@Z */
494 /* ??4_Timevec@std@@QEAAAEAV01@AEBV01@@Z */
495 DEFINE_THISCALL_WRAPPER(_Timevec_op_assign
, 8)
496 _Timevec
* __thiscall
_Timevec_op_assign(_Timevec
*this, _Timevec
*right
)
498 TRACE("(%p %p)\n", this, right
);
499 this->timeptr
= right
->timeptr
;
500 right
->timeptr
= NULL
;
504 /* ?_Getptr@_Timevec@std@@QBEPAXXZ */
505 /* ?_Getptr@_Timevec@std@@QEBAPEAXXZ */
506 DEFINE_THISCALL_WRAPPER(_Timevec__Getptr
, 4)
507 void* __thiscall
_Timevec__Getptr(_Timevec
*this)
509 TRACE("(%p)\n", this);
510 return this->timeptr
;
513 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@HPBD@Z */
514 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@HPEBD@Z */
515 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cat_cstr(_Locinfo
*locinfo
, int category
, const char *locstr
)
517 const char *locale
= NULL
;
518 #if _MSVCP_VER >= 110
519 static const wchar_t empty
[] = { '\0' };
522 /* This function is probably modifying more global objects */
523 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
526 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
528 _Lockit_ctor_locktype(&locinfo
->lock
, _LOCK_LOCALE
);
529 locale_string_char_ctor_cstr(&locinfo
->days
, "");
530 locale_string_char_ctor_cstr(&locinfo
->months
, "");
531 #if _MSVCP_VER >= 110
532 locale_string_wchar_ctor_cstr(&locinfo
->wdays
, empty
);
533 locale_string_wchar_ctor_cstr(&locinfo
->wmonths
, empty
);
535 locale_string_char_ctor_cstr(&locinfo
->oldlocname
, setlocale(LC_ALL
, NULL
));
538 locale
= setlocale(LC_ALL
, locstr
);
540 locale
= setlocale(LC_ALL
, NULL
);
543 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
545 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
550 /* ??0_Locinfo@std@@QAE@HPBD@Z */
551 /* ??0_Locinfo@std@@QEAA@HPEBD@Z */
552 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cat_cstr
, 12)
553 _Locinfo
* __thiscall
_Locinfo_ctor_cat_cstr(_Locinfo
*this, int category
, const char *locstr
)
555 return _Locinfo__Locinfo_ctor_cat_cstr(this, category
, locstr
);
558 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
559 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z */
560 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_bstr(_Locinfo
*locinfo
, const basic_string_char
*locstr
)
562 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
565 /* ??0_Locinfo@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
566 /* ??0_Locinfo@std@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z */
567 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_bstr
, 8)
568 _Locinfo
* __thiscall
_Locinfo_ctor_bstr(_Locinfo
*this, const basic_string_char
*locstr
)
570 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, MSVCP_basic_string_char_c_str(locstr
));
573 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z */
574 /* ?_Locinfo_ctor@_Locinfo@std@@SAXPEAV12@PEBD@Z */
575 _Locinfo
* __cdecl
_Locinfo__Locinfo_ctor_cstr(_Locinfo
*locinfo
, const char *locstr
)
577 return _Locinfo__Locinfo_ctor_cat_cstr(locinfo
, 1/*FIXME*/, locstr
);
580 /* ??0_Locinfo@std@@QAE@PBD@Z */
581 /* ??0_Locinfo@std@@QEAA@PEBD@Z */
582 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor_cstr
, 8)
583 _Locinfo
* __thiscall
_Locinfo_ctor_cstr(_Locinfo
*this, const char *locstr
)
585 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, locstr
);
588 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z */
589 /* ?_Locinfo_dtor@_Locinfo@std@@SAXPEAV12@@Z */
590 void __cdecl
_Locinfo__Locinfo_dtor(_Locinfo
*locinfo
)
592 TRACE("(%p)\n", locinfo
);
594 setlocale(LC_ALL
, locale_string_char_c_str(&locinfo
->oldlocname
));
595 locale_string_char_dtor(&locinfo
->days
);
596 locale_string_char_dtor(&locinfo
->months
);
597 #if _MSVCP_VER >= 110
598 locale_string_wchar_dtor(&locinfo
->wdays
);
599 locale_string_wchar_dtor(&locinfo
->wmonths
);
601 locale_string_char_dtor(&locinfo
->oldlocname
);
602 locale_string_char_dtor(&locinfo
->newlocname
);
603 _Lockit_dtor(&locinfo
->lock
);
606 /* ??_F_Locinfo@std@@QAEXXZ */
607 /* ??_F_Locinfo@std@@QEAAXXZ */
608 DEFINE_THISCALL_WRAPPER(_Locinfo_ctor
, 4)
609 _Locinfo
* __thiscall
_Locinfo_ctor(_Locinfo
*this)
611 return _Locinfo__Locinfo_ctor_cat_cstr(this, 1/*FIXME*/, "C");
614 /* ??1_Locinfo@std@@QAE@XZ */
615 /* ??1_Locinfo@std@@QEAA@XZ */
616 DEFINE_THISCALL_WRAPPER(_Locinfo_dtor
, 4)
617 void __thiscall
_Locinfo_dtor(_Locinfo
*this)
619 _Locinfo__Locinfo_dtor(this);
622 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAAV12@PAV12@HPBD@Z */
623 /* ?_Locinfo_Addcats@_Locinfo@std@@SAAEAV12@PEAV12@HPEBD@Z */
624 _Locinfo
* __cdecl
_Locinfo__Locinfo_Addcats(_Locinfo
*locinfo
, int category
, const char *locstr
)
626 const char *locale
= NULL
;
628 /* This function is probably modifying more global objects */
629 FIXME("(%p %d %s) semi-stub\n", locinfo
, category
, locstr
);
631 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
633 locale_string_char_dtor(&locinfo
->newlocname
);
636 locale
= setlocale(LC_ALL
, locstr
);
638 locale
= setlocale(LC_ALL
, NULL
);
641 locale_string_char_ctor_cstr(&locinfo
->newlocname
, locale
);
643 locale_string_char_ctor_cstr(&locinfo
->newlocname
, "*");
648 /* ?_Addcats@_Locinfo@std@@QAEAAV12@HPBD@Z */
649 /* ?_Addcats@_Locinfo@std@@QEAAAEAV12@HPEBD@Z */
650 DEFINE_THISCALL_WRAPPER(_Locinfo__Addcats
, 12)
651 _Locinfo
* __thiscall
_Locinfo__Addcats(_Locinfo
*this, int category
, const char *locstr
)
653 return _Locinfo__Locinfo_Addcats(this, category
, locstr
);
657 ULONGLONG __cdecl
_Getcoll(void)
666 ret
.collvec
.page
= ___lc_collate_cp_func();
667 ret
.collvec
.handle
= ___lc_handle_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
)
688 ret
->page
= ___lc_codepage_func();
690 ret
->handle
= ___lc_handle_func()[LC_COLLATE
];
692 ret
->name
= ___lc_locale_name_func()[LC_COLLATE
];
695 table
= malloc(sizeof(short[256]));
696 if(!table
) throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
697 memcpy(table
, __pctype_func(), sizeof(short[256]));
702 /* ?_Getctype@_Locinfo@std@@QBE?AU_Ctypevec@@XZ */
703 /* ?_Getctype@_Locinfo@std@@QEBA?AU_Ctypevec@@XZ */
704 DEFINE_THISCALL_WRAPPER(_Locinfo__Getctype
, 8)
705 _Ctypevec
* __thiscall
_Locinfo__Getctype(const _Locinfo
*this, _Ctypevec
*ret
)
707 return _Getctype(ret
);
712 ULONGLONG __cdecl
_Getcvt(void)
721 ret
.cvtvec
.page
= ___lc_codepage_func();
722 ret
.cvtvec
.handle
= ___lc_handle_func()[LC_CTYPE
];
726 _Cvtvec
* __cdecl
_Getcvt(_Cvtvec
*ret
)
732 memset(ret
, 0, sizeof(*ret
));
733 ret
->page
= ___lc_codepage_func();
734 ret
->mb_max
= ___mb_cur_max_func();
736 if(ret
->mb_max
> 1) {
738 if(_ismbblead(i
)) ret
->isleadbyte
[i
/8] |= 1 << (i
&7);
744 /* ?_Getcvt@_Locinfo@std@@QBE?AU_Cvtvec@@XZ */
745 /* ?_Getcvt@_Locinfo@std@@QEBA?AU_Cvtvec@@XZ */
746 DEFINE_THISCALL_WRAPPER(_Locinfo__Getcvt
, 8)
747 _Cvtvec
* __thiscall
_Locinfo__Getcvt(const _Locinfo
*this, _Cvtvec
*ret
)
750 ULONGLONG ull
= _Getcvt();
751 memcpy(ret
, &ull
, sizeof(ull
));
755 memcpy(ret
, &cvtvec
, sizeof(cvtvec
));
760 int __cdecl
_Getdateorder(void)
764 if(!GetLocaleInfoW(___lc_handle_func()[LC_TIME
], LOCALE_ILDATE
,
765 date_fmt
, sizeof(date_fmt
)/sizeof(*date_fmt
)))
766 return DATEORDER_no_order
;
768 if(*date_fmt
== '0') return DATEORDER_mdy
;
769 if(*date_fmt
== '1') return DATEORDER_dmy
;
770 if(*date_fmt
== '2') return DATEORDER_ymd
;
771 return DATEORDER_no_order
;
774 /* ?_Getdateorder@_Locinfo@std@@QBEHXZ */
775 /* ?_Getdateorder@_Locinfo@std@@QEBAHXZ */
776 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdateorder
, 4)
777 int __thiscall
_Locinfo__Getdateorder(const _Locinfo
*this)
779 TRACE("(%p)\n", this);
780 return _Getdateorder();
783 /* ?_Getdays@_Locinfo@std@@QBEPBDXZ */
784 /* ?_Getdays@_Locinfo@std@@QEBAPEBDXZ */
785 DEFINE_THISCALL_WRAPPER(_Locinfo__Getdays
, 4)
786 const char* __thiscall
_Locinfo__Getdays(_Locinfo
*this)
788 char *days
= _Getdays();
791 TRACE("(%p)\n", this);
794 locale_string_char_dtor(&this->days
);
795 locale_string_char_ctor_cstr(&this->days
, days
);
799 ret
= locale_string_char_c_str(&this->days
);
800 if (!ret
[0]) ret
= ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday:Thu:Thursday:Fri:Friday:Sat:Saturday";
804 #if _MSVCP_VER >= 110
805 /* ?_W_Getdays@_Locinfo@std@@QBEPBGXZ */
806 /* ?_W_Getdays@_Locinfo@std@@QEBAPEBGXZ */
807 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getdays
, 4)
808 const wchar_t* __thiscall
_Locinfo__W_Getdays(_Locinfo
*this)
810 static const wchar_t defdays
[] =
812 ':','S','u','n',':','S','u','n','d','a','y',
813 ':','M','o','n',':','M','o','n','d','a','y',
814 ':','T','u','e',':','T','u','e','s','d','a','y',
815 ':','W','e','d',':','W','e','d','n','e','s','d','a','y',
816 ':','T','h','u',':','T','h','u','r','s','d','a','y',
817 ':','F','r','i',':','F','r','i','d','a','y',
818 ':','S','a','t',':','S','a','t','u','r','d','a','y'
820 wchar_t *wdays
= _W_Getdays();
823 TRACE("(%p)\n", this);
826 locale_string_wchar_dtor(&this->wdays
);
827 locale_string_wchar_ctor_cstr(&this->wdays
, wdays
);
831 ret
= locale_string_wchar_c_str(&this->wdays
);
832 if (!ret
[0]) ret
= defdays
;
836 /* ?_W_Getmonths@_Locinfo@std@@QBEPBGXZ */
837 /* ?_W_Getmonths@_Locinfo@std@@QEBAPEBGXZ */
838 DEFINE_THISCALL_WRAPPER(_Locinfo__W_Getmonths
, 4)
839 const wchar_t* __thiscall
_Locinfo__W_Getmonths(_Locinfo
*this)
841 static const wchar_t defmonths
[] =
843 ':','J','a','n',':','J','a','n','u','a','r','y',
844 ':','F','e','b',':','F','e','b','r','u','a','r','y',
845 ':','M','a','r',':','M','a','r','c','h',
846 ':','A','p','r',':','A','p','r','i','l',
847 ':','M','a','y',':','M','a','y',
848 ':','J','u','n',':','J','u','n','e',
849 ':','J','u','l',':','J','u','l','y',
850 ':','A','u','g',':','A','u','g','u','s','t',
851 ':','S','e','p',':','S','e','p','t','e','m','b','e','r',
852 ':','O','c','t',':','O','c','t','o','b','e','r',
853 ':','N','o','v',':','N','o','v','e','m','b','e','r',
854 ':','D','e','c',':','D','e','c','e','m','b','e','r'
856 wchar_t *wmonths
= _W_Getmonths();
859 TRACE("(%p)\n", this);
862 locale_string_wchar_dtor(&this->wmonths
);
863 locale_string_wchar_ctor_cstr(&this->wmonths
, wmonths
);
867 ret
= locale_string_wchar_c_str(&this->wmonths
);
868 if (!ret
[0]) ret
= defmonths
;
873 /* ?_Getmonths@_Locinfo@std@@QBEPBDXZ */
874 /* ?_Getmonths@_Locinfo@std@@QEBAPEBDXZ */
875 DEFINE_THISCALL_WRAPPER(_Locinfo__Getmonths
, 4)
876 const char* __thiscall
_Locinfo__Getmonths(_Locinfo
*this)
878 char *months
= _Getmonths();
881 TRACE("(%p)\n", this);
884 locale_string_char_dtor(&this->months
);
885 locale_string_char_ctor_cstr(&this->months
, months
);
889 ret
= locale_string_char_c_str(&this->months
);
890 if (!ret
[0]) ret
= ":Jan:January:Feb:February:Mar:March:Apr:April:May:May:Jun:June:Jul:July"
891 ":Aug:August:Sep:September:Oct:October:Nov:November:Dec:December";
895 /* ?_Getfalse@_Locinfo@std@@QBEPBDXZ */
896 /* ?_Getfalse@_Locinfo@std@@QEBAPEBDXZ */
897 DEFINE_THISCALL_WRAPPER(_Locinfo__Getfalse
, 4)
898 const char* __thiscall
_Locinfo__Getfalse(const _Locinfo
*this)
900 TRACE("(%p)\n", this);
904 /* ?_Gettrue@_Locinfo@std@@QBEPBDXZ */
905 /* ?_Gettrue@_Locinfo@std@@QEBAPEBDXZ */
906 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettrue
, 4)
907 const char* __thiscall
_Locinfo__Gettrue(const _Locinfo
*this)
909 TRACE("(%p)\n", this);
913 /* ?_Getlconv@_Locinfo@std@@QBEPBUlconv@@XZ */
914 /* ?_Getlconv@_Locinfo@std@@QEBAPEBUlconv@@XZ */
915 DEFINE_THISCALL_WRAPPER(_Locinfo__Getlconv
, 4)
916 const struct lconv
* __thiscall
_Locinfo__Getlconv(const _Locinfo
*this)
918 TRACE("(%p)\n", this);
922 /* ?_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ */
923 /* ?_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ */
924 DEFINE_THISCALL_WRAPPER(_Locinfo__Gettnames
, 8)
925 _Timevec
*__thiscall
_Locinfo__Gettnames(const _Locinfo
*this, _Timevec
*ret
)
927 TRACE("(%p)\n", this);
929 _Timevec_ctor_timeptr(ret
, _Gettnames());
933 /* ?id@?$collate@D@std@@2V0locale@2@A */
934 locale_id collate_char_id
= {0};
936 /* ??_7?$collate@D@std@@6B@ */
937 extern const vtable_ptr MSVCP_collate_char_vtable
;
939 /* ?_Init@?$collate@D@std@@IAEXABV_Locinfo@2@@Z */
940 /* ?_Init@?$collate@D@std@@IEAAXAEBV_Locinfo@2@@Z */
941 DEFINE_THISCALL_WRAPPER(collate_char__Init
, 8)
942 void __thiscall
collate_char__Init(collate
*this, const _Locinfo
*locinfo
)
944 TRACE("(%p %p)\n", this, locinfo
);
945 _Locinfo__Getcoll(locinfo
, &this->coll
);
948 /* ??0?$collate@D@std@@IAE@PBDI@Z */
949 /* ??0?$collate@D@std@@IEAA@PEBD_K@Z */
950 DEFINE_THISCALL_WRAPPER(collate_char_ctor_name
, 12)
951 collate
* __thiscall
collate_char_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
955 TRACE("(%p %s %lu)\n", this, name
, refs
);
957 locale_facet_ctor_refs(&this->facet
, refs
);
958 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
960 _Locinfo_ctor_cstr(&locinfo
, name
);
961 collate_char__Init(this, &locinfo
);
962 _Locinfo_dtor(&locinfo
);
966 /* ??0?$collate@D@std@@QAE@ABV_Locinfo@1@I@Z */
967 /* ??0?$collate@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
968 DEFINE_THISCALL_WRAPPER(collate_char_ctor_locinfo
, 12)
969 collate
* __thiscall
collate_char_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
971 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
973 locale_facet_ctor_refs(&this->facet
, refs
);
974 this->facet
.vtable
= &MSVCP_collate_char_vtable
;
975 collate_char__Init(this, locinfo
);
979 /* ??0?$collate@D@std@@QAE@I@Z */
980 /* ??0?$collate@D@std@@QEAA@_K@Z */
981 DEFINE_THISCALL_WRAPPER(collate_char_ctor_refs
, 8)
982 collate
* __thiscall
collate_char_ctor_refs(collate
*this, MSVCP_size_t refs
)
984 return collate_char_ctor_name(this, "C", refs
);
987 /* ??1?$collate@D@std@@UAE@XZ */
988 /* ??1?$collate@D@std@@UEAA@XZ */
989 /* ??1?$collate@D@std@@MAE@XZ */
990 /* ??1?$collate@D@std@@MEAA@XZ */
991 DEFINE_THISCALL_WRAPPER(collate_char_dtor
, 4)
992 void __thiscall
collate_char_dtor(collate
*this)
994 TRACE("(%p)\n", this);
997 DEFINE_THISCALL_WRAPPER(collate_char_vector_dtor
, 8)
998 collate
* __thiscall
collate_char_vector_dtor(collate
*this, unsigned int flags
)
1000 TRACE("(%p %x)\n", this, flags
);
1002 /* we have an array, with the number of elements stored before the first object */
1003 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1005 for(i
=*ptr
-1; i
>=0; i
--)
1006 collate_char_dtor(this+i
);
1007 MSVCRT_operator_delete(ptr
);
1009 collate_char_dtor(this);
1011 MSVCRT_operator_delete(this);
1017 /* ??_F?$collate@D@std@@QAEXXZ */
1018 /* ??_F?$collate@D@std@@QEAAXXZ */
1019 DEFINE_THISCALL_WRAPPER(collate_char_ctor
, 4)
1020 collate
* __thiscall
collate_char_ctor(collate
*this)
1022 return collate_char_ctor_name(this, "C", 0);
1025 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1026 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1027 MSVCP_size_t __cdecl
collate_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1029 TRACE("(%p %p)\n", facet
, loc
);
1031 if(facet
&& !*facet
) {
1032 *facet
= MSVCRT_operator_new(sizeof(collate
));
1034 ERR("Out of memory\n");
1035 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1038 collate_char_ctor_name((collate
*)*facet
,
1039 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1045 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
1046 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1047 MSVCP_size_t __cdecl
collate_char__Getcat_old(const locale_facet
**facet
)
1049 return collate_char__Getcat(facet
, locale_classic());
1052 static collate
* collate_char_use_facet(const locale
*loc
)
1054 static collate
*obj
= NULL
;
1057 const locale_facet
*fac
;
1059 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1060 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_char_id
));
1062 _Lockit_dtor(&lock
);
1063 return (collate
*)fac
;
1067 _Lockit_dtor(&lock
);
1071 collate_char__Getcat(&fac
, loc
);
1072 obj
= (collate
*)fac
;
1073 call_locale_facet__Incref(&obj
->facet
);
1074 locale_facet_register(&obj
->facet
);
1075 _Lockit_dtor(&lock
);
1081 int __cdecl
_Strcoll(const char *first1
, const char *last1
, const char *first2
,
1082 const char *last2
, const _Collvec
*coll
)
1086 TRACE("(%s %s)\n", debugstr_an(first1
, last1
-first1
), debugstr_an(first2
, last2
-first2
));
1089 lcid
= coll
->handle
;
1091 lcid
= ___lc_handle_func()[LC_COLLATE
];
1092 return CompareStringA(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1095 /* ?do_compare@?$collate@D@std@@MBEHPBD000@Z */
1096 /* ?do_compare@?$collate@D@std@@MEBAHPEBD000@Z */
1097 DEFINE_THISCALL_WRAPPER(collate_char_do_compare
, 20)
1098 #if _MSVCP_VER <= 100
1099 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1100 (const collate*, const char*, const char*, const char*, const char*), \
1101 (this, first1, last1, first2, last2))
1103 #define call_collate_char_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1104 (const collate*, const char*, const char*, const char*, const char*), \
1105 (this, first1, last1, first2, last2))
1107 int __thiscall
collate_char_do_compare(const collate
*this, const char *first1
,
1108 const char *last1
, const char *first2
, const char *last2
)
1110 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1111 return _Strcoll(first1
, last1
, first2
, last2
, &this->coll
);
1114 /* ?compare@?$collate@D@std@@QBEHPBD000@Z */
1115 /* ?compare@?$collate@D@std@@QEBAHPEBD000@Z */
1116 DEFINE_THISCALL_WRAPPER(collate_char_compare
, 20)
1117 int __thiscall
collate_char_compare(const collate
*this, const char *first1
,
1118 const char *last1
, const char *first2
, const char *last2
)
1120 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1121 return call_collate_char_do_compare(this, first1
, last1
, first2
, last2
);
1124 /* ?do_hash@?$collate@D@std@@MBEJPBD0@Z */
1125 /* ?do_hash@?$collate@D@std@@MEBAJPEBD0@Z */
1126 DEFINE_THISCALL_WRAPPER(collate_char_do_hash
, 12)
1127 #if _MSVCP_VER <= 100
1128 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1129 (const collate*, const char*, const char*), (this, first, last))
1131 #define call_collate_char_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1132 (const collate*, const char*, const char*), (this, first, last))
1134 LONG __thiscall
collate_char_do_hash(const collate
*this,
1135 const char *first
, const char *last
)
1139 TRACE("(%p %p %p)\n", this, first
, last
);
1141 for(; first
<last
; first
++)
1142 ret
= (ret
<<8 | ret
>>24) + *first
;
1146 /* ?hash@?$collate@D@std@@QBEJPBD0@Z */
1147 /* ?hash@?$collate@D@std@@QEBAJPEBD0@Z */
1148 DEFINE_THISCALL_WRAPPER(collate_char_hash
, 12)
1149 LONG __thiscall
collate_char_hash(const collate
*this,
1150 const char *first
, const char *last
)
1152 TRACE("(%p %p %p)\n", this, first
, last
);
1153 return call_collate_char_do_hash(this, first
, last
);
1156 /* ?do_transform@?$collate@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1157 /* ?do_transform@?$collate@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1158 DEFINE_THISCALL_WRAPPER(collate_char_do_transform
, 16)
1159 basic_string_char
* __thiscall
collate_char_do_transform(const collate
*this,
1160 basic_string_char
*ret
, const char *first
, const char *last
)
1162 FIXME("(%p %p %p) stub\n", this, first
, last
);
1166 /* ?transform@?$collate@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PBD0@Z */
1167 /* ?transform@?$collate@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@PEBD0@Z */
1168 DEFINE_THISCALL_WRAPPER(collate_char_transform
, 16)
1169 basic_string_char
* __thiscall
collate_char_transform(const collate
*this,
1170 basic_string_char
*ret
, const char *first
, const char *last
)
1172 FIXME("(%p %p %p) stub\n", this, first
, last
);
1176 /* ?id@?$collate@_W@std@@2V0locale@2@A */
1177 locale_id collate_wchar_id
= {0};
1178 /* ?id@?$collate@G@std@@2V0locale@2@A */
1179 locale_id collate_short_id
= {0};
1181 /* ??_7?$collate@_W@std@@6B@ */
1182 extern const vtable_ptr MSVCP_collate_wchar_vtable
;
1183 /* ??_7?$collate@G@std@@6B@ */
1184 extern const vtable_ptr MSVCP_collate_short_vtable
;
1186 /* ?_Init@?$collate@_W@std@@IAEXABV_Locinfo@2@@Z */
1187 /* ?_Init@?$collate@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
1188 /* ?_Init@?$collate@G@std@@IAEXABV_Locinfo@2@@Z */
1189 /* ?_Init@?$collate@G@std@@IEAAXAEBV_Locinfo@2@@Z */
1190 DEFINE_THISCALL_WRAPPER(collate_wchar__Init
, 8)
1191 void __thiscall
collate_wchar__Init(collate
*this, const _Locinfo
*locinfo
)
1193 TRACE("(%p %p)\n", this, locinfo
);
1194 _Locinfo__Getcoll(locinfo
, &this->coll
);
1197 /* ??0?$collate@_W@std@@IAE@PBDI@Z */
1198 /* ??0?$collate@_W@std@@IEAA@PEBD_K@Z */
1199 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_name
, 12)
1200 collate
* __thiscall
collate_wchar_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1204 TRACE("(%p %s %lu)\n", this, name
, refs
);
1206 locale_facet_ctor_refs(&this->facet
, refs
);
1207 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1209 _Locinfo_ctor_cstr(&locinfo
, name
);
1210 collate_wchar__Init(this, &locinfo
);
1211 _Locinfo_dtor(&locinfo
);
1215 /* ??0?$collate@G@std@@IAE@PBDI@Z */
1216 /* ??0?$collate@G@std@@IEAA@PEBD_K@Z */
1217 DEFINE_THISCALL_WRAPPER(collate_short_ctor_name
, 12)
1218 collate
* __thiscall
collate_short_ctor_name(collate
*this, const char *name
, MSVCP_size_t refs
)
1220 collate
*ret
= collate_wchar_ctor_name(this, name
, refs
);
1221 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1225 /* ??0?$collate@_W@std@@QAE@ABV_Locinfo@1@I@Z */
1226 /* ??0?$collate@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1227 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_locinfo
, 12)
1228 collate
* __thiscall
collate_wchar_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1230 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1232 locale_facet_ctor_refs(&this->facet
, refs
);
1233 this->facet
.vtable
= &MSVCP_collate_wchar_vtable
;
1234 collate_wchar__Init(this, locinfo
);
1238 /* ??0?$collate@G@std@@QAE@ABV_Locinfo@1@I@Z */
1239 /* ??0?$collate@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1240 DEFINE_THISCALL_WRAPPER(collate_short_ctor_locinfo
, 12)
1241 collate
* __thiscall
collate_short_ctor_locinfo(collate
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1243 collate
*ret
= collate_wchar_ctor_locinfo(this, locinfo
, refs
);
1244 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1248 /* ??0?$collate@_W@std@@QAE@I@Z */
1249 /* ??0?$collate@_W@std@@QEAA@_K@Z */
1250 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor_refs
, 8)
1251 collate
* __thiscall
collate_wchar_ctor_refs(collate
*this, MSVCP_size_t refs
)
1253 return collate_wchar_ctor_name(this, "C", refs
);
1256 /* ??0?$collate@G@std@@QAE@I@Z */
1257 /* ??0?$collate@G@std@@QEAA@_K@Z */
1258 DEFINE_THISCALL_WRAPPER(collate_short_ctor_refs
, 8)
1259 collate
* __thiscall
collate_short_ctor_refs(collate
*this, MSVCP_size_t refs
)
1261 collate
*ret
= collate_wchar_ctor_refs(this, refs
);
1262 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1266 /* ??1?$collate@G@std@@UAE@XZ */
1267 /* ??1?$collate@G@std@@UEAA@XZ */
1268 /* ??1?$collate@_W@std@@MAE@XZ */
1269 /* ??1?$collate@_W@std@@MEAA@XZ */
1270 /* ??1?$collate@G@std@@MAE@XZ */
1271 /* ??1?$collate@G@std@@MEAA@XZ */
1272 DEFINE_THISCALL_WRAPPER(collate_wchar_dtor
, 4)
1273 void __thiscall
collate_wchar_dtor(collate
*this)
1275 TRACE("(%p)\n", this);
1278 DEFINE_THISCALL_WRAPPER(collate_wchar_vector_dtor
, 8)
1279 collate
* __thiscall
collate_wchar_vector_dtor(collate
*this, unsigned int flags
)
1281 TRACE("(%p %x)\n", this, flags
);
1283 /* we have an array, with the number of elements stored before the first object */
1284 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1286 for(i
=*ptr
-1; i
>=0; i
--)
1287 collate_wchar_dtor(this+i
);
1288 MSVCRT_operator_delete(ptr
);
1290 collate_wchar_dtor(this);
1292 MSVCRT_operator_delete(this);
1298 /* ??_F?$collate@_W@std@@QAEXXZ */
1299 /* ??_F?$collate@_W@std@@QEAAXXZ */
1300 DEFINE_THISCALL_WRAPPER(collate_wchar_ctor
, 4)
1301 collate
* __thiscall
collate_wchar_ctor(collate
*this)
1303 return collate_wchar_ctor_name(this, "C", 0);
1306 /* ??_F?$collate@G@std@@QAEXXZ */
1307 /* ??_F?$collate@G@std@@QEAAXXZ */
1308 DEFINE_THISCALL_WRAPPER(collate_short_ctor
, 4)
1309 collate
* __thiscall
collate_short_ctor(collate
*this)
1311 collate
*ret
= collate_wchar_ctor(this);
1312 ret
->facet
.vtable
= &MSVCP_collate_short_vtable
;
1316 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1317 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1318 MSVCP_size_t __cdecl
collate_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
1320 TRACE("(%p %p)\n", facet
, loc
);
1322 if(facet
&& !*facet
) {
1323 *facet
= MSVCRT_operator_new(sizeof(collate
));
1325 ERR("Out of memory\n");
1326 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1329 collate_wchar_ctor_name((collate
*)*facet
,
1330 locale_string_char_c_str(&loc
->ptr
->name
), 0);
1336 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
1337 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1338 MSVCP_size_t __cdecl
collate_wchar__Getcat_old(const locale_facet
**facet
)
1340 return collate_wchar__Getcat(facet
, locale_classic());
1343 static collate
* collate_wchar_use_facet(const locale
*loc
)
1345 static collate
*obj
= NULL
;
1348 const locale_facet
*fac
;
1350 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1351 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_wchar_id
));
1353 _Lockit_dtor(&lock
);
1354 return (collate
*)fac
;
1358 _Lockit_dtor(&lock
);
1362 collate_wchar__Getcat(&fac
, loc
);
1363 obj
= (collate
*)fac
;
1364 call_locale_facet__Incref(&obj
->facet
);
1365 locale_facet_register(&obj
->facet
);
1366 _Lockit_dtor(&lock
);
1371 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1372 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1373 MSVCP_size_t __cdecl
collate_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
1375 if(facet
&& !*facet
) {
1376 collate_wchar__Getcat(facet
, loc
);
1377 (*(locale_facet
**)facet
)->vtable
= &MSVCP_collate_short_vtable
;
1383 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
1384 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1385 MSVCP_size_t __cdecl
collate_short__Getcat_old(const locale_facet
**facet
)
1387 return collate_short__Getcat(facet
, locale_classic());
1390 static collate
* collate_short_use_facet(const locale
*loc
)
1392 static collate
*obj
= NULL
;
1395 const locale_facet
*fac
;
1397 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1398 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&collate_short_id
));
1400 _Lockit_dtor(&lock
);
1401 return (collate
*)fac
;
1405 _Lockit_dtor(&lock
);
1409 collate_short__Getcat(&fac
, loc
);
1410 obj
= (collate
*)fac
;
1411 call_locale_facet__Incref(&obj
->facet
);
1412 locale_facet_register(&obj
->facet
);
1413 _Lockit_dtor(&lock
);
1419 int __cdecl
_Wcscoll(const wchar_t *first1
, const wchar_t *last1
, const wchar_t *first2
,
1420 const wchar_t *last2
, const _Collvec
*coll
)
1424 TRACE("(%s %s)\n", debugstr_wn(first1
, last1
-first1
), debugstr_wn(first2
, last2
-first2
));
1427 lcid
= coll
->handle
;
1429 lcid
= ___lc_handle_func()[LC_COLLATE
];
1430 return CompareStringW(lcid
, 0, first1
, last1
-first1
, first2
, last2
-first2
)-CSTR_EQUAL
;
1433 /* ?do_compare@?$collate@_W@std@@MBEHPB_W000@Z */
1434 /* ?do_compare@?$collate@_W@std@@MEBAHPEB_W000@Z */
1435 /* ?do_compare@?$collate@G@std@@MBEHPBG000@Z */
1436 /* ?do_compare@?$collate@G@std@@MEBAHPEBG000@Z */
1437 DEFINE_THISCALL_WRAPPER(collate_wchar_do_compare
, 20)
1438 #if _MSVCP_VER <= 100
1439 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 4, int, \
1440 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1441 (this, first1, last1, first2, last2))
1443 #define call_collate_wchar_do_compare(this, first1, last1, first2, last2) CALL_VTBL_FUNC(this, 12, int, \
1444 (const collate*, const wchar_t*, const wchar_t*, const wchar_t*, const wchar_t*), \
1445 (this, first1, last1, first2, last2))
1447 int __thiscall
collate_wchar_do_compare(const collate
*this, const wchar_t *first1
,
1448 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1450 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1451 return _Wcscoll(first1
, last1
, first2
, last2
, &this->coll
);
1454 /* ?compare@?$collate@_W@std@@QBEHPB_W000@Z */
1455 /* ?compare@?$collate@_W@std@@QEBAHPEB_W000@Z */
1456 /* ?compare@?$collate@G@std@@QBEHPBG000@Z */
1457 /* ?compare@?$collate@G@std@@QEBAHPEBG000@Z */
1458 DEFINE_THISCALL_WRAPPER(collate_wchar_compare
, 20)
1459 int __thiscall
collate_wchar_compare(const collate
*this, const wchar_t *first1
,
1460 const wchar_t *last1
, const wchar_t *first2
, const wchar_t *last2
)
1462 TRACE("(%p %p %p %p %p)\n", this, first1
, last1
, first2
, last2
);
1463 return call_collate_wchar_do_compare(this, first1
, last1
, first2
, last2
);
1466 /* ?do_hash@?$collate@_W@std@@MBEJPB_W0@Z */
1467 /* ?do_hash@?$collate@_W@std@@MEBAJPEB_W0@Z */
1468 /* ?do_hash@?$collate@G@std@@MBEJPBG0@Z */
1469 /* ?do_hash@?$collate@G@std@@MEBAJPEBG0@Z */
1470 DEFINE_THISCALL_WRAPPER(collate_wchar_do_hash
, 12)
1471 #if _MSVCP_VER <= 100
1472 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 12, LONG, \
1473 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1475 #define call_collate_wchar_do_hash(this, first, last) CALL_VTBL_FUNC(this, 20, LONG, \
1476 (const collate*, const wchar_t*, const wchar_t*), (this, first, last))
1478 LONG __thiscall
collate_wchar_do_hash(const collate
*this,
1479 const wchar_t *first
, const wchar_t *last
)
1483 TRACE("(%p %p %p)\n", this, first
, last
);
1485 for(; first
<last
; first
++)
1486 ret
= (ret
<<8 | ret
>>24) + *first
;
1490 /* ?hash@?$collate@_W@std@@QBEJPB_W0@Z */
1491 /* ?hash@?$collate@_W@std@@QEBAJPEB_W0@Z */
1492 /* ?hash@?$collate@G@std@@QBEJPBG0@Z */
1493 /* ?hash@?$collate@G@std@@QEBAJPEBG0@Z */
1494 DEFINE_THISCALL_WRAPPER(collate_wchar_hash
, 12)
1495 LONG __thiscall
collate_wchar_hash(const collate
*this,
1496 const wchar_t *first
, const wchar_t *last
)
1498 TRACE("(%p %p %p)\n", this, first
, last
);
1499 return call_collate_wchar_do_hash(this, first
, last
);
1502 /* ?do_transform@?$collate@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1503 /* ?do_transform@?$collate@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1504 /* ?do_transform@?$collate@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1505 /* ?do_transform@?$collate@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1506 DEFINE_THISCALL_WRAPPER(collate_wchar_do_transform
, 16)
1507 basic_string_wchar
* __thiscall
collate_wchar_do_transform(const collate
*this,
1508 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1510 FIXME("(%p %p %p) stub\n", this, first
, last
);
1514 /* ?transform@?$collate@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PB_W0@Z */
1515 /* ?transform@?$collate@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@PEB_W0@Z */
1516 /* ?transform@?$collate@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PBG0@Z */
1517 /* ?transform@?$collate@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@PEBG0@Z */
1518 DEFINE_THISCALL_WRAPPER(collate_wchar_transform
, 16)
1519 basic_string_wchar
* __thiscall
collate_wchar_transform(const collate
*this,
1520 basic_string_wchar
*ret
, const wchar_t *first
, const wchar_t *last
)
1522 FIXME("(%p %p %p) stub\n", this, first
, last
);
1526 /* ??_7ctype_base@std@@6B@ */
1527 extern const vtable_ptr MSVCP_ctype_base_vtable
;
1529 /* ??0ctype_base@std@@QAE@I@Z */
1530 /* ??0ctype_base@std@@QEAA@_K@Z */
1531 DEFINE_THISCALL_WRAPPER(ctype_base_ctor_refs
, 8)
1532 ctype_base
* __thiscall
ctype_base_ctor_refs(ctype_base
*this, MSVCP_size_t refs
)
1534 TRACE("(%p %lu)\n", this, refs
);
1535 locale_facet_ctor_refs(&this->facet
, refs
);
1536 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1540 /* ??_Fctype_base@std@@QAEXXZ */
1541 /* ??_Fctype_base@std@@QEAAXXZ */
1542 DEFINE_THISCALL_WRAPPER(ctype_base_ctor
, 4)
1543 ctype_base
* __thiscall
ctype_base_ctor(ctype_base
*this)
1545 TRACE("(%p)\n", this);
1546 locale_facet_ctor_refs(&this->facet
, 0);
1547 this->facet
.vtable
= &MSVCP_ctype_base_vtable
;
1551 /* ??1ctype_base@std@@UAE@XZ */
1552 /* ??1ctype_base@std@@UEAA@XZ */
1553 DEFINE_THISCALL_WRAPPER(ctype_base_dtor
, 4)
1554 void __thiscall
ctype_base_dtor(ctype_base
*this)
1556 TRACE("(%p)\n", this);
1559 DEFINE_THISCALL_WRAPPER(ctype_base_vector_dtor
, 8)
1560 ctype_base
* __thiscall
ctype_base_vector_dtor(ctype_base
*this, unsigned int flags
)
1562 TRACE("(%p %x)\n", this, flags
);
1564 /* we have an array, with the number of elements stored before the first object */
1565 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1567 for(i
=*ptr
-1; i
>=0; i
--)
1568 ctype_base_dtor(this+i
);
1569 MSVCRT_operator_delete(ptr
);
1571 ctype_base_dtor(this);
1573 MSVCRT_operator_delete(this);
1579 /* ?_Xran@ctype_base@std@@KAXXZ */
1580 void __cdecl
ctype_base__Xran(void)
1582 throw_exception(EXCEPTION_OUT_OF_RANGE
, "out of range in ctype<T>");
1585 /* ?id@?$ctype@D@std@@2V0locale@2@A */
1586 locale_id ctype_char_id
= {0};
1587 /* ?table_size@?$ctype@D@std@@2IB */
1588 /* ?table_size@?$ctype@D@std@@2_KB */
1589 MSVCP_size_t ctype_char_table_size
= 256;
1591 /* ??_7?$ctype@D@std@@6B@ */
1592 extern const vtable_ptr MSVCP_ctype_char_vtable
;
1594 /* ?_Id_func@?$ctype@D@std@@SAAAVid@locale@2@XZ */
1595 /* ?_Id_func@?$ctype@D@std@@SAAEAVid@locale@2@XZ */
1596 locale_id
* __cdecl
ctype_char__Id_func(void)
1599 return &ctype_char_id
;
1602 /* ?_Init@?$ctype@D@std@@IAEXABV_Locinfo@2@@Z */
1603 /* ?_Init@?$ctype@D@std@@IEAAXAEBV_Locinfo@2@@Z */
1604 DEFINE_THISCALL_WRAPPER(ctype_char__Init
, 8)
1605 void __thiscall
ctype_char__Init(ctype_char
*this, const _Locinfo
*locinfo
)
1607 TRACE("(%p %p)\n", this, locinfo
);
1608 _Locinfo__Getctype(locinfo
, &this->ctype
);
1611 /* ?_Tidy@?$ctype@D@std@@IAEXXZ */
1612 /* ?_Tidy@?$ctype@D@std@@IEAAXXZ */
1613 DEFINE_THISCALL_WRAPPER(ctype_char__Tidy
, 4)
1614 void __thiscall
ctype_char__Tidy(ctype_char
*this)
1616 TRACE("(%p)\n", this);
1618 if(this->ctype
.delfl
)
1619 free((short*)this->ctype
.table
);
1620 #if _MSVCP_VER >= 110
1621 free(this->ctype
.name
);
1625 /* ?classic_table@?$ctype@D@std@@KAPBFXZ */
1626 /* ?classic_table@?$ctype@D@std@@KAPEBFXZ */
1627 const short* __cdecl
ctype_char_classic_table(void)
1632 ctype
= ctype_char_use_facet( locale_classic() );
1633 return ctype
->ctype
.table
;
1636 /* ??0?$ctype@D@std@@QAE@ABV_Locinfo@1@I@Z */
1637 /* ??0?$ctype@D@std@@QEAA@AEBV_Locinfo@1@_K@Z */
1638 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_locinfo
, 12)
1639 ctype_char
* __thiscall
ctype_char_ctor_locinfo(ctype_char
*this,
1640 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
1642 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
1643 ctype_base_ctor_refs(&this->base
, refs
);
1644 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1645 ctype_char__Init(this, locinfo
);
1649 /* ??0?$ctype@D@std@@QAE@PBF_NI@Z */
1650 /* ??0?$ctype@D@std@@QEAA@PEBF_N_K@Z */
1651 DEFINE_THISCALL_WRAPPER(ctype_char_ctor_table
, 16)
1652 ctype_char
* __thiscall
ctype_char_ctor_table(ctype_char
*this,
1653 const short *table
, MSVCP_bool
delete, MSVCP_size_t refs
)
1657 TRACE("(%p %p %d %lu)\n", this, table
, delete, refs
);
1659 ctype_base_ctor_refs(&this->base
, refs
);
1660 this->base
.facet
.vtable
= &MSVCP_ctype_char_vtable
;
1662 _Locinfo_ctor(&locinfo
);
1663 ctype_char__Init(this, &locinfo
);
1664 _Locinfo_dtor(&locinfo
);
1667 ctype_char__Tidy(this);
1668 this->ctype
.table
= table
;
1669 this->ctype
.delfl
= delete;
1674 /* ??_F?$ctype@D@std@@QAEXXZ */
1675 /* ??_F?$ctype@D@std@@QEAAXXZ */
1676 DEFINE_THISCALL_WRAPPER(ctype_char_ctor
, 4)
1677 ctype_char
* __thiscall
ctype_char_ctor(ctype_char
*this)
1679 return ctype_char_ctor_table(this, NULL
, FALSE
, 0);
1682 /* ??1?$ctype@D@std@@UAE@XZ */
1683 /* ??1?$ctype@D@std@@UEAA@XZ */
1684 /* ??1?$ctype@D@std@@MAE@XZ */
1685 /* ??1?$ctype@D@std@@MEAA@XZ */
1686 DEFINE_THISCALL_WRAPPER(ctype_char_dtor
, 4)
1687 void __thiscall
ctype_char_dtor(ctype_char
*this)
1689 TRACE("(%p)\n", this);
1690 ctype_char__Tidy(this);
1693 DEFINE_THISCALL_WRAPPER(ctype_char_vector_dtor
, 8)
1694 ctype_char
* __thiscall
ctype_char_vector_dtor(ctype_char
*this, unsigned int flags
)
1696 TRACE("(%p %x)\n", this, flags
);
1698 /* we have an array, with the number of elements stored before the first object */
1699 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
1701 for(i
=*ptr
-1; i
>=0; i
--)
1702 ctype_char_dtor(this+i
);
1703 MSVCRT_operator_delete(ptr
);
1705 ctype_char_dtor(this);
1707 MSVCRT_operator_delete(this);
1713 /* ?do_narrow@?$ctype@D@std@@MBEDDD@Z */
1714 /* ?do_narrow@?$ctype@D@std@@MEBADDD@Z */
1715 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow_ch
, 12)
1716 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1717 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 36, \
1718 char, (const ctype_char*, char, char), (this, ch, unused))
1719 #elif _MSVCP_VER <= 100
1720 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 32, \
1721 char, (const ctype_char*, char, char), (this, ch, unused))
1723 #define call_ctype_char_do_narrow_ch(this, ch, unused) CALL_VTBL_FUNC(this, 40, \
1724 char, (const ctype_char*, char, char), (this, ch, unused))
1726 char __thiscall
ctype_char_do_narrow_ch(const ctype_char
*this, char ch
, char unused
)
1728 TRACE("(%p %c %c)\n", this, ch
, unused
);
1732 /* ?do_narrow@?$ctype@D@std@@MBEPBDPBD0DPAD@Z */
1733 /* ?do_narrow@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD@Z */
1734 DEFINE_THISCALL_WRAPPER(ctype_char_do_narrow
, 20)
1735 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
1736 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 32, \
1737 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1738 (this, first, last, unused, dest))
1739 #elif _MSVCP_VER <= 100
1740 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 28, \
1741 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1742 (this, first, last, unused, dest))
1744 #define call_ctype_char_do_narrow(this, first, last, unused, dest) CALL_VTBL_FUNC(this, 36, \
1745 const char*, (const ctype_char*, const char*, const char*, char, char*), \
1746 (this, first, last, unused, dest))
1748 const char* __thiscall
ctype_char_do_narrow(const ctype_char
*this,
1749 const char *first
, const char *last
, char unused
, char *dest
)
1751 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1752 memcpy(dest
, first
, last
-first
);
1756 /* ?_Do_narrow_s@?$ctype@D@std@@MBEPBDPBD0DPADI@Z */
1757 /* ?_Do_narrow_s@?$ctype@D@std@@MEBAPEBDPEBD0DPEAD_K@Z */
1758 DEFINE_THISCALL_WRAPPER(ctype_char__Do_narrow_s
, 24)
1759 #define call_ctype_char__Do_narrow_s(this, first, last, unused, dest, size) CALL_VTBL_FUNC(this, 40, \
1760 const char*, (const ctype_char*, const char*, const char*, char, char*, MSVCP_size_t), \
1761 (this, first, last, unused, dest, size))
1762 const char* __thiscall
ctype_char__Do_narrow_s(const ctype_char
*this, const char *first
,
1763 const char *last
, char unused
, char *dest
, MSVCP_size_t size
)
1765 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1766 memcpy_s(dest
, size
, first
, last
-first
);
1770 /* ?narrow@?$ctype@D@std@@QBEDDD@Z */
1771 /* ?narrow@?$ctype@D@std@@QEBADDD@Z */
1772 DEFINE_THISCALL_WRAPPER(ctype_char_narrow_ch
, 12)
1773 char __thiscall
ctype_char_narrow_ch(const ctype_char
*this, char ch
, char dflt
)
1775 TRACE("(%p %c %c)\n", this, ch
, dflt
);
1776 return call_ctype_char_do_narrow_ch(this, ch
, dflt
);
1779 /* ?narrow@?$ctype@D@std@@QBEPBDPBD0DPAD@Z */
1780 /* ?narrow@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD@Z */
1781 DEFINE_THISCALL_WRAPPER(ctype_char_narrow
, 20)
1782 const char* __thiscall
ctype_char_narrow(const ctype_char
*this,
1783 const char *first
, const char *last
, char dflt
, char *dest
)
1785 TRACE("(%p %p %p %c %p)\n", this, first
, last
, dflt
, dest
);
1786 return call_ctype_char_do_narrow(this, first
, last
, dflt
, dest
);
1789 /* ?_Narrow_s@?$ctype@D@std@@QBEPBDPBD0DPADI@Z */
1790 /* ?_Narrow_s@?$ctype@D@std@@QEBAPEBDPEBD0DPEAD_K@Z */
1791 DEFINE_THISCALL_WRAPPER(ctype_char__Narrow_s
, 24)
1792 const char* __thiscall
ctype_char__Narrow_s(const ctype_char
*this, const char *first
,
1793 const char *last
, char dflt
, char *dest
, MSVCP_size_t size
)
1795 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1796 return call_ctype_char__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
1799 /* ?do_widen@?$ctype@D@std@@MBEDD@Z */
1800 /* ?do_widen@?$ctype@D@std@@MEBADD@Z */
1801 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen_ch
, 8)
1802 #if _MSVCP_VER <= 100
1803 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
1804 char, (const ctype_char*, char), (this, ch))
1806 #define call_ctype_char_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
1807 char, (const ctype_char*, char), (this, ch))
1809 char __thiscall
ctype_char_do_widen_ch(const ctype_char
*this, char ch
)
1811 TRACE("(%p %c)\n", this, ch
);
1815 /* ?do_widen@?$ctype@D@std@@MBEPBDPBD0PAD@Z */
1816 /* ?do_widen@?$ctype@D@std@@MEBAPEBDPEBD0PEAD@Z */
1817 DEFINE_THISCALL_WRAPPER(ctype_char_do_widen
, 16)
1818 #if _MSVCP_VER <= 100
1819 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 20, \
1820 const char*, (const ctype_char*, const char*, const char*, char*), \
1821 (this, first, last, dest))
1823 #define call_ctype_char_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 28, \
1824 const char*, (const ctype_char*, const char*, const char*, char*), \
1825 (this, first, last, dest))
1827 const char* __thiscall
ctype_char_do_widen(const ctype_char
*this,
1828 const char *first
, const char *last
, char *dest
)
1830 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1831 memcpy(dest
, first
, last
-first
);
1835 /* ?_Do_widen_s@?$ctype@D@std@@MBEPBDPBD0PADI@Z */
1836 /* ?_Do_widen_s@?$ctype@D@std@@MEBAPEBDPEBD0PEAD_K@Z */
1837 DEFINE_THISCALL_WRAPPER(ctype_char__Do_widen_s
, 20)
1838 #define call_ctype_char__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 28, \
1839 const char*, (const ctype_char*, const char*, const char*, char*, MSVCP_size_t), \
1840 (this, first, last, dest, size))
1841 const char* __thiscall
ctype_char__Do_widen_s(const ctype_char
*this,
1842 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1844 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1845 memcpy_s(dest
, size
, first
, last
-first
);
1849 /* ?widen@?$ctype@D@std@@QBEDD@Z */
1850 /* ?widen@?$ctype@D@std@@QEBADD@Z */
1851 DEFINE_THISCALL_WRAPPER(ctype_char_widen_ch
, 8)
1852 char __thiscall
ctype_char_widen_ch(const ctype_char
*this, char ch
)
1854 TRACE("(%p %c)\n", this, ch
);
1855 return call_ctype_char_do_widen_ch(this, ch
);
1858 /* ?widen@?$ctype@D@std@@QBEPBDPBD0PAD@Z */
1859 /* ?widen@?$ctype@D@std@@QEBAPEBDPEBD0PEAD@Z */
1860 DEFINE_THISCALL_WRAPPER(ctype_char_widen
, 16)
1861 const char* __thiscall
ctype_char_widen(const ctype_char
*this,
1862 const char *first
, const char *last
, char *dest
)
1864 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
1865 return call_ctype_char_do_widen(this, first
, last
, dest
);
1868 /* ?_Widen_s@?$ctype@D@std@@QBEPBDPBD0PADI@Z */
1869 /* ?_Widen_s@?$ctype@D@std@@QEBAPEBDPEBD0PEAD_K@Z */
1870 DEFINE_THISCALL_WRAPPER(ctype_char__Widen_s
, 20)
1871 const char* __thiscall
ctype_char__Widen_s(const ctype_char
*this,
1872 const char *first
, const char *last
, char *dest
, MSVCP_size_t size
)
1874 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
1875 return call_ctype_char__Do_widen_s(this, first
, last
, dest
, size
);
1878 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
1879 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
1880 MSVCP_size_t __cdecl
ctype_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
1882 TRACE("(%p %p)\n", facet
, loc
);
1884 if(facet
&& !*facet
) {
1887 *facet
= MSVCRT_operator_new(sizeof(ctype_char
));
1889 ERR("Out of memory\n");
1890 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
1894 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
1895 ctype_char_ctor_locinfo((ctype_char
*)*facet
, &locinfo
, 0);
1896 _Locinfo_dtor(&locinfo
);
1902 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
1903 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
1904 MSVCP_size_t __cdecl
ctype_char__Getcat_old(const locale_facet
**facet
)
1906 return ctype_char__Getcat(facet
, locale_classic());
1909 ctype_char
* ctype_char_use_facet(const locale
*loc
)
1911 static ctype_char
*obj
= NULL
;
1914 const locale_facet
*fac
;
1916 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
1917 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_char_id
));
1919 _Lockit_dtor(&lock
);
1920 return (ctype_char
*)fac
;
1924 _Lockit_dtor(&lock
);
1928 ctype_char__Getcat(&fac
, loc
);
1929 obj
= (ctype_char
*)fac
;
1930 call_locale_facet__Incref(&obj
->base
.facet
);
1931 locale_facet_register(&obj
->base
.facet
);
1932 _Lockit_dtor(&lock
);
1938 int __cdecl
_Tolower(int ch
, const _Ctypevec
*ctype
)
1942 TRACE("%d %p\n", ch
, ctype
);
1947 cp
= ___lc_codepage_func();
1949 /* Don't convert to unicode in case of C locale */
1951 if(ch
>='A' && ch
<='Z')
1960 str
[0] = (ch
>>8) & 255;
1968 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
1971 lower
= tolowerW(wide
);
1975 WideCharToMultiByte(cp
, 0, &lower
, 1, str
, 2, NULL
, NULL
);
1977 return str
[0] + (str
[1]<<8);
1981 /* ?do_tolower@?$ctype@D@std@@MBEDD@Z */
1982 /* ?do_tolower@?$ctype@D@std@@MEBADD@Z */
1983 #if _MSVCP_VER <= 100
1984 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 8, \
1985 char, (const ctype_char*, char), (this, ch))
1987 #define call_ctype_char_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
1988 char, (const ctype_char*, char), (this, ch))
1990 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower_ch
, 8)
1991 char __thiscall
ctype_char_do_tolower_ch(const ctype_char
*this, char ch
)
1993 TRACE("(%p %c)\n", this, ch
);
1994 return _Tolower(ch
, &this->ctype
);
1997 /* ?do_tolower@?$ctype@D@std@@MBEPBDPADPBD@Z */
1998 /* ?do_tolower@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
1999 #if _MSVCP_VER <= 100
2000 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 4, \
2001 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2003 #define call_ctype_char_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 12, \
2004 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2006 DEFINE_THISCALL_WRAPPER(ctype_char_do_tolower
, 12)
2007 const char* __thiscall
ctype_char_do_tolower(const ctype_char
*this, char *first
, const char *last
)
2009 TRACE("(%p %p %p)\n", this, first
, last
);
2010 for(; first
<last
; first
++)
2011 *first
= _Tolower(*first
, &this->ctype
);
2015 /* ?tolower@?$ctype@D@std@@QBEDD@Z */
2016 /* ?tolower@?$ctype@D@std@@QEBADD@Z */
2017 DEFINE_THISCALL_WRAPPER(ctype_char_tolower_ch
, 8)
2018 char __thiscall
ctype_char_tolower_ch(const ctype_char
*this, char ch
)
2020 TRACE("(%p %c)\n", this, ch
);
2021 return call_ctype_char_do_tolower_ch(this, ch
);
2024 /* ?tolower@?$ctype@D@std@@QBEPBDPADPBD@Z */
2025 /* ?tolower@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2026 DEFINE_THISCALL_WRAPPER(ctype_char_tolower
, 12)
2027 const char* __thiscall
ctype_char_tolower(const ctype_char
*this, char *first
, const char *last
)
2029 TRACE("(%p %p %p)\n", this, first
, last
);
2030 return call_ctype_char_do_tolower(this, first
, last
);
2034 int __cdecl
_Toupper(int ch
, const _Ctypevec
*ctype
)
2038 TRACE("%d %p\n", ch
, ctype
);
2043 cp
= ___lc_codepage_func();
2045 /* Don't convert to unicode in case of C locale */
2047 if(ch
>='a' && ch
<='z')
2056 str
[0] = (ch
>>8) & 255;
2064 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, str
, size
, &wide
, 1))
2067 upper
= toupperW(wide
);
2071 WideCharToMultiByte(cp
, 0, &upper
, 1, str
, 2, NULL
, NULL
);
2073 return str
[0] + (str
[1]<<8);
2077 /* ?do_toupper@?$ctype@D@std@@MBEDD@Z */
2078 /* ?do_toupper@?$ctype@D@std@@MEBADD@Z */
2079 #if _MSVCP_VER <= 100
2080 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 16, \
2081 char, (const ctype_char*, char), (this, ch))
2083 #define call_ctype_char_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2084 char, (const ctype_char*, char), (this, ch))
2086 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper_ch
, 8)
2087 char __thiscall
ctype_char_do_toupper_ch(const ctype_char
*this, char ch
)
2089 TRACE("(%p %c)\n", this, ch
);
2090 return _Toupper(ch
, &this->ctype
);
2093 /* ?do_toupper@?$ctype@D@std@@MBEPBDPADPBD@Z */
2094 /* ?do_toupper@?$ctype@D@std@@MEBAPEBDPEADPEBD@Z */
2095 #if _MSVCP_VER <= 100
2096 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 12, \
2097 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2099 #define call_ctype_char_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 20, \
2100 const char*, (const ctype_char*, char*, const char*), (this, first, last))
2102 DEFINE_THISCALL_WRAPPER(ctype_char_do_toupper
, 12)
2103 const char* __thiscall
ctype_char_do_toupper(const ctype_char
*this,
2104 char *first
, const char *last
)
2106 TRACE("(%p %p %p)\n", this, first
, last
);
2107 for(; first
<last
; first
++)
2108 *first
= _Toupper(*first
, &this->ctype
);
2112 /* ?toupper@?$ctype@D@std@@QBEDD@Z */
2113 /* ?toupper@?$ctype@D@std@@QEBADD@Z */
2114 DEFINE_THISCALL_WRAPPER(ctype_char_toupper_ch
, 8)
2115 char __thiscall
ctype_char_toupper_ch(const ctype_char
*this, char ch
)
2117 TRACE("(%p %c)\n", this, ch
);
2118 return call_ctype_char_do_toupper_ch(this, ch
);
2121 /* ?toupper@?$ctype@D@std@@QBEPBDPADPBD@Z */
2122 /* ?toupper@?$ctype@D@std@@QEBAPEBDPEADPEBD@Z */
2123 DEFINE_THISCALL_WRAPPER(ctype_char_toupper
, 12)
2124 const char* __thiscall
ctype_char_toupper(const ctype_char
*this, char *first
, const char *last
)
2126 TRACE("(%p %p %p)\n", this, first
, last
);
2127 return call_ctype_char_do_toupper(this, first
, last
);
2130 /* ?is@?$ctype@D@std@@QBE_NFD@Z */
2131 /* ?is@?$ctype@D@std@@QEBA_NFD@Z */
2132 DEFINE_THISCALL_WRAPPER(ctype_char_is_ch
, 12)
2133 MSVCP_bool __thiscall
ctype_char_is_ch(const ctype_char
*this, short mask
, char ch
)
2135 TRACE("(%p %x %c)\n", this, mask
, ch
);
2136 return (this->ctype
.table
[(unsigned char)ch
] & mask
) != 0;
2139 /* ?is@?$ctype@D@std@@QBEPBDPBD0PAF@Z */
2140 /* ?is@?$ctype@D@std@@QEBAPEBDPEBD0PEAF@Z */
2141 DEFINE_THISCALL_WRAPPER(ctype_char_is
, 16)
2142 const char* __thiscall
ctype_char_is(const ctype_char
*this, const char *first
, const char *last
, short *dest
)
2144 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2145 for(; first
<last
; first
++)
2146 *dest
++ = this->ctype
.table
[(unsigned char)*first
];
2150 /* ?scan_is@?$ctype@D@std@@QBEPBDFPBD0@Z */
2151 /* ?scan_is@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2152 DEFINE_THISCALL_WRAPPER(ctype_char_scan_is
, 16)
2153 const char* __thiscall
ctype_char_scan_is(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2155 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2156 for(; first
<last
; first
++)
2157 if(!ctype_char_is_ch(this, mask
, *first
))
2162 /* ?scan_not@?$ctype@D@std@@QBEPBDFPBD0@Z */
2163 /* ?scan_not@?$ctype@D@std@@QEBAPEBDFPEBD0@Z */
2164 DEFINE_THISCALL_WRAPPER(ctype_char_scan_not
, 16)
2165 const char* __thiscall
ctype_char_scan_not(const ctype_char
*this, short mask
, const char *first
, const char *last
)
2167 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
2168 for(; first
<last
; first
++)
2169 if(ctype_char_is_ch(this, mask
, *first
))
2174 /* ?table@?$ctype@D@std@@IBEPBFXZ */
2175 /* ?table@?$ctype@D@std@@IEBAPEBFXZ */
2176 DEFINE_THISCALL_WRAPPER(ctype_char_table
, 4)
2177 const short* __thiscall
ctype_char_table(const ctype_char
*this)
2179 TRACE("(%p)\n", this);
2180 return this->ctype
.table
;
2183 /* ?id@?$ctype@_W@std@@2V0locale@2@A */
2184 locale_id ctype_wchar_id
= {0};
2185 /* ?id@?$ctype@G@std@@2V0locale@2@A */
2186 locale_id ctype_short_id
= {0};
2188 /* ??_7?$ctype@_W@std@@6B@ */
2189 extern const vtable_ptr MSVCP_ctype_wchar_vtable
;
2190 /* ??_7?$ctype@G@std@@6B@ */
2191 extern const vtable_ptr MSVCP_ctype_short_vtable
;
2193 /* ?_Id_func@?$ctype@_W@std@@SAAAVid@locale@2@XZ */
2194 /* ?_Id_func@?$ctype@_W@std@@SAAEAVid@locale@2@XZ */
2195 locale_id
* __cdecl
ctype_wchar__Id_func(void)
2198 return &ctype_wchar_id
;
2201 /* ?_Id_func@?$ctype@G@std@@SAAAVid@locale@2@XZ */
2202 /* ?_Id_func@?$ctype@G@std@@SAAEAVid@locale@2@XZ */
2203 locale_id
* __cdecl
ctype_short__Id_func(void)
2206 return &ctype_short_id
;
2209 /* ?_Init@?$ctype@_W@std@@IAEXABV_Locinfo@2@@Z */
2210 /* ?_Init@?$ctype@_W@std@@IEAAXAEBV_Locinfo@2@@Z */
2211 /* ?_Init@?$ctype@G@std@@IAEXABV_Locinfo@2@@Z */
2212 /* ?_Init@?$ctype@G@std@@IEAAXAEBV_Locinfo@2@@Z */
2213 DEFINE_THISCALL_WRAPPER(ctype_wchar__Init
, 8)
2214 void __thiscall
ctype_wchar__Init(ctype_wchar
*this, const _Locinfo
*locinfo
)
2216 TRACE("(%p %p)\n", this, locinfo
);
2217 _Locinfo__Getctype(locinfo
, &this->ctype
);
2218 _Locinfo__Getcvt(locinfo
, &this->cvt
);
2221 /* ??0?$ctype@_W@std@@QAE@ABV_Locinfo@1@I@Z */
2222 /* ??0?$ctype@_W@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2223 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_locinfo
, 12)
2224 ctype_wchar
* __thiscall
ctype_wchar_ctor_locinfo(ctype_wchar
*this,
2225 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2227 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
2228 ctype_base_ctor_refs(&this->base
, refs
);
2229 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2230 ctype_wchar__Init(this, locinfo
);
2234 /* ??0?$ctype@G@std@@QAE@ABV_Locinfo@1@I@Z */
2235 /* ??0?$ctype@G@std@@QEAA@AEBV_Locinfo@1@_K@Z */
2236 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_locinfo
, 12)
2237 ctype_wchar
* __thiscall
ctype_short_ctor_locinfo(ctype_wchar
*this,
2238 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
2240 ctype_wchar
*ret
= ctype_wchar_ctor_locinfo(this, locinfo
, refs
);
2241 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2245 /* ??0?$ctype@_W@std@@QAE@I@Z */
2246 /* ??0?$ctype@_W@std@@QEAA@_K@Z */
2247 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor_refs
, 8)
2248 ctype_wchar
* __thiscall
ctype_wchar_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2252 TRACE("(%p %lu)\n", this, refs
);
2254 ctype_base_ctor_refs(&this->base
, refs
);
2255 this->base
.facet
.vtable
= &MSVCP_ctype_wchar_vtable
;
2257 _Locinfo_ctor(&locinfo
);
2258 ctype_wchar__Init(this, &locinfo
);
2259 _Locinfo_dtor(&locinfo
);
2263 /* ??0?$ctype@G@std@@QAE@I@Z */
2264 /* ??0?$ctype@G@std@@QEAA@_K@Z */
2265 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_refs
, 8)
2266 ctype_wchar
* __thiscall
ctype_short_ctor_refs(ctype_wchar
*this, MSVCP_size_t refs
)
2268 ctype_wchar
*ret
= ctype_wchar_ctor_refs(this, refs
);
2269 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2273 /* ??0?$ctype@G@std@@IAE@PBDI@Z */
2274 /* ??0?$ctype@G@std@@IEAA@PEBD_K@Z */
2275 DEFINE_THISCALL_WRAPPER(ctype_short_ctor_name
, 12)
2276 ctype_wchar
* __thiscall
ctype_short_ctor_name(ctype_wchar
*this,
2277 const char *name
, MSVCP_size_t refs
)
2281 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
2283 ctype_base_ctor_refs(&this->base
, refs
);
2284 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2286 _Locinfo_ctor_cstr(&locinfo
, name
);
2287 ctype_wchar__Init(this, &locinfo
);
2288 _Locinfo_dtor(&locinfo
);
2292 /* ??_F?$ctype@_W@std@@QAEXXZ */
2293 /* ??_F?$ctype@_W@std@@QEAAXXZ */
2294 DEFINE_THISCALL_WRAPPER(ctype_wchar_ctor
, 4)
2295 ctype_wchar
* __thiscall
ctype_wchar_ctor(ctype_wchar
*this)
2297 TRACE("(%p)\n", this);
2298 return ctype_short_ctor_refs(this, 0);
2301 /* ??_F?$ctype@G@std@@QAEXXZ */
2302 /* ??_F?$ctype@G@std@@QEAAXXZ */
2303 DEFINE_THISCALL_WRAPPER(ctype_short_ctor
, 4)
2304 ctype_wchar
* __thiscall
ctype_short_ctor(ctype_wchar
*this)
2306 ctype_wchar
*ret
= ctype_wchar_ctor(this);
2307 this->base
.facet
.vtable
= &MSVCP_ctype_short_vtable
;
2311 /* ??1?$ctype@G@std@@UAE@XZ */
2312 /* ??1?$ctype@G@std@@UEAA@XZ */
2313 /* ??1?$ctype@_W@std@@MAE@XZ */
2314 /* ??1?$ctype@_W@std@@MEAA@XZ */
2315 /* ??1?$ctype@G@std@@MAE@XZ */
2316 /* ??1?$ctype@G@std@@MEAA@XZ */
2317 DEFINE_THISCALL_WRAPPER(ctype_wchar_dtor
, 4)
2318 void __thiscall
ctype_wchar_dtor(ctype_wchar
*this)
2320 TRACE("(%p)\n", this);
2321 if(this->ctype
.delfl
)
2322 free((void*)this->ctype
.table
);
2323 #if _MSVCP_VER >= 110
2324 free(this->ctype
.name
);
2328 DEFINE_THISCALL_WRAPPER(ctype_wchar_vector_dtor
, 8)
2329 ctype_wchar
* __thiscall
ctype_wchar_vector_dtor(ctype_wchar
*this, unsigned int flags
)
2331 TRACE("(%p %x)\n", this, flags
);
2333 /* we have an array, with the number of elements stored before the first object */
2334 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
2336 for(i
=*ptr
-1; i
>=0; i
--)
2337 ctype_wchar_dtor(this+i
);
2338 MSVCRT_operator_delete(ptr
);
2340 ctype_wchar_dtor(this);
2342 MSVCRT_operator_delete(this);
2349 int __cdecl
_Wcrtomb(char *s
, wchar_t wch
, int *state
, const _Cvtvec
*cvt
)
2354 TRACE("%p %d %p %p\n", s
, wch
, state
, cvt
);
2359 cp
= ___lc_codepage_func();
2371 size
= WideCharToMultiByte(cp
, 0, &wch
, 1, s
, MB_LEN_MAX
, NULL
, &def
);
2380 /* ?_Donarrow@?$ctype@_W@std@@IBED_WD@Z */
2381 /* ?_Donarrow@?$ctype@_W@std@@IEBAD_WD@Z */
2382 /* ?_Donarrow@?$ctype@G@std@@IBEDGD@Z */
2383 /* ?_Donarrow@?$ctype@G@std@@IEBADGD@Z */
2384 DEFINE_THISCALL_WRAPPER(ctype_wchar__Donarrow
, 12)
2385 char __thiscall
ctype_wchar__Donarrow(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2387 char buf
[MB_LEN_MAX
];
2389 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2391 return _Wcrtomb(buf
, ch
, NULL
, &this->cvt
)==1 ? buf
[0] : dflt
;
2394 /* ?do_narrow@?$ctype@_W@std@@MBED_WD@Z */
2395 /* ?do_narrow@?$ctype@_W@std@@MEBAD_WD@Z */
2396 /* ?do_narrow@?$ctype@G@std@@MBEDGD@Z */
2397 /* ?do_narrow@?$ctype@G@std@@MEBADGD@Z */
2398 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow_ch
, 12)
2399 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2400 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 52, \
2401 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2402 #elif _MSVCP_VER <= 100
2403 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 48, \
2404 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2406 #define call_ctype_wchar_do_narrow_ch(this, ch, dflt) CALL_VTBL_FUNC(this, 56, \
2407 char, (const ctype_wchar*, wchar_t, char), (this, ch, dflt))
2409 char __thiscall
ctype_wchar_do_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2411 return ctype_wchar__Donarrow(this, ch
, dflt
);
2414 /* ?do_narrow@?$ctype@_W@std@@MBEPB_WPB_W0DPAD@Z */
2415 /* ?do_narrow@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD@Z */
2416 /* ?do_narrow@?$ctype@G@std@@MBEPBGPBG0DPAD@Z */
2417 /* ?do_narrow@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD@Z */
2418 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_narrow
, 20)
2419 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
2420 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 48, \
2421 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2422 (this, first, last, dflt, dest))
2423 #elif _MSVCP_VER <= 100
2424 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 44, \
2425 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2426 (this, first, last, dflt, dest))
2428 #define call_ctype_wchar_do_narrow(this, first, last, dflt, dest) CALL_VTBL_FUNC(this, 52, \
2429 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*), \
2430 (this, first, last, dflt, dest))
2432 const wchar_t* __thiscall
ctype_wchar_do_narrow(const ctype_wchar
*this,
2433 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2435 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2436 for(; first
<last
; first
++)
2437 *dest
++ = ctype_wchar__Donarrow(this, *first
, dflt
);
2441 /* ?_Do_narrow_s@?$ctype@_W@std@@MBEPB_WPB_W0DPADI@Z */
2442 /* ?_Do_narrow_s@?$ctype@_W@std@@MEBAPEB_WPEB_W0DPEAD_K@Z */
2443 /* ?_Do_narrow_s@?$ctype@G@std@@MBEPBGPBG0DPADI@Z */
2444 /* ?_Do_narrow_s@?$ctype@G@std@@MEBAPEBGPEBG0DPEAD_K@Z */
2445 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_narrow_s
, 24)
2446 #define call_ctype_wchar__Do_narrow_s(this, first, last, dflt, dest, size) CALL_VTBL_FUNC(this, 56, \
2447 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, char, char*, MSVCP_size_t), \
2448 (this, first, last, dflt, dest, size))
2449 const wchar_t* __thiscall
ctype_wchar__Do_narrow_s(const ctype_wchar
*this,
2450 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2452 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2453 /* This function converts all multi-byte characters to dflt,
2454 * thanks to it result size is known before converting */
2455 if(last
-first
> size
)
2457 return ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2460 /* ?narrow@?$ctype@_W@std@@QBED_WD@Z */
2461 /* ?narrow@?$ctype@_W@std@@QEBAD_WD@Z */
2462 /* ?narrow@?$ctype@G@std@@QBEDGD@Z */
2463 /* ?narrow@?$ctype@G@std@@QEBADGD@Z */
2464 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow_ch
, 12)
2465 char __thiscall
ctype_wchar_narrow_ch(const ctype_wchar
*this, wchar_t ch
, char dflt
)
2467 TRACE("(%p %d %d)\n", this, ch
, dflt
);
2468 return call_ctype_wchar_do_narrow_ch(this, ch
, dflt
);
2471 /* ?narrow@?$ctype@_W@std@@QBEPB_WPB_W0DPAD@Z */
2472 /* ?narrow@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD@Z */
2473 /* ?narrow@?$ctype@G@std@@QBEPBGPBG0DPAD@Z */
2474 /* ?narrow@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD@Z */
2475 DEFINE_THISCALL_WRAPPER(ctype_wchar_narrow
, 20)
2476 const wchar_t* __thiscall
ctype_wchar_narrow(const ctype_wchar
*this,
2477 const wchar_t *first
, const wchar_t *last
, char dflt
, char *dest
)
2479 TRACE("(%p %p %p %d %p)\n", this, first
, last
, dflt
, dest
);
2480 return call_ctype_wchar_do_narrow(this, first
, last
, dflt
, dest
);
2483 /* ?_Narrow_s@?$ctype@_W@std@@QBEPB_WPB_W0DPADI@Z */
2484 /* ?_Narrow_s@?$ctype@_W@std@@QEBAPEB_WPEB_W0DPEAD_K@Z */
2485 /* ?_Narrow_s@?$ctype@G@std@@QBEPBGPBG0DPADI@Z */
2486 /* ?_Narrow_s@?$ctype@G@std@@QEBAPEBGPEBG0DPEAD_K@Z */
2487 DEFINE_THISCALL_WRAPPER(ctype_wchar__Narrow_s
, 24)
2488 const wchar_t* __thiscall
ctype_wchar__Narrow_s(const ctype_wchar
*this, const wchar_t *first
,
2489 const wchar_t *last
, char dflt
, char *dest
, MSVCP_size_t size
)
2491 TRACE("(%p %p %p %d %p %lu)\n", this, first
, last
, dflt
, dest
, size
);
2492 return call_ctype_wchar__Do_narrow_s(this, first
, last
, dflt
, dest
, size
);
2496 int __cdecl
_Mbrtowc(wchar_t *out
, const char *in
, MSVCP_size_t len
, int *state
, const _Cvtvec
*cvt
)
2502 TRACE("(%p %p %lu %p %p)\n", out
, in
, len
, state
, cvt
);
2510 cp
= ___lc_codepage_func();
2514 *out
= (unsigned char)*in
;
2521 ((char*)state
)[1] = *in
;
2523 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, (char*)state
, 2, out
, out
? 1 : 0)) {
2533 GetCPInfo(cp
, &cp_info
);
2535 for(i
=0; i
<MAX_LEADBYTES
; i
+=2) {
2536 if(!cp_info
.LeadByte
[i
+1])
2538 if((unsigned char)*in
>=cp_info
.LeadByte
[i
] && (unsigned char)*in
<=cp_info
.LeadByte
[i
+1]) {
2546 *state
= (unsigned char)*in
;
2550 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 2, out
, out
? 1 : 0)) {
2557 if(!MultiByteToWideChar(cp
, MB_ERR_INVALID_CHARS
, in
, 1, out
, out
? 1 : 0)) {
2564 static inline wchar_t mb_to_wc(char ch
, const _Cvtvec
*cvt
)
2569 return _Mbrtowc(&ret
, &ch
, 1, &state
, cvt
) == 1 ? ret
: 0;
2572 /* ?_Dowiden@?$ctype@_W@std@@IBE_WD@Z */
2573 /* ?_Dowiden@?$ctype@_W@std@@IEBA_WD@Z */
2574 /* ?_Dowiden@?$ctype@G@std@@IBEGD@Z */
2575 /* ?_Dowiden@?$ctype@G@std@@IEBAGD@Z */
2576 DEFINE_THISCALL_WRAPPER(ctype_wchar__Dowiden
, 8)
2577 wchar_t __thiscall
ctype_wchar__Dowiden(const ctype_wchar
*this, char ch
)
2581 TRACE("(%p %d)\n", this, ch
);
2582 return _Mbrtowc(&ret
, &ch
, 1, &state
, &this->cvt
)<0 ? WEOF
: ret
;
2585 /* ?do_widen@?$ctype@_W@std@@MBE_WD@Z */
2586 /* ?do_widen@?$ctype@_W@std@@MEBA_WD@Z */
2587 /* ?do_widen@?$ctype@G@std@@MBEGD@Z */
2588 /* ?do_widen@?$ctype@G@std@@MEBAGD@Z */
2589 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen_ch
, 8)
2590 #if _MSVCP_VER <= 100
2591 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2592 wchar_t, (const ctype_wchar*, char), (this, ch))
2594 #define call_ctype_wchar_do_widen_ch(this, ch) CALL_VTBL_FUNC(this, 48, \
2595 wchar_t, (const ctype_wchar*, char), (this, ch))
2597 wchar_t __thiscall
ctype_wchar_do_widen_ch(const ctype_wchar
*this, char ch
)
2599 return ctype_wchar__Dowiden(this, ch
);
2602 /* ?do_widen@?$ctype@_W@std@@MBEPBDPBD0PA_W@Z */
2603 /* ?do_widen@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W@Z */
2604 /* ?do_widen@?$ctype@G@std@@MBEPBDPBD0PAG@Z */
2605 /* ?do_widen@?$ctype@G@std@@MEBAPEBDPEBD0PEAG@Z */
2606 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_widen
, 16)
2607 #if _MSVCP_VER <= 100
2608 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 36, \
2609 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2610 (this, first, last, dest))
2612 #define call_ctype_wchar_do_widen(this, first, last, dest) CALL_VTBL_FUNC(this, 44, \
2613 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*), \
2614 (this, first, last, dest))
2616 const char* __thiscall
ctype_wchar_do_widen(const ctype_wchar
*this,
2617 const char *first
, const char *last
, wchar_t *dest
)
2619 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2620 for(; first
<last
; first
++)
2621 *dest
++ = ctype_wchar__Dowiden(this, *first
);
2625 /* ?_Do_widen_s@?$ctype@_W@std@@MBEPBDPBD0PA_WI@Z */
2626 /* ?_Do_widen_s@?$ctype@_W@std@@MEBAPEBDPEBD0PEA_W_K@Z */
2627 /* ?_Do_widen_s@?$ctype@G@std@@MBEPBDPBD0PAGI@Z */
2628 /* ?_Do_widen_s@?$ctype@G@std@@MEBAPEBDPEBD0PEAG_K@Z */
2629 DEFINE_THISCALL_WRAPPER(ctype_wchar__Do_widen_s
, 20)
2630 #define call_ctype_wchar__Do_widen_s(this, first, last, dest, size) CALL_VTBL_FUNC(this, 44, \
2631 const char*, (const ctype_wchar*, const char*, const char*, wchar_t*, MSVCP_size_t), \
2632 (this, first, last, dest, size))
2633 const char* __thiscall
ctype_wchar__Do_widen_s(const ctype_wchar
*this,
2634 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2636 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2637 /* This function converts all multi-byte characters to WEOF,
2638 * thanks to it result size is known before converting */
2639 if(size
< last
-first
)
2641 return ctype_wchar_do_widen(this, first
, last
, dest
);
2644 /* ?widen@?$ctype@_W@std@@QBE_WD@Z */
2645 /* ?widen@?$ctype@_W@std@@QEBA_WD@Z */
2646 /* ?widen@?$ctype@G@std@@QBEGD@Z */
2647 /* ?widen@?$ctype@G@std@@QEBAGD@Z */
2648 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen_ch
, 8)
2649 wchar_t __thiscall
ctype_wchar_widen_ch(const ctype_wchar
*this, char ch
)
2651 TRACE("(%p %d)\n", this, ch
);
2652 return call_ctype_wchar_do_widen_ch(this, ch
);
2655 /* ?widen@?$ctype@_W@std@@QBEPBDPBD0PA_W@Z */
2656 /* ?widen@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W@Z */
2657 /* ?widen@?$ctype@G@std@@QBEPBDPBD0PAG@Z */
2658 /* ?widen@?$ctype@G@std@@QEBAPEBDPEBD0PEAG@Z */
2659 DEFINE_THISCALL_WRAPPER(ctype_wchar_widen
, 16)
2660 const char* __thiscall
ctype_wchar_widen(const ctype_wchar
*this,
2661 const char *first
, const char *last
, wchar_t *dest
)
2663 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2664 return call_ctype_wchar_do_widen(this, first
, last
, dest
);
2667 /* ?_Widen_s@?$ctype@_W@std@@QBEPBDPBD0PA_WI@Z */
2668 /* ?_Widen_s@?$ctype@_W@std@@QEBAPEBDPEBD0PEA_W_K@Z */
2669 /* ?_Widen_s@?$ctype@G@std@@QBEPBDPBD0PAGI@Z */
2670 /* ?_Widen_s@?$ctype@G@std@@QEBAPEBDPEBD0PEAG_K@Z */
2671 DEFINE_THISCALL_WRAPPER(ctype_wchar__Widen_s
, 20)
2672 const char* __thiscall
ctype_wchar__Widen_s(const ctype_wchar
*this,
2673 const char *first
, const char *last
, wchar_t *dest
, MSVCP_size_t size
)
2675 TRACE("(%p %p %p %p %lu)\n", this, first
, last
, dest
, size
);
2676 return call_ctype_wchar__Do_widen_s(this, first
, last
, dest
, size
);
2679 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2680 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2681 MSVCP_size_t __cdecl
ctype_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
2683 TRACE("(%p %p)\n", facet
, loc
);
2685 if(facet
&& !*facet
) {
2688 *facet
= MSVCRT_operator_new(sizeof(ctype_wchar
));
2690 ERR("Out of memory\n");
2691 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
2695 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
2696 ctype_wchar_ctor_locinfo((ctype_wchar
*)*facet
, &locinfo
, 0);
2697 _Locinfo_dtor(&locinfo
);
2703 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
2704 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2705 MSVCP_size_t __cdecl
ctype_wchar__Getcat_old(const locale_facet
**facet
)
2707 return ctype_wchar__Getcat(facet
, locale_classic());
2710 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
2711 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
2712 MSVCP_size_t __cdecl
ctype_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
2714 if(facet
&& !*facet
) {
2715 ctype_wchar__Getcat(facet
, loc
);
2716 (*(locale_facet
**)facet
)->vtable
= &MSVCP_ctype_short_vtable
;
2722 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
2723 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
2724 MSVCP_size_t __cdecl
ctype_short__Getcat_old(const locale_facet
**facet
)
2726 return ctype_short__Getcat(facet
, locale_classic());
2730 wchar_t __cdecl
_Towlower(wchar_t ch
, const _Ctypevec
*ctype
)
2732 TRACE("(%d %p)\n", ch
, ctype
);
2733 return tolowerW(ch
);
2736 ctype_wchar
* ctype_wchar_use_facet(const locale
*loc
)
2738 static ctype_wchar
*obj
= NULL
;
2741 const locale_facet
*fac
;
2743 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2744 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_wchar_id
));
2746 _Lockit_dtor(&lock
);
2747 return (ctype_wchar
*)fac
;
2751 _Lockit_dtor(&lock
);
2755 ctype_wchar__Getcat(&fac
, loc
);
2756 obj
= (ctype_wchar
*)fac
;
2757 call_locale_facet__Incref(&obj
->base
.facet
);
2758 locale_facet_register(&obj
->base
.facet
);
2759 _Lockit_dtor(&lock
);
2764 ctype_wchar
* ctype_short_use_facet(const locale
*loc
)
2766 static ctype_wchar
*obj
= NULL
;
2769 const locale_facet
*fac
;
2771 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
2772 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&ctype_short_id
));
2774 _Lockit_dtor(&lock
);
2775 return (ctype_wchar
*)fac
;
2779 _Lockit_dtor(&lock
);
2783 ctype_short__Getcat(&fac
, loc
);
2784 obj
= (ctype_wchar
*)fac
;
2785 call_locale_facet__Incref(&obj
->base
.facet
);
2786 locale_facet_register(&obj
->base
.facet
);
2787 _Lockit_dtor(&lock
);
2792 /* ?do_tolower@?$ctype@_W@std@@MBE_W_W@Z */
2793 /* ?do_tolower@?$ctype@_W@std@@MEBA_W_W@Z */
2794 /* ?do_tolower@?$ctype@G@std@@MBEGG@Z */
2795 /* ?do_tolower@?$ctype@G@std@@MEBAGG@Z */
2796 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower_ch
, 8)
2797 #if _MSVCP_VER <= 100
2798 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 24, \
2799 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2801 #define call_ctype_wchar_do_tolower_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2802 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2804 wchar_t __thiscall
ctype_wchar_do_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2806 return _Towlower(ch
, &this->ctype
);
2809 /* ?do_tolower@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2810 /* ?do_tolower@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2811 /* ?do_tolower@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2812 /* ?do_tolower@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2813 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_tolower
, 12)
2814 #if _MSVCP_VER <= 100
2815 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 20, \
2816 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2817 (this, first, last))
2819 #define call_ctype_wchar_do_tolower(this, first, last) CALL_VTBL_FUNC(this, 28, \
2820 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2821 (this, first, last))
2823 const wchar_t* __thiscall
ctype_wchar_do_tolower(const ctype_wchar
*this,
2824 wchar_t *first
, const wchar_t *last
)
2826 TRACE("(%p %p %p)\n", this, first
, last
);
2827 for(; first
<last
; first
++)
2828 *first
= _Towlower(*first
, &this->ctype
);
2832 /* ?tolower@?$ctype@_W@std@@QBE_W_W@Z */
2833 /* ?tolower@?$ctype@_W@std@@QEBA_W_W@Z */
2834 /* ?tolower@?$ctype@G@std@@QBEGG@Z */
2835 /* ?tolower@?$ctype@G@std@@QEBAGG@Z */
2836 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower_ch
, 8)
2837 wchar_t __thiscall
ctype_wchar_tolower_ch(const ctype_wchar
*this, wchar_t ch
)
2839 TRACE("(%p %d)\n", this, ch
);
2840 return call_ctype_wchar_do_tolower_ch(this, ch
);
2843 /* ?tolower@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2844 /* ?tolower@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2845 /* ?tolower@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2846 /* ?tolower@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2847 DEFINE_THISCALL_WRAPPER(ctype_wchar_tolower
, 12)
2848 const wchar_t* __thiscall
ctype_wchar_tolower(const ctype_wchar
*this,
2849 wchar_t *first
, const wchar_t *last
)
2851 TRACE("(%p %p %p)\n", this, first
, last
);
2852 return call_ctype_wchar_do_tolower(this, first
, last
);
2856 wchar_t __cdecl
_Towupper(wchar_t ch
, const _Ctypevec
*ctype
)
2858 TRACE("(%d %p)\n", ch
, ctype
);
2859 return toupperW(ch
);
2862 /* ?do_toupper@?$ctype@_W@std@@MBE_W_W@Z */
2863 /* ?do_toupper@?$ctype@_W@std@@MEBA_W_W@Z */
2864 /* ?do_toupper@?$ctype@G@std@@MBEGG@Z */
2865 /* ?do_toupper@?$ctype@G@std@@MEBAGG@Z */
2866 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper_ch
, 8)
2867 #if _MSVCP_VER <= 100
2868 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 32, \
2869 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2871 #define call_ctype_wchar_do_toupper_ch(this, ch) CALL_VTBL_FUNC(this, 40, \
2872 wchar_t, (const ctype_wchar*, wchar_t), (this, ch))
2874 wchar_t __thiscall
ctype_wchar_do_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2876 return _Towupper(ch
, &this->ctype
);
2879 /* ?do_toupper@?$ctype@_W@std@@MBEPB_WPA_WPB_W@Z */
2880 /* ?do_toupper@?$ctype@_W@std@@MEBAPEB_WPEA_WPEB_W@Z */
2881 /* ?do_toupper@?$ctype@G@std@@MBEPBGPAGPBG@Z */
2882 /* ?do_toupper@?$ctype@G@std@@MEBAPEBGPEAGPEBG@Z */
2883 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_toupper
, 12)
2884 #if _MSVCP_VER <= 100
2885 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 28, \
2886 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2887 (this, first, last))
2889 #define call_ctype_wchar_do_toupper(this, first, last) CALL_VTBL_FUNC(this, 36, \
2890 const wchar_t*, (const ctype_wchar*, wchar_t*, const wchar_t*), \
2891 (this, first, last))
2893 const wchar_t* __thiscall
ctype_wchar_do_toupper(const ctype_wchar
*this,
2894 wchar_t *first
, const wchar_t *last
)
2896 TRACE("(%p %p %p)\n", this, first
, last
);
2897 for(; first
<last
; first
++)
2898 *first
= _Towupper(*first
, &this->ctype
);
2902 /* ?toupper@?$ctype@_W@std@@QBE_W_W@Z */
2903 /* ?toupper@?$ctype@_W@std@@QEBA_W_W@Z */
2904 /* ?toupper@?$ctype@G@std@@QBEGG@Z */
2905 /* ?toupper@?$ctype@G@std@@QEBAGG@Z */
2906 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper_ch
, 8)
2907 wchar_t __thiscall
ctype_wchar_toupper_ch(const ctype_wchar
*this, wchar_t ch
)
2909 TRACE("(%p %d)\n", this, ch
);
2910 return call_ctype_wchar_do_toupper_ch(this, ch
);
2913 /* ?toupper@?$ctype@_W@std@@QBEPB_WPA_WPB_W@Z */
2914 /* ?toupper@?$ctype@_W@std@@QEBAPEB_WPEA_WPEB_W@Z */
2915 /* ?toupper@?$ctype@G@std@@QBEPBGPAGPBG@Z */
2916 /* ?toupper@?$ctype@G@std@@QEBAPEBGPEAGPEBG@Z */
2917 DEFINE_THISCALL_WRAPPER(ctype_wchar_toupper
, 12)
2918 const wchar_t* __thiscall
ctype_wchar_toupper(const ctype_wchar
*this,
2919 wchar_t *first
, const wchar_t *last
)
2921 TRACE("(%p %p %p)\n", this, first
, last
);
2922 return call_ctype_wchar_do_toupper(this, first
, last
);
2926 const wchar_t* __cdecl
_Getwctypes(const wchar_t *first
, const wchar_t *last
,
2927 short *mask
, const _Ctypevec
*ctype
)
2929 TRACE("(%p %p %p %p)\n", first
, last
, mask
, ctype
);
2930 GetStringTypeW(CT_CTYPE1
, first
, last
-first
, (WORD
*)mask
);
2935 short __cdecl
_Getwctype(wchar_t ch
, const _Ctypevec
*ctype
)
2938 _Getwctypes(&ch
, &ch
+1, &mask
, ctype
);
2942 /* ?do_is@?$ctype@_W@std@@MBE_NF_W@Z */
2943 /* ?do_is@?$ctype@_W@std@@MEBA_NF_W@Z */
2944 /* ?do_is@?$ctype@G@std@@MBE_NFG@Z */
2945 /* ?do_is@?$ctype@G@std@@MEBA_NFG@Z */
2946 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is_ch
, 12)
2947 #if _MSVCP_VER <= 100
2948 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 8, \
2949 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2951 #define call_ctype_wchar_do_is_ch(this, mask, ch) CALL_VTBL_FUNC(this, 16, \
2952 MSVCP_bool, (const ctype_wchar*, short, wchar_t), (this, mask, ch))
2954 MSVCP_bool __thiscall
ctype_wchar_do_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2956 TRACE("(%p %x %d)\n", this, mask
, ch
);
2957 return (_Getwctype(ch
, &this->ctype
) & mask
) != 0;
2960 /* ?do_is@?$ctype@_W@std@@MBEPB_WPB_W0PAF@Z */
2961 /* ?do_is@?$ctype@_W@std@@MEBAPEB_WPEB_W0PEAF@Z */
2962 /* ?do_is@?$ctype@G@std@@MBEPBGPBG0PAF@Z */
2963 /* ?do_is@?$ctype@G@std@@MEBAPEBGPEBG0PEAF@Z */
2964 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_is
, 16)
2965 #if _MSVCP_VER <= 100
2966 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 4, \
2967 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2968 (this, first, last, dest))
2970 #define call_ctype_wchar_do_is(this, first, last, dest) CALL_VTBL_FUNC(this, 12, \
2971 const wchar_t*, (const ctype_wchar*, const wchar_t*, const wchar_t*, short*), \
2972 (this, first, last, dest))
2974 const wchar_t* __thiscall
ctype_wchar_do_is(const ctype_wchar
*this,
2975 const wchar_t *first
, const wchar_t *last
, short *dest
)
2977 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
2978 return _Getwctypes(first
, last
, dest
, &this->ctype
);
2981 /* ?is@?$ctype@_W@std@@QBE_NF_W@Z */
2982 /* ?is@?$ctype@_W@std@@QEBA_NF_W@Z */
2983 /* ?is@?$ctype@G@std@@QBE_NFG@Z */
2984 /* ?is@?$ctype@G@std@@QEBA_NFG@Z */
2985 DEFINE_THISCALL_WRAPPER(ctype_wchar_is_ch
, 12)
2986 MSVCP_bool __thiscall
ctype_wchar_is_ch(const ctype_wchar
*this, short mask
, wchar_t ch
)
2988 TRACE("(%p %x %d)\n", this, mask
, ch
);
2989 return call_ctype_wchar_do_is_ch(this, mask
, ch
);
2992 /* ?is@?$ctype@_W@std@@QBEPB_WPB_W0PAF@Z */
2993 /* ?is@?$ctype@_W@std@@QEBAPEB_WPEB_W0PEAF@Z */
2994 /* ?is@?$ctype@G@std@@QBEPBGPBG0PAF@Z */
2995 /* ?is@?$ctype@G@std@@QEBAPEBGPEBG0PEAF@Z */
2996 DEFINE_THISCALL_WRAPPER(ctype_wchar_is
, 16)
2997 const wchar_t* __thiscall
ctype_wchar_is(const ctype_wchar
*this,
2998 const wchar_t *first
, const wchar_t *last
, short *dest
)
3000 TRACE("(%p %p %p %p)\n", this, first
, last
, dest
);
3001 return call_ctype_wchar_do_is(this, first
, last
, dest
);
3004 /* ?do_scan_is@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3005 /* ?do_scan_is@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3006 /* ?do_scan_is@?$ctype@G@std@@MBEPBGFPBG0@Z */
3007 /* ?do_scan_is@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3008 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_is
, 16)
3009 #if _MSVCP_VER <= 100
3010 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 12, \
3011 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3012 (this, mask, first, last))
3014 #define call_ctype_wchar_do_scan_is(this, mask, first, last) CALL_VTBL_FUNC(this, 20, \
3015 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3016 (this, mask, first, last))
3018 const wchar_t* __thiscall
ctype_wchar_do_scan_is(const ctype_wchar
*this,
3019 short mask
, const wchar_t *first
, const wchar_t *last
)
3021 TRACE("(%p %d %p %p)\n", this, mask
, first
, last
);
3022 for(; first
<last
; first
++)
3023 if(!ctype_wchar_is_ch(this, mask
, *first
))
3028 /* ?scan_is@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3029 /* ?scan_is@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3030 /* ?scan_is@?$ctype@G@std@@QBEPBGFPBG0@Z */
3031 /* ?scan_is@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3032 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_is
, 16)
3033 const wchar_t* __thiscall
ctype_wchar_scan_is(const ctype_wchar
*this,
3034 short mask
, const wchar_t *first
, const wchar_t *last
)
3036 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3037 return call_ctype_wchar_do_scan_is(this, mask
, first
, last
);
3040 /* ?do_scan_not@?$ctype@_W@std@@MBEPB_WFPB_W0@Z */
3041 /* ?do_scan_not@?$ctype@_W@std@@MEBAPEB_WFPEB_W0@Z */
3042 /* ?do_scan_not@?$ctype@G@std@@MBEPBGFPBG0@Z */
3043 /* ?do_scan_not@?$ctype@G@std@@MEBAPEBGFPEBG0@Z */
3044 DEFINE_THISCALL_WRAPPER(ctype_wchar_do_scan_not
, 16)
3045 #if _MSVCP_VER <= 100
3046 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 16, \
3047 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3048 (this, mask, first, last))
3050 #define call_ctype_wchar_do_scan_not(this, mask, first, last) CALL_VTBL_FUNC(this, 24, \
3051 const wchar_t*, (const ctype_wchar*, short, const wchar_t*, const wchar_t*), \
3052 (this, mask, first, last))
3054 const wchar_t* __thiscall
ctype_wchar_do_scan_not(const ctype_wchar
*this,
3055 short mask
, const wchar_t *first
, const wchar_t *last
)
3057 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3058 for(; first
<last
; first
++)
3059 if(ctype_wchar_is_ch(this, mask
, *first
))
3064 /* ?scan_not@?$ctype@_W@std@@QBEPB_WFPB_W0@Z */
3065 /* ?scan_not@?$ctype@_W@std@@QEBAPEB_WFPEB_W0@Z */
3066 /* ?scan_not@?$ctype@G@std@@QBEPBGFPBG0@Z */
3067 /* ?scan_not@?$ctype@G@std@@QEBAPEBGFPEBG0@Z */
3068 DEFINE_THISCALL_WRAPPER(ctype_wchar_scan_not
, 16)
3069 const wchar_t* __thiscall
ctype_wchar_scan_not(const ctype_wchar
*this,
3070 short mask
, const wchar_t *first
, const wchar_t *last
)
3072 TRACE("(%p %x %p %p)\n", this, mask
, first
, last
);
3073 return call_ctype_wchar_do_scan_not(this, mask
, first
, last
);
3076 /* ??_7codecvt_base@std@@6B@ */
3077 extern const vtable_ptr MSVCP_codecvt_base_vtable
;
3079 /* ??0codecvt_base@std@@QAE@I@Z */
3080 /* ??0codecvt_base@std@@QEAA@_K@Z */
3081 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor_refs
, 8)
3082 codecvt_base
* __thiscall
codecvt_base_ctor_refs(codecvt_base
*this, MSVCP_size_t refs
)
3084 TRACE("(%p %lu)\n", this, refs
);
3085 locale_facet_ctor_refs(&this->facet
, refs
);
3086 this->facet
.vtable
= &MSVCP_codecvt_base_vtable
;
3090 /* ??_Fcodecvt_base@std@@QAEXXZ */
3091 /* ??_Fcodecvt_base@std@@QEAAXXZ */
3092 DEFINE_THISCALL_WRAPPER(codecvt_base_ctor
, 4)
3093 codecvt_base
* __thiscall
codecvt_base_ctor(codecvt_base
*this)
3095 return codecvt_base_ctor_refs(this, 0);
3098 /* ??1codecvt_base@std@@UAE@XZ */
3099 /* ??1codecvt_base@std@@UEAA@XZ */
3100 DEFINE_THISCALL_WRAPPER(codecvt_base_dtor
, 4)
3101 void __thiscall
codecvt_base_dtor(codecvt_base
*this)
3103 TRACE("(%p)\n", this);
3104 locale_facet_dtor(&this->facet
);
3107 DEFINE_THISCALL_WRAPPER(codecvt_base_vector_dtor
, 8)
3108 codecvt_base
* __thiscall
codecvt_base_vector_dtor(codecvt_base
*this, unsigned int flags
)
3110 TRACE("(%p %x)\n", this, flags
);
3112 /* we have an array, with the number of elements stored before the first object */
3113 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3115 for(i
=*ptr
-1; i
>=0; i
--)
3116 codecvt_base_dtor(this+i
);
3117 MSVCRT_operator_delete(ptr
);
3119 codecvt_base_dtor(this);
3121 MSVCRT_operator_delete(this);
3127 /* ?do_always_noconv@codecvt_base@std@@MBE_NXZ */
3128 /* ?do_always_noconv@codecvt_base@std@@MEBA_NXZ */
3129 #if _MSVCP_VER <= 100
3130 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 4, \
3131 MSVCP_bool, (const codecvt_base*), (this))
3133 #define call_codecvt_base_do_always_noconv(this) CALL_VTBL_FUNC(this, 12, \
3134 MSVCP_bool, (const codecvt_base*), (this))
3136 DEFINE_THISCALL_WRAPPER(codecvt_base_do_always_noconv
, 4)
3137 MSVCP_bool __thiscall
codecvt_base_do_always_noconv(const codecvt_base
*this)
3139 TRACE("(%p)\n", this);
3143 /* ?always_noconv@codecvt_base@std@@QBE_NXZ */
3144 /* ?always_noconv@codecvt_base@std@@QEBA_NXZ */
3145 DEFINE_THISCALL_WRAPPER(codecvt_base_always_noconv
, 4)
3146 MSVCP_bool __thiscall
codecvt_base_always_noconv(const codecvt_base
*this)
3148 TRACE("(%p)\n", this);
3149 return call_codecvt_base_do_always_noconv(this);
3152 /* ?do_max_length@codecvt_base@std@@MBEHXZ */
3153 /* ?do_max_length@codecvt_base@std@@MEBAHXZ */
3154 #if _MSVCP_VER <= 100
3155 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 8, \
3156 int, (const codecvt_base*), (this))
3158 #define call_codecvt_base_do_max_length(this) CALL_VTBL_FUNC(this, 16, \
3159 int, (const codecvt_base*), (this))
3161 DEFINE_THISCALL_WRAPPER(codecvt_base_do_max_length
, 4)
3162 int __thiscall
codecvt_base_do_max_length(const codecvt_base
*this)
3164 TRACE("(%p)\n", this);
3168 /* ?max_length@codecvt_base@std@@QBEHXZ */
3169 /* ?max_length@codecvt_base@std@@QEBAHXZ */
3170 DEFINE_THISCALL_WRAPPER(codecvt_base_max_length
, 4)
3171 int __thiscall
codecvt_base_max_length(const codecvt_base
*this)
3173 TRACE("(%p)\n", this);
3174 return call_codecvt_base_do_max_length(this);
3177 /* ?do_encoding@codecvt_base@std@@MBEHXZ */
3178 /* ?do_encoding@codecvt_base@std@@MEBAHXZ */
3179 #if _MSVCP_VER <= 100
3180 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 12, \
3181 int, (const codecvt_base*), (this))
3183 #define call_codecvt_base_do_encoding(this) CALL_VTBL_FUNC(this, 20, \
3184 int, (const codecvt_base*), (this))
3186 DEFINE_THISCALL_WRAPPER(codecvt_base_do_encoding
, 4)
3187 int __thiscall
codecvt_base_do_encoding(const codecvt_base
*this)
3189 TRACE("(%p)\n", this);
3193 /* ?encoding@codecvt_base@std@@QBEHXZ */
3194 /* ?encoding@codecvt_base@std@@QEBAHXZ */
3195 DEFINE_THISCALL_WRAPPER(codecvt_base_encoding
, 4)
3196 int __thiscall
codecvt_base_encoding(const codecvt_base
*this)
3198 TRACE("(%p)\n", this);
3199 return call_codecvt_base_do_encoding(this);
3202 /* ?id@?$codecvt@DDH@std@@2V0locale@2@A */
3203 locale_id codecvt_char_id
= {0};
3205 /* ??_7?$codecvt@DDH@std@@6B@ */
3206 extern const vtable_ptr MSVCP_codecvt_char_vtable
;
3208 /* ?_Init@?$codecvt@DDH@std@@IAEXABV_Locinfo@2@@Z */
3209 /* ?_Init@?$codecvt@DDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3210 DEFINE_THISCALL_WRAPPER(codecvt_char__Init
, 8)
3211 void __thiscall
codecvt_char__Init(codecvt_char
*this, const _Locinfo
*locinfo
)
3213 TRACE("(%p %p)\n", this, locinfo
);
3216 /* ??0?$codecvt@DDH@std@@QAE@ABV_Locinfo@1@I@Z */
3217 /* ??0?$codecvt@DDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3218 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_locinfo
, 12)
3219 codecvt_char
* __thiscall
codecvt_char_ctor_locinfo(codecvt_char
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3221 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
3222 codecvt_base_ctor_refs(&this->base
, refs
);
3223 this->base
.facet
.vtable
= &MSVCP_codecvt_char_vtable
;
3227 /* ??0?$codecvt@DDH@std@@QAE@I@Z */
3228 /* ??0?$codecvt@DDH@std@@QEAA@_K@Z */
3229 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor_refs
, 8)
3230 codecvt_char
* __thiscall
codecvt_char_ctor_refs(codecvt_char
*this, MSVCP_size_t refs
)
3232 return codecvt_char_ctor_locinfo(this, NULL
, refs
);
3235 /* ??_F?$codecvt@DDH@std@@QAEXXZ */
3236 /* ??_F?$codecvt@DDH@std@@QEAAXXZ */
3237 DEFINE_THISCALL_WRAPPER(codecvt_char_ctor
, 4)
3238 codecvt_char
* __thiscall
codecvt_char_ctor(codecvt_char
*this)
3240 return codecvt_char_ctor_locinfo(this, NULL
, 0);
3243 /* ??1?$codecvt@DDH@std@@UAE@XZ */
3244 /* ??1?$codecvt@DDH@std@@UEAA@XZ */
3245 /* ??1?$codecvt@DDH@std@@MAE@XZ */
3246 /* ??1?$codecvt@DDH@std@@MEAA@XZ */
3247 DEFINE_THISCALL_WRAPPER(codecvt_char_dtor
, 4)
3248 void __thiscall
codecvt_char_dtor(codecvt_char
*this)
3250 TRACE("(%p)\n", this);
3251 codecvt_base_dtor(&this->base
);
3254 DEFINE_THISCALL_WRAPPER(codecvt_char_vector_dtor
, 8)
3255 codecvt_char
* __thiscall
codecvt_char_vector_dtor(codecvt_char
*this, unsigned int flags
)
3257 TRACE("(%p %x)\n", this, flags
);
3259 /* we have an array, with the number of elements stored before the first object */
3260 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3262 for(i
=*ptr
-1; i
>=0; i
--)
3263 codecvt_char_dtor(this+i
);
3264 MSVCRT_operator_delete(ptr
);
3266 codecvt_char_dtor(this);
3268 MSVCRT_operator_delete(this);
3274 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3275 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3276 MSVCP_size_t __cdecl
codecvt_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
3278 TRACE("(%p %p)\n", facet
, loc
);
3280 if(facet
&& !*facet
) {
3281 *facet
= MSVCRT_operator_new(sizeof(codecvt_char
));
3283 ERR("Out of memory\n");
3284 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3287 codecvt_char_ctor((codecvt_char
*)*facet
);
3293 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
3294 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3295 MSVCP_size_t __cdecl
codecvt_char__Getcat_old(const locale_facet
**facet
)
3297 return codecvt_char__Getcat(facet
, locale_classic());
3300 codecvt_char
* codecvt_char_use_facet(const locale
*loc
)
3302 static codecvt_char
*obj
= NULL
;
3305 const locale_facet
*fac
;
3307 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3308 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_char_id
));
3310 _Lockit_dtor(&lock
);
3311 return (codecvt_char
*)fac
;
3315 _Lockit_dtor(&lock
);
3319 codecvt_char__Getcat(&fac
, loc
);
3320 obj
= (codecvt_char
*)fac
;
3321 call_locale_facet__Incref(&obj
->base
.facet
);
3322 locale_facet_register(&obj
->base
.facet
);
3323 _Lockit_dtor(&lock
);
3328 /* ?do_in@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3329 /* ?do_in@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3330 #if _MSVCP_VER <= 100
3331 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3332 CALL_VTBL_FUNC(this, 16, int, \
3333 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3334 (this, state, from, from_end, from_next, to, to_end, to_next))
3336 #define call_codecvt_char_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3337 CALL_VTBL_FUNC(this, 24, int, \
3338 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3339 (this, state, from, from_end, from_next, to, to_end, to_next))
3341 DEFINE_THISCALL_WRAPPER(codecvt_char_do_in
, 32)
3342 int __thiscall
codecvt_char_do_in(const codecvt_char
*this, int *state
,
3343 const char *from
, const char *from_end
, const char **from_next
,
3344 char *to
, char *to_end
, char **to_next
)
3346 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3347 from_next
, to
, to_end
, to_next
);
3350 return CODECVT_noconv
;
3353 /* ?in@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3354 /* ?in@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3355 DEFINE_THISCALL_WRAPPER(codecvt_char_in
, 32)
3356 int __thiscall
codecvt_char_in(const codecvt_char
*this, int *state
,
3357 const char *from
, const char *from_end
, const char **from_next
,
3358 char *to
, char *to_end
, char **to_next
)
3360 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3361 from_next
, to
, to_end
, to_next
);
3362 return call_codecvt_char_do_in(this, state
, from
, from_end
, from_next
,
3363 to
, to_end
, to_next
);
3366 /* ?do_out@?$codecvt@DDH@std@@MBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3367 /* ?do_out@?$codecvt@DDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3368 #if _MSVCP_VER <= 100
3369 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3370 CALL_VTBL_FUNC(this, 20, int, \
3371 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3372 (this, state, from, from_end, from_next, to, to_end, to_next))
3374 #define call_codecvt_char_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3375 CALL_VTBL_FUNC(this, 28, int, \
3376 (const codecvt_char*, int*, const char*, const char*, const char**, char*, char*, char**), \
3377 (this, state, from, from_end, from_next, to, to_end, to_next))
3379 DEFINE_THISCALL_WRAPPER(codecvt_char_do_out
, 32)
3380 int __thiscall
codecvt_char_do_out(const codecvt_char
*this, int *state
,
3381 const char *from
, const char *from_end
, const char **from_next
,
3382 char *to
, char *to_end
, char **to_next
)
3384 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3385 from_end
, from_next
, to
, to_end
, to_next
);
3388 return CODECVT_noconv
;
3391 /* ?out@?$codecvt@DDH@std@@QBEHAAHPBD1AAPBDPAD3AAPAD@Z */
3392 /* ?out@?$codecvt@DDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAD3AEAPEAD@Z */
3393 DEFINE_THISCALL_WRAPPER(codecvt_char_out
, 32)
3394 int __thiscall
codecvt_char_out(const codecvt_char
*this, int *state
,
3395 const char *from
, const char *from_end
, const char **from_next
,
3396 char *to
, char *to_end
, char **to_next
)
3398 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
, from_end
,
3399 from_next
, to
, to_end
, to_next
);
3400 return call_codecvt_char_do_out(this, state
, from
, from_end
, from_next
,
3401 to
, to_end
, to_next
);
3404 /* ?do_unshift@?$codecvt@DDH@std@@MBEHAAHPAD1AAPAD@Z */
3405 /* ?do_unshift@?$codecvt@DDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3406 #if _MSVCP_VER <= 100
3407 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3408 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3410 #define call_codecvt_char_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3411 int, (const codecvt_char*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3413 DEFINE_THISCALL_WRAPPER(codecvt_char_do_unshift
, 20)
3414 int __thiscall
codecvt_char_do_unshift(const codecvt_char
*this,
3415 int *state
, char *to
, char *to_end
, char **to_next
)
3417 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3419 return CODECVT_noconv
;
3422 /* ?unshift@?$codecvt@DDH@std@@QBEHAAHPAD1AAPAD@Z */
3423 /* ?unshift@?$codecvt@DDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3424 DEFINE_THISCALL_WRAPPER(codecvt_char_unshift
, 20)
3425 int __thiscall
codecvt_char_unshift(const codecvt_char
*this,
3426 int *state
, char *to
, char *to_end
, char **to_next
)
3428 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3429 return call_codecvt_char_do_unshift(this, state
, to
, to_end
, to_next
);
3432 /* ?do_length@?$codecvt@DDH@std@@MBEHABHPBD1I@Z */
3433 /* ?do_length@?$codecvt@DDH@std@@MEBAHAEBHPEBD1_K@Z */
3434 #if _MSVCP_VER <= 100
3435 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3436 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3437 (this, state, from, from_end, max))
3439 #define call_codecvt_char_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3440 int, (const codecvt_char*, const int*, const char*, const char*, MSVCP_size_t), \
3441 (this, state, from, from_end, max))
3443 DEFINE_THISCALL_WRAPPER(codecvt_char_do_length
, 20)
3444 int __thiscall
codecvt_char_do_length(const codecvt_char
*this, const int *state
,
3445 const char *from
, const char *from_end
, MSVCP_size_t max
)
3447 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3448 return (from_end
-from
> max
? max
: from_end
-from
);
3451 /* ?length@?$codecvt@DDH@std@@QBEHABHPBD1I@Z */
3452 /* ?length@?$codecvt@DDH@std@@QEBAHAEBHPEBD1_K@Z */
3453 DEFINE_THISCALL_WRAPPER(codecvt_char_length
, 20)
3454 int __thiscall
codecvt_char_length(const codecvt_char
*this, const int *state
,
3455 const char *from
, const char *from_end
, MSVCP_size_t max
)
3457 TRACE("(%p %p %p %p %lu)\n", this, state
, from
, from_end
, max
);
3458 return call_codecvt_char_do_length(this, state
, from
, from_end
, max
);
3461 /* ?id@?$codecvt@_WDH@std@@2V0locale@2@A */
3462 locale_id codecvt_wchar_id
= {0};
3463 /* ?id@?$codecvt@GDH@std@@2V0locale@2@A */
3464 locale_id codecvt_short_id
= {0};
3466 /* ??_7?$codecvt@_WDH@std@@6B@ */
3467 extern const vtable_ptr MSVCP_codecvt_wchar_vtable
;
3468 /* ??_7?$codecvt@GDH@std@@6B@ */
3469 extern const vtable_ptr MSVCP_codecvt_short_vtable
;
3471 /* ?_Init@?$codecvt@GDH@std@@IAEXABV_Locinfo@2@@Z */
3472 /* ?_Init@?$codecvt@GDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3473 /* ?_Init@?$codecvt@_WDH@std@@IAEXABV_Locinfo@2@@Z */
3474 /* ?_Init@?$codecvt@_WDH@std@@IEAAXAEBV_Locinfo@2@@Z */
3475 DEFINE_THISCALL_WRAPPER(codecvt_wchar__Init
, 8)
3476 void __thiscall
codecvt_wchar__Init(codecvt_wchar
*this, const _Locinfo
*locinfo
)
3478 TRACE("(%p %p)\n", this, locinfo
);
3479 _Locinfo__Getcvt(locinfo
, &this->cvt
);
3482 /* ??0?$codecvt@_WDH@std@@QAE@ABV_Locinfo@1@I@Z */
3483 /* ??0?$codecvt@_WDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3484 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_locinfo
, 12)
3485 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3487 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3489 codecvt_base_ctor_refs(&this->base
, refs
);
3490 this->base
.facet
.vtable
= &MSVCP_codecvt_wchar_vtable
;
3492 codecvt_wchar__Init(this, locinfo
);
3496 /* ??0?$codecvt@GDH@std@@QAE@ABV_Locinfo@1@I@Z */
3497 /* ??0?$codecvt@GDH@std@@QEAA@AEBV_Locinfo@1@_K@Z */
3498 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_locinfo
, 12)
3499 codecvt_wchar
* __thiscall
codecvt_short_ctor_locinfo(codecvt_wchar
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
3501 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
3503 codecvt_wchar_ctor_locinfo(this, locinfo
, refs
);
3504 this->base
.facet
.vtable
= &MSVCP_codecvt_short_vtable
;
3508 /* ??0?$codecvt@_WDH@std@@QAE@I@Z */
3509 /* ??0?$codecvt@_WDH@std@@QEAA@_K@Z */
3510 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor_refs
, 8)
3511 codecvt_wchar
* __thiscall
codecvt_wchar_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3515 TRACE("(%p %ld)\n", this, refs
);
3517 _Locinfo_ctor(&locinfo
);
3518 codecvt_wchar_ctor_locinfo(this, &locinfo
, refs
);
3519 _Locinfo_dtor(&locinfo
);
3523 /* ??0?$codecvt@GDH@std@@QAE@I@Z */
3524 /* ??0?$codecvt@GDH@std@@QEAA@_K@Z */
3525 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_refs
, 8)
3526 codecvt_wchar
* __thiscall
codecvt_short_ctor_refs(codecvt_wchar
*this, MSVCP_size_t refs
)
3530 TRACE("(%p %ld)\n", this, refs
);
3532 _Locinfo_ctor(&locinfo
);
3533 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3534 _Locinfo_dtor(&locinfo
);
3538 /* ??0?$codecvt@GDH@std@@IAE@PBDI@Z */
3539 /* ??0?$codecvt@GDH@std@@IEAA@PEBD_K@Z */
3540 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor_name
, 12)
3541 codecvt_wchar
* __thiscall
codecvt_short_ctor_name(codecvt_wchar
*this, const char *name
, MSVCP_size_t refs
)
3545 TRACE("(%p %s %ld)\n", this, name
, refs
);
3547 _Locinfo_ctor_cstr(&locinfo
, name
);
3548 codecvt_short_ctor_locinfo(this, &locinfo
, refs
);
3549 _Locinfo_dtor(&locinfo
);
3553 /* ??_F?$codecvt@_WDH@std@@QAEXXZ */
3554 /* ??_F?$codecvt@_WDH@std@@QEAAXXZ */
3555 DEFINE_THISCALL_WRAPPER(codecvt_wchar_ctor
, 4)
3556 codecvt_wchar
* __thiscall
codecvt_wchar_ctor(codecvt_wchar
*this)
3558 return codecvt_wchar_ctor_refs(this, 0);
3561 /* ??_F?$codecvt@GDH@std@@QAEXXZ */
3562 /* ??_F?$codecvt@GDH@std@@QEAAXXZ */
3563 DEFINE_THISCALL_WRAPPER(codecvt_short_ctor
, 4)
3564 codecvt_wchar
* __thiscall
codecvt_short_ctor(codecvt_wchar
*this)
3566 return codecvt_short_ctor_refs(this, 0);
3569 /* ??1?$codecvt@GDH@std@@UAE@XZ */
3570 /* ??1?$codecvt@GDH@std@@UEAA@XZ */
3571 /* ??1?$codecvt@GDH@std@@MAE@XZ */
3572 /* ??1?$codecvt@GDH@std@@MEAA@XZ */
3573 /* ??1?$codecvt@_WDH@std@@MAE@XZ */
3574 /* ??1?$codecvt@_WDH@std@@MEAA@XZ */
3575 DEFINE_THISCALL_WRAPPER(codecvt_wchar_dtor
, 4)
3576 void __thiscall
codecvt_wchar_dtor(codecvt_wchar
*this)
3578 TRACE("(%p)\n", this);
3579 codecvt_base_dtor(&this->base
);
3582 DEFINE_THISCALL_WRAPPER(codecvt_wchar_vector_dtor
, 8)
3583 codecvt_wchar
* __thiscall
codecvt_wchar_vector_dtor(codecvt_wchar
*this, unsigned int flags
)
3585 TRACE("(%p %x)\n", this, flags
);
3587 /* we have an array, with the number of elements stored before the first object */
3588 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
3590 for(i
=*ptr
-1; i
>=0; i
--)
3591 codecvt_wchar_dtor(this+i
);
3592 MSVCRT_operator_delete(ptr
);
3594 codecvt_wchar_dtor(this);
3596 MSVCRT_operator_delete(this);
3602 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3603 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3604 MSVCP_size_t __cdecl
codecvt_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
3606 TRACE("(%p %p)\n", facet
, loc
);
3608 if(facet
&& !*facet
) {
3611 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3613 ERR("Out of memory\n");
3614 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3618 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3619 codecvt_wchar_ctor_locinfo((codecvt_wchar
*)*facet
, &locinfo
, 0);
3620 _Locinfo_dtor(&locinfo
);
3626 /* ?_Getcat@?$codecvt@_WDH@std@@SAIPAPBVfacet@locale@2@@Z */
3627 /* ?_Getcat@?$codecvt@_WDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3628 MSVCP_size_t __cdecl
codecvt_wchar__Getcat_old(const locale_facet
**facet
)
3630 return codecvt_wchar__Getcat(facet
, locale_classic());
3633 codecvt_wchar
* codecvt_wchar_use_facet(const locale
*loc
)
3635 static codecvt_wchar
*obj
= NULL
;
3638 const locale_facet
*fac
;
3640 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3641 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_wchar_id
));
3643 _Lockit_dtor(&lock
);
3644 return (codecvt_wchar
*)fac
;
3648 _Lockit_dtor(&lock
);
3652 codecvt_wchar__Getcat(&fac
, loc
);
3653 obj
= (codecvt_wchar
*)fac
;
3654 call_locale_facet__Incref(&obj
->base
.facet
);
3655 locale_facet_register(&obj
->base
.facet
);
3656 _Lockit_dtor(&lock
);
3661 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
3662 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
3663 MSVCP_size_t __cdecl
codecvt_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
3665 TRACE("(%p %p)\n", facet
, loc
);
3667 if(facet
&& !*facet
) {
3670 *facet
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
3672 ERR("Out of memory\n");
3673 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
3677 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
3678 codecvt_short_ctor((codecvt_wchar
*)*facet
);
3679 _Locinfo_dtor(&locinfo
);
3685 /* ?_Getcat@?$codecvt@GDH@std@@SAIPAPBVfacet@locale@2@@Z */
3686 /* ?_Getcat@?$codecvt@GDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
3687 MSVCP_size_t __cdecl
codecvt_short__Getcat_old(const locale_facet
**facet
)
3689 return codecvt_short__Getcat(facet
, locale_classic());
3692 codecvt_wchar
* codecvt_short_use_facet(const locale
*loc
)
3694 static codecvt_wchar
*obj
= NULL
;
3697 const locale_facet
*fac
;
3699 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
3700 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&codecvt_short_id
));
3702 _Lockit_dtor(&lock
);
3703 return (codecvt_wchar
*)fac
;
3707 _Lockit_dtor(&lock
);
3711 codecvt_short__Getcat(&fac
, loc
);
3712 obj
= (codecvt_wchar
*)fac
;
3713 call_locale_facet__Incref(&obj
->base
.facet
);
3714 locale_facet_register(&obj
->base
.facet
);
3715 _Lockit_dtor(&lock
);
3720 /* ?_Id_func@?$codecvt@_WDH@std@@SAAAVid@locale@2@XZ */
3721 /* ?_Id_func@?$codecvt@_WDH@std@@SAAEAVid@locale@2@XZ */
3722 locale_id
* __cdecl
codecvt_wchar__Id_func(void)
3725 return &codecvt_wchar_id
;
3728 /* ?_Id_func@?$codecvt@GDH@std@@SAAAVid@locale@2@XZ */
3729 /* ?_Id_func@?$codecvt@GDH@std@@SAAEAVid@locale@2@XZ */
3730 locale_id
* __cdecl
codecvt_short__Id_func(void)
3733 return &codecvt_short_id
;
3736 /* ?do_always_noconv@?$codecvt@GDH@std@@MBE_NXZ */
3737 /* ?do_always_noconv@?$codecvt@GDH@std@@MEBA_NXZ */
3738 /* ?do_always_noconv@?$codecvt@_WDH@std@@MBE_NXZ */
3739 /* ?do_always_noconv@?$codecvt@_WDH@std@@MEBA_NXZ */
3740 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_always_noconv
, 4)
3741 MSVCP_bool __thiscall
codecvt_wchar_do_always_noconv(const codecvt_wchar
*this)
3743 TRACE("(%p)\n", this);
3747 /* ?do_max_length@?$codecvt@GDH@std@@MBEHXZ */
3748 /* ?do_max_length@?$codecvt@GDH@std@@MEBAHXZ */
3749 /* ?do_max_length@?$codecvt@_WDH@std@@MBEHXZ */
3750 /* ?do_max_length@?$codecvt@_WDH@std@@MEBAHXZ */
3751 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_max_length
, 4)
3752 int __thiscall
codecvt_wchar_do_max_length(const codecvt_wchar
*this)
3754 TRACE("(%p)\n", this);
3758 /* ?do_in@?$codecvt@GDH@std@@MBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3759 /* ?do_in@?$codecvt@GDH@std@@MEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3760 /* ?do_in@?$codecvt@_WDH@std@@MBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3761 /* ?do_in@?$codecvt@_WDH@std@@MEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3762 #if _MSVCP_VER <= 100
3763 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3764 CALL_VTBL_FUNC(this, 16, int, \
3765 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3766 (this, state, from, from_end, from_next, to, to_end, to_next))
3768 #define call_codecvt_wchar_do_in(this, state, from, from_end, from_next, to, to_end, to_next) \
3769 CALL_VTBL_FUNC(this, 24, int, \
3770 (const codecvt_wchar*, int*, const char*, const char*, const char**, wchar_t*, wchar_t*, wchar_t**), \
3771 (this, state, from, from_end, from_next, to, to_end, to_next))
3773 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_in
, 32)
3774 int __thiscall
codecvt_wchar_do_in(const codecvt_wchar
*this, int *state
,
3775 const char *from
, const char *from_end
, const char **from_next
,
3776 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3778 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3779 from_end
, from_next
, to
, to_end
, to_next
);
3784 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3785 switch(_Mbrtowc(*to_next
, *from_next
, from_end
-*from_next
, state
, &this->cvt
)) {
3787 *from_next
= from_end
;
3788 return CODECVT_partial
;
3790 return CODECVT_error
;
3804 /* ?in@?$codecvt@GDH@std@@QBEHAAHPBD1AAPBDPAG3AAPAG@Z */
3805 /* ?in@?$codecvt@GDH@std@@QEBAHAEAHPEBD1AEAPEBDPEAG3AEAPEAG@Z */
3806 /* ?in@?$codecvt@_WDH@std@@QBEHAAHPBD1AAPBDPA_W3AAPA_W@Z */
3807 /* ?in@?$codecvt@_WDH@std@@QEBAHAEAHPEBD1AEAPEBDPEA_W3AEAPEA_W@Z */
3808 DEFINE_THISCALL_WRAPPER(codecvt_wchar_in
, 32)
3809 int __thiscall
codecvt_wchar_in(const codecvt_wchar
*this, int *state
,
3810 const char *from
, const char *from_end
, const char **from_next
,
3811 wchar_t *to
, wchar_t *to_end
, wchar_t **to_next
)
3813 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3814 from_end
, from_next
, to
, to_end
, to_next
);
3815 return call_codecvt_wchar_do_in(this, state
, from
,
3816 from_end
, from_next
, to
, to_end
, to_next
);
3819 /* ?do_out@?$codecvt@GDH@std@@MBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3820 /* ?do_out@?$codecvt@GDH@std@@MEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3821 /* ?do_out@?$codecvt@_WDH@std@@MBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3822 /* ?do_out@?$codecvt@_WDH@std@@MEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3823 #if _MSVCP_VER <= 100
3824 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3825 CALL_VTBL_FUNC(this, 20, int, \
3826 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3827 (this, state, from, from_end, from_next, to, to_end, to_next))
3829 #define call_codecvt_wchar_do_out(this, state, from, from_end, from_next, to, to_end, to_next) \
3830 CALL_VTBL_FUNC(this, 28, int, \
3831 (const codecvt_wchar*, int*, const wchar_t*, const wchar_t*, const wchar_t**, char*, char*, char**), \
3832 (this, state, from, from_end, from_next, to, to_end, to_next))
3834 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_out
, 32)
3835 int __thiscall
codecvt_wchar_do_out(const codecvt_wchar
*this, int *state
,
3836 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3837 char *to
, char *to_end
, char **to_next
)
3839 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3840 from_end
, from_next
, to
, to_end
, to_next
);
3845 while(*from_next
!=from_end
&& *to_next
!=to_end
) {
3846 int old_state
= *state
, size
;
3847 char buf
[MB_LEN_MAX
];
3849 switch((size
= _Wcrtomb(buf
, **from_next
, state
, &this->cvt
))) {
3851 return CODECVT_error
;
3853 if(size
> from_end
-*from_next
) {
3855 return CODECVT_partial
;
3859 memcpy_s(*to_next
, to_end
-*to_next
, buf
, size
);
3867 /* ?out@?$codecvt@GDH@std@@QBEHAAHPBG1AAPBGPAD3AAPAD@Z */
3868 /* ?out@?$codecvt@GDH@std@@QEBAHAEAHPEBG1AEAPEBGPEAD3AEAPEAD@Z */
3869 /* ?out@?$codecvt@_WDH@std@@QBEHAAHPB_W1AAPB_WPAD3AAPAD@Z */
3870 /* ?out@?$codecvt@_WDH@std@@QEBAHAEAHPEB_W1AEAPEB_WPEAD3AEAPEAD@Z */
3871 DEFINE_THISCALL_WRAPPER(codecvt_wchar_out
, 32)
3872 int __thiscall
codecvt_wchar_out(const codecvt_wchar
*this, int *state
,
3873 const wchar_t *from
, const wchar_t *from_end
, const wchar_t **from_next
,
3874 char *to
, char *to_end
, char **to_next
)
3876 TRACE("(%p %p %p %p %p %p %p %p)\n", this, state
, from
,
3877 from_end
, from_next
, to
, to_end
, to_next
);
3878 return call_codecvt_wchar_do_out(this, state
, from
,
3879 from_end
, from_next
, to
, to_end
, to_next
);
3882 /* ?do_unshift@?$codecvt@GDH@std@@MBEHAAHPAD1AAPAD@Z */
3883 /* ?do_unshift@?$codecvt@GDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3884 /* ?do_unshift@?$codecvt@_WDH@std@@MBEHAAHPAD1AAPAD@Z */
3885 /* ?do_unshift@?$codecvt@_WDH@std@@MEBAHAEAHPEAD1AEAPEAD@Z */
3886 #if _MSVCP_VER <= 100
3887 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 24, \
3888 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3890 #define call_codecvt_wchar_do_unshift(this, state, to, to_end, to_next) CALL_VTBL_FUNC(this, 32, \
3891 int, (const codecvt_wchar*, int*, char*, char*, char**), (this, state, to, to_end, to_next))
3893 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_unshift
, 20)
3894 int __thiscall
codecvt_wchar_do_unshift(const codecvt_wchar
*this,
3895 int *state
, char *to
, char *to_end
, char **to_next
)
3897 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3899 WARN("unexpected state: %x\n", *state
);
3905 /* ?unshift@?$codecvt@GDH@std@@QBEHAAHPAD1AAPAD@Z */
3906 /* ?unshift@?$codecvt@GDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3907 /* ?unshift@?$codecvt@_WDH@std@@QBEHAAHPAD1AAPAD@Z */
3908 /* ?unshift@?$codecvt@_WDH@std@@QEBAHAEAHPEAD1AEAPEAD@Z */
3909 DEFINE_THISCALL_WRAPPER(codecvt_wchar_unshift
, 20)
3910 int __thiscall
codecvt_wchar_unshift(const codecvt_wchar
*this,
3911 int *state
, char *to
, char *to_end
, char **to_next
)
3913 TRACE("(%p %p %p %p %p)\n", this, state
, to
, to_end
, to_next
);
3914 return call_codecvt_wchar_do_unshift(this, state
, to
, to_end
, to_next
);
3917 /* ?do_length@?$codecvt@GDH@std@@MBEHABHPBD1I@Z */
3918 /* ?do_length@?$codecvt@GDH@std@@MEBAHAEBHPEBD1_K@Z */
3919 /* ?do_length@?$codecvt@_WDH@std@@MBEHABHPBD1I@Z */
3920 /* ?do_length@?$codecvt@_WDH@std@@MEBAHAEBHPEBD1_K@Z */
3921 #if _MSVCP_VER <= 100
3922 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 28, \
3923 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3924 (this, state, from, from_end, max))
3926 #define call_codecvt_wchar_do_length(this, state, from, from_end, max) CALL_VTBL_FUNC(this, 36, \
3927 int, (const codecvt_wchar*, const int*, const char*, const char*, MSVCP_size_t), \
3928 (this, state, from, from_end, max))
3930 DEFINE_THISCALL_WRAPPER(codecvt_wchar_do_length
, 20)
3931 int __thiscall
codecvt_wchar_do_length(const codecvt_wchar
*this, const int *state
,
3932 const char *from
, const char *from_end
, MSVCP_size_t max
)
3934 int tmp_state
= *state
, ret
=0;
3936 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3938 while(ret
<max
&& from
!=from_end
) {
3939 switch(_Mbrtowc(NULL
, from
, from_end
-from
, &tmp_state
, &this->cvt
)) {
3956 /* ?length@?$codecvt@GDH@std@@QBEHABHPBD1I@Z */
3957 /* ?length@?$codecvt@GDH@std@@QEBAHAEBHPEBD1_K@Z */
3958 /* ?length@?$codecvt@_WDH@std@@QBEHABHPBD1I@Z */
3959 /* ?length@?$codecvt@_WDH@std@@QEBAHAEBHPEBD1_K@Z */
3960 DEFINE_THISCALL_WRAPPER(codecvt_wchar_length
, 20)
3961 int __thiscall
codecvt_wchar_length(const codecvt_wchar
*this, const int *state
,
3962 const char *from
, const char *from_end
, MSVCP_size_t max
)
3964 TRACE("(%p %p %p %p %ld)\n", this, state
, from
, from_end
, max
);
3965 return call_codecvt_wchar_do_length(this, state
, from
, from_end
, max
);
3968 /* ?id@?$numpunct@D@std@@2V0locale@2@A */
3969 locale_id numpunct_char_id
= {0};
3971 /* ??_7?$numpunct@D@std@@6B@ */
3972 extern const vtable_ptr MSVCP_numpunct_char_vtable
;
3974 /* ?_Init@?$numpunct@D@std@@IAEXABV_Locinfo@2@_N@Z */
3975 /* ?_Init@?$numpunct@D@std@@IEAAXAEBV_Locinfo@2@_N@Z */
3976 DEFINE_THISCALL_WRAPPER(numpunct_char__Init
, 12)
3977 void __thiscall
numpunct_char__Init(numpunct_char
*this, const _Locinfo
*locinfo
, MSVCP_bool isdef
)
3981 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
3983 len
= strlen(_Locinfo__Getfalse(locinfo
))+1;
3984 this->false_name
= MSVCRT_operator_new(len
);
3985 if(this->false_name
)
3986 memcpy((char*)this->false_name
, _Locinfo__Getfalse(locinfo
), len
);
3988 len
= strlen(_Locinfo__Gettrue(locinfo
))+1;
3989 this->true_name
= MSVCRT_operator_new(len
);
3991 memcpy((char*)this->true_name
, _Locinfo__Gettrue(locinfo
), len
);
3994 this->grouping
= MSVCRT_operator_new(1);
3996 *(char*)this->grouping
= 0;
4001 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4003 len
= strlen(lc
->grouping
)+1;
4004 this->grouping
= MSVCRT_operator_new(len
);
4006 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4008 this->dp
= lc
->decimal_point
[0];
4009 this->sep
= lc
->thousands_sep
[0];
4012 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4013 MSVCRT_operator_delete((char*)this->grouping
);
4014 MSVCRT_operator_delete((char*)this->false_name
);
4015 MSVCRT_operator_delete((char*)this->true_name
);
4017 ERR("Out of memory\n");
4018 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4022 /* ?_Tidy@?$numpunct@D@std@@AAEXXZ */
4023 /* ?_Tidy@?$numpunct@D@std@@AEAAXXZ */
4024 DEFINE_THISCALL_WRAPPER(numpunct_char__Tidy
, 4)
4025 void __thiscall
numpunct_char__Tidy(numpunct_char
*this)
4027 TRACE("(%p)\n", this);
4029 MSVCRT_operator_delete((char*)this->grouping
);
4030 MSVCRT_operator_delete((char*)this->false_name
);
4031 MSVCRT_operator_delete((char*)this->true_name
);
4034 /* ??0?$numpunct@D@std@@QAE@ABV_Locinfo@1@I_N@Z */
4035 /* ??0?$numpunct@D@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4036 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_locinfo
, 16)
4037 numpunct_char
* __thiscall
numpunct_char_ctor_locinfo(numpunct_char
*this,
4038 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4040 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4041 locale_facet_ctor_refs(&this->facet
, refs
);
4042 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4043 numpunct_char__Init(this, locinfo
, usedef
);
4047 /* ??0?$numpunct@D@std@@IAE@PBDI_N@Z */
4048 /* ??0?$numpunct@D@std@@IEAA@PEBD_K_N@Z */
4049 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_name
, 16)
4050 numpunct_char
* __thiscall
numpunct_char_ctor_name(numpunct_char
*this,
4051 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4055 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4056 locale_facet_ctor_refs(&this->facet
, refs
);
4057 this->facet
.vtable
= &MSVCP_numpunct_char_vtable
;
4059 _Locinfo_ctor_cstr(&locinfo
, name
);
4060 numpunct_char__Init(this, &locinfo
, usedef
);
4061 _Locinfo_dtor(&locinfo
);
4065 /* ??0?$numpunct@D@std@@QAE@I@Z */
4066 /* ??0?$numpunct@D@std@@QEAA@_K@Z */
4067 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor_refs
, 8)
4068 numpunct_char
* __thiscall
numpunct_char_ctor_refs(numpunct_char
*this, MSVCP_size_t refs
)
4070 TRACE("(%p %lu)\n", this, refs
);
4071 return numpunct_char_ctor_name(this, "C", refs
, FALSE
);
4074 /* ??_F?$numpunct@D@std@@QAEXXZ */
4075 /* ??_F?$numpunct@D@std@@QEAAXXZ */
4076 DEFINE_THISCALL_WRAPPER(numpunct_char_ctor
, 4)
4077 numpunct_char
* __thiscall
numpunct_char_ctor(numpunct_char
*this)
4079 return numpunct_char_ctor_refs(this, 0);
4082 /* ??1?$numpunct@D@std@@UAE@XZ */
4083 /* ??1?$numpunct@D@std@@UEAA@XZ */
4084 /* ??1?$numpunct@D@std@@MAE@XZ */
4085 /* ??1?$numpunct@D@std@@MEAA@XZ */
4086 DEFINE_THISCALL_WRAPPER(numpunct_char_dtor
, 4)
4087 void __thiscall
numpunct_char_dtor(numpunct_char
*this)
4089 TRACE("(%p)\n", this);
4090 numpunct_char__Tidy(this);
4093 DEFINE_THISCALL_WRAPPER(numpunct_char_vector_dtor
, 8)
4094 numpunct_char
* __thiscall
numpunct_char_vector_dtor(numpunct_char
*this, unsigned int flags
)
4096 TRACE("(%p %x)\n", this, flags
);
4098 /* we have an array, with the number of elements stored before the first object */
4099 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4101 for(i
=*ptr
-1; i
>=0; i
--)
4102 numpunct_char_dtor(this+i
);
4103 MSVCRT_operator_delete(ptr
);
4105 numpunct_char_dtor(this);
4107 MSVCRT_operator_delete(this);
4113 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4114 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4115 MSVCP_size_t __cdecl
numpunct_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
4117 TRACE("(%p %p)\n", facet
, loc
);
4119 if(facet
&& !*facet
) {
4120 *facet
= MSVCRT_operator_new(sizeof(numpunct_char
));
4122 ERR("Out of memory\n");
4123 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4126 numpunct_char_ctor_name((numpunct_char
*)*facet
,
4127 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4133 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
4134 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4135 MSVCP_size_t __cdecl
numpunct_char__Getcat_old(const locale_facet
**facet
)
4137 return numpunct_char__Getcat(facet
, locale_classic());
4140 static numpunct_char
* numpunct_char_use_facet(const locale
*loc
)
4142 static numpunct_char
*obj
= NULL
;
4145 const locale_facet
*fac
;
4147 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4148 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_char_id
));
4150 _Lockit_dtor(&lock
);
4151 return (numpunct_char
*)fac
;
4155 _Lockit_dtor(&lock
);
4159 numpunct_char__Getcat(&fac
, loc
);
4160 obj
= (numpunct_char
*)fac
;
4161 call_locale_facet__Incref(&obj
->facet
);
4162 locale_facet_register(&obj
->facet
);
4163 _Lockit_dtor(&lock
);
4168 /* ?do_decimal_point@?$numpunct@D@std@@MBEDXZ */
4169 /* ?do_decimal_point@?$numpunct@D@std@@MEBADXZ */
4170 DEFINE_THISCALL_WRAPPER(numpunct_char_do_decimal_point
, 4)
4171 #if _MSVCP_VER <= 100
4172 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4173 char, (const numpunct_char *this), (this))
4175 #define call_numpunct_char_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4176 char, (const numpunct_char *this), (this))
4178 char __thiscall
numpunct_char_do_decimal_point(const numpunct_char
*this)
4180 TRACE("(%p)\n", this);
4184 /* ?decimal_point@?$numpunct@D@std@@QBEDXZ */
4185 /* ?decimal_point@?$numpunct@D@std@@QEBADXZ */
4186 DEFINE_THISCALL_WRAPPER(numpunct_char_decimal_point
, 4)
4187 char __thiscall
numpunct_char_decimal_point(const numpunct_char
*this)
4189 TRACE("(%p)\n", this);
4190 return call_numpunct_char_do_decimal_point(this);
4193 /* ?do_thousands_sep@?$numpunct@D@std@@MBEDXZ */
4194 /* ?do_thousands_sep@?$numpunct@D@std@@MEBADXZ */
4195 DEFINE_THISCALL_WRAPPER(numpunct_char_do_thousands_sep
, 4)
4196 #if _MSVCP_VER <= 100
4197 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4198 char, (const numpunct_char*), (this))
4200 #define call_numpunct_char_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4201 char, (const numpunct_char*), (this))
4203 char __thiscall
numpunct_char_do_thousands_sep(const numpunct_char
*this)
4205 TRACE("(%p)\n", this);
4209 /* ?thousands_sep@?$numpunct@D@std@@QBEDXZ */
4210 /* ?thousands_sep@?$numpunct@D@std@@QEBADXZ */
4211 DEFINE_THISCALL_WRAPPER(numpunct_char_thousands_sep
, 4)
4212 char __thiscall
numpunct_char_thousands_sep(const numpunct_char
*this)
4214 TRACE("(%p)\n", this);
4215 return call_numpunct_char_do_thousands_sep(this);
4218 /* ?do_grouping@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4219 /* ?do_grouping@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4220 DEFINE_THISCALL_WRAPPER(numpunct_char_do_grouping
, 8)
4221 #if _MSVCP_VER <= 100
4222 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4223 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4225 #define call_numpunct_char_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4226 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4228 basic_string_char
* __thiscall
numpunct_char_do_grouping(
4229 const numpunct_char
*this, basic_string_char
*ret
)
4231 TRACE("(%p)\n", this);
4232 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4235 /* ?grouping@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4236 /* ?grouping@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4237 DEFINE_THISCALL_WRAPPER(numpunct_char_grouping
, 8)
4238 basic_string_char
* __thiscall
numpunct_char_grouping(const numpunct_char
*this, basic_string_char
*ret
)
4240 TRACE("(%p)\n", this);
4241 return call_numpunct_char_do_grouping(this, ret
);
4244 /* ?do_falsename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4245 /* ?do_falsename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4246 DEFINE_THISCALL_WRAPPER(numpunct_char_do_falsename
, 8)
4247 #if _MSVCP_VER <= 100
4248 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4249 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4251 #define call_numpunct_char_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4252 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4254 basic_string_char
* __thiscall
numpunct_char_do_falsename(
4255 const numpunct_char
*this, basic_string_char
*ret
)
4257 TRACE("(%p)\n", this);
4258 return MSVCP_basic_string_char_ctor_cstr(ret
, this->false_name
);
4261 /* ?falsename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4262 /* ?falsename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4263 DEFINE_THISCALL_WRAPPER(numpunct_char_falsename
, 8)
4264 basic_string_char
* __thiscall
numpunct_char_falsename(const numpunct_char
*this, basic_string_char
*ret
)
4266 TRACE("(%p)\n", this);
4267 return call_numpunct_char_do_falsename(this, ret
);
4270 /* ?do_truename@?$numpunct@D@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4271 /* ?do_truename@?$numpunct@D@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4272 DEFINE_THISCALL_WRAPPER(numpunct_char_do_truename
, 8)
4273 #if _MSVCP_VER <= 100
4274 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4275 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4277 #define call_numpunct_char_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4278 basic_string_char*, (const numpunct_char*, basic_string_char*), (this, ret))
4280 basic_string_char
* __thiscall
numpunct_char_do_truename(
4281 const numpunct_char
*this, basic_string_char
*ret
)
4283 TRACE("(%p)\n", this);
4284 return MSVCP_basic_string_char_ctor_cstr(ret
, this->true_name
);
4287 /* ?truename@?$numpunct@D@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4288 /* ?truename@?$numpunct@D@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4289 DEFINE_THISCALL_WRAPPER(numpunct_char_truename
, 8)
4290 basic_string_char
* __thiscall
numpunct_char_truename(const numpunct_char
*this, basic_string_char
*ret
)
4292 TRACE("(%p)\n", this);
4293 return call_numpunct_char_do_truename(this, ret
);
4296 /* ?id@?$numpunct@_W@std@@2V0locale@2@A */
4297 locale_id numpunct_wchar_id
= {0};
4298 /* ?id@?$numpunct@G@std@@2V0locale@2@A */
4299 locale_id numpunct_short_id
= {0};
4301 /* ??_7?$numpunct@_W@std@@6B@ */
4302 extern const vtable_ptr MSVCP_numpunct_wchar_vtable
;
4303 /* ??_7?$numpunct@G@std@@6B@ */
4304 extern const vtable_ptr MSVCP_numpunct_short_vtable
;
4306 /* ?_Init@?$numpunct@_W@std@@IAEXABV_Locinfo@2@_N@Z */
4307 /* ?_Init@?$numpunct@_W@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4308 /* ?_Init@?$numpunct@G@std@@IAEXABV_Locinfo@2@_N@Z */
4309 /* ?_Init@?$numpunct@G@std@@IEAAXAEBV_Locinfo@2@_N@Z */
4310 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Init
, 12)
4311 void __thiscall
numpunct_wchar__Init(numpunct_wchar
*this,
4312 const _Locinfo
*locinfo
, MSVCP_bool isdef
)
4314 const char *to_convert
;
4318 TRACE("(%p %p %d)\n", this, locinfo
, isdef
);
4320 _Locinfo__Getcvt(locinfo
, &cvt
);
4322 to_convert
= _Locinfo__Getfalse(locinfo
);
4323 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4324 this->false_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4325 if(this->false_name
)
4326 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4327 (wchar_t*)this->false_name
, len
);
4329 to_convert
= _Locinfo__Gettrue(locinfo
);
4330 len
= MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1, NULL
, 0);
4331 this->true_name
= MSVCRT_operator_new(len
*sizeof(WCHAR
));
4333 MultiByteToWideChar(cvt
.page
, 0, to_convert
, -1,
4334 (wchar_t*)this->true_name
, len
);
4337 this->grouping
= MSVCRT_operator_new(1);
4339 *(char*)this->grouping
= 0;
4344 const struct lconv
*lc
= _Locinfo__Getlconv(locinfo
);
4346 len
= strlen(lc
->grouping
)+1;
4347 this->grouping
= MSVCRT_operator_new(len
);
4349 memcpy((char*)this->grouping
, lc
->grouping
, len
);
4351 this->dp
= mb_to_wc(lc
->decimal_point
[0], &cvt
);
4352 this->sep
= mb_to_wc(lc
->thousands_sep
[0], &cvt
);
4355 if(!this->false_name
|| !this->true_name
|| !this->grouping
) {
4356 MSVCRT_operator_delete((char*)this->grouping
);
4357 MSVCRT_operator_delete((wchar_t*)this->false_name
);
4358 MSVCRT_operator_delete((wchar_t*)this->true_name
);
4360 ERR("Out of memory\n");
4361 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4365 /* ?_Tidy@?$numpunct@_W@std@@AAEXXZ */
4366 /* ?_Tidy@?$numpunct@_W@std@@AEAAXXZ */
4367 /* ?_Tidy@?$numpunct@G@std@@AAEXXZ */
4368 /* ?_Tidy@?$numpunct@G@std@@AEAAXXZ */
4369 DEFINE_THISCALL_WRAPPER(numpunct_wchar__Tidy
, 4)
4370 void __thiscall
numpunct_wchar__Tidy(numpunct_wchar
*this)
4372 TRACE("(%p)\n", this);
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
);
4379 /* ??0?$numpunct@_W@std@@QAE@ABV_Locinfo@1@I_N@Z */
4380 /* ??0?$numpunct@_W@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4381 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_locinfo
, 16)
4382 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_locinfo(numpunct_wchar
*this,
4383 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4385 TRACE("(%p %p %lu %d)\n", this, locinfo
, refs
, usedef
);
4386 locale_facet_ctor_refs(&this->facet
, refs
);
4387 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4388 numpunct_wchar__Init(this, locinfo
, usedef
);
4392 /* ??0?$numpunct@G@std@@QAE@ABV_Locinfo@1@I_N@Z */
4393 /* ??0?$numpunct@G@std@@QEAA@AEBV_Locinfo@1@_K_N@Z */
4394 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_locinfo
, 16)
4395 numpunct_wchar
* __thiscall
numpunct_short_ctor_locinfo(numpunct_wchar
*this,
4396 const _Locinfo
*locinfo
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4398 numpunct_wchar_ctor_locinfo(this, locinfo
, refs
, usedef
);
4399 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4403 /* ??0?$numpunct@_W@std@@IAE@PBDI_N@Z */
4404 /* ??0?$numpunct@_W@std@@IEAA@PEBD_K_N@Z */
4405 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_name
, 16)
4406 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_name(numpunct_wchar
*this,
4407 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4411 TRACE("(%p %s %lu %d)\n", this, debugstr_a(name
), refs
, usedef
);
4412 locale_facet_ctor_refs(&this->facet
, refs
);
4413 this->facet
.vtable
= &MSVCP_numpunct_wchar_vtable
;
4415 _Locinfo_ctor_cstr(&locinfo
, name
);
4416 numpunct_wchar__Init(this, &locinfo
, usedef
);
4417 _Locinfo_dtor(&locinfo
);
4421 /* ??0?$numpunct@G@std@@IAE@PBDI_N@Z */
4422 /* ??0?$numpunct@G@std@@IEAA@PEBD_K_N@Z */
4423 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_name
, 16)
4424 numpunct_wchar
* __thiscall
numpunct_short_ctor_name(numpunct_wchar
*this,
4425 const char *name
, MSVCP_size_t refs
, MSVCP_bool usedef
)
4427 numpunct_wchar_ctor_name(this, name
, refs
, usedef
);
4428 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4432 /* ??0?$numpunct@_W@std@@QAE@I@Z */
4433 /* ??0?$numpunct@_W@std@@QEAA@_K@Z */
4434 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor_refs
, 8)
4435 numpunct_wchar
* __thiscall
numpunct_wchar_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4437 TRACE("(%p %lu)\n", this, refs
);
4438 return numpunct_wchar_ctor_name(this, "C", refs
, FALSE
);
4441 /* ??0?$numpunct@G@std@@QAE@I@Z */
4442 /* ??0?$numpunct@G@std@@QEAA@_K@Z */
4443 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor_refs
, 8)
4444 numpunct_wchar
* __thiscall
numpunct_short_ctor_refs(numpunct_wchar
*this, MSVCP_size_t refs
)
4446 numpunct_wchar_ctor_refs(this, refs
);
4447 this->facet
.vtable
= &MSVCP_numpunct_short_vtable
;
4451 /* ??_F?$numpunct@_W@std@@QAEXXZ */
4452 /* ??_F?$numpunct@_W@std@@QEAAXXZ */
4453 DEFINE_THISCALL_WRAPPER(numpunct_wchar_ctor
, 4)
4454 numpunct_wchar
* __thiscall
numpunct_wchar_ctor(numpunct_wchar
*this)
4456 return numpunct_wchar_ctor_refs(this, 0);
4459 /* ??_F?$numpunct@G@std@@QAEXXZ */
4460 /* ??_F?$numpunct@G@std@@QEAAXXZ */
4461 DEFINE_THISCALL_WRAPPER(numpunct_short_ctor
, 4)
4462 numpunct_wchar
* __thiscall
numpunct_short_ctor(numpunct_wchar
*this)
4464 return numpunct_short_ctor_refs(this, 0);
4467 /* ??1?$numpunct@G@std@@UAE@XZ */
4468 /* ??1?$numpunct@G@std@@UEAA@XZ */
4469 /* ??1?$numpunct@_W@std@@MAE@XZ */
4470 /* ??1?$numpunct@_W@std@@MEAA@XZ */
4471 /* ??1?$numpunct@G@std@@MAE@XZ */
4472 /* ??1?$numpunct@G@std@@MEAA@XZ */
4473 DEFINE_THISCALL_WRAPPER(numpunct_wchar_dtor
, 4)
4474 void __thiscall
numpunct_wchar_dtor(numpunct_wchar
*this)
4476 TRACE("(%p)\n", this);
4477 numpunct_wchar__Tidy(this);
4480 DEFINE_THISCALL_WRAPPER(numpunct_wchar_vector_dtor
, 8)
4481 numpunct_wchar
* __thiscall
numpunct_wchar_vector_dtor(numpunct_wchar
*this, unsigned int flags
)
4483 TRACE("(%p %x)\n", this, flags
);
4485 /* we have an array, with the number of elements stored before the first object */
4486 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4488 for(i
=*ptr
-1; i
>=0; i
--)
4489 numpunct_wchar_dtor(this+i
);
4490 MSVCRT_operator_delete(ptr
);
4492 numpunct_wchar_dtor(this);
4494 MSVCRT_operator_delete(this);
4500 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4501 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4502 MSVCP_size_t __cdecl
numpunct_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4504 TRACE("(%p %p)\n", facet
, loc
);
4506 if(facet
&& !*facet
) {
4507 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4509 ERR("Out of memory\n");
4510 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4513 numpunct_wchar_ctor_name((numpunct_wchar
*)*facet
,
4514 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4520 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
4521 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4522 MSVCP_size_t __cdecl
numpunct_wchar__Getcat_old(const locale_facet
**facet
)
4524 return numpunct_wchar__Getcat(facet
, locale_classic());
4527 static numpunct_wchar
* numpunct_wchar_use_facet(const locale
*loc
)
4529 static numpunct_wchar
*obj
= NULL
;
4532 const locale_facet
*fac
;
4534 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4535 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_wchar_id
));
4537 _Lockit_dtor(&lock
);
4538 return (numpunct_wchar
*)fac
;
4542 _Lockit_dtor(&lock
);
4546 numpunct_wchar__Getcat(&fac
, loc
);
4547 obj
= (numpunct_wchar
*)fac
;
4548 call_locale_facet__Incref(&obj
->facet
);
4549 locale_facet_register(&obj
->facet
);
4550 _Lockit_dtor(&lock
);
4555 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4556 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4557 MSVCP_size_t __cdecl
numpunct_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
4559 TRACE("(%p %p)\n", facet
, loc
);
4561 if(facet
&& !*facet
) {
4562 *facet
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
4564 ERR("Out of memory\n");
4565 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4568 numpunct_short_ctor_name((numpunct_wchar
*)*facet
,
4569 locale_string_char_c_str(&loc
->ptr
->name
), 0, TRUE
);
4575 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
4576 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
4577 MSVCP_size_t __cdecl
numpunct_short__Getcat_old(const locale_facet
**facet
)
4579 return numpunct_short__Getcat(facet
, locale_classic());
4582 static numpunct_wchar
* numpunct_short_use_facet(const locale
*loc
)
4584 static numpunct_wchar
*obj
= NULL
;
4587 const locale_facet
*fac
;
4589 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
4590 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&numpunct_short_id
));
4592 _Lockit_dtor(&lock
);
4593 return (numpunct_wchar
*)fac
;
4597 _Lockit_dtor(&lock
);
4601 numpunct_short__Getcat(&fac
, loc
);
4602 obj
= (numpunct_wchar
*)fac
;
4603 call_locale_facet__Incref(&obj
->facet
);
4604 locale_facet_register(&obj
->facet
);
4605 _Lockit_dtor(&lock
);
4610 /* ?do_decimal_point@?$numpunct@_W@std@@MBE_WXZ */
4611 /* ?do_decimal_point@?$numpunct@_W@std@@MEBA_WXZ */
4612 /* ?do_decimal_point@?$numpunct@G@std@@MBEGXZ */
4613 /* ?do_decimal_point@?$numpunct@G@std@@MEBAGXZ */
4614 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_decimal_point
, 4)
4615 #if _MSVCP_VER <= 100
4616 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 4, \
4617 wchar_t, (const numpunct_wchar *this), (this))
4619 #define call_numpunct_wchar_do_decimal_point(this) CALL_VTBL_FUNC(this, 12, \
4620 wchar_t, (const numpunct_wchar *this), (this))
4622 wchar_t __thiscall
numpunct_wchar_do_decimal_point(const numpunct_wchar
*this)
4624 TRACE("(%p)\n", this);
4628 /* ?decimal_point@?$numpunct@_W@std@@QBE_WXZ */
4629 /* ?decimal_point@?$numpunct@_W@std@@QEBA_WXZ */
4630 /* ?decimal_point@?$numpunct@G@std@@QBEGXZ */
4631 /* ?decimal_point@?$numpunct@G@std@@QEBAGXZ */
4632 DEFINE_THISCALL_WRAPPER(numpunct_wchar_decimal_point
, 4)
4633 wchar_t __thiscall
numpunct_wchar_decimal_point(const numpunct_wchar
*this)
4635 TRACE("(%p)\n", this);
4636 return call_numpunct_wchar_do_decimal_point(this);
4639 /* ?do_thousands_sep@?$numpunct@_W@std@@MBE_WXZ */
4640 /* ?do_thousands_sep@?$numpunct@_W@std@@MEBA_WXZ */
4641 /* ?do_thousands_sep@?$numpunct@G@std@@MBEGXZ */
4642 /* ?do_thousands_sep@?$numpunct@G@std@@MEBAGXZ */
4643 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_thousands_sep
, 4)
4644 #if _MSVCP_VER <= 100
4645 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 8, \
4646 wchar_t, (const numpunct_wchar *this), (this))
4648 #define call_numpunct_wchar_do_thousands_sep(this) CALL_VTBL_FUNC(this, 16, \
4649 wchar_t, (const numpunct_wchar *this), (this))
4651 wchar_t __thiscall
numpunct_wchar_do_thousands_sep(const numpunct_wchar
*this)
4653 TRACE("(%p)\n", this);
4657 /* ?thousands_sep@?$numpunct@_W@std@@QBE_WXZ */
4658 /* ?thousands_sep@?$numpunct@_W@std@@QEBA_WXZ */
4659 /* ?thousands_sep@?$numpunct@G@std@@QBEGXZ */
4660 /* ?thousands_sep@?$numpunct@G@std@@QEBAGXZ */
4661 DEFINE_THISCALL_WRAPPER(numpunct_wchar_thousands_sep
, 4)
4662 wchar_t __thiscall
numpunct_wchar_thousands_sep(const numpunct_wchar
*this)
4664 TRACE("(%p)\n", this);
4665 return call_numpunct_wchar_do_thousands_sep(this);
4668 /* ?do_grouping@?$numpunct@_W@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4669 /* ?do_grouping@?$numpunct@_W@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4670 /* ?do_grouping@?$numpunct@G@std@@MBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4671 /* ?do_grouping@?$numpunct@G@std@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4672 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_grouping
, 8)
4673 #if _MSVCP_VER <= 100
4674 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 12, \
4675 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4677 #define call_numpunct_wchar_do_grouping(this, ret) CALL_VTBL_FUNC(this, 20, \
4678 basic_string_char*, (const numpunct_wchar*, basic_string_char*), (this, ret))
4680 basic_string_char
* __thiscall
numpunct_wchar_do_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4682 TRACE("(%p)\n", this);
4683 return MSVCP_basic_string_char_ctor_cstr(ret
, this->grouping
);
4686 /* ?grouping@?$numpunct@_W@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4687 /* ?grouping@?$numpunct@_W@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4688 /* ?grouping@?$numpunct@G@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4689 /* ?grouping@?$numpunct@G@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
4690 DEFINE_THISCALL_WRAPPER(numpunct_wchar_grouping
, 8)
4691 basic_string_char
* __thiscall
numpunct_wchar_grouping(const numpunct_wchar
*this, basic_string_char
*ret
)
4693 TRACE("(%p)\n", this);
4694 return call_numpunct_wchar_do_grouping(this, ret
);
4697 /* ?do_falsename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4698 /* ?do_falsename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4699 /* ?do_falsename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4700 /* ?do_falsename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4701 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_falsename
, 8)
4702 #if _MSVCP_VER <= 100
4703 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 16, \
4704 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4706 #define call_numpunct_wchar_do_falsename(this, ret) CALL_VTBL_FUNC(this, 24, \
4707 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4709 basic_string_wchar
* __thiscall
numpunct_wchar_do_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4711 TRACE("(%p)\n", this);
4712 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->false_name
);
4715 /* ?falsename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4716 /* ?falsename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4717 /* ?falsename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4718 /* ?falsename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4719 DEFINE_THISCALL_WRAPPER(numpunct_wchar_falsename
, 8)
4720 basic_string_wchar
* __thiscall
numpunct_wchar_falsename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4722 TRACE("(%p)\n", this);
4723 return call_numpunct_wchar_do_falsename(this, ret
);
4726 /* ?do_truename@?$numpunct@_W@std@@MBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4727 /* ?do_truename@?$numpunct@_W@std@@MEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4728 /* ?do_truename@?$numpunct@G@std@@MBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4729 /* ?do_truename@?$numpunct@G@std@@MEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4730 DEFINE_THISCALL_WRAPPER(numpunct_wchar_do_truename
, 8)
4731 #if _MSVCP_VER <= 100
4732 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 20, \
4733 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4735 #define call_numpunct_wchar_do_truename(this, ret) CALL_VTBL_FUNC(this, 28, \
4736 basic_string_wchar*, (const numpunct_wchar*, basic_string_wchar*), (this, ret))
4738 basic_string_wchar
* __thiscall
numpunct_wchar_do_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4740 TRACE("(%p)\n", this);
4741 return MSVCP_basic_string_wchar_ctor_cstr(ret
, this->true_name
);
4744 /* ?truename@?$numpunct@_W@std@@QBE?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4745 /* ?truename@?$numpunct@_W@std@@QEBA?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@XZ */
4746 /* ?truename@?$numpunct@G@std@@QBE?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4747 /* ?truename@?$numpunct@G@std@@QEBA?AV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@2@XZ */
4748 DEFINE_THISCALL_WRAPPER(numpunct_wchar_truename
, 8)
4749 basic_string_wchar
* __thiscall
numpunct_wchar_truename(const numpunct_wchar
*this, basic_string_wchar
*ret
)
4751 TRACE("(%p)\n", this);
4752 return call_numpunct_wchar_do_truename(this, ret
);
4755 double __cdecl
_Stod(const char *buf
, char **buf_end
, LONG exp
)
4757 double ret
= strtod(buf
, buf_end
);
4760 ret
*= pow(10, exp
);
4764 double __cdecl
_Stodx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4770 ret
= _Stod(buf
, buf_end
, exp
);
4780 float __cdecl
_Stof(const char *buf
, char **buf_end
, LONG exp
)
4782 return _Stod(buf
, buf_end
, exp
);
4785 float __cdecl
_Stofx(const char *buf
, char **buf_end
, LONG exp
, int *err
)
4787 return _Stodx(buf
, buf_end
, exp
, err
);
4790 __int64 __cdecl
_Stoll(const char *buf
, char **buf_end
, int base
)
4792 return _strtoi64(buf
, buf_end
, base
);
4795 __int64 __cdecl
_Stollx(const char *buf
, char **buf_end
, int base
, int *err
)
4801 ret
= _strtoi64(buf
, buf_end
, base
);
4811 LONG __cdecl
_Stolx(const char *buf
, char **buf_end
, int base
, int *err
)
4813 __int64 i
= _Stollx(buf
, buf_end
, base
, err
);
4814 if(!*err
&& i
!=(__int64
)((LONG
)i
))
4819 unsigned __int64 __cdecl
_Stoull(const char *buf
, char **buf_end
, int base
)
4821 return _strtoui64(buf
, buf_end
, base
);
4824 unsigned __int64 __cdecl
_Stoullx(const char *buf
, char **buf_end
, int base
, int *err
)
4826 unsigned __int64 ret
;
4830 ret
= _strtoui64(buf
, buf_end
, base
);
4840 ULONG __cdecl
_Stoul(const char *buf
, char **buf_end
, int base
)
4843 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, &err
);
4844 if(!err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4846 return buf
[0]=='-' ? -i
: i
;
4849 ULONG __cdecl
_Stoulx(const char *buf
, char **buf_end
, int base
, int *err
)
4851 unsigned __int64 i
= _Stoullx(buf
[0]=='-' ? buf
+1 : buf
, buf_end
, base
, err
);
4852 if(!*err
&& i
!=(unsigned __int64
)((ULONG
)i
))
4854 return buf
[0]=='-' ? -i
: i
;
4857 /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
4858 locale_id num_get_wchar_id
= {0};
4859 /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
4860 locale_id num_get_short_id
= {0};
4862 /* ??_7?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
4863 extern const vtable_ptr MSVCP_num_get_wchar_vtable
;
4864 /* ??_7?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
4865 extern const vtable_ptr MSVCP_num_get_short_vtable
;
4867 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4868 /* ?_Init@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4869 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
4870 /* ?_Init@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
4871 DEFINE_THISCALL_WRAPPER(num_get_wchar__Init
, 8)
4872 void __thiscall
num_get_wchar__Init(num_get
*this, const _Locinfo
*locinfo
)
4874 TRACE("(%p %p)\n", this, locinfo
);
4875 _Locinfo__Getcvt(locinfo
, &this->cvt
);
4878 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4879 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4880 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_locinfo
, 12)
4881 num_get
* __thiscall
num_get_wchar_ctor_locinfo(num_get
*this,
4882 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4884 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
4886 locale_facet_ctor_refs(&this->facet
, refs
);
4887 this->facet
.vtable
= &MSVCP_num_get_wchar_vtable
;
4889 num_get_wchar__Init(this, locinfo
);
4893 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
4894 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
4895 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_locinfo
, 12)
4896 num_get
* __thiscall
num_get_short_ctor_locinfo(num_get
*this,
4897 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
4899 num_get_wchar_ctor_locinfo(this, locinfo
, refs
);
4900 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4904 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
4905 /* ??0?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
4906 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor_refs
, 8)
4907 num_get
* __thiscall
num_get_wchar_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4911 TRACE("(%p %lu)\n", this, refs
);
4913 _Locinfo_ctor(&locinfo
);
4914 num_get_wchar_ctor_locinfo(this, &locinfo
, refs
);
4915 _Locinfo_dtor(&locinfo
);
4919 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
4920 /* ??0?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
4921 DEFINE_THISCALL_WRAPPER(num_get_short_ctor_refs
, 8)
4922 num_get
* __thiscall
num_get_short_ctor_refs(num_get
*this, MSVCP_size_t refs
)
4924 num_get_wchar_ctor_refs(this, refs
);
4925 this->facet
.vtable
= &MSVCP_num_get_short_vtable
;
4929 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4930 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4931 DEFINE_THISCALL_WRAPPER(num_get_wchar_ctor
, 4)
4932 num_get
* __thiscall
num_get_wchar_ctor(num_get
*this)
4934 return num_get_wchar_ctor_refs(this, 0);
4937 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
4938 /* ??_F?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
4939 DEFINE_THISCALL_WRAPPER(num_get_short_ctor
, 4)
4940 num_get
* __thiscall
num_get_short_ctor(num_get
*this)
4942 return num_get_short_ctor_refs(this, 0);
4945 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
4946 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
4947 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
4948 /* ??1?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
4949 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
4950 /* ??1?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
4951 DEFINE_THISCALL_WRAPPER(num_get_wchar_dtor
, 4)
4952 void __thiscall
num_get_wchar_dtor(num_get
*this)
4954 TRACE("(%p)\n", this);
4955 locale_facet_dtor(&this->facet
);
4958 DEFINE_THISCALL_WRAPPER(num_get_wchar_vector_dtor
, 8)
4959 num_get
* __thiscall
num_get_wchar_vector_dtor(num_get
*this, unsigned int flags
)
4961 TRACE("(%p %x)\n", this, flags
);
4963 /* we have an array, with the number of elements stored before the first object */
4964 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
4966 for(i
=*ptr
-1; i
>=0; i
--)
4967 num_get_wchar_dtor(this+i
);
4968 MSVCRT_operator_delete(ptr
);
4970 num_get_wchar_dtor(this);
4972 MSVCRT_operator_delete(this);
4978 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
4979 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
4980 MSVCP_size_t __cdecl
num_get_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
4982 TRACE("(%p %p)\n", facet
, loc
);
4984 if(facet
&& !*facet
) {
4987 *facet
= MSVCRT_operator_new(sizeof(num_get
));
4989 ERR("Out of memory\n");
4990 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
4994 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
4995 num_get_wchar_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
4996 _Locinfo_dtor(&locinfo
);
5002 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5003 /* ?_Getcat@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5004 MSVCP_size_t __cdecl
num_get_wchar__Getcat_old(const locale_facet
**facet
)
5006 return num_get_wchar__Getcat(facet
, locale_classic());
5009 num_get
* num_get_wchar_use_facet(const locale
*loc
)
5011 static num_get
*obj
= NULL
;
5014 const locale_facet
*fac
;
5016 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5017 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_wchar_id
));
5019 _Lockit_dtor(&lock
);
5020 return (num_get
*)fac
;
5024 _Lockit_dtor(&lock
);
5028 num_get_wchar__Getcat(&fac
, loc
);
5029 obj
= (num_get
*)fac
;
5030 call_locale_facet__Incref(&obj
->facet
);
5031 locale_facet_register(&obj
->facet
);
5032 _Lockit_dtor(&lock
);
5037 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
5038 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
5039 MSVCP_size_t __cdecl
num_get_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
5041 if(facet
&& !*facet
) {
5042 num_get_wchar__Getcat(facet
, loc
);
5043 (*(locale_facet
**)facet
)->vtable
= &MSVCP_num_get_short_vtable
;
5049 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
5050 /* ?_Getcat@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
5051 MSVCP_size_t __cdecl
num_get_short__Getcat_old(const locale_facet
**facet
)
5053 return num_get_short__Getcat(facet
, locale_classic());
5056 num_get
* num_get_short_use_facet(const locale
*loc
)
5058 static num_get
*obj
= NULL
;
5061 const locale_facet
*fac
;
5063 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
5064 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_short_id
));
5066 _Lockit_dtor(&lock
);
5067 return (num_get
*)fac
;
5071 _Lockit_dtor(&lock
);
5075 num_get_short__Getcat(&fac
, loc
);
5076 obj
= (num_get
*)fac
;
5077 call_locale_facet__Incref(&obj
->facet
);
5078 locale_facet_register(&obj
->facet
);
5079 _Lockit_dtor(&lock
);
5084 static int num_get__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5085 istreambuf_iterator_wchar
*last
, const locale
*loc
, numpunct_wchar
*numpunct
)
5087 basic_string_char grouping_bstr
;
5088 basic_string_char groups_found
;
5089 int i
, groups_no
= 0, cur_group
= 0, exp
= 0;
5090 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31;
5091 wchar_t sep
= 0, digits
[11], *digits_pos
;
5092 const char *grouping
, *groups
;
5093 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
5095 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
5098 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5101 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5102 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5103 #if _MSVCP_VER >= 70
5104 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5108 MSVCP_basic_string_char_ctor(&groups_found
);
5110 istreambuf_iterator_wchar_val(first
);
5112 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5114 istreambuf_iterator_wchar_inc(first
);
5115 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5117 istreambuf_iterator_wchar_inc(first
);
5120 /* read possibly grouped numbers before decimal */
5121 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5122 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5123 if(sep
&& first
->val
==sep
) {
5124 if(!groups_no
) break; /* empty group - stop parsing */
5125 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5132 got_digit
= TRUE
; /* found a digit, zero or non-zero */
5133 /* write digit to dest if not a leading zero (to not waste dest buffer) */
5134 if(!got_nonzero
&& first
->val
== digits
[0])
5141 *dest
++ = '0'+digits_pos
-digits
;
5143 exp
++; /* too many digits, just multiply by 10 */
5144 if(sep
&& groups_no
<CHAR_MAX
)
5149 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
5150 if(got_digit
&& !got_nonzero
)
5153 /* get decimal, if any */
5154 if(first
->strbuf
&& first
->val
==numpunct_wchar_decimal_point(numpunct
)) {
5156 *dest
++ = *localeconv()->decimal_point
;
5157 istreambuf_iterator_wchar_inc(first
);
5160 /* read non-grouped after decimal */
5161 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5162 if(!(digits_pos
= wcschr(digits
, first
->val
)))
5164 else if(dest
<num_end
) {
5166 *dest
++ = '0'+digits_pos
-digits
;
5170 /* read exponent, if any */
5171 if(first
->strbuf
&& (first
->val
==mb_to_wc('e', &this->cvt
) || first
->val
==mb_to_wc('E', &this->cvt
))) {
5173 istreambuf_iterator_wchar_inc(first
);
5175 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5177 istreambuf_iterator_wchar_inc(first
);
5178 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5180 istreambuf_iterator_wchar_inc(first
);
5183 got_digit
= got_nonzero
= FALSE
;
5185 /* skip any leading zeroes */
5186 for(; first
->strbuf
&& first
->val
==digits
[0]; istreambuf_iterator_wchar_inc(first
))
5189 for(; first
->strbuf
&& (digits_pos
= wcschr(digits
, first
->val
)); istreambuf_iterator_wchar_inc(first
)) {
5190 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
5193 *dest
++ = '0'+digits_pos
-digits
;
5196 /* if just found zeroes for exponent, use that */
5197 if(got_digit
&& !got_nonzero
)
5205 if(sep
&& groups_no
)
5206 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5208 if(!cur_group
) /* no groups, skip loop */
5210 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
5211 error
= TRUE
; /* trailing empty */
5213 for(; cur_group
>=0 && !error
; cur_group
--) {
5214 if(*grouping
== CHAR_MAX
) {
5218 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5219 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5222 }else if(grouping
[1]) {
5226 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5228 MSVCP_basic_string_char_dtor(&groups_found
);
5238 /* ?_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 */
5239 /* ?_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 */
5240 int __cdecl
num_get_wchar__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5241 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5243 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_wchar_use_facet(loc
));
5246 /* ?_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 */
5247 /* ?_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 */
5248 int __cdecl
num_get_short__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5249 istreambuf_iterator_wchar
*last
, const locale
*loc
)
5251 return num_get__Getffld(this, dest
, first
, last
, loc
, numpunct_short_use_facet(loc
));
5254 /* ?_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 */
5255 /* ?_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 */
5256 /* ?_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 */
5257 /* ?_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 */
5258 int __cdecl
num_get_wchar__Getffldx(num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5259 istreambuf_iterator_wchar
*last
, ios_base
*ios
, int *phexexp
)
5261 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
5265 static int num_get__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5266 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
, numpunct_wchar
*numpunct
)
5268 wchar_t digits
[23], *digits_pos
, sep
= 0;
5269 basic_string_char grouping_bstr
;
5270 basic_string_char groups_found
;
5271 int i
, basefield
, base
, groups_no
= 0, cur_group
= 0;
5272 char *dest_beg
= dest
, *dest_end
= dest
+24;
5273 const char *grouping
, *groups
;
5274 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
5276 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
5279 digits
[i
] = mb_to_wc('0'+i
, &this->cvt
);
5280 for(i
=0; i
<6; i
++) {
5281 digits
[10+i
] = mb_to_wc('a'+i
, &this->cvt
);
5282 digits
[16+i
] = mb_to_wc('A'+i
, &this->cvt
);
5285 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
5286 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
5287 #if _MSVCP_VER >= 70
5288 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
5291 basefield
= fmtflags
& FMTFLAG_basefield
;
5292 if(basefield
== FMTFLAG_oct
)
5294 else if(basefield
== FMTFLAG_hex
)
5295 base
= 22; /* equal to the size of digits buffer */
5301 istreambuf_iterator_wchar_val(first
);
5302 if(first
->strbuf
&& first
->val
==mb_to_wc('-', &this->cvt
)) {
5304 istreambuf_iterator_wchar_inc(first
);
5305 }else if(first
->strbuf
&& first
->val
==mb_to_wc('+', &this->cvt
)) {
5307 istreambuf_iterator_wchar_inc(first
);
5310 if(first
->strbuf
&& first
->val
==digits
[0]) {
5312 istreambuf_iterator_wchar_inc(first
);
5313 if(first
->strbuf
&& (first
->val
==mb_to_wc('x', &this->cvt
) || first
->val
==mb_to_wc('X', &this->cvt
))) {
5314 if(!base
|| base
== 22) {
5316 istreambuf_iterator_wchar_inc(first
);
5326 if(!base
) base
= 10;
5331 MSVCP_basic_string_char_ctor(&groups_found
);
5332 if(found_zero
) ++groups_no
;
5335 for(; first
->strbuf
; istreambuf_iterator_wchar_inc(first
)) {
5336 if(!(digits_pos
= wcschr(digits
, first
->val
))) {
5337 if(sep
&& first
->val
==sep
) {
5338 if(!groups_no
) break; /* empty group - stop parsing */
5339 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5347 if(dest_empty
&& first
->val
== digits
[0]) {
5353 /* skip digits that can't be copied to dest buffer, other
5354 * functions are responsible for detecting overflows */
5356 *dest
++ = (digits_pos
-digits
<10 ? '0'+digits_pos
-digits
:
5357 (digits_pos
-digits
<16 ? 'a'+digits_pos
-digits
-10 :
5358 'A'+digits_pos
-digits
-16));
5359 if(sep
&& groups_no
<CHAR_MAX
)
5364 if(sep
&& groups_no
)
5365 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
5367 if(!cur_group
) { /* no groups, skip loop */
5369 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
5370 error
= TRUE
; /* trailing empty */
5374 for(; cur_group
>=0 && !error
; cur_group
--) {
5375 if(*grouping
== CHAR_MAX
) {
5379 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
5380 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
5383 }else if(grouping
[1]) {
5388 MSVCP_basic_string_char_dtor(&grouping_bstr
);
5390 MSVCP_basic_string_char_dtor(&groups_found
);
5397 }else if(dest_empty
)
5401 return (base
==22 ? 16 : base
);
5404 /* ?_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 */
5405 /* ?_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 */
5406 int __cdecl
num_get_wchar__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5407 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5409 return num_get__Getifld(this, dest
, first
, last
,
5410 fmtflags
, loc
, numpunct_wchar_use_facet(loc
));
5413 /* ?_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 */
5414 /* ?_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 */
5415 int __cdecl
num_get_short__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_wchar
*first
,
5416 istreambuf_iterator_wchar
*last
, int fmtflags
, const locale
*loc
)
5418 return num_get__Getifld(this, dest
, first
, last
,
5419 fmtflags
, loc
, numpunct_short_use_facet(loc
));
5422 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABEH_W000@Z */
5423 /* ?_Hexdig@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAH_W000@Z */
5424 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABEHGGGG@Z */
5425 /* ?_Hexdig@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAHGGGG@Z */
5426 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_wchar__Hexdig
, 20)
5427 int __thiscall
MSVCP_num_get_wchar__Hexdig(num_get
*this, wchar_t dig
, wchar_t e0
, wchar_t al
, wchar_t au
)
5429 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
5433 static istreambuf_iterator_wchar
* num_get_do_get_void(const num_get
*this,
5434 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5435 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5436 void **pval
, numpunct_wchar
*numpunct
)
5442 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5444 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5445 &last
, FMTFLAG_hex
, IOS_LOCALE(base
), numpunct
), &err
);
5446 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
5447 *state
|= IOSTATE_failbit
;
5448 else if(end
!=tmp
&& !err
)
5449 *pval
= (void*)((INT_PTR
)v
);
5451 *state
|= IOSTATE_failbit
;
5454 *state
|= IOSTATE_eofbit
;
5460 /* ?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 */
5461 /* ?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 */
5462 #if _MSVCP_VER <= 100
5463 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_wchar*, \
5464 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5465 (this, ret, first, last, base, state, pval))
5467 #define call_num_get_wchar_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5468 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**), \
5469 (this, ret, first, last, base, state, pval))
5471 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_void
,36)
5472 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5473 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5475 return num_get_do_get_void(this, ret
, first
, last
, base
,
5476 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5479 /* ?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 */
5480 /* ?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 */
5481 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_void
,36)
5482 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5483 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5485 return num_get_do_get_void(this, ret
, first
, last
, base
,
5486 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5489 /* ?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 */
5490 /* ?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 */
5491 /* ?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 */
5492 /* ?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 */
5493 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_void
,36)
5494 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_void(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5495 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, void **pval
)
5497 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5498 return call_num_get_wchar_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
5501 static istreambuf_iterator_wchar
* num_get_do_get_double(const num_get
*this,
5502 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5503 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5504 double *pval
, numpunct_wchar
*numpunct
)
5510 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5512 v
= _Stodx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
), numpunct
), &err
);
5513 if(end
!=tmp
&& !err
)
5516 *state
|= IOSTATE_failbit
;
5519 *state
|= IOSTATE_eofbit
;
5525 /* ?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 */
5526 /* ?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 */
5527 /* ?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 */
5528 /* ?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 */
5529 #if _MSVCP_VER <= 100
5530 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_wchar*, \
5531 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5532 (this, ret, first, last, base, state, pval))
5533 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_wchar*, \
5534 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5535 (this, ret, first, last, base, state, pval))
5537 #define call_num_get_wchar_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5538 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5539 (this, ret, first, last, base, state, pval))
5540 #define call_num_get_wchar_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5541 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*), \
5542 (this, ret, first, last, base, state, pval))
5544 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_double
,36)
5545 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5546 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5548 return num_get_do_get_double(this, ret
, first
, last
, base
,
5549 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5552 /* ?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 */
5553 /* ?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 */
5554 /* ?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 */
5555 /* ?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 */
5556 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_double
,36)
5557 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5558 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5560 return num_get_do_get_double(this, ret
, first
, last
, base
,
5561 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5564 /* ?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 */
5565 /* ?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 */
5566 /* ?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 */
5567 /* ?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 */
5568 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ldouble
,36)
5569 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ldouble(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5570 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5572 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5573 return call_num_get_wchar_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
5576 /* ?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 */
5577 /* ?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 */
5578 /* ?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 */
5579 /* ?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 */
5580 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_double
,36)
5581 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_double(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5582 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, double *pval
)
5584 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5585 return call_num_get_wchar_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
5588 static istreambuf_iterator_wchar
* num_get_do_get_float(const num_get
*this,
5589 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5590 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5591 float *pval
, numpunct_wchar
*numpunct
)
5597 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5599 v
= _Stofx(tmp
, &end
, num_get__Getffld(this, tmp
, &first
,
5600 &last
, IOS_LOCALE(base
), numpunct
), &err
);
5601 if(end
!=tmp
&& !err
)
5604 *state
|= IOSTATE_failbit
;
5607 *state
|= IOSTATE_eofbit
;
5613 /* ?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 */
5614 /* ?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 */
5615 #if _MSVCP_VER <= 100
5616 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_wchar*, \
5617 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5618 (this, ret, first, last, base, state, pval))
5620 #define call_num_get_wchar_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5621 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*), \
5622 (this, ret, first, last, base, state, pval))
5624 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_float
,36)
5625 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5626 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5628 return num_get_do_get_float(this, ret
, first
, last
, base
,
5629 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5632 /* ?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 */
5633 /* ?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 */
5634 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_float
,36)
5635 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5636 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5638 return num_get_do_get_float(this, ret
, first
, last
, base
,
5639 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5642 /* ?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 */
5643 /* ?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 */
5644 /* ?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 */
5645 /* ?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 */
5646 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_float
,36)
5647 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_float(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5648 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, float *pval
)
5650 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5651 return call_num_get_wchar_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
5654 static istreambuf_iterator_wchar
* num_get_do_get_uint64(const num_get
*this,
5655 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5656 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5657 ULONGLONG
*pval
, numpunct_wchar
*numpunct
)
5663 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5665 v
= _Stoullx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5666 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5667 if(end
!=tmp
&& !err
)
5670 *state
|= IOSTATE_failbit
;
5673 *state
|= IOSTATE_eofbit
;
5679 /* ?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 */
5680 /* ?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 */
5681 #if _MSVCP_VER <= 100
5682 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_wchar*, \
5683 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5684 (this, ret, first, last, base, state, pval))
5686 #define call_num_get_wchar_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5687 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*), \
5688 (this, ret, first, last, base, state, pval))
5690 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint64
,36)
5691 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5692 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5694 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5695 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5698 /* ?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 */
5699 /* ?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 */
5700 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint64
,36)
5701 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5702 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5704 return num_get_do_get_uint64(this, ret
, first
, last
, base
,
5705 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5708 /* ?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 */
5709 /* ?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 */
5710 /* ?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 */
5711 /* ?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 */
5712 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint64
,36)
5713 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5714 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
5716 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5717 return call_num_get_wchar_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
5720 static istreambuf_iterator_wchar
* num_get_do_get_int64(const num_get
*this,
5721 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5722 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5723 LONGLONG
*pval
, numpunct_wchar
*numpunct
)
5729 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5731 v
= _Stollx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5732 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5733 if(end
!=tmp
&& !err
)
5736 *state
|= IOSTATE_failbit
;
5739 *state
|= IOSTATE_eofbit
;
5745 /* ?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 */
5746 /* ?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 */
5747 #if _MSVCP_VER <= 100
5748 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_wchar*, \
5749 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5750 (this, ret, first, last, base, state, pval))
5752 #define call_num_get_wchar_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5753 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*), \
5754 (this, ret, first, last, base, state, pval))
5756 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_int64
,36)
5757 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5758 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5760 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5761 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5764 /* ?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 */
5765 /* ?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 */
5766 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_int64
,36)
5767 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5768 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5770 return num_get_do_get_int64(this, ret
, first
, last
, base
,
5771 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5774 /* ?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 */
5775 /* ?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 */
5776 /* ?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 */
5777 /* ?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 */
5778 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_int64
,36)
5779 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_int64(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5780 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
5782 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5783 return call_num_get_wchar_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
5786 static istreambuf_iterator_wchar
* num_get_do_get_ulong(const num_get
*this,
5787 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5788 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5789 ULONG
*pval
, numpunct_wchar
*numpunct
)
5795 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5797 v
= _Stoulx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5798 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5799 if(end
!=tmp
&& !err
)
5802 *state
|= IOSTATE_failbit
;
5805 *state
|= IOSTATE_eofbit
;
5811 /* ?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 */
5812 /* ?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 */
5813 #if _MSVCP_VER <= 100
5814 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_wchar*, \
5815 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5816 (this, ret, first, last, base, state, pval))
5818 #define call_num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5819 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*), \
5820 (this, ret, first, last, base, state, pval))
5822 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ulong
,36)
5823 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5824 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5826 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5827 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5830 /* ?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 */
5831 /* ?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 */
5832 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ulong
,36)
5833 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5834 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5836 return num_get_do_get_ulong(this, ret
, first
, last
, base
,
5837 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5840 /* ?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 */
5841 /* ?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 */
5842 /* ?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 */
5843 /* ?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 */
5844 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ulong
,36)
5845 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ulong(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5846 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, ULONG
*pval
)
5848 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5849 return call_num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5852 static istreambuf_iterator_wchar
* num_get_do_get_long(const num_get
*this,
5853 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
5854 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
5855 LONG
*pval
, numpunct_wchar
*numpunct
)
5861 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5863 v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
5864 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
5865 if(end
!=tmp
&& !err
)
5868 *state
|= IOSTATE_failbit
;
5871 *state
|= IOSTATE_eofbit
;
5877 /* ?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 */
5878 /* ?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 */
5879 #if _MSVCP_VER <= 100
5880 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_wchar*, \
5881 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5882 (this, ret, first, last, base, state, pval))
5884 #define call_num_get_wchar_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5885 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*), \
5886 (this, ret, first, last, base, state, pval))
5888 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_long
,36)
5889 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5890 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5892 return num_get_do_get_long(this, ret
, first
, last
, base
,
5893 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
5896 /* ?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 */
5897 /* ?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 */
5898 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_long
,36)
5899 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5900 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5902 return num_get_do_get_long(this, ret
, first
, last
, base
,
5903 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
5906 /* ?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 */
5907 /* ?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 */
5908 /* ?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 */
5909 /* ?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 */
5910 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_long
,36)
5911 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_long(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5912 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, LONG
*pval
)
5914 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5915 return call_num_get_wchar_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
5918 /* ?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 */
5919 /* ?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 */
5920 #if _MSVCP_VER <= 100
5921 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_wchar*, \
5922 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5923 (this, ret, first, last, base, state, pval))
5925 #define call_num_get_wchar_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
5926 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*), \
5927 (this, ret, first, last, base, state, pval))
5929 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_uint
,36)
5930 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5931 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5933 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5934 return num_get_wchar_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5937 /* ?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 */
5938 /* ?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 */
5939 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_uint
,36)
5940 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5941 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5943 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5944 return num_get_short_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
5947 /* ?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 */
5948 /* ?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 */
5949 /* ?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 */
5950 /* ?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 */
5951 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_uint
,36)
5952 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_uint(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5953 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned int *pval
)
5955 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5956 return call_num_get_wchar_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
5959 /* ?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 */
5960 /* ?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 */
5961 #if _MSVCP_VER <= 100
5962 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_wchar*, \
5963 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5964 (this, ret, first, last, base, state, pval))
5966 #define call_num_get_wchar_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_wchar*, \
5967 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*), \
5968 (this, ret, first, last, base, state, pval))
5970 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_ushort
,36)
5971 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
5972 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
5975 char tmp
[25], *beg
, *end
;
5978 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
5980 b
= num_get_wchar__Getifld(this, tmp
,
5981 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
5982 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
5983 v
= _Stoulx(beg
, &end
, b
, &err
);
5985 if(v
!= (ULONG
)((unsigned short)v
))
5986 *state
|= IOSTATE_failbit
;
5987 else if(end
!=beg
&& !err
)
5988 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
5990 *state
|= IOSTATE_failbit
;
5993 *state
|= IOSTATE_eofbit
;
5999 /* ?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 */
6000 /* ?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 */
6001 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_ushort
,36)
6002 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6003 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6005 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, state
, pval
);
6009 /* ?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 */
6010 /* ?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 */
6011 /* ?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@ */
6012 /* ?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 */
6013 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_ushort
,36)
6014 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_ushort(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6015 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, unsigned short *pval
)
6017 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6018 return call_num_get_wchar_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6021 static istreambuf_iterator_wchar
* num_get_do_get_bool(const num_get
*this,
6022 istreambuf_iterator_wchar
*ret
, istreambuf_iterator_wchar first
,
6023 istreambuf_iterator_wchar last
, ios_base
*base
, int *state
,
6024 MSVCP_bool
*pval
, numpunct_wchar
*numpunct
)
6026 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6028 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
6029 basic_string_wchar false_bstr
, true_bstr
;
6030 const wchar_t *pfalse
, *ptrue
;
6032 numpunct_wchar_falsename(numpunct
, &false_bstr
);
6033 numpunct_wchar_truename(numpunct
, &true_bstr
);
6034 pfalse
= MSVCP_basic_string_wchar_c_str(&false_bstr
);
6035 ptrue
= MSVCP_basic_string_wchar_c_str(&true_bstr
);
6037 for(istreambuf_iterator_wchar_val(&first
); first
.strbuf
;) {
6038 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
6040 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
6043 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
6045 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
6054 istreambuf_iterator_wchar_inc(&first
);
6056 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
6065 *state
|= IOSTATE_failbit
;
6067 MSVCP_basic_string_wchar_dtor(&false_bstr
);
6068 MSVCP_basic_string_wchar_dtor(&true_bstr
);
6072 LONG v
= _Stolx(tmp
, &end
, num_get__Getifld(this, tmp
, &first
,
6073 &last
, base
->fmtfl
, IOS_LOCALE(base
), numpunct
), &err
);
6075 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
6078 *state
|= IOSTATE_failbit
;
6082 *state
|= IOSTATE_eofbit
;
6083 memcpy(ret
, &first
, sizeof(first
));
6087 /* ?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 */
6088 /* ?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 */
6089 #if _MSVCP_VER <= 100
6090 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_wchar*, \
6091 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6092 (this, ret, first, last, base, state, pval))
6094 #define call_num_get_wchar_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_wchar*, \
6095 (const num_get*, istreambuf_iterator_wchar*, istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*), \
6096 (this, ret, first, last, base, state, pval))
6098 DEFINE_THISCALL_WRAPPER(num_get_wchar_do_get_bool
,36)
6099 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6100 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6102 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6103 state
, pval
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
6106 /* ?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 */
6107 /* ?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 */
6108 DEFINE_THISCALL_WRAPPER(num_get_short_do_get_bool
,36)
6109 istreambuf_iterator_wchar
*__thiscall
num_get_short_do_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6110 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6112 return num_get_do_get_bool(this, ret
, first
, last
, base
,
6113 state
, pval
, numpunct_short_use_facet(IOS_LOCALE(base
)));
6116 /* ?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 */
6117 /* ?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 */
6118 /* ?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 */
6119 /* ?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 */
6120 DEFINE_THISCALL_WRAPPER(num_get_wchar_get_bool
,36)
6121 istreambuf_iterator_wchar
*__thiscall
num_get_wchar_get_bool(const num_get
*this, istreambuf_iterator_wchar
*ret
,
6122 istreambuf_iterator_wchar first
, istreambuf_iterator_wchar last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
6124 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6125 return call_num_get_wchar_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
6128 /* ?id@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
6129 locale_id num_get_char_id
= {0};
6131 /* ??_7?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
6132 extern const vtable_ptr MSVCP_num_get_char_vtable
;
6134 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
6135 /* ?_Init@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
6136 DEFINE_THISCALL_WRAPPER(num_get_char__Init
, 8)
6137 void __thiscall
num_get_char__Init(num_get
*this, const _Locinfo
*locinfo
)
6139 TRACE("(%p %p)\n", this, locinfo
);
6140 _Locinfo__Getcvt(locinfo
, &this->cvt
);
6143 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
6144 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
6145 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_locinfo
, 12)
6146 num_get
* __thiscall
num_get_char_ctor_locinfo(num_get
*this,
6147 const _Locinfo
*locinfo
, MSVCP_size_t refs
)
6149 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
6151 locale_facet_ctor_refs(&this->facet
, refs
);
6152 this->facet
.vtable
= &MSVCP_num_get_char_vtable
;
6154 num_get_char__Init(this, locinfo
);
6158 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
6159 /* ??0?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
6160 DEFINE_THISCALL_WRAPPER(num_get_char_ctor_refs
, 8)
6161 num_get
* __thiscall
num_get_char_ctor_refs(num_get
*this, MSVCP_size_t refs
)
6165 TRACE("(%p %lu)\n", this, refs
);
6167 _Locinfo_ctor(&locinfo
);
6168 num_get_char_ctor_locinfo(this, &locinfo
, refs
);
6169 _Locinfo_dtor(&locinfo
);
6173 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
6174 /* ??_F?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
6175 DEFINE_THISCALL_WRAPPER(num_get_char_ctor
, 4)
6176 num_get
* __thiscall
num_get_char_ctor(num_get
*this)
6178 return num_get_char_ctor_refs(this, 0);
6181 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
6182 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
6183 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
6184 /* ??1?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
6185 DEFINE_THISCALL_WRAPPER(num_get_char_dtor
, 4)
6186 void __thiscall
num_get_char_dtor(num_get
*this)
6188 TRACE("(%p)\n", this);
6189 locale_facet_dtor(&this->facet
);
6192 DEFINE_THISCALL_WRAPPER(num_get_char_vector_dtor
, 8)
6193 num_get
* __thiscall
num_get_char_vector_dtor(num_get
*this, unsigned int flags
)
6195 TRACE("(%p %x)\n", this, flags
);
6197 /* we have an array, with the number of elements stored before the first object */
6198 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
6200 for(i
=*ptr
-1; i
>=0; i
--)
6201 num_get_char_dtor(this+i
);
6202 MSVCRT_operator_delete(ptr
);
6204 num_get_char_dtor(this);
6206 MSVCRT_operator_delete(this);
6212 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
6213 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
6214 MSVCP_size_t __cdecl
num_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
6216 TRACE("(%p %p)\n", facet
, loc
);
6218 if(facet
&& !*facet
) {
6221 *facet
= MSVCRT_operator_new(sizeof(num_get
));
6223 ERR("Out of memory\n");
6224 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
6228 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
6229 num_get_char_ctor_locinfo((num_get
*)*facet
, &locinfo
, 0);
6230 _Locinfo_dtor(&locinfo
);
6236 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
6237 /* ?_Getcat@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
6238 MSVCP_size_t __cdecl
num_get_char__Getcat_old(const locale_facet
**facet
)
6240 return num_get_char__Getcat(facet
, locale_classic());
6243 num_get
* num_get_char_use_facet(const locale
*loc
)
6245 static num_get
*obj
= NULL
;
6248 const locale_facet
*fac
;
6250 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
6251 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_get_char_id
));
6253 _Lockit_dtor(&lock
);
6254 return (num_get
*)fac
;
6258 _Lockit_dtor(&lock
);
6262 num_get_char__Getcat(&fac
, loc
);
6263 obj
= (num_get
*)fac
;
6264 call_locale_facet__Incref(&obj
->facet
);
6265 locale_facet_register(&obj
->facet
);
6266 _Lockit_dtor(&lock
);
6271 /* ?_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 */
6272 /* ?_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 */
6273 /* Copies number to dest buffer, validates grouping and skips separators.
6274 * Updates first so it points past the number, all digits are skipped.
6275 * Returns how exponent needs to changed.
6276 * Size of dest buffer is not specified, assuming it's not smaller than 32:
6277 * strlen(+0.e+) + 22(digits) + 4(expontent) + 1(nullbyte)
6279 int __cdecl
num_get_char__Getffld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6280 istreambuf_iterator_char
*last
, const locale
*loc
)
6282 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6283 basic_string_char grouping_bstr
;
6284 basic_string_char groups_found
;
6285 int groups_no
= 0, cur_group
= 0, exp
= 0;
6286 char *dest_beg
= dest
, *num_end
= dest
+25, *exp_end
= dest
+31, sep
= 0;
6287 const char *grouping
, *groups
;
6288 BOOL error
= FALSE
, got_digit
= FALSE
, got_nonzero
= FALSE
;
6290 TRACE("(%p %p %p %p)\n", dest
, first
, last
, loc
);
6292 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6293 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6294 #if _MSVCP_VER >= 70
6295 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6299 MSVCP_basic_string_char_ctor(&groups_found
);
6301 istreambuf_iterator_char_val(first
);
6303 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6304 *dest
++ = first
->val
;
6305 istreambuf_iterator_char_inc(first
);
6308 /* read possibly grouped numbers before decimal */
6309 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6310 if(first
->val
<'0' || first
->val
>'9') {
6311 if(sep
&& first
->val
==sep
) {
6312 if(!groups_no
) break; /* empty group - stop parsing */
6313 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6320 got_digit
= TRUE
; /* found a digit, zero or non-zero */
6321 /* write digit to dest if not a leading zero (to not waste dest buffer) */
6322 if(!got_nonzero
&& first
->val
== '0')
6329 *dest
++ = first
->val
;
6331 exp
++; /* too many digits, just multiply by 10 */
6332 if(sep
&& groups_no
<CHAR_MAX
)
6337 /* if all leading zeroes, we didn't write anything so put a zero we check for a decimal */
6338 if(got_digit
&& !got_nonzero
)
6341 /* get decimal, if any */
6342 if(first
->strbuf
&& first
->val
==numpunct_char_decimal_point(numpunct
)) {
6344 *dest
++ = *localeconv()->decimal_point
;
6345 istreambuf_iterator_char_inc(first
);
6348 /* read non-grouped after decimal */
6349 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6350 if(first
->val
<'0' || first
->val
>'9')
6352 else if(dest
<num_end
) {
6354 *dest
++ = first
->val
;
6358 /* read exponent, if any */
6359 if(first
->strbuf
&& (first
->val
=='e' || first
->val
=='E')) {
6360 *dest
++ = first
->val
;
6361 istreambuf_iterator_char_inc(first
);
6363 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6364 *dest
++ = first
->val
;
6365 istreambuf_iterator_char_inc(first
);
6368 got_digit
= got_nonzero
= FALSE
;
6370 /* skip any leading zeroes */
6371 for(; first
->strbuf
&& first
->val
=='0'; istreambuf_iterator_char_inc(first
))
6374 for(; first
->strbuf
&& first
->val
>='0' && first
->val
<='9'; istreambuf_iterator_char_inc(first
)) {
6375 got_digit
= got_nonzero
= TRUE
; /* leading zeroes would have been skipped, so first digit is non-zero */
6378 *dest
++ = first
->val
;
6381 /* if just found zeroes for exponent, use that */
6382 if(got_digit
&& !got_nonzero
)
6390 if(sep
&& groups_no
)
6391 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6393 if(!cur_group
) /* no groups, skip loop */
6395 else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
])
6396 error
= TRUE
; /* trailing empty */
6398 for(; cur_group
>=0 && !error
; cur_group
--) {
6399 if(*grouping
== CHAR_MAX
) {
6403 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6404 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6407 }else if(grouping
[1]) {
6411 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6413 MSVCP_basic_string_char_dtor(&groups_found
);
6423 /* ?_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 */
6424 /* ?_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 */
6425 int __cdecl
num_get_char__Getffldx(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6426 istreambuf_iterator_char
*last
, ios_base
*ios
, int *phexexp
)
6428 FIXME("(%p %p %p %p %p) stub\n", dest
, first
, last
, ios
, phexexp
);
6432 /* ?_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 */
6433 /* ?_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 */
6434 /* Copies number to dest buffer, validates grouping and skips separators.
6435 * Updates first so it points past the number, all digits are skipped.
6436 * Returns number base (8, 10 or 16).
6437 * Size of dest buffer is not specified, assuming it's not smaller than 25:
6438 * 22(8^22>2^64)+1(detect overflows)+1(sign)+1(nullbyte) = 25
6440 int __cdecl
num_get_char__Getifld(const num_get
*this, char *dest
, istreambuf_iterator_char
*first
,
6441 istreambuf_iterator_char
*last
, int fmtflags
, const locale
*loc
)
6443 static const char digits
[] = "0123456789abcdefABCDEF";
6445 numpunct_char
*numpunct
= numpunct_char_use_facet(loc
);
6446 basic_string_char grouping_bstr
;
6447 basic_string_char groups_found
;
6448 int basefield
, base
, groups_no
= 0, cur_group
= 0;
6449 char *dest_beg
= dest
, *dest_end
= dest
+24, sep
= 0;
6450 const char *grouping
, *groups
;
6451 BOOL error
= TRUE
, dest_empty
= TRUE
, found_zero
= FALSE
;
6453 TRACE("(%p %p %p %04x %p)\n", dest
, first
, last
, fmtflags
, loc
);
6455 numpunct_char_grouping(numpunct
, &grouping_bstr
);
6456 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
6457 #if _MSVCP_VER >= 70
6458 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
6461 basefield
= fmtflags
& FMTFLAG_basefield
;
6462 if(basefield
== FMTFLAG_oct
)
6464 else if(basefield
== FMTFLAG_hex
)
6465 base
= 22; /* equal to the size of digits buffer */
6471 istreambuf_iterator_char_val(first
);
6472 if(first
->strbuf
&& (first
->val
=='-' || first
->val
=='+')) {
6473 *dest
++ = first
->val
;
6474 istreambuf_iterator_char_inc(first
);
6477 if(first
->strbuf
&& first
->val
=='0') {
6479 istreambuf_iterator_char_inc(first
);
6480 if(first
->strbuf
&& (first
->val
=='x' || first
->val
=='X')) {
6481 if(!base
|| base
== 22) {
6483 istreambuf_iterator_char_inc(first
);
6493 if (!base
) base
= 10;
6498 MSVCP_basic_string_char_ctor(&groups_found
);
6499 if(found_zero
) ++groups_no
;
6502 for(; first
->strbuf
; istreambuf_iterator_char_inc(first
)) {
6503 if(!memchr(digits
, first
->val
, base
)) {
6504 if(sep
&& first
->val
==sep
) {
6505 if(!groups_no
) break; /* empty group - stop parsing */
6506 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6514 if(dest_empty
&& first
->val
== '0')
6521 /* skip digits that can't be copied to dest buffer, other
6522 * functions are responsible for detecting overflows */
6524 *dest
++ = first
->val
;
6525 if(sep
&& groups_no
<CHAR_MAX
)
6530 if(sep
&& groups_no
)
6531 MSVCP_basic_string_char_append_ch(&groups_found
, groups_no
);
6533 if(!cur_group
) { /* no groups, skip loop */
6535 }else if(!(groups
= MSVCP_basic_string_char_c_str(&groups_found
))[cur_group
]) {
6536 error
= TRUE
; /* trailing empty */
6540 for(; cur_group
>=0 && !error
; cur_group
--) {
6541 if(*grouping
== CHAR_MAX
) {
6545 }else if((cur_group
&& *grouping
!=groups
[cur_group
])
6546 || (!cur_group
&& *grouping
<groups
[cur_group
])) {
6549 }else if(grouping
[1]) {
6554 MSVCP_basic_string_char_dtor(&grouping_bstr
);
6556 MSVCP_basic_string_char_dtor(&groups_found
);
6563 }else if(dest_empty
)
6567 return (base
==22 ? 16 : base
);
6570 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABEHD000@Z */
6571 /* ?_Hexdig@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHD000@Z */
6572 DEFINE_THISCALL_WRAPPER(MSVCP_num_get_char__Hexdig
, 20)
6573 int __thiscall
MSVCP_num_get_char__Hexdig(num_get
*this, char dig
, char e0
, char al
, char au
)
6575 FIXME("(%p %c %c %c %c) stub\n", this, dig
, e0
, al
, au
);
6579 /* ?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 */
6580 /* ?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 */
6581 #if _MSVCP_VER <= 100
6582 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 4, istreambuf_iterator_char*, \
6583 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6584 (this, ret, first, last, base, state, pval))
6586 #define call_num_get_char_do_get_void(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6587 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**), \
6588 (this, ret, first, last, base, state, pval))
6590 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_void
,36)
6591 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6592 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6598 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6600 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6601 &first
, &last
, FMTFLAG_hex
, IOS_LOCALE(base
)), &err
);
6602 if(v
!=(unsigned __int64
)((INT_PTR
)v
))
6603 *state
|= IOSTATE_failbit
;
6604 else if(end
!=tmp
&& !err
)
6605 *pval
= (void*)((INT_PTR
)v
);
6607 *state
|= IOSTATE_failbit
;
6610 *state
|= IOSTATE_eofbit
;
6616 /* ?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 */
6617 /* ?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 */
6618 DEFINE_THISCALL_WRAPPER(num_get_char_get_void
,36)
6619 istreambuf_iterator_char
*__thiscall
num_get_char_get_void(const num_get
*this, istreambuf_iterator_char
*ret
,
6620 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, void **pval
)
6622 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6623 return call_num_get_char_do_get_void(this, ret
, first
, last
, base
, state
, pval
);
6626 /* ?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 */
6627 /* ?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 */
6628 /* ?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 */
6629 /* ?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 */
6630 #if _MSVCP_VER <= 100
6631 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
6632 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6633 (this, ret, first, last, base, state, pval))
6634 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
6635 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6636 (this, ret, first, last, base, state, pval))
6638 #define call_num_get_char_do_get_ldouble(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6639 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6640 (this, ret, first, last, base, state, pval))
6641 #define call_num_get_char_do_get_double(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6642 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*), \
6643 (this, ret, first, last, base, state, pval))
6645 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_double
,36)
6646 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6647 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6653 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6655 v
= _Stodx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6656 if(end
!=tmp
&& !err
)
6659 *state
|= IOSTATE_failbit
;
6662 *state
|= IOSTATE_eofbit
;
6668 /* ?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 */
6669 /* ?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 */
6670 DEFINE_THISCALL_WRAPPER(num_get_char_get_ldouble
,36)
6671 istreambuf_iterator_char
*__thiscall
num_get_char_get_ldouble(const num_get
*this, istreambuf_iterator_char
*ret
,
6672 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6674 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6675 return call_num_get_char_do_get_ldouble(this, ret
, first
, last
, base
, state
, pval
);
6678 /* ?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 */
6679 /* ?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 */
6680 DEFINE_THISCALL_WRAPPER(num_get_char_get_double
,36)
6681 istreambuf_iterator_char
*__thiscall
num_get_char_get_double(const num_get
*this, istreambuf_iterator_char
*ret
,
6682 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, double *pval
)
6684 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6685 return call_num_get_char_do_get_double(this, ret
, first
, last
, base
, state
, pval
);
6688 /* ?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 */
6689 /* ?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 */
6690 #if _MSVCP_VER <= 100
6691 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
6692 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6693 (this, ret, first, last, base, state, pval))
6695 #define call_num_get_char_do_get_float(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6696 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*), \
6697 (this, ret, first, last, base, state, pval))
6699 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_float
,36)
6700 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6701 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6707 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6709 v
= _Stofx(tmp
, &end
, num_get_char__Getffld(this, tmp
, &first
, &last
, IOS_LOCALE(base
)), &err
);
6710 if(end
!=tmp
&& !err
)
6713 *state
|= IOSTATE_failbit
;
6716 *state
|= IOSTATE_eofbit
;
6722 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAM@Z */
6723 /* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AEAVios_base@2@AEAHAEAM@Z */
6724 DEFINE_THISCALL_WRAPPER(num_get_char_get_float
,36)
6725 istreambuf_iterator_char
*__thiscall
num_get_char_get_float(const num_get
*this, istreambuf_iterator_char
*ret
,
6726 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, float *pval
)
6728 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6729 return call_num_get_char_do_get_float(this, ret
, first
, last
, base
, state
, pval
);
6732 /* ?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 */
6733 /* ?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 */
6734 #if _MSVCP_VER <= 100
6735 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
6736 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6737 (this, ret, first, last, base, state, pval))
6739 #define call_num_get_char_do_get_uint64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6740 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*), \
6741 (this, ret, first, last, base, state, pval))
6743 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint64
,36)
6744 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6745 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6751 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6753 v
= _Stoullx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6754 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6755 if(end
!=tmp
&& !err
)
6758 *state
|= IOSTATE_failbit
;
6761 *state
|= IOSTATE_eofbit
;
6767 /* ?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 */
6768 /* ?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 */
6769 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint64
,36)
6770 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint64(const num_get
*this, istreambuf_iterator_char
*ret
,
6771 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONGLONG
*pval
)
6773 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6774 return call_num_get_char_do_get_uint64(this, ret
, first
, last
, base
, state
, pval
);
6777 /* ?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 */
6778 /* ?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 */
6779 #if _MSVCP_VER <= 100
6780 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
6781 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6782 (this, ret, first, last, base, state, pval))
6784 #define call_num_get_char_do_get_int64(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6785 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*), \
6786 (this, ret, first, last, base, state, pval))
6788 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_int64
,36)
6789 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6790 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6796 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6798 v
= _Stollx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6799 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6800 if(end
!=tmp
&& !err
)
6803 *state
|= IOSTATE_failbit
;
6806 *state
|= IOSTATE_eofbit
;
6812 /* ?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 */
6813 /* ?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 */
6814 DEFINE_THISCALL_WRAPPER(num_get_char_get_int64
,36)
6815 istreambuf_iterator_char
*__thiscall
num_get_char_get_int64(const num_get
*this, istreambuf_iterator_char
*ret
,
6816 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONGLONG
*pval
)
6818 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6819 return call_num_get_char_do_get_int64(this, ret
, first
, last
, base
, state
, pval
);
6822 /* ?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 */
6823 /* ?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 */
6824 #if _MSVCP_VER <= 100
6825 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
6826 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6827 (this, ret, first, last, base, state, pval))
6829 #define call_num_get_char_do_get_ulong(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6830 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*), \
6831 (this, ret, first, last, base, state, pval))
6833 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ulong
,36)
6834 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6835 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6841 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6843 v
= _Stoulx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6844 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6845 if(end
!=tmp
&& !err
)
6848 *state
|= IOSTATE_failbit
;
6851 *state
|= IOSTATE_eofbit
;
6857 /* ?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 */
6858 /* ?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 */
6859 DEFINE_THISCALL_WRAPPER(num_get_char_get_ulong
,36)
6860 istreambuf_iterator_char
*__thiscall
num_get_char_get_ulong(const num_get
*this, istreambuf_iterator_char
*ret
,
6861 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, ULONG
*pval
)
6863 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6864 return call_num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6867 /* ?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 */
6868 /* ?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 */
6869 #if _MSVCP_VER <= 100
6870 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 32, istreambuf_iterator_char*, \
6871 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6872 (this, ret, first, last, base, state, pval))
6874 #define call_num_get_char_do_get_long(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6875 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*), \
6876 (this, ret, first, last, base, state, pval))
6878 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_long
,36)
6879 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6880 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6886 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6888 v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
6889 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
6890 if(end
!=tmp
&& !err
)
6893 *state
|= IOSTATE_failbit
;
6896 *state
|= IOSTATE_eofbit
;
6902 /* ?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 */
6903 /* ?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 */
6904 DEFINE_THISCALL_WRAPPER(num_get_char_get_long
,36)
6905 istreambuf_iterator_char
*__thiscall
num_get_char_get_long(const num_get
*this, istreambuf_iterator_char
*ret
,
6906 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, LONG
*pval
)
6908 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6909 return call_num_get_char_do_get_long(this, ret
, first
, last
, base
, state
, pval
);
6912 /* ?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 */
6913 /* ?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 */
6914 #if _MSVCP_VER <= 100
6915 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 36, istreambuf_iterator_char*, \
6916 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6917 (this, ret, first, last, base, state, pval))
6919 #define call_num_get_char_do_get_uint(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6920 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*), \
6921 (this, ret, first, last, base, state, pval))
6923 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_uint
,36)
6924 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6925 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6927 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6928 return num_get_char_do_get_ulong(this, ret
, first
, last
, base
, state
, pval
);
6931 /* ?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 */
6932 /* ?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 */
6933 DEFINE_THISCALL_WRAPPER(num_get_char_get_uint
,36)
6934 istreambuf_iterator_char
*__thiscall
num_get_char_get_uint(const num_get
*this, istreambuf_iterator_char
*ret
,
6935 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned int *pval
)
6937 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6938 return call_num_get_char_do_get_uint(this, ret
, first
, last
, base
, state
, pval
);
6941 /* ?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 */
6942 /* ?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 */
6943 #if _MSVCP_VER <= 100
6944 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 40, istreambuf_iterator_char*, \
6945 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6946 (this, ret, first, last, base, state, pval))
6948 #define call_num_get_char_do_get_ushort(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 48, istreambuf_iterator_char*, \
6949 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*), \
6950 (this, ret, first, last, base, state, pval))
6952 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_ushort
,36)
6953 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6954 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6957 char tmp
[25], *beg
, *end
;
6960 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6962 b
= num_get_char__Getifld(this, tmp
,
6963 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
));
6964 beg
= tmp
+ (tmp
[0]=='-' ? 1 : 0);
6965 v
= _Stoulx(beg
, &end
, b
, &err
);
6967 if(v
!= (ULONG
)((unsigned short)v
))
6968 *state
|= IOSTATE_failbit
;
6969 else if(end
!=beg
&& !err
)
6970 *pval
= (tmp
[0]=='-' ? -((unsigned short)v
) : v
);
6972 *state
|= IOSTATE_failbit
;
6975 *state
|= IOSTATE_eofbit
;
6981 /* ?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 */
6982 /* ?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 */
6983 DEFINE_THISCALL_WRAPPER(num_get_char_get_ushort
,36)
6984 istreambuf_iterator_char
*__thiscall
num_get_char_get_ushort(const num_get
*this, istreambuf_iterator_char
*ret
,
6985 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, unsigned short *pval
)
6987 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
6988 return call_num_get_char_do_get_ushort(this, ret
, first
, last
, base
, state
, pval
);
6991 /* ?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 */
6992 /* ?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 */
6993 #if _MSVCP_VER <= 100
6994 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 44, istreambuf_iterator_char*, \
6995 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
6996 (this, ret, first, last, base, state, pval))
6998 #define call_num_get_char_do_get_bool(this, ret, first, last, base, state, pval) CALL_VTBL_FUNC(this, 52, istreambuf_iterator_char*, \
6999 (const num_get*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*), \
7000 (this, ret, first, last, base, state, pval))
7002 DEFINE_THISCALL_WRAPPER(num_get_char_do_get_bool
,36)
7003 istreambuf_iterator_char
*__thiscall
num_get_char_do_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7004 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7006 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7008 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7009 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7010 basic_string_char false_bstr
, true_bstr
;
7011 const char *pfalse
, *ptrue
;
7013 numpunct_char_falsename(numpunct
, &false_bstr
);
7014 numpunct_char_truename(numpunct
, &true_bstr
);
7015 pfalse
= MSVCP_basic_string_char_c_str(&false_bstr
);
7016 ptrue
= MSVCP_basic_string_char_c_str(&true_bstr
);
7018 for(istreambuf_iterator_char_val(&first
); first
.strbuf
;) {
7019 if(pfalse
&& *pfalse
&& first
.val
!=*pfalse
)
7021 if(ptrue
&& *ptrue
&& first
.val
!=*ptrue
)
7024 if(pfalse
&& *pfalse
&& ptrue
&& !*ptrue
)
7026 if(ptrue
&& *ptrue
&& pfalse
&& !*pfalse
)
7035 istreambuf_iterator_char_inc(&first
);
7037 if((!pfalse
|| !*pfalse
) && (!ptrue
|| !*ptrue
))
7046 *state
|= IOSTATE_failbit
;
7048 MSVCP_basic_string_char_dtor(&false_bstr
);
7049 MSVCP_basic_string_char_dtor(&true_bstr
);
7053 LONG v
= _Stolx(tmp
, &end
, num_get_char__Getifld(this, tmp
,
7054 &first
, &last
, base
->fmtfl
, IOS_LOCALE(base
)), &err
);
7056 if(end
!=tmp
&& err
==0 && (v
==0 || v
==1))
7059 *state
|= IOSTATE_failbit
;
7063 *state
|= IOSTATE_eofbit
;
7064 memcpy(ret
, &first
, sizeof(first
));
7068 /* ?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 */
7069 /* ?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 */
7070 DEFINE_THISCALL_WRAPPER(num_get_char_get_bool
,36)
7071 istreambuf_iterator_char
*__thiscall
num_get_char_get_bool(const num_get
*this, istreambuf_iterator_char
*ret
,
7072 istreambuf_iterator_char first
, istreambuf_iterator_char last
, ios_base
*base
, int *state
, MSVCP_bool
*pval
)
7074 TRACE("(%p %p %p %p %p)\n", this, ret
, base
, state
, pval
);
7075 return call_num_get_char_do_get_bool(this, ret
, first
, last
, base
, state
, pval
);
7078 /* ?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
7079 locale_id num_put_char_id
= {0};
7081 /* num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
7082 extern const vtable_ptr MSVCP_num_put_char_vtable
;
7084 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7085 /* ?_Init@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7086 DEFINE_THISCALL_WRAPPER(num_put_char__Init
, 8)
7087 void __thiscall
num_put_char__Init(num_put
*this, const _Locinfo
*locinfo
)
7089 TRACE("(%p %p)\n", this, locinfo
);
7090 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7093 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7094 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7095 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_locinfo
, 12)
7096 num_put
* __thiscall
num_put_char_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7098 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7100 locale_facet_ctor_refs(&this->facet
, refs
);
7101 this->facet
.vtable
= &MSVCP_num_put_char_vtable
;
7103 num_put_char__Init(this, locinfo
);
7107 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
7108 /* ??0?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
7109 DEFINE_THISCALL_WRAPPER(num_put_char_ctor_refs
, 8)
7110 num_put
* __thiscall
num_put_char_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7114 TRACE("(%p %lu)\n", this, refs
);
7116 _Locinfo_ctor(&locinfo
);
7117 num_put_char_ctor_locinfo(this, &locinfo
, refs
);
7118 _Locinfo_dtor(&locinfo
);
7122 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
7123 /* ??_F?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
7124 DEFINE_THISCALL_WRAPPER(num_put_char_ctor
, 4)
7125 num_put
* __thiscall
num_put_char_ctor(num_put
*this)
7127 return num_put_char_ctor_refs(this, 0);
7130 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UAE@XZ */
7131 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@UEAA@XZ */
7132 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
7133 /* ??1?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
7134 DEFINE_THISCALL_WRAPPER(num_put_char_dtor
, 4)
7135 void __thiscall
num_put_char_dtor(num_put
*this)
7137 TRACE("(%p)\n", this);
7138 locale_facet_dtor(&this->facet
);
7141 DEFINE_THISCALL_WRAPPER(num_put_char_vector_dtor
, 8)
7142 num_put
* __thiscall
num_put_char_vector_dtor(num_put
*this, unsigned int flags
)
7144 TRACE("(%p %x)\n", this, flags
);
7146 /* we have an array, with the number of elements stored before the first object */
7147 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7149 for(i
=*ptr
-1; i
>=0; i
--)
7150 num_put_char_dtor(this+i
);
7151 MSVCRT_operator_delete(ptr
);
7153 num_put_char_dtor(this);
7155 MSVCRT_operator_delete(this);
7161 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7162 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7163 MSVCP_size_t __cdecl
num_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
7165 TRACE("(%p %p)\n", facet
, loc
);
7167 if(facet
&& !*facet
) {
7170 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7172 ERR("Out of memory\n");
7173 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7177 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7178 num_put_char_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7179 _Locinfo_dtor(&locinfo
);
7185 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7186 /* ?_Getcat@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7187 MSVCP_size_t __cdecl
num_put_char__Getcat_old(const locale_facet
**facet
)
7189 return num_put_char__Getcat(facet
, locale_classic());
7192 num_put
* num_put_char_use_facet(const locale
*loc
)
7194 static num_put
*obj
= NULL
;
7197 const locale_facet
*fac
;
7199 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
7200 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_char_id
));
7202 _Lockit_dtor(&lock
);
7203 return (num_put
*)fac
;
7207 _Lockit_dtor(&lock
);
7211 num_put_char__Getcat(&fac
, loc
);
7212 obj
= (num_put
*)fac
;
7213 call_locale_facet__Incref(&obj
->facet
);
7214 locale_facet_register(&obj
->facet
);
7215 _Lockit_dtor(&lock
);
7220 /* ?_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 */
7221 /* ?_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 */
7222 ostreambuf_iterator_char
* __cdecl
num_put_char__Put(const num_put
*this, ostreambuf_iterator_char
*ret
,
7223 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7225 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7227 for(; count
>0; count
--)
7228 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7234 /* ?_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 */
7235 /* ?_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 */
7236 ostreambuf_iterator_char
* __cdecl
num_put_char__Putc(const num_put
*this, ostreambuf_iterator_char
*ret
,
7237 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
)
7239 TRACE("(%p %p %p %ld)\n", this, ret
, ptr
, count
);
7241 for(; count
>0; count
--)
7242 ostreambuf_iterator_char_put(&dest
, *ptr
++);
7248 /* ?_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 */
7249 /* ?_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 */
7250 ostreambuf_iterator_char
* __cdecl
num_put_char__Putgrouped(const num_put
*this, ostreambuf_iterator_char
*ret
,
7251 ostreambuf_iterator_char dest
, const char *ptr
, MSVCP_size_t count
, char delim
)
7253 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
7257 /* ?_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 */
7258 /* ?_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 */
7259 ostreambuf_iterator_char
* __cdecl
num_put_char__Rep(const num_put
*this, ostreambuf_iterator_char
*ret
,
7260 ostreambuf_iterator_char dest
, char c
, MSVCP_size_t count
)
7262 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
7264 for(; count
>0; count
--)
7265 ostreambuf_iterator_char_put(&dest
, c
);
7271 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADDH@Z */
7272 /* ?_Ffmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADDH@Z */
7273 char* __cdecl
num_put_char__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
7275 int type
= fmtfl
& FMTFLAG_floatfield
;
7278 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
7281 if(fmtfl
& FMTFLAG_showpos
)
7283 if(fmtfl
& FMTFLAG_showpoint
)
7290 if(type
== FMTFLAG_fixed
)
7292 else if(type
== FMTFLAG_scientific
)
7293 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
7294 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
7295 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
7297 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
7303 /* ?_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 */
7304 /* ?_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 */
7305 ostreambuf_iterator_char
* __cdecl
num_put_char__Fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7306 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const char *buf
, MSVCP_size_t bef_point
,
7307 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
7309 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
7310 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
7314 /* TODO: This function should be removed when num_put_char__Fput is implemented */
7315 static ostreambuf_iterator_char
* num_put_char_fput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7316 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7318 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7319 basic_string_char grouping_bstr
;
7320 const char *grouping
;
7321 char *p
, sep
= 0, dec_point
= *localeconv()->decimal_point
;
7322 int cur_group
= 0, group_size
= 0;
7323 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7326 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7328 /* Change decimal point */
7329 for(p
=buf
; p
<buf
+count
; p
++) {
7330 if(*p
== dec_point
) {
7331 *p
= numpunct_char_decimal_point(numpunct
);
7337 /* Add separators to number */
7338 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7339 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7340 #if _MSVCP_VER >= 70
7341 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7344 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7346 if(group_size
== grouping
[cur_group
]) {
7348 if(grouping
[cur_group
+1])
7351 memmove(p
+1, p
, buf
+count
-p
);
7356 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7358 /* Display number with padding */
7359 if(count
>= base
->wide
)
7362 pad
= base
->wide
-count
;
7365 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7366 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7369 if(adjustfield
!= FMTFLAG_left
) {
7370 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7373 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7374 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7377 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAPADPADPBDH@Z */
7378 /* ?_Ifmt@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
7379 char* __cdecl
num_put_char__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
7381 int base
= fmtfl
& FMTFLAG_basefield
;
7384 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
7387 if(fmtfl
& FMTFLAG_showpos
)
7389 if(fmtfl
& FMTFLAG_showbase
)
7396 if(base
== FMTFLAG_oct
)
7398 else if(base
== FMTFLAG_hex
)
7399 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
7407 /* ?_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 */
7408 /* ?_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 */
7409 ostreambuf_iterator_char
* __cdecl
num_put_char__Iput(const num_put
*this, ostreambuf_iterator_char
*ret
,
7410 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, char *buf
, MSVCP_size_t count
)
7412 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7413 basic_string_char grouping_bstr
;
7414 const char *grouping
;
7416 int cur_group
= 0, group_size
= 0;
7417 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
7420 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
7422 /* Add separators to number */
7423 numpunct_char_grouping(numpunct
, &grouping_bstr
);
7424 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
7425 #if _MSVCP_VER >= 70
7426 if (grouping
[0]) sep
= numpunct_char_thousands_sep(numpunct
);
7429 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
7431 if(group_size
== grouping
[cur_group
]) {
7433 if(grouping
[cur_group
+1])
7436 memmove(p
+1, p
, buf
+count
-p
);
7441 MSVCP_basic_string_char_dtor(&grouping_bstr
);
7443 /* Display number with padding */
7444 if(count
>= base
->wide
)
7447 pad
= base
->wide
-count
;
7450 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
7451 num_put_char__Putc(this, &dest
, dest
, buf
, 1);
7453 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
7454 num_put_char__Putc(this, &dest
, dest
, buf
, 2);
7457 if(adjustfield
!= FMTFLAG_left
) {
7458 num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7461 num_put_char__Putc(this, &dest
, dest
, buf
, count
);
7462 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7465 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DJ@Z */
7466 /* ?do_put@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DJ@Z */
7467 #if _MSVCP_VER <= 100
7468 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7469 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7470 (this, ret, dest, base, fill, v))
7472 #define call_num_put_char_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_char*, \
7473 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, LONG), \
7474 (this, ret, dest, base, fill, v))
7476 #if _MSVCP_VER != 80
7477 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 28)
7479 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_long
, 32)
7481 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7482 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7484 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7485 char fmt
[7]; /* strlen("%+#lld")+1 */
7487 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7489 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7490 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
7493 /* ?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 */
7494 /* ?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 */
7495 #if _MSVCP_VER != 80
7496 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 28)
7498 DEFINE_THISCALL_WRAPPER(num_put_char_put_long
, 32)
7500 ostreambuf_iterator_char
* __thiscall
num_put_char_put_long(const num_put
*this, ostreambuf_iterator_char
*ret
,
7501 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, LONG v
)
7503 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7504 return call_num_put_char_do_put_long(this, ret
, dest
, base
, fill
, v
);
7507 /* ?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 */
7508 /* ?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 */
7509 #if _MSVCP_VER <= 100
7510 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7511 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7512 (this, ret, dest, base, fill, v))
7514 #define call_num_put_char_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7515 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, ULONG), \
7516 (this, ret, dest, base, fill, v))
7518 #if _MSVCP_VER != 80
7519 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 28)
7521 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ulong
, 32)
7523 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7524 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7526 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7527 char fmt
[7]; /* strlen("%+#lld")+1 */
7529 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7531 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7532 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
7535 /* ?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 */
7536 /* ?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 */
7537 #if _MSVCP_VER != 80
7538 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 28)
7540 DEFINE_THISCALL_WRAPPER(num_put_char_put_ulong
, 32)
7542 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ulong(const num_put
*this, ostreambuf_iterator_char
*ret
,
7543 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, ULONG v
)
7545 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7546 return call_num_put_char_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
7549 static inline unsigned get_precision(const ios_base
*base
)
7551 streamsize ret
= base
->prec
<= 0 && !(base
->fmtfl
& FMTFLAG_fixed
) ? 6 : base
->prec
;
7557 /* ?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 */
7558 /* ?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 */
7559 /* ?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 */
7560 /* ?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 */
7561 #if _MSVCP_VER <= 100
7562 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7563 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7564 (this, ret, dest, base, fill, v))
7565 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_char*, \
7566 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7567 (this, ret, dest, base, fill, v))
7569 #define call_num_put_char_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7570 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7571 (this, ret, dest, base, fill, v))
7572 #define call_num_put_char_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7573 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, double), \
7574 (this, ret, dest, base, fill, v))
7576 #if _MSVCP_VER != 80
7577 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 32)
7579 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_double
, 36)
7581 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7582 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7585 char fmt
[8]; /* strlen("%+#.*lg")+1 */
7589 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7591 num_put_char__Ffmt(this, fmt
, '\0', base
->fmtfl
);
7592 prec
= get_precision(base
);
7593 size
= _scprintf(fmt
, prec
, v
);
7595 /* TODO: don't use dynamic allocation */
7596 tmp
= MSVCRT_operator_new(size
*2);
7598 ERR("Out of memory\n");
7599 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7601 num_put_char_fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
));
7602 MSVCRT_operator_delete(tmp
);
7606 /* ?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 */
7607 /* ?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 */
7608 #if _MSVCP_VER != 80
7609 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 32)
7611 DEFINE_THISCALL_WRAPPER(num_put_char_put_double
, 36)
7613 ostreambuf_iterator_char
* __thiscall
num_put_char_put_double(const num_put
*this, ostreambuf_iterator_char
*ret
,
7614 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7616 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7617 return call_num_put_char_do_put_double(this, ret
, dest
, base
, fill
, v
);
7620 /* ?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 */
7621 /* ?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 */
7622 #if _MSVCP_VER != 80
7623 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 32)
7625 DEFINE_THISCALL_WRAPPER(num_put_char_put_ldouble
, 36)
7627 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ldouble(const num_put
*this, ostreambuf_iterator_char
*ret
,
7628 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, double v
)
7630 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
7631 return call_num_put_char_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
7634 /* ?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 */
7635 /* ?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 */
7636 #if _MSVCP_VER <= 100
7637 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
7638 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7639 (this, ret, dest, base, fill, v))
7641 #define call_num_put_char_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
7642 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const void*), \
7643 (this, ret, dest, base, fill, v))
7645 #if _MSVCP_VER != 80
7646 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 28)
7648 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_ptr
, 32)
7650 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7651 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7653 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
7655 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7657 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
7660 /* ?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 */
7661 /* ?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 */
7662 #if _MSVCP_VER != 80
7663 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 28)
7665 DEFINE_THISCALL_WRAPPER(num_put_char_put_ptr
, 32)
7667 ostreambuf_iterator_char
* __thiscall
num_put_char_put_ptr(const num_put
*this, ostreambuf_iterator_char
*ret
,
7668 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const void *v
)
7670 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
7671 return call_num_put_char_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
7674 /* ?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 */
7675 /* ?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 */
7676 #if _MSVCP_VER <= 100
7677 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_char*, \
7678 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7679 (this, ret, dest, base, fill, v))
7681 #define call_num_put_char_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_char*, \
7682 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, __int64), \
7683 (this, ret, dest, base, fill, v))
7685 #if _MSVCP_VER != 80
7686 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 32)
7688 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_int64
, 36)
7690 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7691 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7693 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7694 char fmt
[7]; /* strlen("%+#lld")+1 */
7696 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7698 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7699 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
7702 /* ?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 */
7703 /* ?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 */
7704 #if _MSVCP_VER != 80
7705 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 32)
7707 DEFINE_THISCALL_WRAPPER(num_put_char_put_int64
, 36)
7709 ostreambuf_iterator_char
* __thiscall
num_put_char_put_int64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7710 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, __int64 v
)
7712 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7713 return call_num_put_char_do_put_int64(this, ret
, dest
, base
, fill
, v
);
7716 /* ?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 */
7717 /* ?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 */
7718 #if _MSVCP_VER <= 100
7719 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_char*, \
7720 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7721 (this, ret, dest, base, fill, v))
7723 #define call_num_put_char_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_char*, \
7724 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, unsigned __int64), \
7725 (this, ret, dest, base, fill, v))
7727 #if _MSVCP_VER != 80
7728 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 32)
7730 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_uint64
, 36)
7732 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7733 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7735 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
7736 char fmt
[7]; /* strlen("%+#lld")+1 */
7738 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7740 return num_put_char__Iput(this, ret
, dest
, base
, fill
, tmp
,
7741 sprintf(tmp
, num_put_char__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
7744 /* ?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 */
7745 /* ?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 */
7746 #if _MSVCP_VER != 80
7747 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 32)
7749 DEFINE_THISCALL_WRAPPER(num_put_char_put_uint64
, 36)
7751 ostreambuf_iterator_char
* __thiscall
num_put_char_put_uint64(const num_put
*this, ostreambuf_iterator_char
*ret
,
7752 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, unsigned __int64 v
)
7754 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
7755 return call_num_put_char_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
7758 /* ?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 */
7759 /* ?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 */
7760 #if _MSVCP_VER <= 100
7761 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_char*, \
7762 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7763 (this, ret, dest, base, fill, v))
7765 #define call_num_put_char_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_char*, \
7766 (const num_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, MSVCP_bool), \
7767 (this, ret, dest, base, fill, v))
7769 #if _MSVCP_VER != 80
7770 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 28)
7772 DEFINE_THISCALL_WRAPPER(num_put_char_do_put_bool
, 32)
7774 ostreambuf_iterator_char
* __thiscall
num_put_char_do_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7775 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7777 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7779 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
7780 numpunct_char
*numpunct
= numpunct_char_use_facet(IOS_LOCALE(base
));
7781 basic_string_char str
;
7782 MSVCP_size_t pad
, len
;
7785 numpunct_char_truename(numpunct
, &str
);
7787 numpunct_char_falsename(numpunct
, &str
);
7789 len
= MSVCP_basic_string_char_length(&str
);
7790 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
7793 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
7794 num_put_char__Rep(this, &dest
, dest
, fill
, pad
);
7797 num_put_char__Putc(this, &dest
, dest
, MSVCP_basic_string_char_c_str(&str
), len
);
7798 MSVCP_basic_string_char_dtor(&str
);
7799 return num_put_char__Rep(this, ret
, dest
, fill
, pad
);
7802 return num_put_char_put_long(this, ret
, dest
, base
, fill
, v
);
7805 /* ?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 */
7806 /* ?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 */
7807 #if _MSVCP_VER != 80
7808 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 28)
7810 DEFINE_THISCALL_WRAPPER(num_put_char_put_bool
, 32)
7812 ostreambuf_iterator_char
* __thiscall
num_put_char_put_bool(const num_put
*this, ostreambuf_iterator_char
*ret
,
7813 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, MSVCP_bool v
)
7815 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
7816 return call_num_put_char_do_put_bool(this, ret
, dest
, base
, fill
, v
);
7819 /* ?id@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
7820 locale_id num_put_wchar_id
= {0};
7821 /* ?id@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
7822 locale_id num_put_short_id
= {0};
7824 /* num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
7825 extern const vtable_ptr MSVCP_num_put_wchar_vtable
;
7826 /* num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
7827 extern const vtable_ptr MSVCP_num_put_short_vtable
;
7829 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
7830 /* ?_Init@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
7831 DEFINE_THISCALL_WRAPPER(num_put_wchar__Init
, 8)
7832 void __thiscall
num_put_wchar__Init(num_put
*this, const _Locinfo
*locinfo
)
7834 TRACE("(%p %p)\n", this, locinfo
);
7835 _Locinfo__Getcvt(locinfo
, &this->cvt
);
7838 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7839 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7840 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_locinfo
, 12)
7841 num_put
* __thiscall
num_put_wchar_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7843 TRACE("(%p %p %ld)\n", this, locinfo
, refs
);
7845 locale_facet_ctor_refs(&this->facet
, refs
);
7846 this->facet
.vtable
= &MSVCP_num_put_wchar_vtable
;
7848 num_put_wchar__Init(this, locinfo
);
7852 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
7853 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
7854 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_locinfo
, 12)
7855 num_put
* __thiscall
num_put_short_ctor_locinfo(num_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
7857 num_put_wchar_ctor_locinfo(this, locinfo
, refs
);
7858 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7862 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
7863 /* ??0?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
7864 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor_refs
, 8)
7865 num_put
* __thiscall
num_put_wchar_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7869 TRACE("(%p %lu)\n", this, refs
);
7871 _Locinfo_ctor(&locinfo
);
7872 num_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
7873 _Locinfo_dtor(&locinfo
);
7877 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
7878 /* ??0?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
7879 DEFINE_THISCALL_WRAPPER(num_put_short_ctor_refs
, 8)
7880 num_put
* __thiscall
num_put_short_ctor_refs(num_put
*this, MSVCP_size_t refs
)
7882 num_put_wchar_ctor_refs(this, refs
);
7883 this->facet
.vtable
= &MSVCP_num_put_short_vtable
;
7887 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
7888 /* ??_F?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
7889 DEFINE_THISCALL_WRAPPER(num_put_wchar_ctor
, 4)
7890 num_put
* __thiscall
num_put_wchar_ctor(num_put
*this)
7892 return num_put_wchar_ctor_refs(this, 0);
7895 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
7896 /* ??_F?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
7897 DEFINE_THISCALL_WRAPPER(num_put_short_ctor
, 4)
7898 num_put
* __thiscall
num_put_short_ctor(num_put
*this)
7900 return num_put_short_ctor_refs(this, 0);
7903 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UAE@XZ */
7904 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@UEAA@XZ */
7905 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
7906 /* ??1?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
7907 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
7908 /* ??1?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
7909 DEFINE_THISCALL_WRAPPER(num_put_wchar_dtor
, 4)
7910 void __thiscall
num_put_wchar_dtor(num_put
*this)
7912 TRACE("(%p)\n", this);
7913 locale_facet_dtor(&this->facet
);
7916 DEFINE_THISCALL_WRAPPER(num_put_wchar_vector_dtor
, 8)
7917 num_put
* __thiscall
num_put_wchar_vector_dtor(num_put
*this, unsigned int flags
)
7919 TRACE("(%p %x)\n", this, flags
);
7921 /* we have an array, with the number of elements stored before the first object */
7922 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
7924 for(i
=*ptr
-1; i
>=0; i
--)
7925 num_put_wchar_dtor(this+i
);
7926 MSVCRT_operator_delete(ptr
);
7928 num_put_wchar_dtor(this);
7930 MSVCRT_operator_delete(this);
7936 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7937 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7938 MSVCP_size_t __cdecl
num_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
7940 TRACE("(%p %p)\n", facet
, loc
);
7942 if(facet
&& !*facet
) {
7945 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7947 ERR("Out of memory\n");
7948 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7952 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7953 num_put_wchar_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7954 _Locinfo_dtor(&locinfo
);
7960 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7961 /* ?_Getcat@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7962 MSVCP_size_t __cdecl
num_put_wchar__Getcat_old(const locale_facet
**facet
)
7964 return num_put_wchar__Getcat(facet
, locale_classic());
7967 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
7968 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
7969 MSVCP_size_t __cdecl
num_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
7971 TRACE("(%p %p)\n", facet
, loc
);
7973 if(facet
&& !*facet
) {
7976 *facet
= MSVCRT_operator_new(sizeof(num_put
));
7978 ERR("Out of memory\n");
7979 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
7983 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
7984 num_put_short_ctor_locinfo((num_put
*)*facet
, &locinfo
, 0);
7985 _Locinfo_dtor(&locinfo
);
7991 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
7992 /* ?_Getcat@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
7993 MSVCP_size_t __cdecl
num_put_short__Getcat_old(const locale_facet
**facet
)
7995 return num_put_short__Getcat(facet
, locale_classic());
7998 num_put
* num_put_wchar_use_facet(const locale
*loc
)
8000 static num_put
*obj
= NULL
;
8003 const locale_facet
*fac
;
8005 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8006 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_wchar_id
));
8008 _Lockit_dtor(&lock
);
8009 return (num_put
*)fac
;
8013 _Lockit_dtor(&lock
);
8017 num_put_wchar__Getcat(&fac
, loc
);
8018 obj
= (num_put
*)fac
;
8019 call_locale_facet__Incref(&obj
->facet
);
8020 locale_facet_register(&obj
->facet
);
8021 _Lockit_dtor(&lock
);
8026 num_put
* num_put_short_use_facet(const locale
*loc
)
8028 static num_put
*obj
= NULL
;
8031 const locale_facet
*fac
;
8033 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
8034 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&num_put_short_id
));
8036 _Lockit_dtor(&lock
);
8037 return (num_put
*)fac
;
8041 _Lockit_dtor(&lock
);
8045 num_put_short__Getcat(&fac
, loc
);
8046 obj
= (num_put
*)fac
;
8047 call_locale_facet__Incref(&obj
->facet
);
8048 locale_facet_register(&obj
->facet
);
8049 _Lockit_dtor(&lock
);
8054 /* ?_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 */
8055 /* ?_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 */
8056 /* ?_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 */
8057 /* ?_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 */
8058 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Put(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8059 ostreambuf_iterator_wchar dest
, const wchar_t *ptr
, MSVCP_size_t count
)
8061 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_wn(ptr
, count
), count
);
8063 for(; count
>0; count
--)
8064 ostreambuf_iterator_wchar_put(&dest
, *ptr
++);
8070 /* ?_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 */
8071 /* ?_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 */
8072 /* ?_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 */
8073 /* ?_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 */
8074 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putc(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8075 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
)
8080 TRACE("(%p %p %s %ld)\n", this, ret
, debugstr_an(ptr
, count
), count
);
8082 for(; count
>0; count
--) {
8083 if(_Mbrtowc(&ch
, ptr
++, 1, &state
, &this->cvt
) == 1)
8084 ostreambuf_iterator_wchar_put(&dest
, ch
);
8091 /* ?_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 */
8092 /* ?_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 */
8093 /* ?_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 */
8094 /* ?_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 */
8095 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Putgrouped(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8096 ostreambuf_iterator_wchar dest
, const char *ptr
, MSVCP_size_t count
, wchar_t delim
)
8098 FIXME("(%p %p %p %ld %d) stub\n", this, ret
, ptr
, count
, delim
);
8102 /* ?_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 */
8103 /* ?_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 */
8104 /* ?_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 */
8105 /* ?_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 */
8106 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Rep(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8107 ostreambuf_iterator_wchar dest
, wchar_t c
, MSVCP_size_t count
)
8109 TRACE("(%p %p %d %ld)\n", this, ret
, c
, count
);
8111 for(; count
>0; count
--)
8112 ostreambuf_iterator_wchar_put(&dest
, c
);
8118 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADDH@Z */
8119 /* ?_Ffmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8120 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADDH@Z */
8121 /* ?_Ffmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADDH@Z */
8122 char* __cdecl
num_put_wchar__Ffmt(const num_put
*this, char *fmt
, char spec
, int fmtfl
)
8124 int type
= fmtfl
& FMTFLAG_floatfield
;
8127 TRACE("(%p %p %d %d)\n", this, fmt
, spec
, fmtfl
);
8130 if(fmtfl
& FMTFLAG_showpos
)
8132 if(fmtfl
& FMTFLAG_showbase
)
8139 if(type
== FMTFLAG_fixed
)
8141 else if(type
== FMTFLAG_scientific
)
8142 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'E' : 'e';
8143 else if(type
== (FMTFLAG_fixed
|FMTFLAG_scientific
))
8144 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'A' : 'a';
8146 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'G' : 'g';
8152 /* ?_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 */
8153 /* ?_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 */
8154 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8155 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8156 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8158 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8159 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8163 /* ?_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 */
8164 /* ?_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 */
8165 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8166 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const char *buf
, MSVCP_size_t bef_point
,
8167 MSVCP_size_t aft_point
, MSVCP_size_t trailing
, MSVCP_size_t count
)
8169 FIXME("(%p %p %p %d %p %ld %ld %ld %ld) stub\n", this, ret
, base
,
8170 fill
, buf
, bef_point
, aft_point
, trailing
, count
);
8174 /* TODO: This function should be removed when num_put_wchar__Fput is implemented */
8175 static ostreambuf_iterator_wchar
* num_put__fput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8176 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8177 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8179 basic_string_char grouping_bstr
;
8180 const char *grouping
;
8181 char *p
, dec_point
= *localeconv()->decimal_point
;
8183 int cur_group
= 0, group_size
= 0;
8184 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8185 MSVCP_size_t i
, pad
;
8187 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8189 for(p
=buf
; p
<buf
+count
; p
++) {
8195 /* Add separators to number */
8196 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8197 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8198 #if _MSVCP_VER >= 70
8199 if (grouping
[0]) sep
= numpunct_wchar_thousands_sep(numpunct
);
8202 for(; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8204 if(group_size
== grouping
[cur_group
]) {
8206 if(grouping
[cur_group
+1])
8209 memmove(p
+1, p
, buf
+count
-p
);
8210 *p
= '\0'; /* mark thousands separator positions */
8214 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8216 /* Display number with padding */
8217 if(count
>= base
->wide
)
8220 pad
= base
->wide
-count
;
8223 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8224 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8227 if(adjustfield
!= FMTFLAG_left
) {
8228 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8232 for(i
=0; i
<count
; i
++) {
8233 if(buf
[i
] == dec_point
)
8234 num_put_wchar__Rep(this, &dest
, dest
, numpunct_wchar_decimal_point(numpunct
), 1);
8236 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8238 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8241 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8244 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@ABAPADPADPBDH@Z */
8245 /* ?_Ifmt@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8246 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABAPADPADPBDH@Z */
8247 /* ?_Ifmt@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@AEBAPEADPEADPEBDH@Z */
8248 char* __cdecl
num_put_wchar__Ifmt(const num_put
*this, char *fmt
, const char *spec
, int fmtfl
)
8250 int base
= fmtfl
& FMTFLAG_basefield
;
8253 TRACE("(%p %p %p %d)\n", this, fmt
, spec
, fmtfl
);
8256 if(fmtfl
& FMTFLAG_showpos
)
8258 if(fmtfl
& FMTFLAG_showbase
)
8265 if(base
== FMTFLAG_oct
)
8267 else if(base
== FMTFLAG_hex
)
8268 *p
++ = (fmtfl
& FMTFLAG_uppercase
) ? 'X' : 'x';
8276 static ostreambuf_iterator_wchar
* num_put__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8277 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
,
8278 MSVCP_size_t count
, numpunct_wchar
*numpunct
)
8280 basic_string_char grouping_bstr
;
8281 const char *grouping
;
8284 int cur_group
= 0, group_size
= 0;
8285 int adjustfield
= base
->fmtfl
& FMTFLAG_adjustfield
;
8286 MSVCP_size_t i
, pad
;
8288 TRACE("(%p %p %p %d %s %ld)\n", this, ret
, base
, fill
, buf
, count
);
8290 /* Add separators to number */
8291 numpunct_wchar_grouping(numpunct
, &grouping_bstr
);
8292 grouping
= MSVCP_basic_string_char_c_str(&grouping_bstr
);
8293 sep
= grouping
[0] ? numpunct_wchar_thousands_sep(numpunct
) : '\0';
8295 for(p
=buf
+count
-1; p
>buf
&& sep
&& grouping
[cur_group
]!=CHAR_MAX
; p
--) {
8297 if(group_size
== grouping
[cur_group
]) {
8299 if(grouping
[cur_group
+1])
8302 memmove(p
+1, p
, buf
+count
-p
);
8303 *p
= '\0'; /* mark thousands separator positions */
8307 MSVCP_basic_string_char_dtor(&grouping_bstr
);
8309 /* Display number with padding */
8310 if(count
>= base
->wide
)
8313 pad
= base
->wide
-count
;
8316 if((adjustfield
& FMTFLAG_internal
) && (buf
[0]=='-' || buf
[0]=='+')) {
8317 num_put_wchar__Putc(this, &dest
, dest
, buf
, 1);
8319 }else if((adjustfield
& FMTFLAG_internal
) && (buf
[1]=='x' || buf
[1]=='X')) {
8320 num_put_wchar__Putc(this, &dest
, dest
, buf
, 2);
8323 if(adjustfield
!= FMTFLAG_left
) {
8324 num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8328 for(i
=0; i
<count
; i
++) {
8330 num_put_wchar__Rep(this, &dest
, dest
, sep
, 1);
8332 num_put_wchar__Putc(this, &dest
, dest
, buf
+i
, 1);
8335 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8338 /* ?_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 */
8339 /* ?_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 */
8340 ostreambuf_iterator_wchar
* __cdecl
num_put_wchar__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8341 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8343 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8346 /* ?_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 */
8347 /* ?_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 */
8348 ostreambuf_iterator_wchar
* __cdecl
num_put_short__Iput(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8349 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, char *buf
, MSVCP_size_t count
)
8351 return num_put__Iput(this, ret
, dest
, base
, fill
, buf
, count
, numpunct_short_use_facet(IOS_LOCALE(base
)));
8354 /* ?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 */
8355 /* ?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 */
8356 #if _MSVCP_VER <= 100
8357 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8358 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8359 (this, ret, dest, base, fill, v))
8361 #define call_num_put_wchar_do_put_long(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 36, ostreambuf_iterator_wchar*, \
8362 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG), \
8363 (this, ret, dest, base, fill, v))
8365 #if _MSVCP_VER != 80
8366 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 28)
8368 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_long
, 32)
8370 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8371 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8373 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8374 char fmt
[7]; /* strlen("%+#lld")+1 */
8376 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8378 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8379 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8382 /* ?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 */
8383 /* ?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 */
8384 #if _MSVCP_VER != 80
8385 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 28)
8387 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_long
, 32)
8389 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8390 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8392 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8393 char fmt
[7]; /* strlen("%+#lld")+1 */
8395 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8397 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8398 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "ld", base
->fmtfl
), v
));
8401 /* ?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 */
8402 /* ?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 */
8403 /* ?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 */
8404 /* ?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 */
8405 #if _MSVCP_VER != 80
8406 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 28)
8408 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_long
, 32)
8410 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_long(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8411 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, LONG v
)
8413 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8414 return call_num_put_wchar_do_put_long(this, ret
, dest
, base
, fill
, v
);
8417 /* ?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 */
8418 /* ?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 */
8419 #if _MSVCP_VER <= 100
8420 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8421 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8422 (this, ret, dest, base, fill, v))
8424 #define call_num_put_wchar_do_put_ulong(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8425 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG), \
8426 (this, ret, dest, base, fill, v))
8428 #if _MSVCP_VER != 80
8429 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 28)
8431 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ulong
, 32)
8433 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8434 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8436 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8437 char fmt
[7]; /* strlen("%+#lld")+1 */
8439 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8441 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8442 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8445 /* ?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 */
8446 /* ?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 */
8447 #if _MSVCP_VER != 80
8448 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 28)
8450 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ulong
, 32)
8452 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8453 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8455 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8456 char fmt
[7]; /* strlen("%+#lld")+1 */
8458 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8460 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8461 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lu", base
->fmtfl
), v
));
8464 /* ?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 */
8465 /* ?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 */
8466 /* ?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 */
8467 /* ?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 */
8468 #if _MSVCP_VER != 80
8469 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 28)
8471 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ulong
, 32)
8473 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ulong(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8474 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, ULONG v
)
8476 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8477 return call_num_put_wchar_do_put_ulong(this, ret
, dest
, base
, fill
, v
);
8480 /* ?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 */
8481 /* ?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 */
8482 /* ?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 */
8483 /* ?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 */
8484 #if _MSVCP_VER <= 100
8485 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8486 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8487 (this, ret, dest, base, fill, v))
8488 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 8, ostreambuf_iterator_wchar*, \
8489 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8490 (this, ret, dest, base, fill, v))
8492 #define call_num_put_wchar_do_put_double(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8493 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8494 (this, ret, dest, base, fill, v))
8495 #define call_num_put_wchar_do_put_ldouble(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8496 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, double), \
8497 (this, ret, dest, base, fill, v))
8499 #if _MSVCP_VER != 80
8500 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 32)
8502 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_double
, 36)
8504 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8505 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8508 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8512 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8514 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8515 prec
= get_precision(base
);
8516 size
= _scprintf(fmt
, prec
, v
);
8518 /* TODO: don't use dynamic allocation */
8519 tmp
= MSVCRT_operator_new(size
*2);
8521 ERR("Out of memory\n");
8522 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8524 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8525 numpunct_wchar_use_facet(IOS_LOCALE(base
)));
8526 MSVCRT_operator_delete(tmp
);
8530 /* ?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 */
8531 /* ?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 */
8532 /* ?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 */
8533 /* ?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 */
8534 #if _MSVCP_VER != 80
8535 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 32)
8537 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_double
, 36)
8539 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8540 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8543 char fmt
[8]; /* strlen("%+#.*lg")+1 */
8547 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8549 num_put_wchar__Ffmt(this, fmt
, '\0', base
->fmtfl
);
8550 prec
= get_precision(base
);
8551 size
= _scprintf(fmt
, prec
, v
);
8553 /* TODO: don't use dynamic allocation */
8554 tmp
= MSVCRT_operator_new(size
*2);
8556 ERR("Out of memory\n");
8557 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8559 num_put__fput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, fmt
, prec
, v
),
8560 numpunct_short_use_facet(IOS_LOCALE(base
)));
8561 MSVCRT_operator_delete(tmp
);
8565 /* ?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 */
8566 /* ?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 */
8567 /* ?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 */
8568 /* ?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 */
8569 #if _MSVCP_VER != 80
8570 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 32)
8572 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_double
, 36)
8574 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_double(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8575 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8577 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8578 return call_num_put_wchar_do_put_double(this, ret
, dest
, base
, fill
, v
);
8581 /* ?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 */
8582 /* ?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 */
8583 /* ?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 */
8584 /* ?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 */
8585 #if _MSVCP_VER != 80
8586 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 32)
8588 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ldouble
, 36)
8590 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ldouble(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8591 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, double v
)
8593 TRACE("(%p %p %p %d %lf)\n", this, ret
, base
, fill
, v
);
8594 return call_num_put_wchar_do_put_ldouble(this, ret
, dest
, base
, fill
, v
);
8597 /* ?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 */
8598 /* ?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 */
8599 #if _MSVCP_VER <= 100
8600 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
8601 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8602 (this, ret, dest, base, fill, v))
8604 #define call_num_put_wchar_do_put_ptr(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
8605 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*), \
8606 (this, ret, dest, base, fill, v))
8608 #if _MSVCP_VER != 80
8609 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 28)
8611 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_ptr
, 32)
8613 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8614 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8616 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8618 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8620 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8623 /* ?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 */
8624 /* ?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 */
8625 #if _MSVCP_VER != 80
8626 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 28)
8628 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_ptr
, 32)
8630 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8631 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8633 char tmp
[17]; /* 8(16^8==2^64)*2(separators beetwen every digit) + 1 */
8635 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8637 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
, sprintf(tmp
, "%p", v
));
8640 /* ?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 */
8641 /* ?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 */
8642 /* ?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 */
8643 /* ?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 */
8644 #if _MSVCP_VER != 80
8645 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 28)
8647 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_ptr
, 32)
8649 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_ptr(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8650 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, const void *v
)
8652 TRACE("(%p %p %p %d %p)\n", this, ret
, base
, fill
, v
);
8653 return call_num_put_wchar_do_put_ptr(this, ret
, dest
, base
, fill
, v
);
8656 /* ?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 */
8657 /* ?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 */
8658 #if _MSVCP_VER <= 100
8659 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 20, ostreambuf_iterator_wchar*, \
8660 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8661 (this, ret, dest, base, fill, v))
8663 #define call_num_put_wchar_do_put_int64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 28, ostreambuf_iterator_wchar*, \
8664 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64), \
8665 (this, ret, dest, base, fill, v))
8667 #if _MSVCP_VER != 80
8668 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 32)
8670 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_int64
, 36)
8672 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8673 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8675 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8676 char fmt
[7]; /* strlen("%+#lld")+1 */
8678 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8680 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8681 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8684 /* ?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 */
8685 /* ?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 */
8686 #if _MSVCP_VER != 80
8687 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 32)
8689 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_int64
, 36)
8691 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8692 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8694 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8695 char fmt
[7]; /* strlen("%+#lld")+1 */
8697 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8699 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8700 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "lld", base
->fmtfl
), v
));
8703 /* ?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 */
8704 /* ?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 */
8705 /* ?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 */
8706 /* ?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 */
8707 #if _MSVCP_VER != 80
8708 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 32)
8710 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_int64
, 36)
8712 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_int64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8713 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, __int64 v
)
8715 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8716 return call_num_put_wchar_do_put_int64(this, ret
, dest
, base
, fill
, v
);
8719 /* ?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 */
8720 /* ?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 */
8721 #if _MSVCP_VER <= 100
8722 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 16, ostreambuf_iterator_wchar*, \
8723 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8724 (this, ret, dest, base, fill, v))
8726 #define call_num_put_wchar_do_put_uint64(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 24, ostreambuf_iterator_wchar*, \
8727 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64), \
8728 (this, ret, dest, base, fill, v))
8730 #if _MSVCP_VER != 80
8731 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 32)
8733 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_uint64
, 36)
8735 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8736 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8738 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8739 char fmt
[7]; /* strlen("%+#lld")+1 */
8741 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8743 return num_put_wchar__Iput(this, ret
, dest
, base
, fill
, tmp
,
8744 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8747 /* ?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 */
8748 /* ?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 */
8749 #if _MSVCP_VER != 80
8750 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 32)
8752 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_uint64
, 36)
8754 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8755 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8757 char tmp
[48]; /* 22(8^22>2^64)*2(separators beetwen every digit) + 3(strlen("+0x"))+1 */
8758 char fmt
[7]; /* strlen("%+#lld")+1 */
8760 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8762 return num_put_short__Iput(this, ret
, dest
, base
, fill
, tmp
,
8763 sprintf(tmp
, num_put_wchar__Ifmt(this, fmt
, "llu", base
->fmtfl
), v
));
8766 /* ?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 */
8767 /* ?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 */
8768 /* ?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 */
8769 /* ?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 */
8770 #if _MSVCP_VER != 80
8771 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 32)
8773 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_uint64
, 36)
8775 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_uint64(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8776 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, unsigned __int64 v
)
8778 TRACE("(%p %p %p %d)\n", this, ret
, base
, fill
);
8779 return call_num_put_wchar_do_put_uint64(this, ret
, dest
, base
, fill
, v
);
8782 /* ?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 */
8783 /* ?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 */
8784 #if _MSVCP_VER <= 100
8785 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 32, ostreambuf_iterator_wchar*, \
8786 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8787 (this, ret, dest, base, fill, v))
8789 #define call_num_put_wchar_do_put_bool(this, ret, dest, base, fill, v) CALL_VTBL_FUNC(this, 40, ostreambuf_iterator_wchar*, \
8790 (const num_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool), \
8791 (this, ret, dest, base, fill, v))
8793 #if _MSVCP_VER != 80
8794 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 28)
8796 DEFINE_THISCALL_WRAPPER(num_put_wchar_do_put_bool
, 32)
8798 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8799 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8801 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8803 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8804 numpunct_wchar
*numpunct
= numpunct_wchar_use_facet(IOS_LOCALE(base
));
8805 basic_string_wchar str
;
8806 MSVCP_size_t pad
, len
;
8809 numpunct_wchar_truename(numpunct
, &str
);
8811 numpunct_wchar_falsename(numpunct
, &str
);
8813 len
= MSVCP_basic_string_wchar_length(&str
);
8814 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8817 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8818 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8821 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8822 MSVCP_basic_string_wchar_dtor(&str
);
8823 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8826 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8829 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AAVios_base@2@G_N@Z */
8830 /* ?do_put@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@AEAVios_base@2@G_N@Z */
8831 #if _MSVCP_VER != 80
8832 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 28)
8834 DEFINE_THISCALL_WRAPPER(num_put_short_do_put_bool
, 32)
8836 ostreambuf_iterator_wchar
* __thiscall
num_put_short_do_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8837 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8839 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8841 if(base
->fmtfl
& FMTFLAG_boolalpha
) {
8842 numpunct_wchar
*numpunct
= numpunct_short_use_facet(IOS_LOCALE(base
));
8843 basic_string_wchar str
;
8844 MSVCP_size_t pad
, len
;
8847 numpunct_wchar_truename(numpunct
, &str
);
8849 numpunct_wchar_falsename(numpunct
, &str
);
8851 len
= MSVCP_basic_string_wchar_length(&str
);
8852 pad
= (len
>base
->wide
? 0 : base
->wide
-len
);
8855 if((base
->fmtfl
& FMTFLAG_adjustfield
) != FMTFLAG_left
) {
8856 num_put_wchar__Rep(this, &dest
, dest
, fill
, pad
);
8859 num_put_wchar__Put(this, &dest
, dest
, MSVCP_basic_string_wchar_c_str(&str
), len
);
8860 MSVCP_basic_string_wchar_dtor(&str
);
8861 return num_put_wchar__Rep(this, ret
, dest
, fill
, pad
);
8864 return num_put_wchar_put_long(this, ret
, dest
, base
, fill
, v
);
8867 /* ?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 */
8868 /* ?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 */
8869 /* ?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 */
8870 /* ?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 */
8871 #if _MSVCP_VER != 80
8872 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 28)
8874 DEFINE_THISCALL_WRAPPER(num_put_wchar_put_bool
, 32)
8876 ostreambuf_iterator_wchar
* __thiscall
num_put_wchar_put_bool(const num_put
*this, ostreambuf_iterator_wchar
*ret
,
8877 ostreambuf_iterator_wchar dest
, ios_base
*base
, wchar_t fill
, MSVCP_bool v
)
8879 TRACE("(%p %p %p %d %d)\n", this, ret
, base
, fill
, v
);
8880 return call_num_put_wchar_do_put_bool(this, ret
, dest
, base
, fill
, v
);
8883 /* ?id@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
8884 locale_id time_put_char_id
= {0};
8886 /* ??_7?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
8887 extern const vtable_ptr MSVCP_time_put_char_vtable
;
8889 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
8890 /* ?_Init@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
8891 DEFINE_THISCALL_WRAPPER(time_put_char__Init
, 8)
8892 void __thiscall
time_put_char__Init(time_put
*this, const _Locinfo
*locinfo
)
8894 TRACE("(%p %p)\n", this, locinfo
);
8895 _Locinfo__Gettnames(locinfo
, &this->time
);
8896 _Locinfo__Getcvt(locinfo
, &this->cvt
);
8899 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
8900 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
8901 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_locinfo
, 12)
8902 time_put
* __thiscall
time_put_char_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
8904 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
8905 locale_facet_ctor_refs(&this->facet
, refs
);
8906 this->facet
.vtable
= &MSVCP_time_put_char_vtable
;
8907 time_put_char__Init(this, locinfo
);
8911 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
8912 /* ??0?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
8913 DEFINE_THISCALL_WRAPPER(time_put_char_ctor_refs
, 8)
8914 time_put
* __thiscall
time_put_char_ctor_refs(time_put
*this, MSVCP_size_t refs
)
8918 TRACE("(%p %lu)\n", this, refs
);
8920 _Locinfo_ctor(&locinfo
);
8921 time_put_char_ctor_locinfo(this, &locinfo
, refs
);
8922 _Locinfo_dtor(&locinfo
);
8926 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
8927 /* ??_F?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
8928 DEFINE_THISCALL_WRAPPER(time_put_char_ctor
, 4)
8929 time_put
* __thiscall
time_put_char_ctor(time_put
*this)
8931 return time_put_char_ctor_refs(this, 0);
8934 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
8935 /* ??1?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
8936 DEFINE_THISCALL_WRAPPER(time_put_char_dtor
, 4)
8937 void __thiscall
time_put_char_dtor(time_put
*this)
8939 TRACE("(%p)\n", this);
8940 _Timevec_dtor(&this->time
);
8943 DEFINE_THISCALL_WRAPPER(time_put_char_vector_dtor
, 8)
8944 time_put
* __thiscall
time_put_char_vector_dtor(time_put
*this, unsigned int flags
)
8946 TRACE("(%p %x)\n", this, flags
);
8948 /* we have an array, with the number of elements stored before the first object */
8949 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
8951 for(i
=*ptr
-1; i
>=0; i
--)
8952 time_put_char_dtor(this+i
);
8953 MSVCRT_operator_delete(ptr
);
8955 time_put_char_dtor(this);
8957 MSVCRT_operator_delete(this);
8963 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
8964 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
8965 MSVCP_size_t __cdecl
time_put_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
8967 TRACE("(%p %p)\n", facet
, loc
);
8969 if(facet
&& !*facet
) {
8972 *facet
= MSVCRT_operator_new(sizeof(time_put
));
8974 ERR("Out of memory\n");
8975 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
8979 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
8980 time_put_char_ctor_locinfo((time_put
*)*facet
, &locinfo
, 0);
8981 _Locinfo_dtor(&locinfo
);
8987 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
8988 /* ?_Getcat@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
8989 MSVCP_size_t __cdecl
time_put_char__Getcat_old(const locale_facet
**facet
)
8991 return time_put_char__Getcat(facet
, locale_classic());
8994 static time_put
* time_put_char_use_facet(const locale
*loc
)
8996 static time_put
*obj
= NULL
;
8999 const locale_facet
*fac
;
9001 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9002 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_char_id
));
9004 _Lockit_dtor(&lock
);
9005 return (time_put
*)fac
;
9009 _Lockit_dtor(&lock
);
9013 time_put_char__Getcat(&fac
, loc
);
9014 obj
= (time_put
*)fac
;
9015 call_locale_facet__Incref(&obj
->facet
);
9016 locale_facet_register(&obj
->facet
);
9017 _Lockit_dtor(&lock
);
9022 #if _MSVCP_VER >= 70
9024 /* ?do_put@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBUtm@@DD@Z */
9025 /* ?do_put@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBUtm@@DD@Z */
9026 #if _MSVCP_VER != 80
9027 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 36)
9029 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 40)
9031 #if _MSVCP_VER <= 100
9032 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9033 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9034 (this, ret, dest, base, fill, t, spec, mod))
9036 #define call_time_put_char_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_char*, \
9037 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, char, const struct tm*, char, char), \
9038 (this, ret, dest, base, fill, t, spec, mod))
9040 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9041 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9043 char buf
[64], fmt
[4], *p
= fmt
;
9044 MSVCP_size_t i
, len
;
9046 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9054 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9055 for(i
=0; i
<len
; i
++)
9056 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9062 /* ?put@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AAVios_base@2@DPBUtm@@DD@Z */
9063 /* ?put@?$time_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@AEAVios_base@2@DPEBUtm@@DD@Z */
9064 #if _MSVCP_VER != 80
9065 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 36)
9067 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 40)
9069 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9070 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, char spec
, char mod
)
9072 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9073 return call_time_put_char_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9076 /* ?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 */
9077 /* ?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 */
9078 #if _MSVCP_VER != 80
9079 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 36)
9081 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 40)
9083 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9084 ostreambuf_iterator_char dest
, ios_base
*base
, char fill
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9086 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_an(pat
, pat_end
-pat
));
9088 while(pat
< pat_end
) {
9090 ostreambuf_iterator_char_put(&dest
, *pat
++);
9091 }else if(++pat
== pat_end
) {
9092 ostreambuf_iterator_char_put(&dest
, '%');
9093 }else if(*pat
=='#' && pat
+1==pat_end
) {
9094 ostreambuf_iterator_char_put(&dest
, '%');
9095 ostreambuf_iterator_char_put(&dest
, *pat
++);
9106 time_put_char_put(this, &dest
, dest
, base
, fill
, t
, *pat
++, mod
);
9114 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9116 /* ?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 */
9117 /* ?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 */
9118 DEFINE_THISCALL_WRAPPER(time_put_char_do_put
, 32)
9119 #define call_time_put_char_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_char*, \
9120 (const time_put*, ostreambuf_iterator_char*, ostreambuf_iterator_char, ios_base*, const struct tm*, char, char), \
9121 (this, ret, dest, base, t, spec, mod))
9122 ostreambuf_iterator_char
* __thiscall
time_put_char_do_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9123 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9125 char buf
[64], fmt
[4], *p
= fmt
;
9126 MSVCP_size_t i
, len
;
9128 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9136 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9137 for(i
=0; i
<len
; i
++)
9138 ostreambuf_iterator_char_put(&dest
, buf
[i
]);
9144 /* ?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 */
9145 /* ?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 */
9146 DEFINE_THISCALL_WRAPPER(time_put_char_put
, 32)
9147 ostreambuf_iterator_char
* __thiscall
time_put_char_put(const time_put
*this, ostreambuf_iterator_char
*ret
,
9148 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, char spec
, char mod
)
9150 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9151 return call_time_put_char_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9154 /* ?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 */
9155 /* ?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 */
9156 DEFINE_THISCALL_WRAPPER(time_put_char_put_format
, 32)
9157 ostreambuf_iterator_char
* __thiscall
time_put_char_put_format(const time_put
*this, ostreambuf_iterator_char
*ret
,
9158 ostreambuf_iterator_char dest
, ios_base
*base
, const struct tm
*t
, const char *pat
, const char *pat_end
)
9160 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_an(pat
, pat_end
-pat
));
9162 while(pat
< pat_end
) {
9164 ostreambuf_iterator_char_put(&dest
, *pat
++);
9165 }else if(++pat
== pat_end
) {
9166 ostreambuf_iterator_char_put(&dest
, '%');
9167 }else if(*pat
=='#' && pat
+1==pat_end
) {
9168 ostreambuf_iterator_char_put(&dest
, '%');
9169 ostreambuf_iterator_char_put(&dest
, *pat
++);
9180 time_put_char_put(this, &dest
, dest
, base
, t
, *pat
++, mod
);
9188 #endif /* MSVCP_VER >= 70 */
9190 /* ?id@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */
9191 locale_id time_put_wchar_id
= {0};
9192 /* ?id@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */
9193 locale_id time_put_short_id
= {0};
9195 /* ??_7?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@6B@ */
9196 extern const vtable_ptr MSVCP_time_put_wchar_vtable
;
9197 /* ??_7?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@6B@ */
9198 extern const vtable_ptr MSVCP_time_put_short_vtable
;
9200 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9201 /* ?_Init@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9202 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9203 /* ?_Init@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9204 DEFINE_THISCALL_WRAPPER(time_put_wchar__Init
, 8)
9205 void __thiscall
time_put_wchar__Init(time_put
*this, const _Locinfo
*locinfo
)
9207 TRACE("(%p %p)\n", this, locinfo
);
9208 _Locinfo__Gettnames(locinfo
, &this->time
);
9209 _Locinfo__Getcvt(locinfo
, &this->cvt
);
9212 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9213 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9214 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_locinfo
, 12)
9215 time_put
* __thiscall
time_put_wchar_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9217 TRACE("(%p %p %lu)\n", this, locinfo
, refs
);
9218 locale_facet_ctor_refs(&this->facet
, refs
);
9219 this->facet
.vtable
= &MSVCP_time_put_wchar_vtable
;
9220 time_put_wchar__Init(this, locinfo
);
9224 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9225 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9226 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_locinfo
, 12)
9227 time_put
* __thiscall
time_put_short_ctor_locinfo(time_put
*this, const _Locinfo
*locinfo
, MSVCP_size_t refs
)
9229 time_put_wchar_ctor_locinfo(this, locinfo
, refs
);
9230 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9234 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IAE@PBDI@Z */
9235 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@IEAA@PEBD_K@Z */
9236 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_name
, 12)
9237 time_put
* __thiscall
time_put_wchar_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9241 TRACE("(%p %s %lu)\n", this, debugstr_a(name
), refs
);
9243 _Locinfo_ctor_cstr(&locinfo
, name
);
9244 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9245 _Locinfo_dtor(&locinfo
);
9249 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IAE@PBDI@Z */
9250 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@IEAA@PEBD_K@Z */
9251 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_name
, 12)
9252 time_put
* __thiscall
time_put_short_ctor_name(time_put
*this, const char *name
, MSVCP_size_t refs
)
9254 time_put_wchar_ctor_name(this, name
, refs
);
9255 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9259 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAE@I@Z */
9260 /* ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z */
9261 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor_refs
, 8)
9262 time_put
* __thiscall
time_put_wchar_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9266 TRACE("(%p %lu)\n", this, refs
);
9268 _Locinfo_ctor(&locinfo
);
9269 time_put_wchar_ctor_locinfo(this, &locinfo
, refs
);
9270 _Locinfo_dtor(&locinfo
);
9274 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAE@I@Z */
9275 /* ??0?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAA@_K@Z */
9276 DEFINE_THISCALL_WRAPPER(time_put_short_ctor_refs
, 8)
9277 time_put
* __thiscall
time_put_short_ctor_refs(time_put
*this, MSVCP_size_t refs
)
9279 time_put_wchar_ctor_refs(this, refs
);
9280 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9284 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QAEXXZ */
9285 /* ??_F?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAAXXZ */
9286 DEFINE_THISCALL_WRAPPER(time_put_wchar_ctor
, 4)
9287 time_put
* __thiscall
time_put_wchar_ctor(time_put
*this)
9289 return time_put_wchar_ctor_refs(this, 0);
9292 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QAEXXZ */
9293 /* ??_F?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@QEAAXXZ */
9294 DEFINE_THISCALL_WRAPPER(time_put_short_ctor
, 4)
9295 time_put
* __thiscall
time_put_short_ctor(time_put
*this)
9297 time_put_wchar_ctor(this);
9298 this->facet
.vtable
= &MSVCP_time_put_short_vtable
;
9302 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MAE@XZ */
9303 /* ??1?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MEAA@XZ */
9304 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MAE@XZ */
9305 /* ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ */
9306 DEFINE_THISCALL_WRAPPER(time_put_wchar_dtor
, 4)
9307 void __thiscall
time_put_wchar_dtor(time_put
*this)
9309 TRACE("(%p)\n", this);
9310 _Timevec_dtor(&this->time
);
9313 DEFINE_THISCALL_WRAPPER(time_put_wchar_vector_dtor
, 8)
9314 time_put
* __thiscall
time_put_wchar_vector_dtor(time_put
*this, unsigned int flags
)
9316 TRACE("(%p %x)\n", this, flags
);
9318 /* we have an array, with the number of elements stored before the first object */
9319 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9321 for(i
=*ptr
-1; i
>=0; i
--)
9322 time_put_wchar_dtor(this+i
);
9323 MSVCRT_operator_delete(ptr
);
9325 time_put_wchar_dtor(this);
9327 MSVCRT_operator_delete(this);
9333 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9334 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9335 MSVCP_size_t __cdecl
time_put_wchar__Getcat(const locale_facet
**facet
, const locale
*loc
)
9337 TRACE("(%p %p)\n", facet
, loc
);
9339 if(facet
&& !*facet
) {
9340 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9342 ERR("Out of memory\n");
9343 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9346 time_put_wchar_ctor_name((time_put
*)*facet
,
9347 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9353 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9354 /* ?_Getcat@?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9355 MSVCP_size_t __cdecl
time_put_wchar__Getcat_old(const locale_facet
**facet
)
9357 return time_put_wchar__Getcat(facet
, locale_classic());
9360 static time_put
* time_put_wchar_use_facet(const locale
*loc
)
9362 static time_put
*obj
= NULL
;
9365 const locale_facet
*fac
;
9367 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9368 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_wchar_id
));
9370 _Lockit_dtor(&lock
);
9371 return (time_put
*)fac
;
9375 _Lockit_dtor(&lock
);
9379 time_put_wchar__Getcat(&fac
, loc
);
9380 obj
= (time_put
*)fac
;
9381 call_locale_facet__Incref(&obj
->facet
);
9382 locale_facet_register(&obj
->facet
);
9383 _Lockit_dtor(&lock
);
9388 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9389 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9390 MSVCP_size_t __cdecl
time_put_short__Getcat(const locale_facet
**facet
, const locale
*loc
)
9392 TRACE("(%p %p)\n", facet
, loc
);
9394 if(facet
&& !*facet
) {
9395 *facet
= MSVCRT_operator_new(sizeof(time_put
));
9397 ERR("Out of memory\n");
9398 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9401 time_put_short_ctor_name((time_put
*)*facet
,
9402 locale_string_char_c_str(&loc
->ptr
->name
), 0);
9408 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SAIPAPBVfacet@locale@2@@Z */
9409 /* ?_Getcat@?$time_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@@Z */
9410 MSVCP_size_t __cdecl
time_put_short__Getcat_old(const locale_facet
**facet
)
9412 return time_put_short__Getcat(facet
, locale_classic());
9415 static time_put
* time_put_short_use_facet(const locale
*loc
)
9417 static time_put
*obj
= NULL
;
9420 const locale_facet
*fac
;
9422 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9423 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_put_short_id
));
9425 _Lockit_dtor(&lock
);
9426 return (time_put
*)fac
;
9430 _Lockit_dtor(&lock
);
9434 time_put_short__Getcat(&fac
, loc
);
9435 obj
= (time_put
*)fac
;
9436 call_locale_facet__Incref(&obj
->facet
);
9437 locale_facet_register(&obj
->facet
);
9438 _Lockit_dtor(&lock
);
9443 #if _MSVCP_VER >= 70
9445 /* ?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 */
9446 /* ?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 */
9447 /* ?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 */
9448 /* ?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 */
9449 #if _MSVCP_VER != 80
9450 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 36)
9452 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 40)
9454 #if _MSVCP_VER <= 100
9455 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9456 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9457 (this, ret, dest, base, fill, t, spec, mod))
9459 #define call_time_put_wchar_do_put(this, ret, dest, base, fill, t, spec, mod) CALL_VTBL_FUNC(this, 12, ostreambuf_iterator_wchar*, \
9460 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, wchar_t, const struct tm*, char, char), \
9461 (this, ret, dest, base, fill, t, spec, mod))
9463 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9464 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9465 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9467 char buf
[64], fmt
[4], *p
= fmt
;
9468 MSVCP_size_t i
, len
;
9471 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9479 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9480 for(i
=0; i
<len
; i
++) {
9481 c
= mb_to_wc(buf
[i
], &this->cvt
);
9482 ostreambuf_iterator_wchar_put(&dest
, c
);
9489 /* ?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 */
9490 /* ?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 */
9491 /* ?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 */
9492 /* ?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 */
9493 #if _MSVCP_VER != 80
9494 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 36)
9496 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 40)
9498 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9499 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9500 wchar_t fill
, const struct tm
*t
, char spec
, char mod
)
9502 TRACE("(%p %p %p %c %p %c %c)\n", this, ret
, base
, fill
, t
, spec
, mod
);
9503 return call_time_put_wchar_do_put(this, ret
, dest
, base
, fill
, t
, spec
, mod
);
9506 /* ?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 */
9507 /* ?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 */
9508 /* ?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 */
9509 /* ?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 */
9510 #if _MSVCP_VER != 80
9511 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 36)
9513 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 40)
9515 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9516 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9517 wchar_t fill
, const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9519 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9522 TRACE("(%p %p %p %c %p %s)\n", this, ret
, base
, fill
, t
, debugstr_wn(pat
, pat_end
-pat
));
9524 while(pat
< pat_end
) {
9525 if(*pat
!= percent
) {
9526 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9527 }else if(++pat
== pat_end
) {
9528 ostreambuf_iterator_wchar_put(&dest
, percent
);
9529 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9530 ostreambuf_iterator_wchar_put(&dest
, percent
);
9531 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9535 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9536 ostreambuf_iterator_wchar_put(&dest
, percent
);
9537 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9538 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9540 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, '#');
9543 time_put_wchar_put(this, &dest
, dest
, base
, fill
, t
, *c
, 0);
9552 #else /* _MSVCP_VER < 70 doesn't have the 'fill' parameter */
9554 /* ?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 */
9555 /* ?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 */
9556 DEFINE_THISCALL_WRAPPER(time_put_wchar_do_put
, 32)
9557 #define call_time_put_wchar_do_put(this, ret, dest, base, t, spec, mod) CALL_VTBL_FUNC(this, 4, ostreambuf_iterator_wchar*, \
9558 (const time_put*, ostreambuf_iterator_wchar*, ostreambuf_iterator_wchar, ios_base*, const struct tm*, char, char), \
9559 (this, ret, dest, base, t, spec, mod))
9560 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_do_put(const time_put
*this,
9561 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9562 const struct tm
*t
, char spec
, char mod
)
9564 char buf
[64], fmt
[4], *p
= fmt
;
9565 MSVCP_size_t i
, len
;
9568 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9576 len
= _Strftime(buf
, sizeof(buf
), fmt
, t
, this->time
.timeptr
);
9577 for(i
=0; i
<len
; i
++) {
9578 c
= mb_to_wc(buf
[i
], &this->cvt
);
9579 ostreambuf_iterator_wchar_put(&dest
, c
);
9586 /* ?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 */
9587 /* ?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 */
9588 DEFINE_THISCALL_WRAPPER(time_put_wchar_put
, 32)
9589 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put(const time_put
*this,
9590 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9591 const struct tm
*t
, char spec
, char mod
)
9593 TRACE("(%p %p %p %p %c %c)\n", this, ret
, base
, t
, spec
, mod
);
9594 return call_time_put_wchar_do_put(this, ret
, dest
, base
, t
, spec
, mod
);
9597 /* ?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 */
9598 /* ?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 */
9599 DEFINE_THISCALL_WRAPPER(time_put_wchar_put_format
, 32)
9600 ostreambuf_iterator_wchar
* __thiscall
time_put_wchar_put_format(const time_put
*this,
9601 ostreambuf_iterator_wchar
*ret
, ostreambuf_iterator_wchar dest
, ios_base
*base
,
9602 const struct tm
*t
, const wchar_t *pat
, const wchar_t *pat_end
)
9604 wchar_t percent
= mb_to_wc('%', &this->cvt
);
9607 TRACE("(%p %p %p %p %s)\n", this, ret
, base
, t
, debugstr_wn(pat
, pat_end
-pat
));
9609 while(pat
< pat_end
) {
9610 if(*pat
!= percent
) {
9611 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9612 }else if(++pat
== pat_end
) {
9613 ostreambuf_iterator_wchar_put(&dest
, percent
);
9614 }else if(_Wcrtomb(c
, *pat
, NULL
, &this->cvt
)!=1 || (*c
=='#' && pat
+1==pat_end
)) {
9615 ostreambuf_iterator_wchar_put(&dest
, percent
);
9616 ostreambuf_iterator_wchar_put(&dest
, *pat
++);
9620 if(_Wcrtomb(c
, *pat
++, NULL
, &this->cvt
) != 1) {
9621 ostreambuf_iterator_wchar_put(&dest
, percent
);
9622 ostreambuf_iterator_wchar_put(&dest
, *(pat
-2));
9623 ostreambuf_iterator_wchar_put(&dest
, *(pat
-1));
9625 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, '#');
9628 time_put_wchar_put(this, &dest
, dest
, base
, t
, *c
, 0);
9637 #endif /* _MSVCP_VER >= 70 */
9639 /* ?id@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A */
9640 locale_id time_get_char_id
= {0};
9642 /* ??_7?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@6B@ */
9643 extern const vtable_ptr MSVCP_time_get_char_vtable
;
9645 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAEXABV_Locinfo@2@@Z */
9646 /* ?_Init@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAAXAEBV_Locinfo@2@@Z */
9647 DEFINE_THISCALL_WRAPPER(time_get_char__Init
, 8)
9648 void __thiscall
time_get_char__Init(time_get_char
*this, const _Locinfo
*locinfo
)
9650 FIXME("(%p %p) stub\n", this, locinfo
);
9653 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IAE@PBDI@Z */
9654 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@IEAA@PEBD_K@Z */
9655 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_name
, 12)
9656 time_get_char
* __thiscall
time_get_char_ctor_name(time_get_char
*this, const char *name
, unsigned int refs
)
9658 FIXME("(%p %p %d) stub\n", this, name
, refs
);
9659 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9663 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@ABV_Locinfo@1@I@Z */
9664 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@AEBV_Locinfo@1@_K@Z */
9665 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_locinfo
, 12)
9666 time_get_char
* __thiscall
time_get_char_ctor_locinfo(time_get_char
*this,
9667 const _Locinfo
*locinfo
, unsigned int refs
)
9669 FIXME("(%p %p %d) stub\n", this, locinfo
, refs
);
9670 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9674 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAE@I@Z */
9675 /* ??0?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAA@_K@Z */
9676 DEFINE_THISCALL_WRAPPER(time_get_char_ctor_refs
, 8)
9677 time_get_char
* __thiscall
time_get_char_ctor_refs(time_get_char
*this, unsigned int refs
)
9679 FIXME("(%p %d) stub\n", this, refs
);
9680 this->facet
.vtable
= &MSVCP_time_get_char_vtable
;
9684 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QAEXXZ */
9685 /* ??_F?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEAAXXZ */
9686 DEFINE_THISCALL_WRAPPER(time_get_char_ctor
, 4)
9687 time_get_char
* __thiscall
time_get_char_ctor(time_get_char
*this)
9689 return time_get_char_ctor_refs(this, 0);
9692 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AAEXXZ */
9693 /* ?_Tidy@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEAAXXZ */
9694 DEFINE_THISCALL_WRAPPER(time_get_char__Tidy
, 4)
9695 void __thiscall
time_get_char__Tidy(time_get_char
*this)
9697 FIXME("(%p) stub\n", this);
9700 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MAE@XZ */
9701 /* ??1?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEAA@XZ */
9702 DEFINE_THISCALL_WRAPPER(time_get_char_dtor
, 4) /* virtual */
9703 void __thiscall
time_get_char_dtor(time_get_char
*this)
9705 FIXME("(%p) stub\n", this);
9708 DEFINE_THISCALL_WRAPPER(time_get_char_vector_dtor
, 8)
9709 time_get_char
* __thiscall
time_get_char_vector_dtor(time_get_char
*this, unsigned int flags
)
9711 TRACE("(%p %x)\n", this, flags
);
9713 /* we have an array, with the number of elements stored before the first object */
9714 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
9716 for(i
=*ptr
-1; i
>=0; i
--)
9717 time_get_char_dtor(this+i
);
9718 MSVCRT_operator_delete(ptr
);
9720 time_get_char_dtor(this);
9722 MSVCRT_operator_delete(this);
9728 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SAIPAPBVfacet@locale@2@PBV42@@Z */
9729 /* ?_Getcat@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z */
9730 unsigned int __cdecl
time_get_char__Getcat(const locale_facet
**facet
, const locale
*loc
)
9732 TRACE("(%p %p)\n", facet
, loc
);
9734 if(facet
&& !*facet
) {
9737 *facet
= MSVCRT_operator_new(sizeof(time_get_char
));
9739 ERR("Out of memory\n");
9740 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
9744 _Locinfo_ctor_cstr(&locinfo
, locale_string_char_c_str(&loc
->ptr
->name
));
9745 time_get_char_ctor_locinfo((time_get_char
*)*facet
, &locinfo
, 0);
9746 _Locinfo_dtor(&locinfo
);
9752 static time_get_char
* time_get_char_use_facet(const locale
*loc
)
9754 static time_get_char
*obj
= NULL
;
9757 const locale_facet
*fac
;
9759 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9760 fac
= locale__Getfacet(loc
, locale_id_operator_size_t(&time_get_char_id
));
9762 _Lockit_dtor(&lock
);
9763 return (time_get_char
*)fac
;
9767 _Lockit_dtor(&lock
);
9771 time_get_char__Getcat(&fac
, loc
);
9772 obj
= (time_get_char
*)fac
;
9773 call_locale_facet__Incref(&obj
->facet
);
9774 locale_facet_register(&obj
->facet
);
9775 _Lockit_dtor(&lock
);
9780 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABAHAAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAAH@Z */
9781 /* ?_Getint@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBAHAEAV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@0HHAEAH@Z */
9782 int __cdecl
time_get_char__Getint(const time_get_char
*this,
9783 istreambuf_iterator_char
*b
, istreambuf_iterator_char
*e
,
9784 int unk1
, int unk2
, int *val
)
9786 FIXME("(%p %p %p %d %d %p) stub\n", this, b
, e
, unk1
, unk2
, val
);
9790 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MBE?AW4dateorder@time_base@2@XZ */
9791 /* ?do_date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@MEBA?AW4dateorder@time_base@2@XZ */
9792 DEFINE_THISCALL_WRAPPER(time_get_char_do_date_order
, 4) /* virtual */
9793 #if _MSVCP_VER <= 100
9794 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 4, dateorder, (const time_get_char*), (this))
9796 #define call_time_get_char_do_date_order(this) CALL_VTBL_FUNC(this, 12, dateorder, (const time_get_char*), (this))
9798 dateorder __thiscall
time_get_char_do_date_order(const time_get_char
*this)
9800 TRACE("(%p)\n", this);
9801 return this->dateorder
;
9804 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AW4dateorder@time_base@2@XZ */
9805 /* ?date_order@?$time_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QEBA?AW4dateorder@time_base@2@XZ */
9806 DEFINE_THISCALL_WRAPPER(time_get_char_date_order
, 4)
9807 dateorder __thiscall
time_get_char_date_order(const time_get_char
*this)
9809 return call_time_get_char_do_date_order(this);
9812 /* ?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 */
9813 /* ?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 */
9814 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_date
, 36) /* virtual */
9815 #if _MSVCP_VER <= 100
9816 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 12, istreambuf_iterator_char*, \
9817 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9818 (this, ret, s, e, base, err, t))
9820 #define call_time_get_char_do_get_date(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9821 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9822 (this, ret, s, e, base, err, t))
9824 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_date(const time_get_char
*this,
9825 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9826 ios_base
*base
, int *err
, struct tm
*t
)
9828 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9832 /* ?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 */
9833 /* ?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 */
9834 DEFINE_THISCALL_WRAPPER(time_get_char_get_date
, 36)
9835 istreambuf_iterator_char
* __thiscall
time_get_char_get_date(const time_get_char
*this,
9836 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9837 ios_base
*base
, int *err
, struct tm
*t
)
9839 return call_time_get_char_do_get_date(this, ret
, s
, e
, base
, err
, t
);
9842 /* ?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 */
9843 /* ?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 */
9844 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_monthname
, 36) /* virtual */
9845 #if _MSVCP_VER <= 100
9846 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 20, istreambuf_iterator_char*, \
9847 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9848 (this, ret, s, e, base, err, t))
9850 #define call_time_get_char_do_get_monthname(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 28, istreambuf_iterator_char*, \
9851 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9852 (this, ret, s, e, base, err, t))
9854 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_monthname(const time_get_char
*this,
9855 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9856 ios_base
*base
, int *err
, struct tm
*t
)
9858 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9862 /* ?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 */
9863 /* ?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 */
9864 DEFINE_THISCALL_WRAPPER(time_get_char_get_monthname
, 36)
9865 istreambuf_iterator_char
* __thiscall
time_get_char_get_monthname(const time_get_char
*this,
9866 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9867 ios_base
*base
, int *err
, struct tm
*t
)
9869 return call_time_get_char_do_get_monthname(this, ret
, s
, e
, base
, err
, t
);
9872 /* ?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 */
9873 /* ?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 */
9874 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_time
, 36) /* virtual */
9875 #if _MSVCP_VER <= 100
9876 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 8, istreambuf_iterator_char*, \
9877 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9878 (this, ret, s, e, base, err, t))
9880 #define call_time_get_char_do_get_time(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, 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 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_time(const time_get_char
*this,
9885 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9886 ios_base
*base
, int *err
, struct tm
*t
)
9888 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9892 /* ?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 */
9893 /* ?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 */
9894 DEFINE_THISCALL_WRAPPER(time_get_char_get_time
, 36)
9895 istreambuf_iterator_char
* __thiscall
time_get_char_get_time(const time_get_char
*this,
9896 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9897 ios_base
*base
, int *err
, struct tm
*t
)
9899 return call_time_get_char_do_get_time(this, ret
, s
, e
, base
, err
, t
);
9902 /* ?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 */
9903 /* ?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 */
9904 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_weekday
, 36) /* virtual */
9905 #if _MSVCP_VER <= 100
9906 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 16, istreambuf_iterator_char*, \
9907 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9908 (this, ret, s, e, base, err, t))
9910 #define call_time_get_char_do_get_weekday(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, 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 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_weekday(const time_get_char
*this,
9915 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9916 ios_base
*base
, int *err
, struct tm
*t
)
9918 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9922 /* ?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 */
9923 /* ?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 */
9924 DEFINE_THISCALL_WRAPPER(time_get_char_get_weekday
, 36)
9925 istreambuf_iterator_char
* __thiscall
time_get_char_get_weekday(const time_get_char
*this,
9926 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9927 ios_base
*base
, int *err
, struct tm
*t
)
9929 return call_time_get_char_do_get_weekday(this, ret
, s
, e
, base
, err
, t
);
9932 /* ?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 */
9933 /* ?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 */
9934 DEFINE_THISCALL_WRAPPER(time_get_char_do_get_year
, 36) /* virtual */
9935 #if _MSVCP_VER <= 100
9936 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 24, istreambuf_iterator_char*, \
9937 (const time_get_char*, istreambuf_iterator_char*, istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, struct tm*), \
9938 (this, ret, s, e, base, err, t))
9940 #define call_time_get_char_do_get_year(this, ret, s, e, base, err, t) CALL_VTBL_FUNC(this, 32, 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 istreambuf_iterator_char
* __thiscall
time_get_char_do_get_year(const time_get_char
*this,
9945 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9946 ios_base
*base
, int *err
, struct tm
*t
)
9948 FIXME("(%p %p %p %p %p) stub\n", this, ret
, base
, err
, t
);
9952 /* ?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 */
9953 /* ?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 */
9954 DEFINE_THISCALL_WRAPPER(time_get_char_get_year
, 36)
9955 istreambuf_iterator_char
* __thiscall
time_get_char_get_year(const time_get_char
*this,
9956 istreambuf_iterator_char
*ret
, istreambuf_iterator_char s
, istreambuf_iterator_char e
,
9957 ios_base
*base
, int *err
, struct tm
*t
)
9959 return call_time_get_char_do_get_year(this, ret
, s
, e
, base
, err
, t
);
9962 /* ??0_Locimp@locale@std@@AAE@_N@Z */
9963 /* ??0_Locimp@locale@std@@AEAA@_N@Z */
9964 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor_transparent
, 8)
9965 locale__Locimp
* __thiscall
locale__Locimp_ctor_transparent(locale__Locimp
*this, MSVCP_bool transparent
)
9967 TRACE("(%p %d)\n", this, transparent
);
9969 memset(this, 0, sizeof(locale__Locimp
));
9970 locale_facet_ctor_refs(&this->facet
, 1);
9971 this->transparent
= transparent
;
9972 locale_string_char_ctor_cstr(&this->name
, "*");
9976 /* ??_F_Locimp@locale@std@@QAEXXZ */
9977 /* ??_F_Locimp@locale@std@@QEAAXXZ */
9978 DEFINE_THISCALL_WRAPPER(locale__Locimp_ctor
, 4)
9979 locale__Locimp
* __thiscall
locale__Locimp_ctor(locale__Locimp
*this)
9981 return locale__Locimp_ctor_transparent(this, FALSE
);
9984 /* ??0_Locimp@locale@std@@AAE@ABV012@@Z */
9985 /* ??0_Locimp@locale@std@@AEAA@AEBV012@@Z */
9986 DEFINE_THISCALL_WRAPPER(locale__Locimp_copy_ctor
, 8)
9987 locale__Locimp
* __thiscall
locale__Locimp_copy_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
9992 TRACE("(%p %p)\n", this, copy
);
9994 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
9995 memcpy(this, copy
, sizeof(locale__Locimp
));
9996 locale_facet_ctor_refs(&this->facet
, 1);
9997 if(copy
->facetvec
) {
9998 this->facetvec
= MSVCRT_operator_new(copy
->facet_cnt
*sizeof(locale_facet
*));
9999 if(!this->facetvec
) {
10000 _Lockit_dtor(&lock
);
10001 ERR("Out of memory\n");
10002 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10005 for(i
=0; i
<this->facet_cnt
; i
++)
10007 this->facetvec
[i
] = copy
->facetvec
[i
];
10008 if(this->facetvec
[i
])
10009 call_locale_facet__Incref(this->facetvec
[i
]);
10012 locale_string_char_copy_ctor(&this->name
, ©
->name
);
10013 _Lockit_dtor(&lock
);
10017 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPAV123@ABV123@@Z */
10018 /* ?_Locimp_ctor@_Locimp@locale@std@@CAXPEAV123@AEBV123@@Z */
10019 locale__Locimp
* __cdecl
locale__Locimp__Locimp_ctor(locale__Locimp
*this, const locale__Locimp
*copy
)
10021 return locale__Locimp_copy_ctor(this, copy
);
10024 /* ??1_Locimp@locale@std@@MAE@XZ */
10025 /* ??1_Locimp@locale@std@@MEAA@XZ */
10026 DEFINE_THISCALL_WRAPPER(locale__Locimp_dtor
, 4)
10027 void __thiscall
locale__Locimp_dtor(locale__Locimp
*this)
10031 TRACE("(%p)\n", this);
10033 locale_facet_dtor(&this->facet
);
10034 for(i
=0; i
<this->facet_cnt
; i
++)
10035 if(this->facetvec
[i
] && call_locale_facet__Decref(this->facetvec
[i
]))
10036 call_locale_facet_vector_dtor(this->facetvec
[i
], 1);
10038 MSVCRT_operator_delete(this->facetvec
);
10039 locale_string_char_dtor(&this->name
);
10042 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPAV123@@Z */
10043 /* ?_Locimp_dtor@_Locimp@locale@std@@CAXPEAV123@@Z */
10044 void __cdecl
locale__Locimp__Locimp_dtor(locale__Locimp
*this)
10046 locale__Locimp_dtor(this);
10049 DEFINE_THISCALL_WRAPPER(locale__Locimp_vector_dtor
, 8)
10050 locale__Locimp
* __thiscall
locale__Locimp_vector_dtor(locale__Locimp
*this, unsigned int flags
)
10052 TRACE("(%p %x)\n", this, flags
);
10054 /* we have an array, with the number of elements stored before the first object */
10055 INT_PTR i
, *ptr
= (INT_PTR
*)this-1;
10057 for(i
=*ptr
-1; i
>=0; i
--)
10058 locale__Locimp_dtor(this+i
);
10059 MSVCRT_operator_delete(ptr
);
10061 locale__Locimp_dtor(this);
10063 MSVCRT_operator_delete(this);
10069 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@ABV123@@Z */
10070 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@AEBV123@@Z */
10071 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp(const locale__Locimp
*copy
)
10073 locale__Locimp
*ret
;
10075 TRACE("(%p)\n", copy
);
10077 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10079 ERR("Out of memory\n");
10080 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10083 return locale__Locimp_copy_ctor(ret
, copy
);
10086 /* ?_New_Locimp@_Locimp@locale@std@@CAPAV123@_N@Z */
10087 /* ?_New_Locimp@_Locimp@locale@std@@CAPEAV123@_N@Z */
10088 locale__Locimp
* __cdecl
locale__Locimp__New_Locimp_transparent(MSVCP_bool transparent
)
10090 locale__Locimp
*ret
;
10092 TRACE("(%x)\n", transparent
);
10094 ret
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10096 ERR("Out of memory\n");
10097 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10100 return locale__Locimp_ctor_transparent(ret
, transparent
);
10103 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPAV123@PAVfacet@23@I@Z */
10104 /* ?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z */
10105 void __cdecl
locale__Locimp__Locimp_Addfac(locale__Locimp
*locimp
, locale_facet
*facet
, MSVCP_size_t id
)
10109 TRACE("(%p %p %lu)\n", locimp
, facet
, id
);
10111 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10112 if(id
>= locimp
->facet_cnt
) {
10113 MSVCP_size_t new_size
= id
+1;
10114 locale_facet
**new_facetvec
;
10116 if(new_size
< locale_id__Id_cnt
+1)
10117 new_size
= locale_id__Id_cnt
+1;
10119 new_facetvec
= MSVCRT_operator_new(sizeof(locale_facet
*)*new_size
);
10120 if(!new_facetvec
) {
10121 _Lockit_dtor(&lock
);
10122 ERR("Out of memory\n");
10123 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10127 memset(new_facetvec
, 0, sizeof(locale_facet
*)*new_size
);
10128 memcpy(new_facetvec
, locimp
->facetvec
, sizeof(locale_facet
*)*locimp
->facet_cnt
);
10129 MSVCRT_operator_delete(locimp
->facetvec
);
10130 locimp
->facetvec
= new_facetvec
;
10131 locimp
->facet_cnt
= new_size
;
10134 if(locimp
->facetvec
[id
] && call_locale_facet__Decref(locimp
->facetvec
[id
]))
10135 call_locale_facet_vector_dtor(locimp
->facetvec
[id
], 1);
10137 locimp
->facetvec
[id
] = facet
;
10139 call_locale_facet__Incref(facet
);
10140 _Lockit_dtor(&lock
);
10143 /* ?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z */
10144 /* ?_Addfac@_Locimp@locale@std@@AEAAXPEAVfacet@23@_K@Z */
10145 DEFINE_THISCALL_WRAPPER(locale__Locimp__Addfac
, 12)
10146 void __thiscall
locale__Locimp__Addfac(locale__Locimp
*this, locale_facet
*facet
, MSVCP_size_t id
)
10148 locale__Locimp__Locimp_Addfac(this, facet
, id
);
10151 /* ?_Clocptr_func@_Locimp@locale@std@@CAAAPAV123@XZ */
10152 /* ?_Clocptr_func@_Locimp@locale@std@@CAAEAPEAV123@XZ */
10153 locale__Locimp
** __cdecl
locale__Locimp__Clocptr_func(void)
10159 /* ?_Makeushloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10160 /* ?_Makeushloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10161 /* List of missing facets:
10162 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10164 void __cdecl
locale__Locimp__Makeushloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10166 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10168 if(cat
& (1<<(ctype_short__Getcat(NULL
, NULL
)-1))) {
10169 ctype_wchar
*ctype
;
10172 ctype
= ctype_short_use_facet(loc
);
10174 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10176 ERR("Out of memory\n");
10177 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10179 ctype_short_ctor_locinfo(ctype
, locinfo
, 0);
10181 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_short_id
));
10184 if(cat
& (1<<(num_get_short__Getcat(NULL
, NULL
)-1))) {
10188 numget
= num_get_short_use_facet(loc
);
10190 numget
= MSVCRT_operator_new(sizeof(num_get
));
10192 ERR("Out of memory\n");
10193 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10195 num_get_short_ctor_locinfo(numget
, locinfo
, 0);
10197 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_short_id
));
10200 if(cat
& (1<<(num_put_short__Getcat(NULL
, NULL
)-1))) {
10204 numput
= num_put_short_use_facet(loc
);
10206 numput
= MSVCRT_operator_new(sizeof(num_put
));
10208 ERR("Out of memory\n");
10209 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10211 num_put_short_ctor_locinfo(numput
, locinfo
, 0);
10213 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_short_id
));
10216 if(cat
& (1<<(numpunct_short__Getcat(NULL
, NULL
)-1))) {
10217 numpunct_wchar
*numpunct
;
10220 numpunct
= numpunct_short_use_facet(loc
);
10222 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10224 ERR("Out of memory\n");
10225 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10227 numpunct_short_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10229 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_short_id
));
10232 if(cat
& (1<<(collate_short__Getcat(NULL
, NULL
)-1))) {
10236 c
= collate_short_use_facet(loc
);
10238 c
= MSVCRT_operator_new(sizeof(collate
));
10240 ERR("Out of memory\n");
10241 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10243 collate_short_ctor_locinfo(c
, locinfo
, 0);
10245 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_short_id
));
10248 if(cat
& (1<<(time_put_short__Getcat(NULL
, NULL
)-1))) {
10252 t
= time_put_short_use_facet(loc
);
10254 t
= MSVCRT_operator_new(sizeof(time_put
));
10256 ERR("Out of memory\n");
10257 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10259 time_put_short_ctor_locinfo(t
, locinfo
, 0);
10261 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_short_id
));
10264 if(cat
& (1<<(codecvt_short__Getcat(NULL
, NULL
)-1))) {
10265 codecvt_wchar
*codecvt
;
10268 codecvt
= codecvt_short_use_facet(loc
);
10270 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10272 ERR("Out of memory\n");
10273 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10275 codecvt_short_ctor_locinfo(codecvt
, locinfo
, 0);
10277 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_short_id
));
10281 /* ?_Makewloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10282 /* ?_Makewloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10283 /* List of missing facets:
10284 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10286 void __cdecl
locale__Locimp__Makewloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10288 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10290 if(cat
& (1<<(ctype_wchar__Getcat(NULL
, NULL
)-1))) {
10291 ctype_wchar
*ctype
;
10294 ctype
= ctype_wchar_use_facet(loc
);
10296 ctype
= MSVCRT_operator_new(sizeof(ctype_wchar
));
10298 ERR("Out of memory\n");
10299 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10301 ctype_wchar_ctor_locinfo(ctype
, locinfo
, 0);
10303 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_wchar_id
));
10306 if(cat
& (1<<(num_get_wchar__Getcat(NULL
, NULL
)-1))) {
10310 numget
= num_get_wchar_use_facet(loc
);
10312 numget
= MSVCRT_operator_new(sizeof(num_get
));
10314 ERR("Out of memory\n");
10315 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10317 num_get_wchar_ctor_locinfo(numget
, locinfo
, 0);
10319 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_wchar_id
));
10322 if(cat
& (1<<(num_put_wchar__Getcat(NULL
, NULL
)-1))) {
10326 numput
= num_put_wchar_use_facet(loc
);
10328 numput
= MSVCRT_operator_new(sizeof(num_put
));
10330 ERR("Out of memory\n");
10331 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10333 num_put_wchar_ctor_locinfo(numput
, locinfo
, 0);
10335 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_wchar_id
));
10338 if(cat
& (1<<(numpunct_wchar__Getcat(NULL
, NULL
)-1))) {
10339 numpunct_wchar
*numpunct
;
10342 numpunct
= numpunct_wchar_use_facet(loc
);
10344 numpunct
= MSVCRT_operator_new(sizeof(numpunct_wchar
));
10346 ERR("Out of memory\n");
10347 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10349 numpunct_wchar_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10351 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_wchar_id
));
10354 if(cat
& (1<<(collate_wchar__Getcat(NULL
, NULL
)-1))) {
10358 c
= collate_wchar_use_facet(loc
);
10360 c
= MSVCRT_operator_new(sizeof(collate
));
10362 ERR("Out of memory\n");
10363 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10365 collate_wchar_ctor_locinfo(c
, locinfo
, 0);
10367 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_wchar_id
));
10370 if(cat
& (1<<(time_put_wchar__Getcat(NULL
, NULL
)-1))) {
10374 t
= time_put_wchar_use_facet(loc
);
10376 t
= MSVCRT_operator_new(sizeof(time_put
));
10378 ERR("Out of memory\n");
10379 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10381 time_put_wchar_ctor_locinfo(t
, locinfo
, 0);
10383 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_wchar_id
));
10386 if(cat
& (1<<(codecvt_wchar__Getcat(NULL
, NULL
)-1))) {
10387 codecvt_wchar
*codecvt
;
10390 codecvt
= codecvt_wchar_use_facet(loc
);
10392 codecvt
= MSVCRT_operator_new(sizeof(codecvt_wchar
));
10394 ERR("Out of memory\n");
10395 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10397 codecvt_wchar_ctor_locinfo(codecvt
, locinfo
, 0);
10399 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_wchar_id
));
10403 /* ?_Makexloc@_Locimp@locale@std@@CAXABV_Locinfo@3@HPAV123@PBV23@@Z */
10404 /* ?_Makexloc@_Locimp@locale@std@@CAXAEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10405 /* List of missing facets:
10406 * messages, money_get, money_put, moneypunct, moneypunct, time_get
10408 void __cdecl
locale__Locimp__Makexloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10410 FIXME("(%p %d %p %p) semi-stub\n", locinfo
, cat
, locimp
, loc
);
10412 if(cat
& (1<<(ctype_char__Getcat(NULL
, NULL
)-1))) {
10416 ctype
= ctype_char_use_facet(loc
);
10418 ctype
= MSVCRT_operator_new(sizeof(ctype_char
));
10420 ERR("Out of memory\n");
10421 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10423 ctype_char_ctor_locinfo(ctype
, locinfo
, 0);
10425 locale__Locimp__Addfac(locimp
, &ctype
->base
.facet
, locale_id_operator_size_t(&ctype_char_id
));
10428 if(cat
& (1<<(num_get_char__Getcat(NULL
, NULL
)-1))) {
10432 numget
= num_get_char_use_facet(loc
);
10434 numget
= MSVCRT_operator_new(sizeof(num_get
));
10436 ERR("Out of memory\n");
10437 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10439 num_get_char_ctor_locinfo(numget
, locinfo
, 0);
10441 locale__Locimp__Addfac(locimp
, &numget
->facet
, locale_id_operator_size_t(&num_get_char_id
));
10444 if(cat
& (1<<(num_put_char__Getcat(NULL
, NULL
)-1))) {
10448 numput
= num_put_char_use_facet(loc
);
10450 numput
= MSVCRT_operator_new(sizeof(num_put
));
10452 ERR("Out of memory\n");
10453 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10455 num_put_char_ctor_locinfo(numput
, locinfo
, 0);
10457 locale__Locimp__Addfac(locimp
, &numput
->facet
, locale_id_operator_size_t(&num_put_char_id
));
10460 if(cat
& (1<<(numpunct_char__Getcat(NULL
, NULL
)-1))) {
10461 numpunct_char
*numpunct
;
10464 numpunct
= numpunct_char_use_facet(loc
);
10466 numpunct
= MSVCRT_operator_new(sizeof(numpunct_char
));
10468 ERR("Out of memory\n");
10469 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10471 numpunct_char_ctor_locinfo(numpunct
, locinfo
, 0, FALSE
);
10473 locale__Locimp__Addfac(locimp
, &numpunct
->facet
, locale_id_operator_size_t(&numpunct_char_id
));
10476 if(cat
& (1<<(collate_char__Getcat(NULL
, NULL
)-1))) {
10480 c
= collate_char_use_facet(loc
);
10482 c
= MSVCRT_operator_new(sizeof(collate
));
10484 ERR("Out of memory\n");
10485 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10487 collate_char_ctor_locinfo(c
, locinfo
, 0);
10489 locale__Locimp__Addfac(locimp
, &c
->facet
, locale_id_operator_size_t(&collate_char_id
));
10492 if(cat
& (1<<(time_get_char__Getcat(NULL
, NULL
)-1))) {
10496 t
= time_get_char_use_facet(loc
);
10498 t
= MSVCRT_operator_new(sizeof(time_get_char
));
10500 ERR("Out of memory\n");
10501 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10503 time_get_char_ctor_locinfo(t
, locinfo
, 0);
10505 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_get_char_id
));
10508 if(cat
& (1<<(time_put_char__Getcat(NULL
, NULL
)-1))) {
10512 t
= time_put_char_use_facet(loc
);
10514 t
= MSVCRT_operator_new(sizeof(time_put
));
10516 ERR("Out of memory\n");
10517 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10519 time_put_char_ctor_locinfo(t
, locinfo
, 0);
10521 locale__Locimp__Addfac(locimp
, &t
->facet
, locale_id_operator_size_t(&time_put_char_id
));
10524 if(cat
& (1<<(codecvt_char__Getcat(NULL
, NULL
)-1))) {
10525 codecvt_char
*codecvt
;
10528 codecvt
= codecvt_char_use_facet(loc
);
10530 codecvt
= MSVCRT_operator_new(sizeof(codecvt_char
));
10532 ERR("Out of memory\n");
10533 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10535 codecvt_char_ctor_locinfo(codecvt
, locinfo
, 0);
10537 locale__Locimp__Addfac(locimp
, &codecvt
->base
.facet
, locale_id_operator_size_t(&codecvt_char_id
));
10541 /* ?_Makeloc@_Locimp@locale@std@@CAPAV123@ABV_Locinfo@3@HPAV123@PBV23@@Z */
10542 /* ?_Makeloc@_Locimp@locale@std@@CAPEAV123@AEBV_Locinfo@3@HPEAV123@PEBV23@@Z */
10543 locale__Locimp
* __cdecl
locale__Locimp__Makeloc(const _Locinfo
*locinfo
, category cat
, locale__Locimp
*locimp
, const locale
*loc
)
10545 TRACE("(%p %d %p %p)\n", locinfo
, cat
, locimp
, loc
);
10547 locale__Locimp__Makexloc(locinfo
, cat
, locimp
, loc
);
10548 locale__Locimp__Makewloc(locinfo
, cat
, locimp
, loc
);
10549 locale__Locimp__Makeushloc(locinfo
, cat
, locimp
, loc
);
10551 locimp
->catmask
|= cat
;
10552 locale_string_char_assign(&locimp
->name
, &locinfo
->newlocname
);
10556 /* ??_7_Locimp@locale@std@@6B@ */
10557 const vtable_ptr MSVCP_locale__Locimp_vtable
[] = {
10558 (vtable_ptr
)THISCALL_NAME(locale__Locimp_vector_dtor
)
10561 /* ??0locale@std@@AAE@PAV_Locimp@01@@Z */
10562 /* ??0locale@std@@AEAA@PEAV_Locimp@01@@Z */
10563 DEFINE_THISCALL_WRAPPER(locale_ctor_locimp
, 8)
10564 locale
* __thiscall
locale_ctor_locimp(locale
*this, locale__Locimp
*locimp
)
10566 TRACE("(%p %p)\n", this, locimp
);
10567 /* Don't change locimp reference counter */
10568 this->ptr
= locimp
;
10572 /* ?_Init@locale@std@@CAPAV_Locimp@12@XZ */
10573 /* ?_Init@locale@std@@CAPEAV_Locimp@12@XZ */
10574 locale__Locimp
* __cdecl
locale__Init(void)
10580 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10581 if(global_locale
) {
10582 _Lockit_dtor(&lock
);
10583 return global_locale
;
10586 global_locale
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10587 if(!global_locale
) {
10588 _Lockit_dtor(&lock
);
10589 ERR("Out of memory\n");
10590 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10594 locale__Locimp_ctor(global_locale
);
10595 global_locale
->catmask
= (1<<(LC_MAX
+1))-1;
10596 locale_string_char_dtor(&global_locale
->name
);
10597 locale_string_char_ctor_cstr(&global_locale
->name
, "C");
10599 locale__Locimp__Clocptr
= global_locale
;
10600 global_locale
->facet
.refs
++;
10601 locale_ctor_locimp(&classic_locale
, locale__Locimp__Clocptr
);
10602 _Lockit_dtor(&lock
);
10604 return global_locale
;
10607 /* ?_Init@locale@std@@CAPAV_Locimp@12@_N@Z */
10608 /* ?_Init@locale@std@@CAPEAV_Locimp@12@_N@Z */
10609 locale__Locimp
* __cdecl
locale__Init_ref(MSVCP_bool inc_ref
)
10611 locale__Locimp
*ret
;
10614 TRACE("(%x)\n", inc_ref
);
10616 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10617 if(inc_ref
&& global_locale
) {
10618 call_locale_facet__Incref(&global_locale
->facet
);
10619 _Lockit_dtor(&lock
);
10620 return global_locale
;
10623 ret
= locale__Init();
10624 _Lockit_dtor(&lock
);
10628 /* ?_Iscloc@locale@std@@QBE_NXZ */
10629 /* ?_Iscloc@locale@std@@QEBA_NXZ */
10630 DEFINE_THISCALL_WRAPPER(locale__Iscloc
, 4)
10631 MSVCP_bool __thiscall
locale__Iscloc(const locale
*this)
10633 TRACE("(%p)\n", this);
10634 return this->ptr
== locale__Locimp__Clocptr
;
10637 /* ??0locale@std@@QAE@ABV01@0H@Z */
10638 /* ??0locale@std@@QEAA@AEBV01@0H@Z */
10639 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_locale
, 16)
10640 locale
* __thiscall
locale_ctor_locale_locale(locale
*this, const locale
*loc
, const locale
*other
, category cat
)
10644 TRACE("(%p %p %p %d)\n", this, loc
, other
, cat
);
10646 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10648 ERR("Out of memory\n");
10649 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10651 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10653 _Locinfo_ctor_cat_cstr(&locinfo
, loc
->ptr
->catmask
, locale_string_char_c_str(&loc
->ptr
->name
));
10654 _Locinfo__Addcats(&locinfo
, cat
& other
->ptr
->catmask
, locale_string_char_c_str(&other
->ptr
->name
));
10655 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, other
);
10656 _Locinfo_dtor(&locinfo
);
10661 /* ??0locale@std@@QAE@ABV01@@Z */
10662 /* ??0locale@std@@QEAA@AEBV01@@Z */
10663 DEFINE_THISCALL_WRAPPER(locale_copy_ctor
, 8)
10664 locale
* __thiscall
locale_copy_ctor(locale
*this, const locale
*copy
)
10666 TRACE("(%p %p)\n", this, copy
);
10667 this->ptr
= copy
->ptr
;
10668 call_locale_facet__Incref(&this->ptr
->facet
);
10672 /* ??0locale@std@@QAE@ABV01@PBDH@Z */
10673 /* ??0locale@std@@QEAA@AEBV01@PEBDH@Z */
10674 DEFINE_THISCALL_WRAPPER(locale_ctor_locale_cstr
, 16)
10675 locale
* __thiscall
locale_ctor_locale_cstr(locale
*this, const locale
*loc
, const char *locname
, category cat
)
10679 TRACE("(%p %p %s %d)\n", this, loc
, locname
, cat
);
10681 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10682 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10683 _Locinfo_dtor(&locinfo
);
10684 MSVCRT_operator_delete(this->ptr
);
10685 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10688 this->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10690 ERR("Out of memory\n");
10691 _Locinfo_dtor(&locinfo
);
10692 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10694 locale__Locimp_copy_ctor(this->ptr
, loc
->ptr
);
10696 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10697 _Locinfo_dtor(&locinfo
);
10701 /* ??0locale@std@@QAE@PBDH@Z */
10702 /* ??0locale@std@@QEAA@PEBDH@Z */
10703 DEFINE_THISCALL_WRAPPER(locale_ctor_cstr
, 12)
10704 locale
* __thiscall
locale_ctor_cstr(locale
*this, const char *locname
, category cat
)
10708 TRACE("(%p %s %d)\n", this, locname
, 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_ctor(this->ptr
);
10719 _Locinfo_ctor_cat_cstr(&locinfo
, cat
, locname
);
10720 if(!memcmp(locale_string_char_c_str(&locinfo
.newlocname
), "*", 2)) {
10721 _Locinfo_dtor(&locinfo
);
10722 MSVCRT_operator_delete(this->ptr
);
10723 throw_exception(EXCEPTION_RUNTIME_ERROR
, "bad locale name");
10726 locale__Locimp__Makeloc(&locinfo
, cat
, this->ptr
, NULL
);
10727 _Locinfo_dtor(&locinfo
);
10732 /* ??0locale@std@@QAE@W4_Uninitialized@1@@Z */
10733 /* ??0locale@std@@QEAA@W4_Uninitialized@1@@Z */
10734 DEFINE_THISCALL_WRAPPER(locale_ctor_uninitialized
, 8)
10735 locale
* __thiscall
locale_ctor_uninitialized(locale
*this, int uninitialized
)
10737 TRACE("(%p)\n", this);
10742 /* ??0locale@std@@QAE@XZ */
10743 /* ??0locale@std@@QEAA@XZ */
10744 DEFINE_THISCALL_WRAPPER(locale_ctor
, 4)
10745 locale
* __thiscall
locale_ctor(locale
*this)
10747 TRACE("(%p)\n", this);
10748 this->ptr
= locale__Init();
10749 call_locale_facet__Incref(&this->ptr
->facet
);
10753 /* ??1locale@std@@QAE@XZ */
10754 /* ??1locale@std@@QEAA@XZ */
10755 DEFINE_THISCALL_WRAPPER(locale_dtor
, 4)
10756 void __thiscall
locale_dtor(locale
*this)
10758 TRACE("(%p)\n", this);
10759 if(this->ptr
&& call_locale_facet__Decref(&this->ptr
->facet
))
10761 locale__Locimp_dtor(this->ptr
);
10762 MSVCRT_operator_delete(this->ptr
);
10766 /* ??4locale@std@@QAEAAV01@ABV01@@Z */
10767 /* ??4locale@std@@QEAAAEAV01@AEBV01@@Z */
10768 DEFINE_THISCALL_WRAPPER(locale_operator_assign
, 8)
10769 locale
* __thiscall
locale_operator_assign(locale
*this, const locale
*loc
)
10771 FIXME("(%p %p) stub\n", this, loc
);
10775 /* ??8locale@std@@QBE_NABV01@@Z */
10776 /* ??8locale@std@@QEBA_NAEBV01@@Z */
10777 DEFINE_THISCALL_WRAPPER(locale_operator_equal
, 8)
10778 MSVCP_bool __thiscall
locale_operator_equal(const locale
*this, const locale
*loc
)
10780 FIXME("(%p %p) stub\n", this, loc
);
10784 /* ??9locale@std@@QBE_NABV01@@Z */
10785 /* ??9locale@std@@QEBA_NAEBV01@@Z */
10786 DEFINE_THISCALL_WRAPPER(locale_operator_not_equal
, 8)
10787 MSVCP_bool __thiscall
locale_operator_not_equal(const locale
*this, locale
const *loc
)
10789 FIXME("(%p %p) stub\n", this, loc
);
10793 /* ?_Addfac@locale@std@@QAEAAV12@PAVfacet@12@II@Z */
10794 /* ?_Addfac@locale@std@@QEAAAEAV12@PEAVfacet@12@_K1@Z */
10795 DEFINE_THISCALL_WRAPPER(locale__Addfac
, 16)
10796 locale
* __thiscall
locale__Addfac(locale
*this, locale_facet
*facet
, MSVCP_size_t id
, MSVCP_size_t catmask
)
10798 TRACE("(%p %p %lu %lu)\n", this, facet
, id
, catmask
);
10800 if(this->ptr
->facet
.refs
> 1) {
10801 locale__Locimp
*new_ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10803 ERR("Out of memory\n");
10804 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10807 locale__Locimp_copy_ctor(new_ptr
, this->ptr
);
10808 call_locale_facet__Decref(&this->ptr
->facet
);
10809 this->ptr
= new_ptr
;
10812 locale__Locimp__Addfac(this->ptr
, facet
, id
);
10815 locale_string_char_dtor(&this->ptr
->name
);
10816 locale_string_char_ctor_cstr(&this->ptr
->name
, "*");
10821 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z */
10822 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K_N@Z */
10823 DEFINE_THISCALL_WRAPPER(locale__Getfacet_bool
, 12)
10824 const locale_facet
* __thiscall
locale__Getfacet_bool(const locale
*this,
10825 MSVCP_size_t id
, MSVCP_bool allow_transparent
)
10829 TRACE("(%p %lu)\n", this, id
);
10831 fac
= id
< this->ptr
->facet_cnt
? this->ptr
->facetvec
[id
] : NULL
;
10832 if(fac
|| !this->ptr
->transparent
|| !allow_transparent
)
10835 return id
< global_locale
->facet_cnt
? global_locale
->facetvec
[id
] : NULL
;
10838 /* ?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z */
10839 /* ?_Getfacet@locale@std@@QEBAPEBVfacet@12@_K@Z */
10840 DEFINE_THISCALL_WRAPPER(locale__Getfacet
, 8)
10841 const locale_facet
* __thiscall
locale__Getfacet(const locale
*this, MSVCP_size_t id
)
10843 return locale__Getfacet_bool( this, id
, TRUE
);
10846 /* ?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ */
10847 /* ?_Getgloballocale@locale@std@@CAPEAV_Locimp@12@XZ */
10848 locale__Locimp
* __cdecl
locale__Getgloballocale(void)
10851 return global_locale
;
10854 /* ?_Setgloballocale@locale@std@@CAXPAX@Z */
10855 /* ?_Setgloballocale@locale@std@@CAXPEAX@Z */
10856 void __cdecl
locale__Setgloballocale(void *locimp
)
10858 TRACE("(%p)\n", locimp
);
10859 global_locale
= locimp
;
10862 /* ?classic@locale@std@@SAABV12@XZ */
10863 /* ?classic@locale@std@@SAAEBV12@XZ */
10864 const locale
* __cdecl
locale_classic(void)
10868 return &classic_locale
;
10871 /* ?empty@locale@std@@SA?AV12@XZ */
10872 locale
* __cdecl
locale_empty(locale
*ret
)
10878 ret
->ptr
= MSVCRT_operator_new(sizeof(locale__Locimp
));
10880 ERR("Out of memory\n");
10881 throw_exception(EXCEPTION_BAD_ALLOC
, NULL
);
10883 locale__Locimp_ctor_transparent(ret
->ptr
, TRUE
);
10887 /* ?global@locale@std@@SA?AV12@ABV12@@Z */
10888 /* ?global@locale@std@@SA?AV12@AEBV12@@Z */
10889 locale
* __cdecl
locale_global(locale
*ret
, const locale
*loc
)
10894 TRACE("(%p %p)\n", loc
, ret
);
10896 _Lockit_ctor_locktype(&lock
, _LOCK_LOCALE
);
10899 if(loc
->ptr
!= global_locale
) {
10900 call_locale_facet__Decref(&global_locale
->facet
);
10901 global_locale
= loc
->ptr
;
10902 call_locale_facet__Incref(&global_locale
->facet
);
10904 for(i
=LC_ALL
+1; i
<=LC_MAX
; i
++) {
10905 if((global_locale
->catmask
& (1<<(i
-1))) == 0)
10907 setlocale(i
, locale_string_char_c_str(&global_locale
->name
));
10910 _Lockit_dtor(&lock
);
10914 #if _MSVCP_VER < 100
10916 /* ?_Getname@_Locinfo@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10917 /* ?_Getname@_Locinfo@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10918 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 8)
10919 basic_string_char
* __thiscall
_Locinfo__Getname(const _Locinfo
*this, basic_string_char
*ret
)
10921 TRACE("(%p)\n", this);
10923 MSVCP_basic_string_char_copy_ctor(ret
, &this->newlocname
);
10927 /* ?name@locale@std@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10928 /* ?name@locale@std@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ */
10929 DEFINE_THISCALL_WRAPPER(locale_name
, 8)
10930 basic_string_char
* __thiscall
locale_name(const locale
*this, basic_string_char
*ret
)
10932 TRACE( "(%p)\n", this);
10933 MSVCP_basic_string_char_copy_ctor(ret
, &this->ptr
->name
);
10939 /* ?_Getname@_Locinfo@std@@QBEPBDXZ */
10940 /* ?_Getname@_Locinfo@std@@QEBAPEBDXZ */
10941 DEFINE_THISCALL_WRAPPER(_Locinfo__Getname
, 4)
10942 const char * __thiscall
_Locinfo__Getname( const _Locinfo
*this )
10944 return locale_string_char_c_str( &this->newlocname
);
10947 #endif /* _MSVCP_VER < 100 */
10950 wctrans_t __cdecl
wctrans(const char *property
)
10952 static const char str_tolower
[] = "tolower";
10953 static const char str_toupper
[] = "toupper";
10955 if(!strcmp(property
, str_tolower
))
10957 if(!strcmp(property
, str_toupper
))
10963 wint_t __cdecl
towctrans(wint_t c
, wctrans_t category
)
10966 return towupper(c
);
10967 return towlower(c
);
10971 wint_t __cdecl
btowc(int c
)
10977 if (c
== EOF
|| _Mbrtowc( &ret
, &ch
, 1, &state
, NULL
) != 1) return WEOF
;
10982 size_t __cdecl
mbrlen(const char *str
, size_t n
, mbstate_t *state
)
10984 static int local_state
;
10986 if (!state
) state
= &local_state
;
10987 return _Mbrtowc( NULL
, str
, n
, state
, NULL
);
10991 size_t __cdecl
mbrtowc(wchar_t *dst
, const char *str
, size_t n
, mbstate_t *state
)
10993 static int local_state
;
10995 if (!state
) state
= &local_state
;
10996 return _Mbrtowc( dst
, str
, n
, state
, NULL
);
11000 size_t __cdecl
mbsrtowcs(wchar_t *dst
, const char **pstr
, size_t n
, mbstate_t *state
)
11002 static int local_state
;
11008 if (!state
) state
= &local_state
;
11010 while (!dst
|| n
> ret
)
11012 int len
= _Mbrtowc( &wc
, src
, 2, state
, NULL
);
11013 if (len
< 0) return -1;
11015 if (dst
) dst
[ret
] = wc
;
11024 int __cdecl
wctob(wint_t wc
)
11026 char ret
[MB_LEN_MAX
];
11028 if (wc
== WEOF
|| _Wcrtomb( ret
, wc
, NULL
, NULL
) != 1) return EOF
;
11033 size_t __cdecl
wcrtomb(char *dst
, wchar_t wc
, mbstate_t *state
)
11035 return _Wcrtomb( dst
, wc
, state
, NULL
);
11039 size_t __cdecl
wcsrtombs(char *dst
, const wchar_t **pstr
, size_t n
, mbstate_t *state
)
11041 const wchar_t *src
;
11042 char buffer
[MB_LEN_MAX
];
11047 while (!dst
|| n
> ret
)
11049 int len
= _Wcrtomb( buffer
, *src
, state
, NULL
);
11050 if (len
<= 0) return -1;
11051 if (n
< ret
+ len
) break;
11052 memcpy( dst
+ ret
, buffer
, len
);
11054 if (!buffer
[0]) break;
11061 DEFINE_RTTI_DATA0(locale_facet
, 0, ".?AVfacet@locale@std@@")
11062 DEFINE_RTTI_DATA1(collate_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@D@std@@")
11063 DEFINE_RTTI_DATA1(collate_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@_W@std@@")
11064 DEFINE_RTTI_DATA1(collate_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$collate@G@std@@")
11065 DEFINE_RTTI_DATA1(ctype_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUctype_base@std@@")
11066 DEFINE_RTTI_DATA2(ctype_char
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@D@std@@")
11067 DEFINE_RTTI_DATA2(ctype_wchar
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@_W@std@@")
11068 DEFINE_RTTI_DATA2(ctype_short
, 0, &ctype_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$ctype@G@std@@")
11069 DEFINE_RTTI_DATA1(codecvt_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AVcodecvt_base@std@@")
11070 DEFINE_RTTI_DATA2(codecvt_char
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@DDH@std@@")
11071 DEFINE_RTTI_DATA2(codecvt_wchar
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@_WDH@std@@")
11072 DEFINE_RTTI_DATA2(codecvt_short
, 0, &codecvt_base_rtti_base_descriptor
, &locale_facet_rtti_base_descriptor
, ".?AV?$codecvt@GDH@std@@")
11073 DEFINE_RTTI_DATA1(numpunct_char
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@D@std@@")
11074 DEFINE_RTTI_DATA1(numpunct_wchar
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@_W@std@@")
11075 DEFINE_RTTI_DATA1(numpunct_short
, 0, &locale_facet_rtti_base_descriptor
, ".?AV?$numpunct@G@std@@")
11076 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@@")
11077 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@@")
11078 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@@")
11079 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@@")
11080 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@@")
11081 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@@")
11082 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@@")
11083 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@@")
11084 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@@")
11085 DEFINE_RTTI_DATA1(time_base
, 0, &locale_facet_rtti_base_descriptor
, ".?AUtime_base@std@@")
11086 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@@")
11089 void __asm_dummy_vtables(void) {
11091 __ASM_VTABLE(locale_facet
,
11092 VTABLE_ADD_FUNC(locale_facet_vector_dtor
)
11093 #if _MSVCP_VER >= 110
11094 VTABLE_ADD_FUNC(locale_facet__Incref
)
11095 VTABLE_ADD_FUNC(locale_facet__Decref
)
11098 __ASM_VTABLE(collate_char
,
11099 VTABLE_ADD_FUNC(collate_char_vector_dtor
)
11100 #if _MSVCP_VER >= 110
11101 VTABLE_ADD_FUNC(locale_facet__Incref
)
11102 VTABLE_ADD_FUNC(locale_facet__Decref
)
11104 VTABLE_ADD_FUNC(collate_char_do_compare
)
11105 VTABLE_ADD_FUNC(collate_char_do_transform
)
11106 VTABLE_ADD_FUNC(collate_char_do_hash
));
11107 __ASM_VTABLE(collate_wchar
,
11108 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11109 #if _MSVCP_VER >= 110
11110 VTABLE_ADD_FUNC(locale_facet__Incref
)
11111 VTABLE_ADD_FUNC(locale_facet__Decref
)
11113 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11114 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11115 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11116 __ASM_VTABLE(collate_short
,
11117 VTABLE_ADD_FUNC(collate_wchar_vector_dtor
)
11118 #if _MSVCP_VER >= 110
11119 VTABLE_ADD_FUNC(locale_facet__Incref
)
11120 VTABLE_ADD_FUNC(locale_facet__Decref
)
11122 VTABLE_ADD_FUNC(collate_wchar_do_compare
)
11123 VTABLE_ADD_FUNC(collate_wchar_do_transform
)
11124 VTABLE_ADD_FUNC(collate_wchar_do_hash
));
11125 __ASM_VTABLE(ctype_base
,
11126 VTABLE_ADD_FUNC(ctype_base_vector_dtor
)
11127 #if _MSVCP_VER >= 110
11128 VTABLE_ADD_FUNC(locale_facet__Incref
)
11129 VTABLE_ADD_FUNC(locale_facet__Decref
)
11132 __ASM_VTABLE(ctype_char
,
11133 VTABLE_ADD_FUNC(ctype_char_vector_dtor
)
11134 #if _MSVCP_VER >= 110
11135 VTABLE_ADD_FUNC(locale_facet__Incref
)
11136 VTABLE_ADD_FUNC(locale_facet__Decref
)
11138 VTABLE_ADD_FUNC(ctype_char_do_tolower
)
11139 VTABLE_ADD_FUNC(ctype_char_do_tolower_ch
)
11140 VTABLE_ADD_FUNC(ctype_char_do_toupper
)
11141 VTABLE_ADD_FUNC(ctype_char_do_toupper_ch
)
11142 VTABLE_ADD_FUNC(ctype_char_do_widen
)
11143 VTABLE_ADD_FUNC(ctype_char_do_widen_ch
)
11144 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11145 VTABLE_ADD_FUNC(ctype_char__Do_widen_s
)
11146 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11147 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11148 VTABLE_ADD_FUNC(ctype_char__Do_narrow_s
)
11150 VTABLE_ADD_FUNC(ctype_char_do_narrow
)
11151 VTABLE_ADD_FUNC(ctype_char_do_narrow_ch
)
11154 __ASM_VTABLE(ctype_wchar
,
11155 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11156 #if _MSVCP_VER >= 110
11157 VTABLE_ADD_FUNC(locale_facet__Incref
)
11158 VTABLE_ADD_FUNC(locale_facet__Decref
)
11160 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11161 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11162 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11163 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11164 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11165 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11166 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11167 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11168 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11169 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11170 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11171 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11172 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11173 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11174 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11176 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11177 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11180 __ASM_VTABLE(ctype_short
,
11181 VTABLE_ADD_FUNC(ctype_wchar_vector_dtor
)
11182 #if _MSVCP_VER >= 110
11183 VTABLE_ADD_FUNC(locale_facet__Incref
)
11184 VTABLE_ADD_FUNC(locale_facet__Decref
)
11186 VTABLE_ADD_FUNC(ctype_wchar_do_is
)
11187 VTABLE_ADD_FUNC(ctype_wchar_do_is_ch
)
11188 VTABLE_ADD_FUNC(ctype_wchar_do_scan_is
)
11189 VTABLE_ADD_FUNC(ctype_wchar_do_scan_not
)
11190 VTABLE_ADD_FUNC(ctype_wchar_do_tolower
)
11191 VTABLE_ADD_FUNC(ctype_wchar_do_tolower_ch
)
11192 VTABLE_ADD_FUNC(ctype_wchar_do_toupper
)
11193 VTABLE_ADD_FUNC(ctype_wchar_do_toupper_ch
)
11194 VTABLE_ADD_FUNC(ctype_wchar_do_widen
)
11195 VTABLE_ADD_FUNC(ctype_wchar_do_widen_ch
)
11196 #if _MSVCP_VER >= 80 && _MSVCP_VER <= 90
11197 VTABLE_ADD_FUNC(ctype_wchar__Do_widen_s
)
11198 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11199 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11200 VTABLE_ADD_FUNC(ctype_wchar__Do_narrow_s
)
11202 VTABLE_ADD_FUNC(ctype_wchar_do_narrow
)
11203 VTABLE_ADD_FUNC(ctype_wchar_do_narrow_ch
)
11206 __ASM_VTABLE(codecvt_base
,
11207 VTABLE_ADD_FUNC(codecvt_base_vector_dtor
)
11208 #if _MSVCP_VER >= 110
11209 VTABLE_ADD_FUNC(locale_facet__Incref
)
11210 VTABLE_ADD_FUNC(locale_facet__Decref
)
11212 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11213 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11214 VTABLE_ADD_FUNC(codecvt_base_do_encoding
));
11215 __ASM_VTABLE(codecvt_char
,
11216 VTABLE_ADD_FUNC(codecvt_char_vector_dtor
)
11217 #if _MSVCP_VER >= 110
11218 VTABLE_ADD_FUNC(locale_facet__Incref
)
11219 VTABLE_ADD_FUNC(locale_facet__Decref
)
11221 VTABLE_ADD_FUNC(codecvt_base_do_always_noconv
)
11222 VTABLE_ADD_FUNC(codecvt_base_do_max_length
)
11223 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11224 VTABLE_ADD_FUNC(codecvt_char_do_in
)
11225 VTABLE_ADD_FUNC(codecvt_char_do_out
)
11226 VTABLE_ADD_FUNC(codecvt_char_do_unshift
)
11227 VTABLE_ADD_FUNC(codecvt_char_do_length
));
11228 __ASM_VTABLE(codecvt_wchar
,
11229 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11230 #if _MSVCP_VER >= 110
11231 VTABLE_ADD_FUNC(locale_facet__Incref
)
11232 VTABLE_ADD_FUNC(locale_facet__Decref
)
11234 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11235 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11236 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11237 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11238 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11239 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11240 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11241 __ASM_VTABLE(codecvt_short
,
11242 VTABLE_ADD_FUNC(codecvt_wchar_vector_dtor
)
11243 #if _MSVCP_VER >= 110
11244 VTABLE_ADD_FUNC(locale_facet__Incref
)
11245 VTABLE_ADD_FUNC(locale_facet__Decref
)
11247 VTABLE_ADD_FUNC(codecvt_wchar_do_always_noconv
)
11248 VTABLE_ADD_FUNC(codecvt_wchar_do_max_length
)
11249 VTABLE_ADD_FUNC(codecvt_base_do_encoding
)
11250 VTABLE_ADD_FUNC(codecvt_wchar_do_in
)
11251 VTABLE_ADD_FUNC(codecvt_wchar_do_out
)
11252 VTABLE_ADD_FUNC(codecvt_wchar_do_unshift
)
11253 VTABLE_ADD_FUNC(codecvt_wchar_do_length
));
11254 __ASM_VTABLE(numpunct_char
,
11255 VTABLE_ADD_FUNC(numpunct_char_vector_dtor
)
11256 #if _MSVCP_VER >= 110
11257 VTABLE_ADD_FUNC(locale_facet__Incref
)
11258 VTABLE_ADD_FUNC(locale_facet__Decref
)
11260 VTABLE_ADD_FUNC(numpunct_char_do_decimal_point
)
11261 VTABLE_ADD_FUNC(numpunct_char_do_thousands_sep
)
11262 VTABLE_ADD_FUNC(numpunct_char_do_grouping
)
11263 VTABLE_ADD_FUNC(numpunct_char_do_falsename
)
11264 VTABLE_ADD_FUNC(numpunct_char_do_truename
));
11265 __ASM_VTABLE(numpunct_wchar
,
11266 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11267 #if _MSVCP_VER >= 110
11268 VTABLE_ADD_FUNC(locale_facet__Incref
)
11269 VTABLE_ADD_FUNC(locale_facet__Decref
)
11271 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11272 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11273 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11274 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11275 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11276 __ASM_VTABLE(numpunct_short
,
11277 VTABLE_ADD_FUNC(numpunct_wchar_vector_dtor
)
11278 #if _MSVCP_VER >= 110
11279 VTABLE_ADD_FUNC(locale_facet__Incref
)
11280 VTABLE_ADD_FUNC(locale_facet__Decref
)
11282 VTABLE_ADD_FUNC(numpunct_wchar_do_decimal_point
)
11283 VTABLE_ADD_FUNC(numpunct_wchar_do_thousands_sep
)
11284 VTABLE_ADD_FUNC(numpunct_wchar_do_grouping
)
11285 VTABLE_ADD_FUNC(numpunct_wchar_do_falsename
)
11286 VTABLE_ADD_FUNC(numpunct_wchar_do_truename
));
11287 __ASM_VTABLE(num_get_char
,
11288 VTABLE_ADD_FUNC(num_get_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(num_get_char_do_get_void
)
11294 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11295 VTABLE_ADD_FUNC(num_get_char_do_get_double
)
11296 VTABLE_ADD_FUNC(num_get_char_do_get_float
)
11297 VTABLE_ADD_FUNC(num_get_char_do_get_uint64
)
11298 VTABLE_ADD_FUNC(num_get_char_do_get_int64
)
11299 VTABLE_ADD_FUNC(num_get_char_do_get_ulong
)
11300 VTABLE_ADD_FUNC(num_get_char_do_get_long
)
11301 VTABLE_ADD_FUNC(num_get_char_do_get_uint
)
11302 VTABLE_ADD_FUNC(num_get_char_do_get_ushort
)
11303 VTABLE_ADD_FUNC(num_get_char_do_get_bool
));
11304 __ASM_VTABLE(num_get_short
,
11305 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11306 #if _MSVCP_VER >= 110
11307 VTABLE_ADD_FUNC(locale_facet__Incref
)
11308 VTABLE_ADD_FUNC(locale_facet__Decref
)
11310 VTABLE_ADD_FUNC(num_get_short_do_get_void
)
11311 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11312 VTABLE_ADD_FUNC(num_get_short_do_get_double
)
11313 VTABLE_ADD_FUNC(num_get_short_do_get_float
)
11314 VTABLE_ADD_FUNC(num_get_short_do_get_uint64
)
11315 VTABLE_ADD_FUNC(num_get_short_do_get_int64
)
11316 VTABLE_ADD_FUNC(num_get_short_do_get_ulong
)
11317 VTABLE_ADD_FUNC(num_get_short_do_get_long
)
11318 VTABLE_ADD_FUNC(num_get_short_do_get_uint
)
11319 VTABLE_ADD_FUNC(num_get_short_do_get_ushort
)
11320 VTABLE_ADD_FUNC(num_get_short_do_get_bool
));
11321 __ASM_VTABLE(num_get_wchar
,
11322 VTABLE_ADD_FUNC(num_get_wchar_vector_dtor
)
11323 #if _MSVCP_VER >= 110
11324 VTABLE_ADD_FUNC(locale_facet__Incref
)
11325 VTABLE_ADD_FUNC(locale_facet__Decref
)
11327 VTABLE_ADD_FUNC(num_get_wchar_do_get_void
)
11328 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11329 VTABLE_ADD_FUNC(num_get_wchar_do_get_double
)
11330 VTABLE_ADD_FUNC(num_get_wchar_do_get_float
)
11331 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint64
)
11332 VTABLE_ADD_FUNC(num_get_wchar_do_get_int64
)
11333 VTABLE_ADD_FUNC(num_get_wchar_do_get_ulong
)
11334 VTABLE_ADD_FUNC(num_get_wchar_do_get_long
)
11335 VTABLE_ADD_FUNC(num_get_wchar_do_get_uint
)
11336 VTABLE_ADD_FUNC(num_get_wchar_do_get_ushort
)
11337 VTABLE_ADD_FUNC(num_get_wchar_do_get_bool
));
11338 __ASM_VTABLE(num_put_char
,
11339 VTABLE_ADD_FUNC(num_put_char_vector_dtor
)
11340 #if _MSVCP_VER >= 110
11341 VTABLE_ADD_FUNC(locale_facet__Incref
)
11342 VTABLE_ADD_FUNC(locale_facet__Decref
)
11344 VTABLE_ADD_FUNC(num_put_char_do_put_ptr
)
11345 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11346 VTABLE_ADD_FUNC(num_put_char_do_put_double
)
11347 VTABLE_ADD_FUNC(num_put_char_do_put_uint64
)
11348 VTABLE_ADD_FUNC(num_put_char_do_put_int64
)
11349 VTABLE_ADD_FUNC(num_put_char_do_put_ulong
)
11350 VTABLE_ADD_FUNC(num_put_char_do_put_long
)
11351 VTABLE_ADD_FUNC(num_put_char_do_put_bool
));
11352 __ASM_VTABLE(num_put_wchar
,
11353 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11354 #if _MSVCP_VER >= 110
11355 VTABLE_ADD_FUNC(locale_facet__Incref
)
11356 VTABLE_ADD_FUNC(locale_facet__Decref
)
11358 VTABLE_ADD_FUNC(num_put_wchar_do_put_ptr
)
11359 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11360 VTABLE_ADD_FUNC(num_put_wchar_do_put_double
)
11361 VTABLE_ADD_FUNC(num_put_wchar_do_put_uint64
)
11362 VTABLE_ADD_FUNC(num_put_wchar_do_put_int64
)
11363 VTABLE_ADD_FUNC(num_put_wchar_do_put_ulong
)
11364 VTABLE_ADD_FUNC(num_put_wchar_do_put_long
)
11365 VTABLE_ADD_FUNC(num_put_wchar_do_put_bool
));
11366 __ASM_VTABLE(num_put_short
,
11367 VTABLE_ADD_FUNC(num_put_wchar_vector_dtor
)
11368 #if _MSVCP_VER >= 110
11369 VTABLE_ADD_FUNC(locale_facet__Incref
)
11370 VTABLE_ADD_FUNC(locale_facet__Decref
)
11372 VTABLE_ADD_FUNC(num_put_short_do_put_ptr
)
11373 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11374 VTABLE_ADD_FUNC(num_put_short_do_put_double
)
11375 VTABLE_ADD_FUNC(num_put_short_do_put_uint64
)
11376 VTABLE_ADD_FUNC(num_put_short_do_put_int64
)
11377 VTABLE_ADD_FUNC(num_put_short_do_put_ulong
)
11378 VTABLE_ADD_FUNC(num_put_short_do_put_long
)
11379 VTABLE_ADD_FUNC(num_put_short_do_put_bool
));
11380 __ASM_VTABLE(time_put_char
,
11381 VTABLE_ADD_FUNC(time_put_char_vector_dtor
)
11382 #if _MSVCP_VER >= 110
11383 VTABLE_ADD_FUNC(locale_facet__Incref
)
11384 VTABLE_ADD_FUNC(locale_facet__Decref
)
11386 VTABLE_ADD_FUNC(time_put_char_do_put
));
11387 __ASM_VTABLE(time_put_wchar
,
11388 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11389 #if _MSVCP_VER >= 110
11390 VTABLE_ADD_FUNC(locale_facet__Incref
)
11391 VTABLE_ADD_FUNC(locale_facet__Decref
)
11393 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11394 __ASM_VTABLE(time_put_short
,
11395 VTABLE_ADD_FUNC(time_put_wchar_vector_dtor
)
11396 #if _MSVCP_VER >= 110
11397 VTABLE_ADD_FUNC(locale_facet__Incref
)
11398 VTABLE_ADD_FUNC(locale_facet__Decref
)
11400 VTABLE_ADD_FUNC(time_put_wchar_do_put
));
11401 __ASM_VTABLE(time_get_char
,
11402 VTABLE_ADD_FUNC(time_get_char_vector_dtor
)
11403 #if _MSVCP_VER >= 110
11404 VTABLE_ADD_FUNC(locale_facet__Incref
)
11405 VTABLE_ADD_FUNC(locale_facet__Decref
)
11407 VTABLE_ADD_FUNC(time_get_char_do_date_order
)
11408 VTABLE_ADD_FUNC(time_get_char_do_get_time
)
11409 VTABLE_ADD_FUNC(time_get_char_do_get_date
)
11410 VTABLE_ADD_FUNC(time_get_char_do_get_weekday
)
11411 VTABLE_ADD_FUNC(time_get_char_do_get_monthname
)
11412 VTABLE_ADD_FUNC(time_get_char_do_get_year
));
11417 void init_locale(void *base
)
11420 init_locale_facet_rtti(base
);
11421 init_collate_char_rtti(base
);
11422 init_collate_wchar_rtti(base
);
11423 init_collate_short_rtti(base
);
11424 init_ctype_base_rtti(base
);
11425 init_ctype_char_rtti(base
);
11426 init_ctype_wchar_rtti(base
);
11427 init_ctype_short_rtti(base
);
11428 init_codecvt_base_rtti(base
);
11429 init_codecvt_char_rtti(base
);
11430 init_codecvt_wchar_rtti(base
);
11431 init_codecvt_short_rtti(base
);
11432 init_numpunct_char_rtti(base
);
11433 init_numpunct_wchar_rtti(base
);
11434 init_numpunct_short_rtti(base
);
11435 init_num_get_char_rtti(base
);
11436 init_num_get_wchar_rtti(base
);
11437 init_num_get_short_rtti(base
);
11438 init_num_put_char_rtti(base
);
11439 init_num_put_wchar_rtti(base
);
11440 init_num_put_short_rtti(base
);
11441 init_time_put_char_rtti(base
);
11442 init_time_put_wchar_rtti(base
);
11443 init_time_put_short_rtti(base
);
11444 init_time_base_rtti(base
);
11445 init_time_get_char_rtti(base
);
11449 void free_locale(void)
11451 facets_elem
*iter
, *safe
;
11453 if(global_locale
) {
11454 locale_dtor(&classic_locale
);
11455 locale__Locimp_dtor(global_locale
);
11456 MSVCRT_operator_delete(global_locale
);
11459 LIST_FOR_EACH_ENTRY_SAFE(iter
, safe
, &lazy_facets
, facets_elem
, entry
) {
11460 list_remove(&iter
->entry
);
11461 if(call_locale_facet__Decref(iter
->fac
))
11462 call_locale_facet_vector_dtor(iter
->fac
, 1);
11463 MSVCRT_operator_delete(iter
);